Restore boot image after unroot - Xiaomi Mi 4C

Hi, years ago I installed lineage os 14.1 and supersu 2.82 on my father's mi 4c and I now wanted to unroot it to switch to magisk.
The unroot worked, however I wasn't able to restore the boot image. When I tried to install magisk, it didn't install it responding "Boot image patched by other programs!". So, I tried to flash the boot image with two I had from years ago but they both caused bootloop. Luckily I made a backup with TWRP of the boot before flashing it so I was able to start lineage again. Is there anyone who can help me to restore the boot image? Maybe without wipe all the data if possible. Thanks

Related

Switching from SuperSU to Magisk problems

Greetings,
I'm trying to move from SuperSu to Magisk, but have hit a problem with "fully" unrooting SuperSU.
If I tell it to restore the stock boot image the full unroot fails.
If I tell it not to restore the stock boot image, the full unroot "succeeds", but the stock boot image is not restored (obviously) and Magisk fails with an error about non-stock boot image.
If I re-install SuperSU the log shows it attempting to restore the factory boot image, failing and then going ahead with the already patched image.
Is there any way to install just the boot image (Odin, TWRP or ???) without wiping the entire phone?
Phone is a G920T with DPK1, I have the full DPK1 stock image but don't know how to install just the boot image.
Any help is greatly appreciated!

Issues Rooting Pixel 2 android 9.0 latest build with Magisk

Hello,
I have been struggling to root my device. I have not wiped and rooted it in some time and now coming back to it again magisk keeps breaking my device.
I have clean flashed the latest android 9.0.0 build. I have flashed TWRP custom recovery 3.3.0 successfully. I have tried to flash magisk 3 times now and afterwards my phone wont boot. I originally used magisk manager to get the latest zip and patch my boot image. I then rebooted to to bootloader and ran fast boot flash boot patched_Magisk.img. This wiped out my twrp recovery and my phone wouldn't boot, i couldn't get back into twrp recovery. I reflashed latest 9.0 build and wiped everything. I flashed twrp again and tried to flash Magisk 20.0 from recovery. It was successful but again i couldn't boot into my phone and it eventually restarted back into recovery which i still had twrp this time. I then tried it again with 19.3 and the same thing happened. can anyone tell me what is going on here? What am I missing? I have been having reflash factory 9.0 build each time just to get it to remove the patched boot image and boot up again.

Recovery Bootlooop Please Help *Urgent*

I decided to root my Oneplus 6 (10.30.1) yesterday and everything went fine using TWRP 3.3.1.17 mauronofrio and Magisk 20.3.
Today I wanted to installed EdXposed which I did by going in to Magisk Manager, install Riru, reboot, install EdXposed and then reboot.
However, after installing EdXposed my phone would not boot, it would just hang on the loading screen.
I forced a reboot in to TWRP recovery and proceeded to restore my nandroid backup. This only made things worse.
When i try to boot I get the unlocked bootloader warning, it tries to boot in to the OS for about one second, then back to the bootloader warning screen and so on and so on.
I can still boot in to TWRP with Vol down + Power and i've tried wiping data and i've tried 'fix recovery bootloop' in the advanced settings but neither has worked.
Could someone kindly help fix this? I dont mind if i have to reinstall a stock Rom and lose root etc. I just want my phone back
Thanks
Goooober said:
I decided to root my Oneplus 6 (10.30.1) yesterday and everything went fine using TWRP 3.3.1.17 mauronofrio and Magisk 20.3.
Today I wanted to installed EdXposed which I did by going in to Magisk Manager, install Riru, reboot, install EdXposed and then reboot.
However, after installing EdXposed my phone would not boot, it would just hang on the loading screen.
I forced a reboot in to TWRP recovery and proceeded to restore my nandroid backup. This only made things worse.
When i try to boot I get the unlocked bootloader warning, it tries to boot in to the OS for about one second, then back to the bootloader warning screen and so on and so on.
I can still boot in to TWRP with Vol down + Power and i've tried wiping data and i've tried 'fix recovery bootloop' in the advanced settings but neither has worked.
Could someone kindly help fix this? I dont mind if i have to reinstall a stock Rom and lose root etc. I just want my phone back
Thanks
Click to expand...
Click to collapse
Use the msm tool to recover your device...
Try booting into the mauronofrio twrp recovery from fastboot. Then wipe the system partition and reinstall your rom.
Then boot mauronofrio twrp again from fastboot and install the zip, and reboot to recovery.
Install custom kernel, Magisk.
Uninstall edexposed
People reply here with no clue and advise to just restore stock. How is this a solution and how did not OP think of it themselves?
This is too little too late, but maybe it helps someone else:
Unofficial TWRP for Android 10 is glitchy. E.g. nanodroid backups are not restoring properly. Given current A/B mess this is not at all surprising.
Solution: wipe everything, reinstall *same* lineageOS version as before, flash same gapps as you had, and if you took the nanodroid backup after magisk, install it as well.
Don't boot yet!
Restore the backup *partially*, e.g. only the data partition.
This should work.
Or, emh, it did for me with some minor glitches. But even Google Authenticator didn't notice spoofing (otherwise RIP my accounts). So, i definitely recommend trying this workaround.

