The FBI wanted Michael Cohen's cellphones, but knew they couldn't be found at his home. The problem: Cohen and his family had moved into a hotel while renovating their apartment.

The solution, on April 8, 2018, was to use a controversial surveillance technology to determine his exact location: Room 1728 at the Loews Regency Hotel.

An FBI special agent wrote in an affidavit unsealed Tuesday that federal agents "sought and obtained authority to employ an electronic technique, commonly known as 'triggerfish,' to determine the locations" of Cohen's two iPhones.

Get Breaking News Delivered to Your Inbox

Federal agents later obtained a warrant to retrieve the phones from the room. A court-ordered Special Master later determined that federal agents could review the vast majority of nearly 300,000 files on the two phones, as well as an iPad obtained in the search.

Triggerfish devices — often referred to as Stingrays — mimic cellphone towers, allowing them to pinpoint a phone's location, sometimes even before it makes a call or text.

It is not clear exactly what information other than location that law enforcement gleaned from its use of a Stingray targeting Cohen. The devices also capable of collecting the calls, text messages and even the emails sent to and from phones.

And because they act as cell towers, they don't just collect information from the targets of investigations. Stingrays are capable of taking in information from entire neighborhoods, which is why civil liberties groups have for years objected to their use.

The devices are made by defense contractor Harris Corporation, and its patents indicate Stingrays and similar devices have been used for about two decades, though law enforcement rarely acknowledges their use.

The government has even withdrawn charges against criminal defendants rather than turning over information to defense teams about the Stingray, according to a 2017 policy analysis by the Cato Institute, a libertarian think tank.

As a result, it's not clear just how widespread use of the devices is. In a November 2018 report, the ACLU cataloged Stingray use by 75 agencies in 27 states and the District of Columbia, but that list is almost certainly incomplete. The ACLU found 14 federal agencies that use the devices, but does not currently include one identified by CBS News: the U.S. Fish and Wildlife Service.

In response to a 2016 Freedom of Information Act request filed by CBS News, the agency wrote it could not "disclose techniques and procedures for law enforcement investigation and prosecutions."