Cheung, who was arrested last week on a suspicion of "conspiring and abetting murder," subscribes to the "Dadfindboy" channel, although he denied being among its founders as police have said and he condemned posts calling for violence. He believes he was targeted by police because he developed a tool that could compare images against a set of photos of officers to find matches — a project he later abandoned. "I don't want them to be like secret police," said Cheung, who was released on bail and has not been charged with wrongdoing. "If law enforcement officers don't wear anything to show their identity, they'll become corrupt. They'll be able to do whatever they want." "With the tool, ordinary citizens can tell who the police are," he added. A demonstrator walks over a photo of Junius Kwan-yiu Ho, a Hong Kong legislator, during a protest in the Yuen Long district. Credit:Bloomberg Hong Kong is at the bleeding edge of a significant change in the authorities' ability to track dangerous criminals and legitimate political protesters alike — and in their targets' ability to fight back. Across the border in China, police often catch people with digital fingerprints gleaned using one of the world's most invasive surveillance systems. The advent of facial-recognition technology and the rapid expansion of a vast network of cameras and other tracking tools has begun to increase those capabilities substantially.

The transformation strikes a strong chord in Hong Kong. The protests began over a proposed bill that would have allowed the city to extradite criminal suspects to mainland China, where the police and courts ultimately answer to the Communist Party. Authorities in Hong Kong have outlined strict privacy controls for the use of facial recognition and the collection of other biometric data, although the extent of their efforts is unclear. They also appear to be using other technological methods for tracking protesters. Last month, police arrested a 22-year old man suspected of being the administrator of a Telegram group. Loading Protesters are responding. On Sunday, as another demonstration turned into a violent confrontation with police, some of those involved shined laser pointers at police cameras and used spray paint to block the lenses of surveillance cameras in front of the Chinese government's liaison office. Riot officers carried cameras on poles just behind the front lines as they fired tear gas and rubber bullets. The protesters' ire intensified after the police removed identification numbers from their uniforms, presumably to keep violent misconduct from being reported to city leaders. To some protesters, the move suggested the police were taking a cue from the mainland, where officers lack public accountability and often do not identify themselves.

"Why do the police get away while we're getting attacked?" said Billy Tsui, a hairdresser. "If they do something wrong, they should face legal consequences." He said that he favoured peace over violence but that he also had some sympathy for the Telegram group exposing officers as a check on police misconduct. "The original intention is just to identify who are the policemen," Tsui, 21, said. "If they hide their numbers and don't show their identity, this is the only way to know." Riot police stand around demonstrators lying on the ground during a protest in the Yuen Long district of the New Territories in Hong Kong on Saturday. Credit:Bloomberg Hong Kong police representatives have said personal information about officers and their friends and relatives had been posted online in an act known as 'doxxing'. On July 3, police said they had arrested eight people accused of, among other things, disclosing personal information without approval. A police spokesman said members of the police force had reported more than 800 incidents in which officers or their family members had been harassed following the data releases. "Dadfindboy"— a play on the name of a Facebook group created under the auspices of helping mothers find their children, but which ultimately became a way for pro-government groups to gather photos of protesters — is one forum for the doxxing of police officers. By turns facetious, juvenile, cruel and profane in tone, the channel repeatedly reveals personal information and photos, some of them intimate, of the family members of police officers, sometimes with intimate social-media photos.

The channel has featured calls for violence, often in cartoonish ways, although there is no proof that it has incited any specific acts. One post instructed protesters on how to master using a slingshot. Another explained how to make a blow torch using aerosol deodorant. A recent poll queried the channel's followers about how best to deal with the police. Options included prison, gas chamber, live burial, guillotine, and machine-gun execution. Live burial prevailed with about one-third of the vote. The police grabbed Cheung 11 days after the Telegram channel was created, accusing him of administering it. They also accused him of posting a guide on how to assassinate police officers. Cheung denies the allegations, and a New York Times search could not find posts matching what the police described. A protester uses spray paint to cover the lens of a security camera after demonstrators breached the doors of the Legislative Council in Hong Kong on July 1. A quest to identify protesters and police officers has people in both groups desperate to protect their anonymity. Credit:The New York Times Cheung, a skinny 29-year-old, was grabbed at a mall around noon July 18, according to his account. Four plainclothes officers waited for him to unlock his phone and then jumped on him, trying to pry it out of his hands. After the officers tried to use his face to unlock the phone, they took him to a police station, where, he said, he was roughed up and interrogated. Later, officers went to his home and used a USB drive loaded with hacking software to break into his computers, according to his account of the incident. He said that he had been held for more than 10 hours and that he was not sure how the police had identified him.

Hong Kong police confirmed the investigation, but they declined to comment further on it. The police may have been motivated by the facial-recognition tool, which Cheung said he had showed off in a Facebook video he posted last month. Making use of Google technology, Cheung, a college dropout who studied computer science, built an algorithm to identify police officers based on a small collection of photos that had been posted online. He said he did not continue to pursue the project because of a lack of time. Men armed with sticks and poles outside a train station in Yuen Long, a Hong Kong border town, July 21. Credit:Lam Yik Fei/The New York Times Cheung said his detention had cemented his fears. He said the plainclothes officers who arrested him did not identify themselves until they reached the police station. Later, an investigator in a suit urged him to open his phone as a way of demonstrating his innocence "to the 42nd floor"— a phrase Cheung said seemed to refer to high-ranking police officials. He did not believe that the police ultimately gained access to the phone, although they did break into his other devices. The police also did not initially allow him to make a call. Only when he said he planned to play Ping-Pong with his uncle did they relent and let him. He said he contacted a friend instead, adding "I hate sports."