guardianproject / haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
https://guardianproject.github.io/haven/
GNU General Public License v3.0
6.62k stars 728 forks source link

False USB power alert (probably not a bug but a minor feature request for detailed logs) #325

Open ghost opened 6 years ago

ghost commented 6 years ago

My logs:

USB Power
Sun Aug 12 02:32:29 2018
USB Power
Sun Aug 12 02:32:30 2018

The device theoretically had continuous power as it was on the charger all night. I don't suppose this is a Haven bug.. Haven is probably just relying on the kernel for this info.

feature request Let's assume this was due to dirty A/C power running through the cheap USB power adapter that my phone tells me not to use. It would perhaps be useful if the log were to say "USB Power lost" and "USB Power gained". Otherwise, I don't know if the above logs indicate that power was lost twice, or if it was lost then gained, b/c it's unclear if gaining power is logged.

add sensitivity setting? Perhaps over-engineering, but might it be useful to say if USB power has a 1 second loss it shouldn't be logged? On the one hand, USB alerts are extremely alarming, because when a user gets a USB alert they would naturally be almost certain that someone is removing their device. OTOH, a sophisticated adversary would plug it immediately into an external battery if such a tolerance were introduced.

support question Hope no one minds me asking, but are false USB power alerts frequent enough to justify putting an external USB battery between the phone and the charger, so the device is always getting clean power? (Note that I would embed the battery in the wall to mitigate an adversary keeping the battery attached to the device.)

deviantollam commented 6 years ago

i'd like to add to this kind of code request that it could be very useful for users to be allowed to configure a setting that can enable notification alerts for Power Lost / Power Gained.

if i left this monitoring remotely i'd really want to know if power state was changing in my hotel room, etc. could be a sign of someone flipping a wall switch on and off or could be simply a sign that there's a problem of some other kind. definitely would interest me. (as long as there wasn't too much noise introduced by the problem of too much sensitivity as libBletchley surmised with their power cable, etc.