kaputnikGo / PilferShushJammer

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

Is the app obsolete for Android ≥ 13? #58

Open Drugoy opened 5 months ago

Drugoy commented 5 months ago

Currently the project's description mentions this:

Note: Android 12 (API 31) has new concurrent audio capture policy

https://source.android.com/docs/compatibility/14/android-14-cdd (for modern Android) mentions this:

If device implementations declare android.hardware.microphone, they MUST implement concurrent capture as described in this document. Specifically: [C-1-1] MUST allow concurrent access to microphone by an accessibility service capturing with AudioSource.VOICE_RECOGNITION and at least one application capturing with any AudioSource. [C-1-2] MUST allow concurrent access to microphone by a pre-installed application that holds an Assistant role and at least one application capturing with any AudioSource except for AudioSource.VOICE_COMMUNICATION or AudioSource.CAMCORDER. [C-1-3] MUST silence the audio capture for any other application, except for an accessibility service, while an application is capturing with AudioSource.VOICE_COMMUNICATION or AudioSource.CAMCORDER. However, when an app is capturing via AudioSource.VOICE_COMMUNICATION then another app can capture the voice call if it is a privileged (pre-installed) app with permission CAPTURE_AUDIO_OUTPUT. [C-1-4] If two or more applications are capturing concurrently and if neither app has an UI on top, the one that started capture the most recently receives audio.

I interpret the above document as "there can't be an app with a monopolistic mic access", which, AFAIU, makes this app obsolete for devices running on latest versions of Android.

Is that so?

kaputnikGo commented 3 months ago

yes that is the question and has stalled development on this app. The method this app uses to block mic access is to take advantage of the < 12 adherence to only a single user app being allowed access to the mic at a single time (probably due to technical but also legal wire tapping reasons). this has steadily eroded as more system updates made concurrent access the default, starting with voice assistants/recognition being able to listen in. There are ways of mitigating this, the Pilfershush app has a Omnibox/Assistant jammer function which is enabled via the settings, this spoofs the voice_recognition access and theoretically blocks other voice assistants from listening in.

Later android updates have added concurrent access which means that a lower priority audio app will get zero'd audio data (silence). this is vendor specific too. I think there is meant to be a flag that informs the losing app that it is now receiving zero'd audio but last time i looked it wasn't a requirement. So user information is limited.

Conversely the latter Android APIs are much better at informing the user when the mic is being used, reducing unused apps permissions and generally allowing more control. So for me the problem has moved from user apps to system apps, ie google. but as i use AOSP (Lineage) and FDroid that isnt really something that concerns me.

But I think that this app still functions as intended and can protect from user apps. But you should check the apps you have and the permissions they have.

willywonka-aaa commented 2 months ago

Well I have Android 14, on a Motorola Edge 40 device and works well, in clear passive mode. It is disconnected in the calls by WhatsApp without problems.

The bad thing is that the notification closes well easy, being activated the passive mode and one does not know if it continues to work, The application must be opened to verify.

kaputnikGo commented 2 months ago

thats good to know. and all behaviours are, as always, controlled by the particular OSM version of Android.