Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCR resets every time OS updates (Possibly also when BCR updates.) #237

Closed
bagarwa opened this issue Feb 11, 2023 · 10 comments
Closed

BCR resets every time OS updates (Possibly also when BCR updates.) #237

bagarwa opened this issue Feb 11, 2023 · 10 comments
Assignees
Labels
bug/limitation elsewhere Bug/limitation in the ROM or another project

Comments

@bagarwa
Copy link

bagarwa commented Feb 11, 2023

I've noticed that every time the phone's OS updates, BCR gets reset completely. In recent weeks, I had updated from Android 13 QPR2 Beta 2, to 3 to 3.1. Every time I found out later that the BCR has reset completely - call recording is turned off, "start as paused" is disabled, download location is reset to the default one, recording quality setting is reset etc.

This possibly also happens when BCR itself updates; but I'm not 100% sure on that.

(While I'm here, can you please also give less options in the bitrate slider? Instead of the slider having increments of 1, I think it'd be better if the slider just had standard bitrates on it.)

@chenxiaolong
Copy link
Owner

chenxiaolong commented Feb 11, 2023

I've noticed that every time the phone's OS updates, BCR gets reset completely. In recent weeks, I had updated from Android 13 QPR2 Beta 2, to 3 to 3.1. Every time I found out later that the BCR has reset completely - call recording is turned off, "start as paused" is disabled, download location is reset to the default one, recording quality setting is reset etc.

This possibly also happens when BCR itself updates; but I'm not 100% sure on that.

Do you have any other Magisk modules installed? Also, have you ever restored BCR's data from a backup? The only time I've ever seen Android do this is if the ownership or SELinux label on the /data/data/<app ID> directory is incorrect.

EDIT: Does a simple reboot cause the app data to be cleared too?

(While I'm here, can you please also give less options in the bitrate slider? Instead of the slider having increments of 1, I think it'd be better if the slider just had standard bitrates on it.)

Yeah, I'll change that for OGG/Opus. It currently has 253 increments, which is pretty excessive. I'll make it at least an order of magnitude fewer.

@chenxiaolong chenxiaolong self-assigned this Feb 11, 2023
@bagarwa
Copy link
Author

bagarwa commented Feb 11, 2023

Do you have any other Magisk modules installed?

Yes - Detach3, Substratum Lite Overlay Helper, Systemless Hosts, Universal Safetynet Fix.

Also, have you ever restored BCR's data from a backup?

No, I never restore any system / root app's data from backup.

Does a simple reboot cause the app data to be cleared too?

No, reboot doesn't reset BCR.

Yeah, I'll change that for OGG/Opus. It currently has 253 increments, which is pretty excessive. I'll make it at least an order of magnitude fewer.

Thanks. :)

@chenxiaolong
Copy link
Owner

Yes - Detach3, Substratum Lite Overlay Helper, Systemless Hosts, Universal Safetynet Fix.

Detach3, Systemless Hosts, and Universal Safetynet Fix shouldn't have any effect. Not sure about Substratum Lite Overlay Helper--doesn't seem to be open source.

I'm not really sure what might be causing this. You're setup is not too different from mine, except I'm on the stable QPR1 builds. Probably need to look at the full adb logcat output immediately after it happens, to try and see what Android's installd is doing.

chenxiaolong added a commit that referenced this issue Feb 12, 2023
This reduces the number of steps from an excessive 253 steps to 25
steps.

Issue: #237

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@bagarwa
Copy link
Author

bagarwa commented Feb 12, 2023

Updated to version 1.32 just now. Happy to report that that didn't reset the app. So, I'm guessing it happens only after OS updates. How would I capture the logcat for this after OS update though? Immediately after an OS update reboot, wouldn't the logcat catch a whole bunch of too much stuff?

@chenxiaolong
Copy link
Owner

I think running adb logcat first thing after the OS update reboot is the best way. It will log a bunch of stuff (but hopefully not too much that the installd messages are already out of the log history).

@bagarwa
Copy link
Author

bagarwa commented Feb 12, 2023

Ok, I'll try to do that next time the OS updates.

@lbdroid
Copy link

lbdroid commented Mar 7, 2023

When you do the update, do you boot the device at least once without magisk installed in the boot image? If so, then BCR will be "uninstalled" during that boot, and "reinstalled" the following boot when magisk is re-enabled.

@bagarwa
Copy link
Author

bagarwa commented Mar 8, 2023

When you do the update, do you boot the device at least once without magisk installed in the boot image? If so, then BCR will be "uninstalled" during that boot, and "reinstalled" the following boot when magisk is re-enabled.

Yes, after flashing the updated factory image, the first boot is without magisk installed. I then have to reboot into bootloader again, flash the magisk patched init_boot img and boot into system to have a magisk rooted Android.

@chenxiaolong
Copy link
Owner

Ah, that explains it then. @lbdroid is correct--Android will delete an app's data if the .apk disappears, even for one boot.

For BCR, you can work around this by extracting the .apk from the .zip and installing it manually (in addition to having the Magisk module). When you do this, Android will see that BCR is a system app with an "update" installed. During the first boot without Magisk, Android will only see the "update" (which no longer has system privileges), but that's enough to preserve the data until you reinstall Magisk.


Alternatively, in the factory image flash-all script, you can add --skip-reboot to the fastboot update line so that you have a chance to flash both the factory image and the Magisk-patched init_boot in one go.

@chenxiaolong chenxiaolong added the bug/limitation elsewhere Bug/limitation in the ROM or another project label Mar 8, 2023
@Uj947nXmRqV2nRaWshKtHzTvckUUpD

i also found today that since 11 jul i had no saved files. in app, the recording was disabled for some reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/limitation elsewhere Bug/limitation in the ROM or another project
Projects
None yet
Development

No branches or pull requests

4 participants