How I fixed Magisk 19 constant reboots on my phone - Xiaomi Mi 9 Guides, News, & Discussion

Just some quick instructions that helped me with issues with Magisk 19 most recently.
Problem: you updated the ROM, flashed Magisk and now the phone always reboots to recovery within a few seconds of unlocking it.
Solution:
- Flash Magisk 17.3. this should get you back to a stable system with root, but without working modules.
- Install Magisk Manager 6 to use with 17.3
- Use Root Explorer and go to /data/adb
- Delete all files called Magisk and the modules folder
Reboot and reflash Magisk 19
- update Magisk Manager
I almost gave up and would have started from scratch. I don't know why Magisk 19 corrupted after the update but even after deleting only the modules folder it wouldn't work. The phone finally worked normal again after just deleting all things Magisk in the /data/adb folder.
Unfortunately TWRP doesn't mount the encrypted /data partition yet so you can't use Magisk Recovery or Magisk uninstaller from TWRP. I found this workaround finally fixed my issues and I hope it is helpful to someone else on the forum.
Best of luck!

mrchrister said:
Just some quick instructions that helped me with issues with Magisk 19 most recently.
Problem: you updated the ROM, flashed Magisk and now the phone always reboots to recovery within a few seconds of unlocking it.
Solution:
- Flash Magisk 17.3. this should get you back to a stable system with root, but without working modules.
- Install Magisk Manager 6 to use with 17.3
- Use Root Explorer and go to /data/adb
- Delete all files called Magisk and the modules folder
Reboot and reflash Magisk 19
- update Magisk Manager
I almost gave up and would have started from scratch. I don't know why Magisk 19 corrupted after the update but even after deleting only the modules folder it wouldn't work. The phone finally worked normal again after just deleting all things Magisk in the /data/adb folder.
Unfortunately TWRP doesn't mount the encrypted /data partition yet so you can't use Magisk Recovery or Magisk uninstaller from TWRP. I found this workaround finally fixed my issues and I hope it is helpful to someone else on the forum.
Best of luck!
Click to expand...
Click to collapse
Had this issue a while back and ended up starting with a clean install. Nice that you found a fix, should come in handy if I ever face the same problem again...

Hi,
I have similar issue as you but slightly different. Whatever I tried to flash (e.g: twrp (multiple version) or patched magisk boot img). It always reboot to mi official recovery.
Do you face this issue before and how you fixed it?
Info:
Mi 9 EEA rom

cutesniper22 said:
Hi,
I have similar issue as you but slightly different. Whatever I tried to flash (e.g: twrp (multiple version) or patched magisk boot img). It always reboot to mi official recovery.
Do you face this issue before and how you fixed it?
Info:
Mi 9 EEA rom
Click to expand...
Click to collapse
Take a look, if your bootloader is unlock!
Maybe it is relocked.

I had the same issue today, what I did is quickly opened up Magisk manager, and clicked uninstall. It still rebooted in the middle of the process, but after I flashed 19.1, it never rebooted again!

bombername said:
Take a look, if your bootloader is unlock!
Maybe it is relocked.
Click to expand...
Click to collapse
No, I can confirmed it's unlocked because I'm able to flash global rom into mi 9 china phone.

Related

Systemless Root & SafetyNet working [GUIDE][Magisk][StockROM-6.0.1][SkyMelon][TWRP]

