Update to v11.0.6 QFJEUXM, preserve Magisk and OrangeFox (or TWRP) - Redmi K20 / Xiaomi Mi 9T Guides, News, & Discussio

Had QFJEUXM v11.0.5.0,
OrangeFox v10.1.2,
Hasty kernel,
Magisk Canary v20416
Today received OTA notification for QFJEUXM v11.0.6.0 (frankly, expected v12 but ok for now).
Did not accept OTA (System update, Automatic download disabled) but proceeded as following:
1) Downloaded full Recovery/zip firmware
https://bigota.d.miui.com/V11.0.6.0...AGlobal_V11.0.6.0.QFJEUXM_79a4386920_10.0.zip
2) Opened (in MiXPorer), copied out boot.img, patched boot.img from Magisk Manager (Preserve DM-Verity and Preserve Encryption On, Recovery Mode Off)
3) Rebooted to OrangeFox, flashed firmware zip from (1)
4) Rebooted again to OrangeFox (otherwise stock Recovery will overwrite), flashed patched_boot.img from (2)
5) Rebooted to system:
- all apps, settings and data preserved
- Magisk, modules, root grants all preserved
By (4), OrangeFox was also preserved.
Instead of OrangeFox, you can also use Official TWRP (probably Unofficial as well and likely other custom Recoveries)
Btw, Official TWRP v3.4.0 just released:
https://dl.twrp.me/davinci/
finally supporting back-up of Data if using dual apps:
https://forum.xda-developers.com/showpost.php?p=82910629&postcount=316

Updated mine today also. dowload zip, patched boot with magisk, installed zip and boot image with TWRP, looks like all is fine.

Great, thanks for the advice as I usually follow your recommendations.

Proceeded with Hasty kernel, it works fawlessly with QFJEUXM v11.0.6:
Download Hasty-davinci-Intoxicated-insider.zip from:
https://forum.xda-developers.com/showpost.php?p=82564409&postcount=119
1) Reboot to OrangeFox/TWRP and
flash the just downloaded Hasty
2) Reboot to system - Magisk Manager will show that Magisk is not installed, never mind
3) Reboot to OrangeFox/TWRP and make a Backup of Boot
4) Reboot to system and patch the just backed up boot.emmc.win
5) Reboot to OrangeFox/TWRP and flash the just patched patched_boot.img
Reboot to system and enjoy Hasty kernel (longer lasting battery) with Magisk
Step (2) could probably be skipped and therefore steps (1) and (3) merged to a single step:
Reboot to OrangeFox/TWRP and
flash Hasty, then backup Boot

This maybe a stupid question (probably is) I normally use TWRP and not that I have needed to do it yet but what are the steps for restoring a backup with OF and from reading the guide it doesn't actually explain it? I currently backup to a OTG USB stick.
thanks

