Closed Mino260806 closed 2 weeks ago
If you were to rewrite this as an LSPosed module, you'd have to hook into some system app that has the CONTROL_INCALL_EXPERIENCE
and CAPTURE_AUDIO_OUTPUT
permissions. These are the only things that require system app permissions. Root permissions are not used during runtime.
CONTROL_INCALL_EXPERIENCE
is implicitly used by Android to invoke BCR's RecorderInCallService
. InCallService
is the API that smartwatch apps, Android Auto, etc. detect phone calls, but the permission allows it to work without an associated companion device.
CAPTURE_AUDIO_OUTPUT
is used by the normal AudioRecord
API to allow access to the VOICE_CALL
audio source. This is used in RecorderThread
.
If your only goal is to avoid bootloops, I'd recommend just deleting service.sh
and post-fs-data.sh
hooks from BCR's module. They're used for 2 reasons:
post-fs-data.sh
will clear Android's package manager cache entry for BCR to prevent certain crashes. This is not needed for most devices.service.sh
allows BCR to prompt for the READ_CALL_LOG
permission (which apps aren't allowed to even ask for by default on Android). If you have no use for this functionality, this script isn't needed either.Without those, the only thing left in the module is mounting BCR's /system/priv-app/
and /system/etc/
files, which have an extremely low chance of causing a bootloop.
I am always cautious with installing magisk modules because they may bootloop the phone and are very hard to debug.
So I prefer doing it with LSPosed because everything is possible with it.
I don't know if we can make the existing BCR app compatible with LSPosed too, so can you answer these few questions for me :
By hooking a system app like Calling App, we can make use of each privileges without having to make BCR a system app.
If you think it's better we made a seperate apk for BCR LSPosed module, can you still tell me where the call interception occurs exactly and what code parts I can reuse (example encoding and saving audio etc) ?