Systemless Root & SafetyNet working [GUIDE][Magisk][StockROM-6.0.1][SkyMelon][TWRP]
Hi XDA friends,
After quite investigation I finally have found the way to have our devices Systemless Rooted.
The main advantage? SafetyNet working on our rooted device. That means Google does not notice our device is rooted ...yes, you can play Nintendo games or use Android Pay as well!
View attachment 4371569 View attachment 4371476
Here is the step by step guide:
You Must Have: Unlocked bootloader, ADB Fastboot drivers and Flashtool installed.
- Flash Stock Android 6.0.1 ROM with Flashtool (Wipes checked). I recommend 26.3.A.1.33 for the E2303 model. You can find Stock ROMs in this post.
- Flash TWRP from ADB: "fastboot flash recovery recovery.img" (I tried with v3.0.2.0 and also the new v3.2.1-0 recently published here!)
- Flash custom kernel (SkyMelon 8.1 or 9 without-root) from TWRP. Download v8.1 from this post or v9 directly here: View attachment 9-20171210-no-root.zip. Wipe Dalvik/Cache after install it.
- Flash the latest version of Magisk with TWRP. Wipe Dalvik/Cache after install it. GitHub repo: https://github.com/topjohnwu/Magisk/releases
- Install the latest version of Magisk Manager.apk. GitHub repo: https://github.com/topjohnwu/MagiskManager/releases
- [Optional] In order to avoid flashing errors with TWRP it is recommended to update directly through Magisk Manager. If you want to install previous versions of Magisk (between v14.6 and v15.2), could be neccesary to check the box "Preserve AVB 2.0/dm-verity" before "Direct Install" it.
Note: Magisk v16.4 and Magisk Manager v5.7.0 was the last version working tested by me. From this version I will discontinue testing new Magisk releases on this device. Feel free to post your experience with the new ones
- This method is compatible with E2303, E2306 (reported by @zputnyq) and E2333 (reported by @Yester_Ko) models.
- Compatibility with Apps2SD reported by @tim_pear
Please if this works for you, thanks are very welcome to my first post! Also ideas or improvements to the post are welcome.
Credits:
- Special thanks to @osmank3 who built SkyMelon v9 without-root and help me with Magisk updates.
thanks for sharing your experience , I have A question what about DRM fix , did restore you TA backup ?
Hi! Thanks for your guide. Can you share your safety net check screen on magisk? I try that kernel and some other kernels with different magisk versions, but I don't understand safety net checking status.
Hi othmane.os,
I cannot provide information about restoring the TA. My warranty expired some time ago and I don´t have a TA backup.
Thanks for comment.
othmane.os said:
thanks for sharing your experience , I have A question what about DRM fix , did restore you TA backup ?
Click to expand...
Click to collapse
Hi osmank3,
I have modified the post with the screenshot request and also with some links to the material used in the guide.
If you have any problem, I will be glad to help you. Thanks for comment.
osmank3 said:
Hi! Thanks for your guide. Can you share your safety net check screen on magisk? I try that kernel and some other kernels with different magisk versions, but I don't understand safety net checking status.
Click to expand...
Click to collapse
I want to use your guide but I'm busy to do current configuration of my phone. I delete some files on my system partition for gaining storage (I copied some new versions of upgraded apps to system partition) This take my time but I haven't got enough.
I use skymelon 9 kernel, with supersu. I guess because of supersu changed system partition and safetynet fails. I dislike supersu app but skymelon 9 comes with it. So I built skymelon 9 myself without supersu, but I didn't flash stock rom before installing skymelon 9 without-root and magisk. Now on my phone Magisk15 and skymelon9(compiled by me) installed. Magisk's hide function hiding itself from google apps and choosen apps but safetynet check fails.
Can you or anybody try this guide with skymelon 9 without-root which built by me?
View attachment 9-20171210-no-root.zip
Thanks
Hi osmank3,
I have tested the kernel that you built and it is working perfect. Thank you! This version has been added to the post and of course is menctioned your contribution.
I'm afraid you'll have to install a stock ROM...
BTW: I cannot get working Magisk v15. If I install it direclty from Magisk Manager the installation fails. If I install it through TWRP (and do wipes), the process is correct but when I check it, Magisk Manager not shows it as installed. So for the moment, it is only working for v14.5.
osmank3 said:
I want to use your guide but I'm busy to do current configuration of my phone. I delete some files on my system partition for gaining storage (I copied some new versions of upgraded apps to system partition) This take my time but I haven't got enough.
I use skymelon 9 kernel, with supersu. I guess because of supersu changed system partition and safetynet fails. I dislike supersu app but skymelon 9 comes with it. So I built skymelon 9 myself without supersu, but I didn't flash stock rom before installing skymelon 9 without-root and magisk. Now on my phone Magisk15 and skymelon9(compiled by me) installed. Magisk's hide function hiding itself from google apps and choosen apps but safetynet check fails.
Can you or anybody try this guide with skymelon 9 without-root which built by me?
View attachment 4371416
Thanks
Click to expand...
Click to collapse
GameBoy1989 said:
BTW: I cannot get working Magisk v15. If I install it direclty from Magisk Manager the installation fails. If I install it through TWRP (and do wipes), the process is correct but when I check it, Magisk Manager not shows it as installed. So for the moment, it is only working for v14.5.
Click to expand...
Click to collapse
I'm using magisk manager to patch boot.img with v15. I flash patched_boot.img with TWRP. It is working.
When I update it from v14.5 /data/magisk link crashing. I delete /data/magisk and upgrade on magisk manager as recommended type and reboot system, it is starting to work.
Ups! I forget to say. Check AVB 2.0/dm-verity
It works
Thank you very much. Post updated!
osmank3 said:
I'm using magisk manager to patch boot.img with v15. I flash patched_boot.img with TWRP. It is working.
When I update it from v14.5 /data/magisk link crashing. I delete /data/magisk and upgrade on magisk manager as recommended type and reboot system, it is starting to work.
Ups! I forget to say. Check AVB 2.0/dm-verity
Click to expand...
Click to collapse
Hey, i downloaded Magisk v14.5 and tried to flash it with twrp but i got error "invalid zip file format" What should i do now or what did i do wrong?
Yay i got this work but little bit different way.
1. Flashed stock rom with flashtool. I downloaded my stock rom from XperiFirm.
2. Flashed TWRP with this guide.
3. Flashed Skymelon 8.1 with TWRP and wiped Dalvik/Cache after install.
4. Flashed Magisk v14.0 with TWRP from this post and wiped Dalvik/Cache after install.
When that was done i rebooted and Magisk and Magick manager was installed. They aren't latest versions so i updated them.
1. Downloaded latest Magisk manager from here and installed it.
2. From Magisk manager i checked "Preserve AVB 2.0/dm-verity" and installed it with choosing the recommended option "Direct Install"
Everything seems to working fine and i did this to my E2303 with 26.3.A.1.33
Great! Thanks for sharing :good:
Which is the difference between methods? I see that it also works for you by flashing Magisk v14.0.
Artsii said:
Yay i got this work but little bit different way.
1. Flashed stock rom with flashtool. I downloaded my stock rom from XperiFirm.
2. Flashed TWRP with this guide.
3. Flashed Skymelon 8.1 with TWRP and wiped Dalvik/Cache after install.
4. Flashed Magisk v14.0 with TWRP from this post and wiped Dalvik/Cache after install.
When that was done i rebooted and Magisk and Magick manager was installed. They aren't latest versions so i updated them.
1. Downloaded latest Magisk manager from here and installed it.
2. From Magisk manager i checked "Preserve AVB 2.0/dm-verity" and installed it with choosing the recommended option "Direct Install"
Everything seems to working fine and i did this to my E2303 with 26.3.A.1.33
Click to expand...
Click to collapse
GameBoy1989 said:
- Flash Magisk v14.5 from TWRP. Wipe Dalvik/Cache after install it. GitHub repo: https://github.com/topjohnwu/Magisk/releases
Click to expand...
Click to collapse
This was only thing i made differently. I didn't find right magisk there what would work when flashing because i had problem with "invalid zip file format" so i downloaded that magisk zip file from another place.
This worked fine for me but I directly tried flashing/installing latest version (15.1) from TWRP and later after booting via adb the .apk of the Manager.
Didn't show the Magisk as installed.
With making a backup in TWRP of the boot (just renaming it to .img it has a different extension in the name) and then modifying it (as Manager tells you when you want to install) I could make it work (flashing the modified boot image with fastboot).
(Other steps like flashing the stock ROM and the recovery worked as usual. Also no problems with installing the kernel in TWRP.)
If you try to flash directly the last Magisk version (v15.1 in this case) I don´t know why yet but it doesn´t work. For that reason it is neccesary to first flash Magisk v14.5 (last version working with TWRP).
The way that you do it is also a very good one! Thanks for sharing @lordmd.
lordmd said:
This worked fine for me but I directly tried flashing/installing latest version (15.1) from TWRP and later after booting via adb the .apk of the Manager.
Didn't show the Magisk as installed.
With making a backup in TWRP of the boot (just renaming it to .img it has a different extension in the name) and then modifying it (as Manager tells you when you want to install) I could make it work (flashing the modified boot image with fastboot).
(Other steps like flashing the stock ROM and the recovery worked as usual. Also no problems with installing the kernel in TWRP.)
Click to expand...
Click to collapse
After magisk 14.6+ there is a problem about dm-verity. Magisk can't patch it, so we must preserve the original dm-verity. When you are applying magisk 14.6+ from twrp, you can't preserve and magisk can't patch it. The true way is using magisk manager and patch with preserve dm-verity.
Magisk 15.2 version notes says that problem solved but I try it, it is not solved yet.
My first applying procedure is:
First, patch skymelon 9 boot.img file with new magisk version also with preserve dm-verity on Magisk Manager,
Flash recovery and open with twrp
Apply skymelon 9 wipe dalvik and cache
Apply new magisk
Flash patched img
Let´s see if the next v15.3 beta finally works. Thanks @osmank3
BTW: Did you finally install the stock ROM or could you unroot your CFW for installing Magisk?
osmank3 said:
After magisk 14.6+ there is a problem about dm-verity. Magisk can't patch it, so we must preserve the original dm-verity. When you are applying magisk 14.6+ from twrp, you can't preserve and magisk can't patch it. The true way is using magisk manager and patch with preserve dm-verity.
Magisk 15.2 version notes says that problem solved but I try it, it is not solved yet.
My first applying procedure is:
First, patch skymelon 9 boot.img file with new magisk version also with preserve dm-verity on Magisk Manager,
Flash recovery and open with twrp
Apply skymelon 9 wipe dalvik and cache
Apply new magisk
Flash patched img
Click to expand...
Click to collapse
GameBoy1989 said:
Let´s see if the next v15.3 beta finally works. Thanks @osmank3
BTW: Did you finally install the stock ROM or could you unroot your CFW for installing Magisk?
Click to expand...
Click to collapse
I must flash system partition from stock Rom, after that safetynet passed.
Ty
Is pexorom better than stock. Is this going to work on pexorom.
Please reply
I´ve tried with Pexo Rom v3 and systemless root works with Magisk but it does not passed Safety Net check.
Sayan Qadri said:
Is pexorom better than stock. Is this going to work on pexorom.
Please reply
Click to expand...
Click to collapse

