“Let me begin with the obvious: e-mobility has won the race,” Herbert Diess, chief executive officer of Volkswagen AG, said on Monday. “It is the only solution to reduce mobility emissions fast.”

Diess was speaking at an event VW dubbed “Power Day,” where the company laid out its big plans for beating Tesla Inc. and becoming the world’s largest maker of electric vehicles. Instead of talking about cars, design, or other customer-facing features, however, most of the splashy event was spent on a boring-looking thing that goes inside EVs: the lithium-ion battery.

That’s because batteries make up more than 30% of an electric car’s cost. And with every automaker looking to pivot to EVs, it’s not just about getting batteries at the cheapest price possible but securing enough supply to meet those ambitions.

The pivot won’t be cheap. VW announced it plans to build six battery factories across Europe by 2030, which BloombergNEF estimates would cost about $29 billion. It is also making investments in unifying the design of its battery and in recycling precious metals.

And yet, the world’s largest automaker is going to find it hard to beat Elon Musk. “Tesla will likely maintain its broad EV leadership,” Ben Kallo, an analyst at Robert W. Baird, wrote in a report. He walked away from VW’s hours-long presentation still viewing the Model 3 maker as having the upper hand with regard to batteries.

Venkat Viswanathan, an associate professor at Carnegie Mellon University and an electric-vehicle expert, also thinks Tesla’s drivetrains comprising both batteries and electric motors are four or five years ahead of the competition. They offer “the highest driving range for the same battery capacity,” he said.

Baird’s Kallo gives VW’s ambitions high marks—he’s just not convinced Musk will cede pole position. “We view Volkswagen as a potential leader in the ‘non-Tesla’ portion of the EV market,” Kallo wrote. “A non-Tesla EV ecosystem will emerge, similar to the non-Apple ecosystem in smartphones (i.e., Android).”

Apple Inc. built an ecosystem that integrates hardware innovations such as processing chips and camera sensors with software lock-ins like the iOS operating system and the App Store. It may have annoyed many users, but Apple has stuck with its proprietary lightning charging cable.

Tesla has done something very similar with EVs by developing its own battery chemistry, electric motors and driver-assistance system. It has also built a supercharging network other cars can’t use (at least not yet).

Google’s Android operating system and Samsung Electronics Co. managed to carve out a significant share of the global smartphone market, but Apple became the world’s most valuable company by building a dominant brand and ecosystem for which consumers are willing to pay much more.

The conclusion Baird’s Kallo reached Monday is similar to one UBS AG analyst Patrick Hummel came to after his team completed a teardown of VW’s ID.3. “VW might not be the Apple, but the Samsung of the EV world,” he said earlier this month.

Just like Samsung has an edge over Apple with its superior smartphone display, there is one area where VW may be ahead of Tesla. The German automaker has placed a big bet on next-generation lithium-ion batteries.

In 2012, VW invested in Silicon Valley startup QuantumScape Corp., which was building solid-state batteries that promised to increase driving range by as much as 50% and reduce charging times to 15 minutes. Though QuantumScape’s battery won’t be in a car before 2025, the company’s market value stands at about $23 billion—roughly a sixth of VW’s valuation.

While Tesla has many battery innovations under its belt, from novel chemistry to more efficient production methods, it has not said anything about developing solid-state batteries.