Lost root after rebuilding boot partition (still have twrp)

Hello,
So my phone was in a recovery boot loop and had to rebuild the boot partition in twrp. So I'm back in my phone now and everything is the same but have lost root. Still have access to twrp. It's been a while since I rooted it and don't have any of the files anymore. What do I need to flash to get root back? Do I need to back up all my data or will it be safe?
I am still running android 9 and oos 9.0.7 and I assume bootloader is still unlocked. Orignally rooted with magisk.
thanks
kaotik123 said:
Hello,
So my phone was in a recovery boot loop and had to rebuild the boot partition in twrp. So I'm back in my phone now and everything is the same but have lost root. Still have access to twrp. It's been a while since I rooted it and don't have any of the files anymore. What do I need to flash to get root back? Do I need to back up all my data or will it be safe?
I am still running android 9 and oos 9.0.7 and I assume bootloader is still unlocked. Orignally rooted with magisk.
thanks
Click to expand...
Click to collapse
Damn it, so I booted into twrp and then flashed latest magisk v23 zip but when it finished it said failed to mount partition in red and now the phone just boots to fastboot mode.. I can get back into twrp.. and all my files are still there in file manager.. but it won't boot into my phone.. only fastboot mode. Any advice?
First, boot into TWRP and delete all Magisk Module files and folders:
How to Uninstall Magisk Modules Using TWRP Recovery
Removing the Magisk module manually causes bootloop. You can easily uninstall Magisk modules using TWRP recovery without resetting your device.
www.droidviews.com
I had the same and it seems a module was causing fastboot mode. If that doesn't work try downloading and flashing the stock boot image for your OOS version in TWRP (remember to flash TWRP again before reboot). At least then you will have your phone back.

Question Stuck in BootLoop, unable to flash boot.img via TWRP or ADB

Hi, I run LineageOS 19.1 on my Vayu. It is obviously unlocked and I have Rooted it with Magisk.
I have put off updating the System but did it just now through the Updater in the Settings. From 20220916 to 20221104.
I ran into a Bootloop and went into Fastboot, installed TWRP with ADB sideload. (Had stock Recovery before)
I then tried to just revert back to 20220916 (which was not so smart). I tried to sideloaded the boot.img, but it showed "failed".
--> Still in Bootloop after Rebooting
Now I am unable to flash any boot.img or boot at all.
I tried to flash something else (Magisk.zip), which worked. I have removed all magisk modules, tried to boot with
magisk --remove-modules.
Does anyone have any Ideas? I don't really want to Reset my Phone, even though I have abundant Backups.
Thank you )
Moving back to old version almost all the times is not possible without full reset, new version contains new scripts and possibly new files, how would you explain this for system?
By flashing old version over new one, you probably messed up your system, might as well just backup your data and start from scratch.

Categories

Resources