Honor 9 Bootloop After Every Magisk Install

A while ago, I had TWRP and magisk working. I decided to try and install xposed from the magisk repository, which ended in a bootloop, so I restored the phone using eRecovery.
After this, I installed TWRP and attempted to install magisk again, which led to a bootloop once again - this happens every time I install magisk.
I have tried using uninmod, which just displays no modules to uninstall when I use it in the terminal, and I have tried mounting magisk.img to a folder, but this just contains "lost+found" and no modules.
It would be a great help if someone could offer some advice on how to fix this, because I hope to flash EMUI 9.

Need help updating the October patch update

So the October patch just came out, but my phone's rooted (magisk, no twrp), so I can't install the update. If anyone could provide a guide on how to update and re-root the phone again, that would be very much appreciated. Thank you.
bibekmufc said:
So the October patch just came out, but my phone's rooted (magisk, no twrp), so I can't install the update. If anyone could provide a guide on how to update and re-root the phone again, that would be very much appreciated. Thank you.
Click to expand...
Click to collapse
No need to unroot. If u can get the boot.img u can use magisk to root it and instal.
i use magisk tutorial for updating. and there is a magisk modul for reinstalling twrp. you have to use it before installing magisk on inactive slot.
i suggest you to wait a few days before updating. i update to October and install magisk and twrp but wifi and hotspot are broken. and twrp won't work correctly. not shore if it's because twrp or October ota
It was my fault that break wifi and hotspot. magisk tutorial should do the work. just backup before doing anything
ghasemi.hussein said:
It was my fault that break wifi and hotspot. magisk tutorial should do the work. just backup before doing anything
Click to expand...
Click to collapse
I decided to completely reset my phone and it's now better than ever
From twrp thread
If you want you can also update a stock rom from phone settings with local upgrade:
- Update the Rom WITHOUT REBOOT;
- Open Magisk Manager;
- Menu/modules/+ button/select the twrp installer.zip and flash it;
- Always in Magisk Manager, click on Install/Install/Direct Install;
- Again in Magisk Manager, click on Install/Install/Inactive Slot;
- Reboot.
kimikim0 said:
From twrp thread
If you want you can also update a stock rom from phone settings with local upgrade:
- Update the Rom WITHOUT REBOOT;
- Open Magisk Manager;
- Menu/modules/+ button/select the twrp installer.zip and flash it;
- Always in Magisk Manager, click on Install/Install/Direct Install;
- Again in Magisk Manager, click on Install/Install/Inactive Slot;
- Reboot.
Click to expand...
Click to collapse
This steps work for update rom with magisk and root installed? Need help for install october update (no twrp, just magisk and root)
Enviado desde mi Mi A3 mediante Tapatalk

