Filip Liu, a 31-year-old software developer from Beijing, was traveling in the far western Chinese region of Xinjiang when he was pulled to one side by police as he got off a bus.
The officers took Liu's iPhone, hooked it up to a handheld device that looked like a laptop and told him they were "checking his phone for illegal information".
Liu's experience in Urumqi, the Xinjiang capital, is not uncommon in a region that has been wracked by separatist violence and a crackdown by security forces.
But such surveillance technologies, tested out in the laboratory of Xinjiang, are now quietly spreading across China.
Government procurement documents collected by Reuters and rare insights from officials show the technology Liu encountered in Xinjiang is encroaching into cities like Shanghai and Beijing.
Police stations in almost every province have sought to buy the data-extraction devices for smartphones since the beginning of 2016, coinciding with a sharp rise in spending on internal security and a crackdown on dissent, the data show.
The documents provide a rare glimpse into the numbers behind China's push to arm security forces with high-tech monitoring tools as the government clamps down on dissent.