brachios said:
This maybe a stupid question (probably is) I normally use TWRP and not that I have needed to do it yet but what are the steps for restoring a backup with OF and from reading the guide it doesn't actually explain it? I currently backup to a OTG USB stick.
thanks
Click to expand...
Click to collapse
With the latest official TWRP 3.4.0 I was finally able to successfully back-up Data partition (I'm using dual WhatsApp and it was failing both with TWRP and OrangeFox)
Hence you can use TWRP 3.4.0 (instead of OrangeFox as explained in post #1) and backup everything (except Cache and TWRP recovery itself) in advance - but I didn't need to restore anything (ie, didn't need to restore Data upon upgrading MIUI): all my apps, data and settings were preserved
Otherwise, I also (partially) backup things over Google and Mi account

What I was trying to say is I'm now using Orangefox and just looking how to do a restore if needed as I was using TWRP for years.

brachios said:
What I was trying to say is I'm now using Orangefox and just looking how to do a restore if needed as I was using TWRP for years.
Click to expand...
Click to collapse
There is also Backup/Restore option in OrangeFox
AFAIK, Fox uses the TWRP engine (Fox has different UI and few more options) hence it's backup (files indeed look the same) should be restorable through TWRP
I liked Fox but for now I switched to TWRP since finally being able to make full nandroid backup by TWRP 3.4.0 - hoping that Fox will be updated to the latest TWRP engine

Thanks, being comfortable with TWRP I might switch back at least I know what I'm doing.

Is there are anybody here who did upgrade to QFJEUXM v11.0.6, but who has NO Magisk (and ideally, has locked Bootloader) to check SafetyNet with the attached app, or alternatively with:
https://play.google.com/store/apps/details?id=com.scottyab.safetynet.sample

zgfg said:
Is there are anybody here who did upgrade to QFJEUXM v11.0.6, but who has NO Magisk (and ideally, has locked Bootloader) to check SafetyNet with the attached app, or alternatively with:
https://play.google.com/store/apps/details?id=com.scottyab.safetynet.sample
Click to expand...
Click to collapse
No matter if on v11.0.6 or older, if Bootloader is unlocked, CTS Profile will fail (since the last day or two) and Magisk with Magisk Hide Props Config cannot help
Seems that custom ROMs are excluded from the problem (from Google's ongoing testing)
Google is testing SafetyNet, they will hopefully turn off again that hardware backed CTS Profile attestation later:
https://groups.google.com/forum/m/#!msg/safetynet-api-clients/lpDXBNeV7Fg/Ov2H6ZvhBQAJ
But nobody knows when they can enforce for real and forever, affecting Google Play Device certification and Google Pay

zgfg said:
No matter if on v11.0.6 or older, if Bootloader is unlocked, CTS Profile will fail (since the last day or two) and Magisk with Magisk Hide Props Config cannot help
Click to expand...
Click to collapse
Use e.g. Magisk Hide Props Config module for Magisk and chose the option to delete a prop ro.product.model - reboot and CTS Profile will be using Basic attestation mode, so CTS Profile and SafetyNet will pass
If Playstore shows Device is not certified,, go to Settings, Apps, enable System services, search for Google and delete Cache and Data for Google Playstore, Google Services Play and Google Services Framework

Did anyone had a successful backup>restore with TWRP v3.4.0/11.0.6?
i tried to get my backup to phone but i get the famous "extractTarFork() process ended with ERROR: 255"
EDIT: was able to get the backup back. wiped all partitions, reflashed with miflash, put the same version of miui after, then the backup worked fine, phew!

Related

[GUIDE] ROOT+XPOSED+SAFETYNET at the same time on Stock and stock based ROMs

This guide provides all the steps and patches required to root the Stock system and having Xposed installed while maintaining SafetyNet (Android Pay, Pokemon Go, etc) compatibility. There are some problems of this method that Magisk is supposed to fix, however the latest Magisk v10 is not supporting our stock ROM yet.
The prerequisites of this guide is to have the bootloader unlocked and TWRP recovery.
DOWNLOADS
The recipe require the following ingredients to be downloaded to your internal or external storage:
1. TWRP 3.0.3 (This is the last release at this moment). more info in the Official Thread. Thanks to @jcadduono . TWRP 3.0.2 can't succesfully flash SuperSU 2.79
2. Default Stock ROM for your phone (Required only if you have modified your system or boot partition). You can download them from this thread. Thanks to @DrakenFX . You can alsouse any other custom ROM based on stock such as ZADMix or HelsAx7 SubMix (both tested).
3. SuperSU v2.79. more info in its official thread.
4. SUhide 0.55. More info in its official thread. Thanks to Chainfire.
5. SafetyNet-KCAL Kernel patch, thanks to @jcadduono also for this one!
6. Xposed v86.2 So far only this version is compatible with SUhide.
7. Material Design Xposed Manager app by DVDandroid. More info about this release in its official thread.
8. Root Switch 1.3.3.2 app. Thanks to shakalaca. More info in its official thread.
INSTALLATION
1. Do a backup of your system, I recommend Boot+System+Data partitions. The next steps will modify at least your boot and data partitions, and some Xposed modules will modify also your system partition.
2. If you already have TWRP 3.0.3 then just boot to recovery and proceed to step 3. If you are still using TWRP 3.0.2 please upgrade to the latest TWRP 3.0.3 and reboot to recovery again.
3. I recommend to flash the default Boot and System Partitions and reboot directly to recovery. You can also use any other custom ROM based on the stock ROM such as ZADMix or HelsAx7.
4. All this step must be done without leaving TWRP. Flash SuperSU 2.79 adding also the zips for SUhide 0.55, Xposed v86.2 and the SafetyNet Kernel patch in that order. They must be flashed together. Without leaving TWRP, navigate from the main menu to Advanced > Terminal, introduce the command reboot disemmcwp and the system will reboot by itself once or twice while configuring the settings for SuperSU. Do not be alarmed.
5. Install Xposed Manager and Root Switch apps.
6. Now you have your system fully rooted and you can now install Xposed modules. However you will see the test app SafetyNet Helper reporting a validation failure. Do not worry about it anymore! When you want to initiate a SafetyNet sensitive application (Android Pay or Pokemon Go among others), just open Root Switch and disable root, no need to reboot. SafetyNet will pass and all your apps will work. You can see that Xposed continue working even after disabling root since it was started before. Do not forget to enable root again otherwise new apps requiring root won't load.
Magisk v10+ promises auto root hide per app, but sadly our stock ROM is not yet supported and the method psoposed here requires the user to disable root before loading any SafetyNet protected app.
Enjoy
Reserved for future Magisk guide.
Has anyone managed to get this working on A2017G/B09? I've had a few attempts, forcing systemless SuperSU, but it hangs at the "AXON" boot screen
H0lmEd said:
Has anyone managed to get this working on A2017G/B09? I've had a few attempts, forcing systemless SuperSU, but it hangs at the "AXON" boot screen
Click to expand...
Click to collapse
At what point of the guide is it hanging at the Axon boot screen? after step 4? Have you ensured that the SafetyNet patch is the last thing you flashed before boot?
I just did this on my B29 A2017U phone and it worked perfectly, can switch root on and off with the root switcher and Safetynet passes fully with root set to off.
My previous attempts were all thwarted by the bootloader being unlocked, so that patch to the kernel works great. I'll be backing this up with twrp and getting a little more adventurous (really want to try the BeastMode kernel) soon.
Much thanks for making it nice and simple, Oki !
Oki said:
At what point of the guide is it hanging at the Axon boot screen? after step 4? Have you ensured that the SafetyNet patch is the last thing you flashed before boot?
Click to expand...
Click to collapse
I'm on the same configuration (A2017G B09). I did a step by step installation/reboot/installation/reboot. The Problem is with suhide. After installing suhide the boot process will stick in the Axon screen.
tron1 said:
I'm on the same configuration (A2017G B09). I did a step by step installation/reboot/installation/reboot. The Problem is with suhide. After installing suhide the boot process will stick in the Axon screen.
Click to expand...
Click to collapse
You do not have to reboot after SUhide. The files at step 4 have to be flashed together without leaving TWRP otherwise it won't work.
Oki said:
You do not have to reboot after SUhide. The files at step 4 have to be flashed together without leaving TWRP otherwise it won't work.
Click to expand...
Click to collapse
In theory you're right. But how do like a bugfix to be done if you don't know at which point you're failing?!?
tron1 said:
In theory you're right. But how do like a bugfix to be done if you don't know at which point you're failing?!?
Click to expand...
Click to collapse
The last patch fixes some problems created by SuperSU, SUhide and Xposed. This is why all the patches in step 4 have to be flashed together without leaving TWRP and in the specified order, otherwise it wont work on stock ROMs.
That looks way complicated. What's wrong with the easy way of flashing Magisk V10 + Phh Superuser r266? This has worked on all my devices since the November security patch broke suhide. Magisk now takes care of the flag to hide bootloader unlock status so no need for a kernel patch too. Then flash systemless Xposed by topjohnwu if you want that and you can turn it on and off in Magisk Manager if you want to use Android Pay, play Pokemon Go, etc.
Hi,
I have a A2017G running B08, already unlocked and witch SuperSU 2.79. Just the older version of TWRP.
Can I just upgrade the TWRP and proceed with step 4 and so on? Hate to go back to stock...
Tia,
Cheers,
/Cacti
Tikerz said:
That looks way complicated. What's wrong with the easy way of flashing Magisk V10 + Phh Superuser r266? This has worked on all my devices since the November security patch broke suhide. Magisk now takes care of the flag to hide bootloader unlock status so no need for a kernel patch too. Then flash systemless Xposed by topjohnwu if you want that and you can turn it on and off in Magisk Manager if you want to use Android Pay, play Pokemon Go, etc.
Click to expand...
Click to collapse
For some reason Magisk is not compatible with the Axon 7 kernel. Not yet. This is why it is so complicated and requires a guide. Last time I tested this was yesterday using Magisk v10.2 and phh Superuser r2, and they still failed to root the system.
le_cactus said:
Hi,
I have a A2017G running B08, already unlocked and witch SuperSU 2.79. Just the older version of TWRP.
Can I just upgrade the TWRP and proceed with step 4 and so on? Hate to go back to stock...
Tia,
Cheers,
/Cacti
Click to expand...
Click to collapse
Yes you can try to begin with step 4 with SUhide on. It should work. However I recommend you to upgrade to TWRP 3.0.3 and do the whole step 4.
Gr8. Thanks.
Cheers,
/Cacti
Oki said:
The last patch fixes some problems created by SuperSU, SUhide and Xposed. This is why all the patches in step 4 have to be flashed together without leaving TWRP and in the specified order, otherwise it wont work on stock ROMs.
Click to expand...
Click to collapse
Not quite sure I understand you.
I've tried doing this on A2017g, b09;
0) wipe data/system/boot
1) flash stock Boot stack + System stack zips in twrp 3.0.3 unlocked bl
2) rebooted straight to recovery
3) flashing SuperSU wrote to system so I had to start again but forcing systemless (in terminal; echo "SYSTEMLESS">/data/.SuperSU
4) flash supersu, suhide
5) flash xposed
6) flash the safety net/kcal patch
7) reboot
And I still get stuck on "AXON" boot screen
H0lmEd said:
Not quite sure I understand you.
I've tried doing this on A2017g, b09;
0) wipe data/system/boot
1) flash stock Boot stack + System stack zips in twrp 3.0.3 unlocked bl
2) rebooted straight to recovery
3) flashing SuperSU wrote to system so I had to start again but forcing systemless (in terminal; echo "SYSTEMLESS">/data/.SuperSU
4) flash supersu, suhide
5) flash xposed
6) flash the safety net/kcal patch
7) reboot
And I still get stuck on "AXON" boot screen
Click to expand...
Click to collapse
SuperSU 2.79 installs in systemless mode, no need to set systemless.
Regarding your problem, please try this. Instead of rebooting using the button, open the terminal in TWRP and type "reboot disemmcwp". I hope this was your problem.
This doesn't work for me. Steps:
1. complete wipe
2. install b29 boot stack
2. install b29 system
3. install super su 2.79
4. install su hide 0.55
su hide comes back with an error that says it can't find super su and I should make sure I've installed 2.79 or greater.
edit:
I missed the part in step 3 where you say "reboot directly to recovery". I tried that, but it rebooted to system instead and now I lost TWRP entirely.
edit2:
fastboot flashed twrp again and once in recovery I was able to get through step 4
edit3:
Now it's just stuck on the axon logo. Tried force reboot and the same thing.
Are you sure you tested this from scratch? I have the US version of the axon 7.
Oki said:
SuperSU 2.79 installs in systemless mode, no need to set systemless.
Regarding your problem, please try this. Instead of rebooting using the button, open the terminal in TWRP and type "reboot disemmcwp". I hope this was your problem.
Click to expand...
Click to collapse
I have tried it and am stuck on the same stage also even after using "reboot disemmcwp".
I followed all of your steps and am using an A2017G B08.
corpdecker said:
I just did this on my B29 A2017U phone and it worked perfectly, can switch root on and off with the root switcher and Safetynet passes fully with root set to off.
My previous attempts were all thwarted by the bootloader being unlocked, so that patch to the kernel works great. I'll be backing this up with twrp and getting a little more adventurous (really want to try the BeastMode kernel) soon.
Much thanks for making it nice and simple, Oki !
Click to expand...
Click to collapse
Don't install beast mode yet, from my experience all the steps from op worked fine until I flashed beast mode and it broke safetynet.
lexman098 said:
This doesn't work for me. Steps:
1. complete wipe
2. install b29 boot stack
2. install b29 system
3. install super su 2.79
4. install su hide 0.55
su hide comes back with an error that says it can't find super su and I should make sure I've installed 2.79 or greater.
edit:
I missed the part in step 3 where you say "reboot directly to recovery". I tried that, but it rebooted to system instead and now I lost TWRP entirely.
edit2:
fastboot flashed twrp again and once in recovery I was able to get through step 4
edit3:
Now it's just stuck on the axon logo. Tried force reboot and the same thing.
Are you sure you tested this from scratch? I have the US version of the axon 7.
Click to expand...
Click to collapse
Are you using TWRP 3.0.3? SuperSU 2.79 installs fine and in systemless mode when flashed with the latest TWRP. TWRP 3.0.2 can't flash it properly.
Yes this method has been tested, not only with stock Roms, but also with ZADmix.
If you are doing a complete cleanup before flashing the ROM, boot into system at least once after installing the ROM so the data tree structure is setup. You actually don't need a full cleanup.
Kingo64 said:
I have tried it and am stuck on the same stage also even after using "reboot disemmcwp".
I followed all of your steps and am using an A2017G B08.
Click to expand...
Click to collapse
H0lmEd said:
And I still get stuck on "AXON" boot screen
Click to expand...
Click to collapse
Please ensure you have flashed the right stock ROM for your unit. I have modified Ingredient 2 in the OP since it was highly misleading. Ensure you have unlocked bootloader, TWRP 3.0.3 and flash the right ROM for your system: ZTE_A2017GV1.0.0B09_BootStack_by_tron1.zip and ZTE_A2017GV1.0.0B09_StockSystem_by_tron1.zip. And boot to the system at least once before continue to the rest of the procedure.

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