Uninstalled Magisk, done latest OTA, but can't install Magisk to inactive slot

Hi there,
i'm rooted and i installed the latest OTA (oxygen os 10.3.7.hd01AA - india rom maybe because i used a patched boot.img in the first time months ago) right now and just like all the times before i made the usual steps:
1) Restored Original Image via Magisk Manager
2) Downloaded and installed OTA
3) Didn't reboot and tried to Install Magisk to inactive slot
Unfortunately 3 didn't work. More than that - Magisk Manager doesn't even recognized Magisk was uninstalled. So there is no Installation option.
Tried to Uninstall it again (Restore Original Image) but that didn't change anything.
a) Was the 2nd "Restore Original Image" after installing the OTA a bad idea?
b) How can i install Magisk now?
I don't reboot the phone as i think it could be bricked after that.
Dacoco said:
Hi there,
i'm rooted and i installed the latest OTA (oxygen os 10.3.7.hd01AA - india rom maybe because i used a patched boot.img in the first time months ago) right now and just like all the times before i made the usual steps:
1) Restored Original Image via Magisk Manager
2) Downloaded and installed OTA
3) Didn't reboot and tried to Install Magisk to inactive slot
Unfortunately 3 didn't work. More than that - Magisk Manager doesn't even recognized Magisk was uninstalled. So there is no Installation option.
Tried to Uninstall it again (Restore Original Image) but that didn't change anything.
a) Was the 2nd "Restore Original Image" after installing the OTA a bad idea?
b) How can i install Magisk now?
I don't reboot the phone as i think it could be bricked after that.
Click to expand...
Click to collapse
Well the procedure is disable all magisk modules. Reboot. Take the update don't reboot when the updater says to. Go to magisk select patch to inactive slot let it do it's thing then reboot
for now make a new patched one based on your current is to obtain root like you did initially
Ex pull your current non root boot img patch it in magisk then flash in fastboot
If you need I can grab the India ROM from Updater and make you a patched boot image?
I've already done it for HD01AA EU and HD01BA
Hey, i could manage to install Magisk into inactive slot after updating Magisk manager to the latest version. I would try to reboot now?
If I would like to patch my current boot.img - how can I do so?
digidude512 said:
If you need I can grab the India ROM from Updater and make you a patched boot image?
I've already done it for HD01AA EU and HD01BA
Click to expand...
Click to collapse
Thanks. I think I'll try to reboot and then - if it doesn't Boot - I will come back to you.
Dacoco said:
Thanks. I think I'll try to reboot and then - if it doesn't Boot - I will come back to you.
Click to expand...
Click to collapse
Any luck?
digidude512 said:
Any luck?
Click to expand...
Click to collapse
Booted up and root is working! Thanks a ton!
Dacoco said:
Booted up and root is working! Thanks a ton!
Click to expand...
Click to collapse
Well the ROM is already downloading, Might as well do the boot and recovery images anyway lol
When I'm done I'll update this thread to include HD01AA India
https://forum.xda-developers.com/7t-pro/how-to/oos-10-0-13-hd01aa-t4195159

