kaputnikGo / PilferShushJammer

Light Android AOSP application to test microphone jamming techniques to combat Cross-Device Tracking (XDT)
219 stars 25 forks source link

cpu doesn't go in deep sleep mode #12

Closed 35609902357 closed 4 years ago

35609902357 commented 5 years ago

When the jammer is active, the cpu doesn't go into deep sleep and the battery gets drained

kaputnikGo commented 5 years ago

Correct, thats the background service part of the OS running.

35609902357 commented 5 years ago

This means the jammer can't be on all the time, defeating its purpose

kaputnikGo commented 5 years ago

When the passive jammer is on it does no work for the cpu. the only cpu use is from the system background service and this implementation is dependent on the OS version and build. below is an image of the nominal profile showing the jammer using a background service for 1 day 19 hours, the percentage used is comparable to the basic OS use.

Battery_usage_test

35609902357 commented 5 years ago

It is a lot, especially for older devices. If you check with an app like CPU Spy you will notice the phone never sleeps, even with battery optimization enabled. So is there no way to keep the jammer on while allowing deep sleep?

kaputnikGo commented 5 years ago

To keep a running jammer hold on the microphone then a background service needs to run. If the phone went into deep sleep then that would mean there are no background services running. It is a problem and i have tried to keep all the cpu use to the barest minimum but as far as I know there arent any alternative methods on android.

If you are legitimately concerned about an app recording via the microphone then you could minimise the running time of the jammer to when you are using the phone and/or when a good quality audio recording is possible, ie not when your phone is in a pocket or a bag.

Research into this area has shown most record audio apps will tend to do so only when the screen is on as it means the phone is probably being used. Also this means that any activity by these apps can be covered by whatever the user is doing at the time. Some other apps just periodically wake up a record audio function, analyse and measure the quality of recording to determine if it is a suitable level and clarity and proceed from there or go back to sleep for some time.

Also this site https://reports.exodus-privacy.eu.org/en/ may help you determine a good course of action.

35609902357 commented 5 years ago

Thanks for your explanation. Do you think a toggle named "Battery saving" could be implemented? Its function, when enabled, would be to suspend the jamming when the phone is idle with the screen off, and resume it when the phone is awaken. When disabled it would behave as it does currently, preventing the cpu to go in deep sleep. Would it be feasible?