Shenzhen, China At the Huaqiangbei Market in Shenzhen, you can build a smartphone from scratch in a couple of hours.

Spread over several floors and covering hundreds of thousands of square feet, the market is home to vendors selling the parts that make up your standard phone — cameras, motherboards, frames, screens and so on. All you have to do is buy the right bits and know how to put them all together.

And it's not just smartphones. You can find the parts here for almost any consumer electronics device you can think of, like portable power banks and drones.

To be sure, there is copycatting going on here. The designs of Apple ( AAPL ) or Samsungdevices are regularly ripped off.Intellectual property rights, one of the US government's biggest bugbears with China , are nonexistent. But there's invention at work, too. Some people are trying to use the parts to come up with new and improved versions of existing gadgets.

The whirling, chaotic market highlights how innovation sometimes works in China. Experts say viewing the country as just a vast manufacturing base for products designed by foreign companies is outdated and misguided.

"There's a ton of innovations at a huge scale that are happening in China," said Christian Grewell, a business professor at NYU Shanghai. "They are just happening very, very quickly and without the knowledge of the rest of us."

Hardware hacker Andrew "Bunnie" Huang shows how to build a smartphone with parts bought at the market.

Hardware hub

Once a tiny fishing village in the shadow of nearby Hong Kong, Shenzhen is now a glittering metropolis of more than 12 million people.

Along with other cities spread across Southern China's Pearl River Delta, it rose to prominence in the 80s and 90s as the world's factory floor, pumping out boatloads of industrial and consumer products. But today it's also widely known as China's answer to Silicon Valley, the home of tech giants like Tencent and Huawei.

Shenzhen has become a magnet for ambitious young entrepreneurs seeking to take advantage of the city's position at the heart of global tech supply chains. It has produced startups like DJI, the world's top maker of non-military drones

"If you have an idea, you can quickly evaluate this idea and find factories to manufacture the product for you," said Jasen Wang, CEO of tech education startup Makeblock.

The company produces kits that kids can use to build things like race cars and walking robots — and then program them. Makeblock's products and software are designed to teach children the language of computer programming in a fun way.

A robot built by Makeblock. The tech education startup makes computer programming kits for children.

Shenzhen provides a ready supply of the hardware needed by his company, which was valued around $350 million in its last fundraising round. And it also has the human talent.

"There are so many big companies here, it's very easy to find hardware development engineers," Wang said. "You don't have that kind of advantage in Beijing or Shanghai."

Moving fast

Shenzhen also gets things done quickly.

"If you really want to develop products in a fast pace, I think you have to be in China — and practically have to be in Shenzhen," said Steven Yang, CEO of battery technology company Anker Innovations. "Anything you have to do in days or weeks elsewhere can be done in hours here."

Yang, a 36-year-old former Google ( GOOGL ) employee, has built Anker into one of the top makers of portable power banks for smartphones and other devices. It generated revenue of well of over $500 million last year, and its products sell on Amazon ( AMZN ) and at Walmart ( WMT ).

JUST WATCHED Inside China's biggest gadget market Replay More Videos ... MUST WATCH Inside China's biggest gadget market 02:46

Ten years ago, Shenzhen was 90% about copycatting and 10% innovation, according to Yang. Now, it's 70% innovation and 30% copycatting, he suggests.

Foreign businesses agree that Chinese companies are upping their game.

In an annual survey by the European Union Chamber of Commerce in China, this was the first year that a majority of respondents said they view Chinese companies as "equally or more innovative than European firms."

Counterfeiting still rife

While genuine innovation is happening in Shenzhen, so are trademark infringement and intellectual property theft. The counterfeiting industry is still massive, with fake iPhones and Nike ( NKE ) sneakers prominently on sale.

Anker suffered from knockoffs in its early days, but authorities are gradually taking a tougher line on copycats, according to Yang.

"I think it's getting better year over year," he said.

Experts say the Chinese government needs to do more if it wants to become a global tech powerhouse.

"China does want to see a few of their local firms take on world markets. And they are making lot of bets in various places" such as electric vehicles and artificial intelligence, NYU Shanghai's Grewell said.

"For China to go send its innovations overseas," he added, "I think it's got to fully join the international community in protecting some of that intellectual property."