Some iPhones never die: they go to a four-story electronics mall in Shenzen, where stacks of them are sold every day.

The Chinese city is known for its giant factories that pump out millions of shiny new Apple devices. But across town at this wholesale market the gadgets are decidedly worse for wear. It’s one part of China’s huge grey market, and it helps cater to the millions of people in this country who want an iPhone but can’t afford a new one.

“You have to be careful what you buy, because you can’t return it,” cautioned a Chinese merchant surnamed Yuan, who walked through the mall Tuesday looking for a deal on the white iPhone 4S. He’s among the hundreds of buyers who come here to purchase old phones, refurbish them and then sell them to Chinese consumers.

Many of the phones have cracked screens or scratched casings, but the mall—one of several in the area—has plenty of services to fix them up. There are dozens of stalls that specialize in iPhone repair, while others sell re-polished screens and casings. Some even sell iPhone packaging, including boxes, headphones and power adapters.

Many Chinese still earn low wages, especially those living further inland, so older models like the iPhone 4 are popular. Yuan says he can make about $100 a day selling phones he’s refurbished at his nearby shop.

“I mainly just improve the casings,” he said.

One dealer here, surnamed Lu, said she sells refurbished iPhone 4s in bulk for 1000 yuan each, or around $160. Another sells re-polished displays for the iPhone 5 for 170 yuan ($28).

The whole building is teeming with iPhones. They’re stacked in piles a dozen high, some wrapped in plastic, others held together by rubber bands. Just about every model is here, and they’ve arrive from places as far afield as the U.S., Japan, and Korea.

Dealers here declined to say where they get their old phones, but an electronics seller in neighboring Hong Kong said he buys used iPhones from the locals and sells them to shops in Shenzhen.

Some may also come from companies in the U.S. that specialize in buying old electronics. One such online business, Gazelle, said it has bought $180 million worth of used consumer gadgets, including iPhones.

The company sells about 70 percent of the devices it buys through wholesale buyers, and about half of its pre-owned iPhones are resold to emerging markets.

“Apple is an aspirational brand across the globe, and consumer demand for Apple products is extremely high in all markets,” Gazelle said in an email.

Reselling iPhones can be a lucrative business. The Shenzen mall, called Open World Communication City, is based in the Huaqiangbei district, which attracts buyers from around the world who come here to shop for cheap devices and components.

But some of the business is shady. Earlier this year, a person who claimed to have worked at the mall posted pictures online showing how dealers can refurbish an iPhone 5 to make it look like an 5s.

Outside the mall on Monday, people crowded around a letter posted on a door which claimed that authorities were about to crack down on the “illegal” activities inside. The letter was supposedly written by an unnamed law enforcement official, who demanded that businesses wire 750,000 yuan to his bank account to avoid prosecution.

Yuan noted that the business conducted at the Shenzhen malls happens in the open, and stall owners pay the building managers as much as 10,000 yuan each month to operate there.

Still, the dealers tend to keep to themselves, and individual retail customers aren’t especially welcome. “Unless you know the trade, people here won’t really care to talk to you,” he said.