revert magisk to v23

Waking up with a sleepy head I wanted to swipe the new version notification away, but didnt swipe well enough and it actually upgraded. I need to downgrade to v23 again but for whatever reason, its not working. Here's what I tried:
1. Reboot to fastboot and do fastboot boot magisk_patched.img (boot img with magisk 23 I use after OTA's). This boots but its not rooted. Magisk mgr is 24 though.
2. Rebooted to system, uninstalled Installed magisk manager 24, rebooted and retried the above. Installed Magisk mgr 23. No root.
I then unpacked the latest full oos 11 for my phone with payload_dumper, copied the boot.img to my phone and patched it using magisk manager 23. Copied it back to the PC.
retried step 1. No root.
Rebooted to fastboot again, checked current slot, its A.
fastboot flash boot magisk_patched.img (the new one I patched in the step above).
Rebooted, no root.
What am I supposed to do to get Magisk 23 back on my phone?
The reason is I'm dependent on riru/lsposed for a couple of xposed modules. If I disable zygisk in magisk 24 I won't have root hide, if I enable that, riru/lsposed isn't working.
Thanks for the help!
Yeah I had a similar issue on A12 rom, Magisk 24 just doesn't allow me to pass safety net due to Google play services in Magisk 24 deny list unselects after a reboot, so downgrading to 23 which just works after using hide list.
I had to disable and remove any modules, unhide Magisk 24 then restart.
Use Magisk 24 uninstall in the app and restart.
Install Magisk 23 and Install to boot image file to payload Boot.img, restart to Fastboot and flash as you did.
Then again in Magisk install select Direct Install then restart.
Reapply Magiskhide to apps google pay/services etc restart and check root.
I still have an issue with Magisk hiding the app installs the proxy app but it doesn't open so isn't working, so still working on this. Root is working tho with the above.
Thanks, I still cant get it to work though.
I can patch the boot.img, but when I try to boot it I don't get root.
When I flash and boot it, there still is no root available.
Possibly i had the same issue, no root after flashing the 23-modified boot image. I solved it by, upgrading the app to 24.3, patch the boot image, reboot to fastboot, flash it, reboot it so i was back at Magisk 24.3 Then i did a full uninstall of Magisk, via the app. Then installed app v23. Patched the boot image etc as per https://topjohnwu.github.io/Magisk/install.html#patching-images
Key here was, i think the full removal of Magisk 24 before downgrading.

Categories

Resources