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

Loop to Recovery after installing TWRP_12 #8

Open
bege10 opened this issue Oct 7, 2023 · 5 comments
Open

Loop to Recovery after installing TWRP_12 #8

bege10 opened this issue Oct 7, 2023 · 5 comments

Comments

@bege10
Copy link

bege10 commented Oct 7, 2023

Hello,
I want to install twrp-3.7.0_12 permanently on my FP3 (/e/OS-S-dev rooted with Magisk) as is with v3.7.0_9.

I did as usual: boot twrp.img and then try to use Flash Current TWRP. But that throws and error that the ram disk has been changed and twrp cannot write to it.
Is that normal for this build?
So I used the alternate way Install Recovery Ramdisk. Afterwards I rebooted to recovery and v3.7.0_12 was installed. But booting to system does not work any more. The phone always boots to recovery.

Installing the previous boot.img (twrp-3.7.0_9 patched with Magisk) solved the issue and I can boot to system again.

What might cause the issue? Is there something wrong

  • with the TWRP build?
  • the /e/OS build?
  • or is the reason for the loop to recovery that Magisk app is still installed but of course the boot image is not yet rooted again at the first reboot to system?
@kolAflash
Copy link

Same problem here.
OS: IMG-e-1.12.3-s-20230616300623-dev-FP3.zip

System boots again after reflashing Magisk.v26.3.apk.
And twrp-3.7.0_12-0_k4y0z-20230821-01-fp3.img still works too.

See also: TeamWin/android_bootable_recovery#297 (comment)

@chaosmaster
Copy link
Owner

I would generally advise against installing TWRP permanently on devices that don't use a separate recovery partition like the FP3.
To install TWRP the ramdisk of the boot partition needs to be modified/replaced which will also result in Magisk being removed (since it also modifies the ramdisk).
If you do install TWRP you should also reinstall Magisk afterwards, as @kolAflash did.

@PinkSerenity
Copy link

PinkSerenity commented Jan 23, 2024

For me, flashing TWRP to Ramdisk manually causes a bootloop to the bootloader. Selecting "Flash current TWRP" instead throws the same error, even though the Ramdisk files haven't been modified because I hadn't installed Magisk. @kolAflash suggests reflashing Magisk, which however doesn't work for me either.

In the Fairphone forums I have theorized that the issue is the tool magiskboot, which, as far as I know, is responsible for modifying the boot partition in both TWRP and Magisk. Magisk builds before 26.2 had some kind of issue that they didn't work with Fairphone's changes to the boot image when they retrofitted dynamic partitions. The behaviour people observed back then was very similar to this. Maybe the image still uses the old build?

Edit: magiskboot, last commit date 4 years ago

@PinkSerenity
Copy link

PinkSerenity commented Feb 16, 2024

Took me quite a while to build it (didn't have the hardware and setting up GitHub Actions was difficult), but I managed to fix it. Both Flash Current TWRP and Install Recovery Ramdisk work flawlessly. The only thing I did was replacing the magiskboot binary I mentioned above (unfortunately not the newest version), the other commits are various attempts to work with Actions.
Here's a temporary image, I will take the repository down once it isn't needed anymore.
https://github.com/PinkSerenity/android_device_fairphone_fp3/releases/tag/20240215

Edit: I'm terribly sorry and feel incredibly stupid. It still doesn't work, I just realized I had flashed an older image I had used for testing purposes. Sorry for notifying everyone. Keep on looking, I guess... but this should be the solution somehow. The new image does however fix the Flash Current TWRP issue.

@bege10
Copy link
Author

bege10 commented Jul 3, 2024

Same problem here. OS: IMG-e-1.12.3-s-20230616300623-dev-FP3.zip

System boots again after reflashing Magisk.v26.3.apk. And twrp-3.7.0_12-0_k4y0z-20230821-01-fp3.img still works too.

See also: TeamWin/android_bootable_recovery#297 (comment)

You recommend reflashing Magisk apk afterwards. This is not recommended in Magisk install manual, instead patching boot.img and flashing that is recommended. But patching without being able to boot to OS is not possible. Does flashing Magisk apk right after installing TWRP work correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants