chenxiaolong / BCR

A Basic Call Recorder for rooted Android devices
GNU General Public License v3.0
1.5k stars 98 forks source link

Allow to disable recording notifications #464

Open Serega007RU opened 7 months ago

Serega007RU commented 7 months ago

Hello! I would like to ask you to add the ability to disable notifications that the recording has been successfully completed (Success alerts) and possibly other notifications. I tried to do this through the Android settings, but unfortunately it can't be done there, the switch is simply inactive and does not work.

Screenshot_20231128-012932_Phone

Screenshot_20231128-012951_Settings

Screenshot_20231128-013007_Settings

chenxiaolong commented 7 months ago

I tried to do this through the Android settings, but unfortunately it can't be done there, the switch is simply inactive and does not work.

Shoot, that's very likely a dumb restriction done by the ROM you're running. AOSP and less customized ROMs (like Google Pixel stock OS) don't have the ability to block settings like this.

Can you post a link to the ROM you're running? I can try to take a look and see if it's possible to work around the issue.

Serega007RU commented 7 months ago

well, before you answered, I tried to roll back the BCR to an older version, but I couldn't do it, Magisk wrote the old version, but the apk was a new version. Later I did a factory reset and installed BCR version 1.33 and lo and behold, the switches in the notification settings became all available. Later I upgraded to version 1.56 and the switches are still available.

I do not know what affected the solution of this problem, resetting to factory settings or installing the old version, but the problem was solved.

The ROM I used: https://xdaforums.com/t/rom-unofficial-11-lineageos-18-1-for-xiaomi-redmi-note-5-pro-whyred-2023-11-25.4534005/

chenxiaolong commented 7 months ago

Thanks for reporting back. I didn't see anything in the LineageOS ROM that immediately jumped out as being problematic. Not sure why the factory reset or downgrade made a difference, but glad it did.

Magisk wrote the old version, but the apk was a new version.

In case you run into this problem when downgrading in the future, you can work around this by removing the BCR module, rebooting, running adb shell pm uninstall com.chiller3.bcr, and then reinstalling BCR. (Though if you happen to use work profiles, there may be further steps needed.)

Serega007RU commented 7 months ago

@chenxiaolong And so, I still decided to get to the bottom of it and try to understand what the problem is. I reinstalled BCR and as a result, notifications became unavailable for disabling again. That is, the solution to this problem was affected by the installation of the old version. By going through these versions, I picked up the version from which notifications become unavailable for disabling. This is version 1.42. That is, if I install version 1.41, I can disable notifications. If I install 1.42 (note, I don't upgrade to version 1.42, I delete version 1.41 and then install 1.42, that is, reinstall), then I can't disable notifications.

chenxiaolong commented 7 months ago

Thanks for trying that. If I had to guess, I suspect #323 might be the cause.

Can you try the uninstall/install again for the latest version, but use a root file manager to delete /data/adb/modules/com.chiller3.bcr/post-fs-data.sh before rebooting after installing the module?

EDIT: Before you try this ^^, while the settings are still blocked, can you run this adb command and upload dump.txt?

adb shell pm dump com.chiller3.bcr > dump.txt
Serega007RU commented 7 months ago

dump.txt

about post-fs-data.sh there is no such file, it appears to me only after a reboot this is what this folder looks like there after installing the module without rebooting Screenshot_20231128-164750_Root_Explorer

chenxiaolong commented 7 months ago

about post-fs-data.sh there is no such file, it appears to me only after a reboot this is what this folder looks like there after installing the module without rebooting

Sorry, my mistake. The correct path before reboot is in modules_update instead of modules: /data/adb/modules_update/com.chiller3.bcr/post-fs-data.sh

Serega007RU commented 7 months ago

removal post-fs-data.sh it didn't help, disabling notifications is still blocked

chenxiaolong commented 7 months ago

Hmm, if that's not the issue, then I'm not really sure what it would be. If you don't mind doing more testing, I can create some BCR builds after work today for every change between versions 1.41 and 1.42 to see if we can pin down which exact change caused things to break.

chenxiaolong commented 7 months ago

In case you would like to test, these builds include the changes from 1.41 to 1.42 (one change at a time):

Serega007RU commented 7 months ago

The problem occurs precisely on version 9a29970 (there is no problem on 6cac67e) I'm looking at 9a29970 related to post-fs-data.sh, I tried to delete it again before rebooting, but it didn't help again

chenxiaolong commented 7 months ago

Thanks for testing! Just in case it makes a difference, can you try deleting post-fs-data.sh from the zip before flashing it? (Might need to extract the zip and recompress it)

Serega007RU commented 7 months ago

it didn't help

chenxiaolong commented 7 months ago

I'm really not sure then. That was the only change and deleting post-fs-data.sh prevents the code from running. I don't know else would be triggering the issue.