I originally posted this idea on Reddit.
Magnetism Feature Idea
I had a feature idea which could improve the device physical security, but requires some code to work most effectively. It essentially detects when a phone is being tampered with physically, which would typically require the removal of a case, even partially.
Essentially leveraging the new Pixelsnap accessories.
Idea is that you get your Pixel a Pixelsnap case (which is magnetic).
Modern Pixels have a magnetic sensor that detects the strength of a magnetic field. It uses DC currents. This means that it is immune to changes in the magnetic field when AC magnetic fields are introduced, for example when charging, airport security etc.
Applying a Pixelsnap case generally gives a consistent sensor reading of 1500uT.
Removing it and placing right next to the phone drops dramatically to 150uT.
Moving the case further away, it drops to 50uT or below.
Experimenting with this using Tasker on a non-GrapheneOS Pixel, I created this chain of events:
When magnetic value drops below tolerance, even briefly:-
Immediately Lock the device
Sound a loud alarm (optional) - I'd quite like a Self Destruct countdown timer message to really make them panic and potentially toss the device thinking it's been booby trapped.
Start a countdown (60 seconds)
Factory Reset/Wipe the device.
It can be stopped within 60 seconds by unlocking the device and cancelling the task, e.g. for an accidental activation.
The issue is that on GrapheneOS, I would have to give Tasker quite extensive and intrusive permissions because of the factory reset action, so would need the Graphene team to actually bake this into the OS for most security.
Obviously this would benefit both thefts/robberies and malicious third parties inspecting a device.
Would appreciate any feedback or thoughts on this by the community! Am I on to something here, even if it could do with a bit more refinement?