chenxiaolong / BCR

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

It fails to install with LineageOS Recovery #338

Closed 2shrestha22 closed 1 year ago

2shrestha22 commented 1 year ago

When installing through LineageOS Recovery it fails.

chenxiaolong commented 1 year ago

Please grab the recovery's logs (adb pull /tmp/recovery.log) immediately after flashing (but before rebooting) and upload it here.

SebJansen commented 1 year ago

Same problem here, running the latest LineageOS on this device: https://wiki.lineageos.org/devices/lemonade/

I get the error message: "Invalid footer", see photo below

adb pull didn't work for me, I got the error 'unauthorized'

PXL_20230519_142159688

cao- commented 1 year ago

Also in the recovery of Pixel Experience (which is almost the same as the recovery of Lineage OS) the installation fails, and the only error I see after the message "Mountain system" is Error: recovery: Error in /sideload/package.zip (status 1)

cao- commented 1 year ago

Here are my recovery logs IMG_20230906_001552_126 Thanks

chenxiaolong commented 1 year ago

Please grab /tmp/recovery.log with adb and upload the file. It'll contain more information about why the installation failed than what is shown on screen.

alxv-su commented 1 year ago

I have exactly the same problem on Lineage 20 on Redmi 9. Here is /tmp/recovery.log

chenxiaolong commented 1 year ago

I have exactly the same problem on Lineage 20 on Redmi 9. Here is /tmp/recovery.log

Thanks for the logs! I think #420 might fix this. Can you give this debug build a try? BCR-1.50.r5.ge461578-debug.zip

If it still fails, please upload the recovery log again.

alxv-su commented 1 year ago

I have exactly the same problem on Lineage 20 on Redmi 9. Here is /tmp/recovery.log

Can you give this debug build a try? BCR-1.50.r5.ge461578-debug.zip If it still fails, please upload the recovery log again.

It fails. I am unable to get recovery log, because phone stuck after error and do not return to recover menu. After I press Power for a few seconds it open recovery, but with new recovery log. IMG_20230910_110636

cao- commented 1 year ago

Sorry for the late reply. Here is my recovery log, where I first tried installing the standard version of BCR, and after that the debug version you sent here: recovery.log Thanks for looking into this!

chenxiaolong commented 1 year ago

@alxv-su

It fails. I am unable to get recovery log, because phone stuck after error and do not return to recover menu. After I press Power for a few seconds it open recovery, but with new recovery log.

Hmm, I have no idea why it would crash like that. Have you flashed anything else that modifies /system before? I wonder if your ROM enforces that the system partition is read-only and unmodified.


@cao-

Thanks for the log! Can you give this new debug build a try? BCR-1.50.r5.g2f5f0b6-debug.zip (EDIT: Updated link to the new test build below)

alxv-su commented 1 year ago

It fails too, with exactly the same text on the screen.

Have you flashed anything else that modifies /system before?

Probably not. I install lineage os, mindthegapps, org.fdroid.fdroid.privileged.ota_2130.zip.

adb shell ls -R /system > /tmp/ls-system.txt ls-system.txt

chenxiaolong commented 1 year ago

Probably not. I install lineage os, mindthegapps, org.fdroid.fdroid.privileged.ota_2130.zip.

Thanks, the gapps and fdroid packages gave me some hints on what might be wrong. Looks like the recovery expects the system partition to be mounted at /mnt/system for Android 10+. Can you give this debug build a try? BCR-1.50.r5.g2f5f0b6-debug.zip

cao- commented 1 year ago

For me this last build worked! Thank you :) If you need the logs, when I can I send them

alxv-su commented 1 year ago

BCR-1.50.r5.g2f5f0b6-debug.zip

It is successfully installed and even autorecord my call, but the audio file contains silence.

cao- commented 1 year ago

BCR-1.50.r5.g2f5f0b6-debug.zip

It is successfully installed and even autorecord my call, but the audio file contains silence.

Just for information, mine woks fine, it successfully records calls and the audio of the recordings is great

chenxiaolong commented 1 year ago

For me this last build worked! Thank you :) If you need the logs, when I can I send them

Great, thanks for testing!

It is successfully installed and even autorecord my call, but the audio file contains silence.

If that still happens when you select the WAV/PCM output format (which just dumps the raw audio to a file), then unfortunately, that's beyond the control of BCR. You're probably out of luck outside of trying a different ROM (that might have a working audio driver and mixer configuration).

cao- commented 1 year ago

I tried the new version 1.51, but strangely enough it happens that the installation script succeeds while the app does not appear in the list of apps, so it is not effectively installed. I tried again with flashing again the rom first so to have a clean system and flashing that version of BCR afterwards, but the app was still not present. Instead, the last debug version here works just fine, the app appears. Do you have any idea why it happens?

chenxiaolong commented 1 year ago

I tried the new version 1.51, but strangely enough it happens that the installation script succeeds while the app does not appear in the list of apps, so it is not effectively installed. I tried again with flashing again the rom first so to have a clean system and flashing that version of BCR afterwards, but the app was still not present. Instead, the last debug version here works just fine, the app appears. Do you have any idea why it happens?

Can you try this?

  1. Install 1.51
  2. After Android boots, run adb shell pm uninstall com.chiller3.bcr
  3. Reflash 1.51

This might be happening because the debug build is signed with a different key than the release build.

cao- commented 1 year ago

I tried the new version 1.51, but strangely enough it happens that the installation script succeeds while the app does not appear in the list of apps, so it is not effectively installed. I tried again with flashing again the rom first so to have a clean system and flashing that version of BCR afterwards, but the app was still not present. Instead, the last debug version here works just fine, the app appears. Do you have any idea why it happens?

Can you try this?

  1. Install 1.51
  2. After Android boots, run adb shell pm uninstall com.chiller3.bcr
  3. Reflash 1.51

This might be happening because the debug build is signed with a different key than the release build.

That might be the problem. Anyhow, I tried it and the ADB command fails saying: failure [DELETE_FAILED_INTERNAL_ERROR] In case you have something else to suggest trying, that's welcome; Otherwise by now I can keep the debug version that is working great. Thank you anyway!

chenxiaolong commented 1 year ago

failure [DELETE_FAILED_INTERNAL_ERROR]

Huh, that is really interesting. I've never seen the command fail like that before. Do you happen to be using work profiles, app cloning, or any similar feature that might allow two instances of an app to be installed at the same time?

If you don't mind tinkering, I'd suggest trying these steps a try:

cao- commented 1 year ago

failure [DELETE_FAILED_INTERNAL_ERROR]

Huh, that is really interesting. I've never seen the command fail like that before. Do you happen to be using work profiles, app cloning, or any similar feature that might allow two instances of an app to be installed at the same time?

If you don't mind tinkering, I'd suggest trying these steps a try:

  • Using a root file manager, manually delete the /system/priv-app/com.chiller3.bcr folder.
  • Reboot.
  • Android should automatically notice BCR's apk is gone and delete the app data, but just to make sure: Using a root file manager again, navigate to /data/user. There will be a directory named 0 and possibly more numbered directories. Inside each of them, delete com.chiller3.bcr if it exists.
  • Reboot again.
  • Flash BCR.

I tried to delete the app with different root file managers but I didn't succeed with all of them, because they all say that the priv-app folder is read-only. I guess I'll stick with this debug version by now, until it happens I flash anew my rom. Thank you so much for your time and BCR!