I’d love to know how this would work from a technical perspective, say on an iPhone. I can’t imagine apple implementing that sort of functionality for them
None of that matters apple can override any of that. The only think you can do to prevent it is not have it on you or pull the battery or put it in a faraday cage
The ANT catalog[a] (or TAO catalog) is a classified product catalog by the U.S. National Security Agency (NSA) of which the version written in 2008–2009 was published by German news magazine Der Spiegel in December 2013. Forty-nine catalog pages[b] with pictures, diagrams and descriptions of espionage devices and spying software were published. The items are available to the Tailored Access Operations unit and are mostly targeted at products from US companies such as Apple, Cisco and Dell.
"A software implant for the Apple iPhone that utilizes modular mission applications to provide specific SIGINT functionality. This functionality includes the ability to remotely push/pull files from the device. SMS retrieval, contact list retrieval, voicemail, geolocation, hot mic, camera capture, cell tower location, etc. Command, control and data exfiltration can occur over SMS messaging or a GPRS data connection. All communications with the implant will be covert and encrypted."
Technically it is easy since they write the OS from the ground up. I wrote such a module myself as part of a low level coding class for my class project (in Linux ) and I’m not even that great at this stuff. They are pros. They have no limits to what data they can collect from your phone. The only impediment is bad publicity, but have a government demand it is great cover for implementing it.