How I fixed Magisk 19 constant reboots on my phone

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.

How to have OTA with Twrp (no magisk needed)?

Hi all,
I have read about how to install Twrp, with method described for flashing roms, but i need twrp only for flashing mods eventually and nothing more, and i need to receive ota.
Which is the simpliest and secure way?
Boot.img method or fastboot slot a/b?
Hope i was clear enough and thanks all in advance.
In theory, you could:
- fastboot flash boot twrp.img (do NOT allow system modifications)
- fastboot continue or fastboot reboot (it is being mentioned that continue command is to be used on A3, though not sure why)
- do the magic in twrp
- fastboot flash boot stock_boot.img
- fastboot continue or fastboot reboot
- use the phone and install OTA when it arrives
However, I can't imagine what kind of mods do you want to install in TWRP. Any system modification will prevent OTA installation (even mounting system partition as R/W) and also can prevent booting up the phone (dm-verity). Most mods these days are systemless via Magisk. TWRP on Mi A3 is useful mainly for making (and possibly restoring) backups, installing custom ROMs and troubleshooting. For everything else you have Magisk.
_mysiak_ said:
In theory, you could:
- fastboot flash boot twrp.img (do NOT allow system modifications)
- fastboot continue or fastboot reboot (it is being mentioned that continue command is to be used on A3, though not sure why)
- do the magic in twrp
- fastboot flash boot stock_boot.img
- fastboot continue or fastboot reboot
- use the phone and install OTA when it arrives
However, I can't imagine what kind of mods do you want to install in TWRP. Any system modification will prevent OTA installation (even mounting system partition as R/W) and also can prevent booting up the phone (dm-verity). Most mods these days are systemless via Magisk. TWRP on Mi A3 is useful mainly for making (and possibly restoring) backups, installing custom ROMs and troubleshooting. For everything else you have Magisk.
Click to expand...
Click to collapse
Thanks for reply, really appreciated. Twrp grant you to mount system (for example with fonts) and then umount without issue with ota if you restore boot image, in theory.
Thanks again, maybe i use magisk but i use banks app and i don't want root
HTCDevil said:
Thanks for reply, really appreciated. Twrp grant you to mount system (for example with fonts) and then umount without issue with ota if you restore boot image, in theory.
Thanks again, maybe i use magisk but i use banks app and i don't want root
Click to expand...
Click to collapse
Nope, won't work. OTA update engine checks system partition metadata hash, if it doesn't match, it won't continue with the installation. Just mounting system partion as R/W will change its metadata. With banking apps you'll have more luck with Magisk than without for a simple reason, unlocked bootloader will fail the Safetynet test. Magisk can hide bootloader status, root and itself. Only a very few apps can detect Magisk (mostly with controversial "undocumented" methods).
Btw. fonts replacement is a perfect task for Magisk, there are already modules ready for this.
_mysiak_ said:
Nope, won't work. OTA update engine checks system partition metadata hash, if it doesn't match, it won't continue with the installation. Just mounting system partion as R/W will change its metadata. With banking apps you'll have more luck with Magisk than without for a simple reason, unlocked bootloader will fail the Safetynet test. Magisk can hide bootloader status, root and itself. Only a very few apps can detect Magisk (mostly with controversial "undocumented" methods).
Btw. fonts replacement is a perfect task for Magisk, there are already modules ready for this.
Click to expand...
Click to collapse
Thank you again, you are right, probably magisk is more secure than if you haven't it once bootloader is unlocked

Format Data if you failed to root new Miui 11.0.4.0 Android 10

I was having issue rooting with Magisk 20.3 and also Magisk Canary 20.4.
Tried many solution, but at the end, I format data and that works.
Please backup your photos and any important files. You will lose them.
What I did:
1. Installed Pitch Black Recovery (because i wanted to try a new recovery besides TWRP)
2. Boot to recovery
3. Format data
4. Flash Miui 11.0.4.0 and skip all google, mi account, pin setup because i want to speed up the process.
5. Installed Magisk 20.3 and Canary both works. I tried both.
Good luck
jyaki2 said:
I was having issue rooting with Magisk 20.3 and also Magisk Canary 20.4.
Tried many solution, but at the end, I format data and that works.
Please backup your photos and any important files. You will lose them.
What I did:
1. Installed Pitch Black Recovery (because i wanted to try a new recovery besides TWRP)
2. Boot to recovery
3. Format data
4. Flash Miui 11.0.4.0 and skip all google, mi account, pin setup because i want to speed up the process.
5. Installed Magisk 20.3 and Canary both works. I tried both.
Good luck
Click to expand...
Click to collapse
Any solution skip format data ?
I think with a custom kernel you might be able to fix it as well.

Categories

Resources