Magisk v16.0 Root - Lenovo P2, safety net pass (S233 and S244) - Lenovo P2 Guides, News, & Discussion

*UPDATED TO WORK WITH S244
*I can confirm this is working with the latest version of Magisk (v16.0)
you may not need to execute the script so install the SafetyNetFix first and test.
Hope all goes well, instructions below:
Install TWRP
Follow instructions on this Forum, easy to find.
Convert System from f2fs to ext4
System-less SU does not work on f2fs so you will need to reformat System to ext4,
In TWRP go to:
Wipe > Advanced Wipe.
Check System and Click 'Repair or Change File System' > Change File System > Select EXT4
You'll need to reinstall your firmware after you have formatted. (P2a42_S233/S244 Supports System in ext4 by default)
I would go for a clean install but you could try without wiping.
Run UnSU
Download UnSu here
Run UnSU in Recovery, this may mean you can miss the next step, try with or without (flashing boot image)
Flash original boot.img
This is only if you have tried rooting before (and System is already set to ext4) but failed safety checks, skip if not
Can be found on this forum in the Deodexed_P2a42_S233_170404_ROW.zip or Deodexed_P2a42_S244_170725_ROW.zip
(as long as you are on this firmware of course.)
Download Magisk v16.0
Click here to download latest Magisk
Install using TWRP, this will also install MagiskSU
Reboot, download and install MagiskManager.apk
Turn on Magisk Hide, Systemless Hosts
Hide Google Services Framework and Google Play Store
(I don't think this is necessary but no harm in doing so)
Download Kernel Adiutor from PlayStore
Could also run this in Terminal Emulator but with Kernel Adiutor the script is saved to run again if necessary
Click top left Menu, scroll down to: init.d (don't swipe to activate) Click + for new script and paste:
Code:
#!/system/bin/sh
echo "deleting magisk properties"
resetprop --delete init.svc.magisk_pfs
resetprop --delete init.svc.magisk_pfsd
resetprop --delete init.svc.magisk_service
resetprop --delete persist.magisk.hide
resetprop --delete ro.magisk.disable
resetprop --delete magisk.version
resetprop --delete persist.magisk.busybox
resetprop --delete persist.magisk.hide
Save then click and execute the script.
Install Safety net fix
(This may not be necessary, so reboot and check if you pass before installing this, if you do then no worries, you're good to go!)
Download and install the stable version from here
Install using Magisk Manager
Reboot phone and Open MagiskManager
Check that Safety Net Passes
Some apps may have detected your rooted phone prior to this and blacklisted your device ID
I recommend trying the app Device ID Changer
find here
Thanks to:
Magisk, TWRP, This thread for script and every contributor and developer for the Lenovo P2

Videophile said:
So this is how I was successful, I started with installing v13.1 and updating to v13.3
but you may have success directly installing v13.3.
Hope all goes well, instructions below:
Install TWRP
Follow instructions on this Forum, easy to find.
Convert System from f2fs to ext4
System-less SU does not work on f2fs so you will need to reformat System to ext4,
In TWRP go to:
Wipe > Advanced Wipe.
Check System and Click 'Repair or Change File System' > Change File System > Select EXT4
You'll need to reinstall your firmware after you have formatted. (P2a42_S233 Supports System in ext4 by default)
I would go for a clean install but you could try without wiping.
Flash original boot.img
This is only if you have tried rooting before (and System is already set to ext4) but failed safety checks, skip if not
Can be found on this forum in the Deodexed_P2a42_S233_170404_ROW.zip
(as long as you are on this firmware of course.)
Download Magisk v13.1
Install using TWRP, this will also install MagiskSU
Reboot, download and install MagiskManager.apk
Turn on Magisk Hide, Systemless Hosts
Hide Google Services Framework and Google Play Store
(I don't think this is necessary but no harm in doing so)
Download Kernel Adiutor from PlayStore
Click top left Menu, scroll down to: init.d (don't swipe to activate) Click + for new script and paste:
Code:
#!/system/bin/sh
echo "deleting magisk properties"
resetprop --delete init.svc.magisk_pfs
resetprop --delete init.svc.magisk_pfsd
resetprop --delete init.svc.magisk_service
resetprop --delete persist.magisk.hide
resetprop --delete ro.magisk.disable
resetprop --delete magisk.version
resetprop --delete persist.magisk.busybox
resetprop --delete persist.magisk.hide
Save then click and execute the script.
Reboot phone and Open MagiskManager
Check that Safety Net Passes
Update Magisk to v13.3
Update inside the Magisk Manager and reboot phone
Thanks to:
Magisk, TWRP, This thread for script and every contributor and developer for the Lenovo P2
Click to expand...
Click to collapse
I actually did not understand thid line -
You'll need to reinstall your firmware after you have formatted.
Why do i need to reinstall it after formation. After changing to ext4 cant i just boot the mobile. . And then root it with magisk. ? ??

If you format the system they'll be nothing there, hence why you'll have to reinstall firmware, or at the very least reinstall system. It will be blank after formatting.

Videophile said:
If you format the system they'll be nothing there, hence why you'll have to reinstall firmware, or at the very least reinstall system. It will be blank after formatting.
Click to expand...
Click to collapse
What if i dont format the system. Then??? Just wipe cache. Internal sd n data.

Well, as Systemless Su relies on your system being formatted as ext4 you would need to format, unless your System is already ext4 then as I stated in instructions you can skip that step. If your system is f2fs then you will need to format it to ext4 thus clearing it which will mean you will have to reinstall system to the newly formatted ext4 partition. I believe you could flash the system.img just as you would have done with the boot.img

Finally got this to work. Completely passes safetynet. Note: Do not install update from the app, it will cause bootloop. Download version 13.3 separately and then flash it using twrp. I also used lenovo p2 sefetynet fix magisk module along with the script above.

Uibon said:
Finally got this to work. Completely passes safetynet. Note: Do not install update from the app, it will cause bootloop. Download version 13.3 separately and then flash it using twrp. I also used lenovo p2 sefetynet fix magisk module along with the script above.
Click to expand...
Click to collapse
I know someone on this forum made changes that allowed them to update directly through the Magisk Manager.
Anyway, I have given up on Magisk. Modules that fails to install causing the Manager to crash, incompatibility with previous modules, difficulties upgrading to newer versions, official versions becoming as unreliable as betas, Google being a pain in the ass with frequent SN updates etc.

Can the files needed for this to work be added to the first post? Just to be sure it's been done right

Download Kernel Adiutor from PlayStore: is this really needed ?

robuser007 said:
Download Kernel Adiutor from PlayStore: is this really needed ?
Click to expand...
Click to collapse
It makes it easier to run the script but feel free to use an alternate script executor if you wish.

test passed on RR 5.8.2 but with "universal safetynet fix" MODULE................

I tried to install Magisk again (stock rom) just for the fun of it. Turned out I didn't need the safetynet fix...

eried1 said:
I tried to install Magisk again (stock rom) just for the fun of it. Turned out I didn't need the safetynet fix...
Click to expand...
Click to collapse
An easier guide: boot from twrp: backup all and safe it on your computer, convert only data partition to ext4(not the system partition!), reboot recovery and install magisk frop twrp: done!
Use magiskhide to hide root/bootloader.
If I rethink: is it really needed to convert data partition to ext4?

robuser007 said:
If I rethink: is it really needed to convert data partition to ext4?
Click to expand...
Click to collapse
I know you had to do it in the past. It's possible it isn't required any longer.

For magisk you still need to convert /data to ext

Will formatting from f2fs to ext4 result in lower performance of the internal partition?

will i be able to pass safetynet after installing xposed????

mdvamik said:
will i be able to pass safetynet after installing xposed????
Click to expand...
Click to collapse
No
---------- Post added at 03:52 PM ---------- Previous post was at 03:52 PM ----------
robuser007 said:
For magisk you still need to convert /data to ext
Click to expand...
Click to collapse
Yes

s251 ??
I'm on S251 now, can I still install magisk v.13.3 + root? Thanks in advance

nerofox said:
I'm on S251 now, can I still install magisk v.13.3 + root? Thanks in advance
Click to expand...
Click to collapse
You can, just flash the s244 boot image.

Related

Systemless root info

There seems to be a lot of issues regarding the systemless root method. Here is some help/basic info.
Prerequisite:
1. Bootloader must be unlocked
2. Must have TWRP recovery installed
How to systemless root:
1. Download SuperSU v2.61 or SuperSU v2.62-3. Both work, I use the v2.62-3.
2. Flash either in TWRP recovery. Reboot to system. You now have systemless root.
Problems/Fixes:
1. Don't update SuperSU via the Play Store. I didn't have any luck updating this way (nothing but problems). If you want to update SuperSU/binaries, just download the current version SuperSU v2.71 and flash it in TWRP. As long as you previously flashed one of the SuperSU's listed in "How to systemless root", it will boot without issue.
2. One of your favorite root apps doesn't see that your rooted? Do THIS.
I update super su from the playstore without issues.
kadopt said:
I update super su from the playstore without issues.
Click to expand...
Click to collapse
Could you explain your process? I tried updating from the 2.61 and had issues.
gokart2 said:
Could you explain your process? I tried updating from the 2.61 and had issues.
Click to expand...
Click to collapse
Well, to get root (systemless) you flash super su 2.62-3 with twrp, then go to playstore and update super su app, open Super su and a pop up will indicate that your binaries need updating, press OK and wait until it's complete, then just reboot your device.
Good post. I see nothing but problems in here from people trying to flash some of the newer supersu zips and not booting due to it installing to /system.
I'd just like to add that you can start with whatever version supersu you want (as long as it is new enough to support systemless install - don't dig out 2.47 and expect it to work). You don't have to start with 2.62, but 2.62 is a good choice since it only installed systemless.
On unrooted, unmodified stock you just have to add a preference file to force supersu to install systemless. I find its easiest to do via adb in TWRP, but TWRP's built-in terminal would work too. It is one extra step before rooting, but if you're on unmodified stock then you probably just fastboot flashed TWRP so the PC and USB cable are already handy. Just enter:
Code:
echo "SYSTEMLESS=true" >> /data/.supersu
Once that's done you should be able to flash newer supersu zips. No need to start from 2.62. :good:
gokart2 said:
1. Don't update SuperSU via the Play Store. I didn't have any luck updating this way (nothing but problems). If you want to update SuperSU/binaries, just download the current version SuperSU v2.71 and flash it in TWRP. As long as you previously flashed one of the SuperSU's listed in "How to systemless root", it will boot without issue.
Click to expand...
Click to collapse
Where can one find this magical "How to systemless root" list of safe-to-flash systemless SuperSU?
And I assume only the BETA versions are systemless? I have tried flashing the latest STABLE v2.76 and it just stuck on boot.
The SuperSU v2.62-3 that you mentioned does work but just want to find the latest version to flash.
jason2678 said:
Good post. I see nothing but problems in here from people trying to flash some of the newer supersu zips and not booting due to it installing to /system.
I'd just like to add that you can start with whatever version supersu you want (as long as it is new enough to support systemless install - don't dig out 2.47 and expect it to work). You don't have to start with 2.62, but 2.62 is a good choice since it only installed systemless.
On unrooted, unmodified stock you just have to add a preference file to force supersu to install systemless. I find its easiest to do via adb in TWRP, but TWRP's built-in terminal would work too. It is one extra step before rooting, but if you're on unmodified stock then you probably just fastboot flashed TWRP so the PC and USB cable are already handy. Just enter:
Code:
echo "SYSTEMLESS=true" >> /data/.supersu
Once that's done you should be able to flash newer supersu zips. No need to start from 2.62. :good:
Click to expand...
Click to collapse
Adding the single line text file to /data worked for me to root stock 1575 18-4 with the latest Supersu 2.76 stable.
Making it very easy for everyone, here's my simple flash zip which force-installs any version of SuperSU (2.62 or newer) as systemless.
What the installer does:
1. Copies the "systemless" file to the /data partition.
The systemless file contains the following:
SYSTEMLESS=true
BINDSYSTEMXBIN=false
Click to expand...
Click to collapse
2. Renames the "systemless" file in /data to ".supersu" (as required in SuperSU's guide to overriding.)
3. Installs SuperSU as systemless, as the "systemless/.supersu" file forces it to.
The installer includes SuperSU 2.76. Read updater-script in the ZIP if Chainfire releases a new update and you want to update the zip with a newer version of SuperSU.
EDIT: Updated the installer to apply permission fixes to /su/bin for Android Pay compatibility after installation.
EDIT 2: Removed the /su/bin permission script since SuperSU 2.76 now applies it itself.
EDIT 3: Fixed the installer to look for the correct filename of SuperSU. Everything is perfect now.
Spasticdroid said:
Making it very easy for everyone, here's my simple flash zip which force-installs any version of SuperSU (2.62 or newer) as systemless.
What the installer does:
1. Copies the "systemless" file to the /data partition.
2. Renames the "systemless" file in /data to ".supersu" (as required in SuperSU's guide to overriding.)
3. Installs SuperSU as systemless, as the "systemless/.supersu" file forces it to.
The installer includes SuperSU 2.76. Read updater-script in the ZIP if Chainfire releases a new update and you want to update the zip with a newer version of SuperSU.
EDIT: Updated the installer to apply permission fixes to /su/bin for Android Pay compatibility after installation.
Click to expand...
Click to collapse
Thanks for the script. It should make it easier for someone to apply systemless root. FYI, supersu 2.76 defaults the /su/bin to 751 permission.
csrow said:
Thanks for the script. It should make it easier for someone to apply systemless root. FYI, supersu 2.76 defaults the /su/bin to 751 permission.
Click to expand...
Click to collapse
Yeah I'm hoping this will make it easier for those who are flashing SuperSU and ending up with an un-bootable phone due to the installer defaulting to system root in newer versions.
I've removed the permission script since I had no idea 2.76 now applies it. Thanks for the heads up!
Spasticdroid said:
Making it very easy for everyone, here's my simple flash zip which force-installs any version of SuperSU (2.62 or newer) as systemless.
What the installer does:
1. Copies the "systemless" file to the /data partition.
2. Renames the "systemless" file in /data to ".supersu" (as required in SuperSU's guide to overriding.)
3. Installs SuperSU as systemless, as the "systemless/.supersu" file forces it to.
The installer includes SuperSU 2.76. Read updater-script in the ZIP if Chainfire releases a new update and you want to update the zip with a newer version of SuperSU.
EDIT: Updated the installer to apply permission fixes to /su/bin for Android Pay compatibility after installation.
EDIT 2: Removed the /su/bin permission script since SuperSU 2.76 now applies it itself.
Click to expand...
Click to collapse
Flashed your script but SU wasn't installed. After that, I flashed SU 2.76 in TWRP and everything is as it should be. Android Pay also working.:good:
Edvin73 said:
Flashed your script but SU wasn't installed. After that, I flashed SU 2.76 in TWRP and everything is as it should be. Android Pay also working.:good:
Click to expand...
Click to collapse
Found the issue. The installer couldn't find the zip as I pointed it to a different file that wasn't there
("supersu-v2.76-20160630161323.zip" instead of "UPDATE-SuperSU-v2.76-20160630161323.zip". Thanks!
Spasticdroid said:
Found the issue. The installer couldn't find the zip as I pointed it to a different file that wasn't there
("supersu-v2.76-20160630161323.zip" instead of "UPDATE-SuperSU-v2.76-20160630161323.zip". Thanks!
Click to expand...
Click to collapse
Do you have changed this in the zip file? So if i download the zip it will Flash super user or do i have to Flash super su separate?
Sent from my XT1572 using XDA-Developers mobile app
Ijspegel said:
Do you have changed this in the zip file? So if i download the zip it will Flash super user or do i have to Flash super su separate?
Sent from my XT1572 using XDA-Developers mobile app
Click to expand...
Click to collapse
Yes, I have updated the zip to fix this and it will now find and flash it.
Spasticdroid said:
Yes, I have updated the zip to fix this and it will now find and flash it.
Click to expand...
Click to collapse
Thank you for your work on this one, it is very helpfull!?
Sent from my XT1572 using XDA-Developers mobile app
Spasticdroid said:
Making it very easy for everyone, here's my simple flash zip which force-installs any version of SuperSU (2.62 or newer) as systemless.
What the installer does:
1. Copies the "systemless" file to the /data partition.
2. Renames the "systemless" file in /data to ".supersu" (as required in SuperSU's guide to overriding.)
3. Installs SuperSU as systemless, as the "systemless/.supersu" file forces it to.
The installer includes SuperSU 2.76. Read updater-script in the ZIP if Chainfire releases a new update and you want to update the zip with a newer version of SuperSU.
EDIT: Updated the installer to apply permission fixes to /su/bin for Android Pay compatibility after installation.
EDIT 2: Removed the /su/bin permission script since SuperSU 2.76 now applies it itself.
EDIT 3: Fixed the installer to look for the correct filename of SuperSU. Everything is perfect now.
Click to expand...
Click to collapse
Thanks man, your script was the only thing that worked for me, but now wifi isn't working. what can I do?
Spasticdroid said:
Making it very easy for everyone, here's my simple flash zip which force-installs any version of SuperSU (2.62 or newer) as systemless.
What the installer does:
1. Copies the "systemless" file to the /data partition.
2. Renames the "systemless" file in /data to ".supersu" (as required in SuperSU's guide to overriding.)
3. Installs SuperSU as systemless, as the "systemless/.supersu" file forces it to.
The installer includes SuperSU 2.76. Read updater-script in the ZIP if Chainfire releases a new update and you want to update the zip with a newer version of SuperSU.
EDIT: Updated the installer to apply permission fixes to /su/bin for Android Pay compatibility after installation.
EDIT 2: Removed the /su/bin permission script since SuperSU 2.76 now applies it itself.
EDIT 3: Fixed the installer to look for the correct filename of SuperSU. Everything is perfect now.
Click to expand...
Click to collapse
OMG THANK YOU
I had accidentally installed the wrong SU and i thought I would have to wipe my entire device after hours of trying different methods. Yours was the only one that worked and my phone booted back on. Thank you so much.
Taking a risk of sounding stupid, will your SystemLess Root work for Android 7.0 Nougat?
Need help guys i flash super su v2.46 now on bootloop i have twrp install how do i get the newer supersu to flash to my phone . How and where would i downloqd it .
phillyguy /northeast said:
Need help guys i flash super su v2.46 now on bootloop i have twrp install how do i get the newer supersu to flash to my phone . How and where would i downloqd it .
Click to expand...
Click to collapse
Didn't we fix this in another thread?!?!

Dilemma: Magisk and Xposed boot loop

Dear all,
I'm in quite a dilemma. I have an FRD-L09 with the following environment:
Oreo Firmware (FRD-L09C432B521)
Unlocked FRD and Bootloader
TWRP 3.2.1 from 7to.cn (the one which can mount /system writable) (this one: https://forum.xda-developers.com/ho...p-ish-twrp-3-2-1-honor-9-running-gsi-t3818442)
I did not go the "Fix DataEncryption" way because, to me, it's pretty convenient that nobody is able to access /data even with TWRP, so if the phone gets stolen, my data is protected
I installed Magisk 17.1 and Magisk Manager which worked perfectly fine.
Then I downloaded and installed the corresponding Xposed Module for Magisk (apparently system-less, so Xposed-Uninstaller.zip doesn't work). This resulted in a boot loop.
I'm not able to suppress Xposed loading with the usual "press a device button many times in a row".
If I uninstall Magisk (i.e. flash stock recovery.img extracted from update.app), the system boots up normally, so it's Magisk+Xposed that causes the boot loop
BUT: Now I'm unable to remove the Xposed module from /data/magisk.img because 1. of course I can't access /data from a booted system without root and 2. I can't access /data from TWRP because I want to leave it protected.
Also, the "Fix DataEncryption" option apparently wipes the /data partition which I'd really like to avoid.
With other TWRP releases, I cannot access /data even after entering my lockscreen PIN or the "default_password" as decryption password, so I'm pretty certain that the encryption key is derived by other means - I think I remember reading that it's stored somewhere in hardware, which is also why, for Custom ROMs, encryption on Honor 8 is always an issue.
So does anyone have any clue how I can either access /data from TWRP while keeping it encrypted, or delete magisk.img via any other way?
I'll be happy about any hint!
EdRoxter said:
Dear all,
I'm in quite a dilemma. I have an FRD-L09 with the following environment:
Oreo Firmware (FRD-L09C432B521)
Unlocked FRD and Bootloader
TWRP 3.2.1 from 7to.cn (the one which can mount /system writable) (this one: https://forum.xda-developers.com/ho...-ish-twrp-3-2-1-honor-9-running-gsi-t3818442)
I did not go the "Fix DataEncryption" way because, to me, it's pretty convenient that nobody is able to access /data even with TWRP, so if the phone gets stolen, my data is protected
I installed Magisk 17.1 and Magisk Manager which worked perfectly fine.
Then I downloaded and installed the corresponding Xposed Module for Magisk (apparently system-less, so Xposed-Uninstaller.zip doesn't work). This resulted in a boot loop.
I'm not able to suppress Xposed loading with the usual "press a device button many times in a row".
If I uninstall Magisk (i.e. flash stock recovery.img extracted from update.app), the system boots up normally, so it's Magisk+Xposed that causes the boot loop
BUT: Now I'm unable to remove the Xposed module from /data/magisk.img because 1. of course I can't access /data from a booted system without root and 2. I can't access /data from TWRP because I want to leave it protected.
Also, the "Fix DataEncryption" option apparently wipes the /data partition which I'd really like to avoid.
With other TWRP releases, I cannot access /data even after entering my lockscreen PIN or the "default_password" as decryption password, so I'm pretty certain that the encryption key is derived by other means - I think I remember reading that it's stored somewhere in hardware, which is also why, for Custom ROMs, encryption on Honor 8 is always an issue.
So does anyone have any clue how I can either access /data from TWRP while keeping it encrypted, or delete magisk.img via any other way?
I'll be happy about any hint!
Click to expand...
Click to collapse
Re-install EMUI 8 with eRecovery.
ThePS4Gamer said:
Re-install EMUI 8 with eRecovery.
Click to expand...
Click to collapse
Yeah, I really hoped I could do something without wiping my /data partition, but I guess I'll have to back up my data and do a factory reset and start over...
PS: eRecovery only offers EMUI 5 on the Honor 8 - EMUI 8 is only installable via HiSuite.
EdRoxter said:
Yeah, I really hoped I could do something without wiping my /data partition, but I guess I'll have to back up my data and do a factory reset and start over...
PS: eRecovery only offers EMUI 5 on the Honor 8 - EMUI 8 is only installable via HiSuite.
Click to expand...
Click to collapse
Solution is simple.
Requirement:
TWRP(which Twrp? honor view 10's. Research how to install)
Solution:
-install magisk pached boot img to ramdisk and twrp to recovery_ramdisk
-boot in Twrp
-then navigate to Advance->Terminal
-write below command:
touch /cache/.disable_magisk && chmod 0777 /cache/.disable_magisk && sync && reboot
Behind the scene: It will enable magisk core only mode, then uninstall malfunctioning modules from magisk manager and disable core only mode, reboot and mtv enjoy
spica1234 said:
touch /cache/.disable_magisk && chmod 0777 /cache/.disable_magisk && sync && reboot
Behind the scene: It will enable magisk core only mode, then uninstall malfunctioning modules from magisk manager and disable core only mode, reboot and mtv enjoy
Click to expand...
Click to collapse
Thank you so much! This was exactly was I was looking for, but googling for "disable Magisk boot" and the like didn't bring up any results other than a bunch of tutorials on how to remove Magisk modules from TWRP with uninmod, which obviously didn't work for me because I couldn't mount /data from TWRP.

Advanced OTA keeping Magisk and TWRP (needs a computer)

History...
I originally wrote this guide to upgrade from 10.0.4.0 to 10.0.7.0.
I have also used this same guide to install every OTA from 10.0.7.0 to 11.0.11.0.
This guide assumes you have both Magisk and TWRP, that Magisk cannot "uninstall" (because of TWRP installation) and that you want to keep both Magisk and TWRP after installation. Parts of this guide may still be useful if you aren't in this exact situation.
If you only have Magisk, you should be able to follow these much simpler instructions: https://forum.xda-developers.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
Things to have on hand:
- vanilla_boot.img (for the version you currently have)
- patched_boot.img (your current boot image with Magisk)
- TWRP img and zip (see version info below)
I think that TWRP also causes the vendor partition to be modified. It may also touch system but I have a modified bootanimation.zip which modifies system, so I can't be sure. In any case, I also have a backup of system.img and vendor.img.
Because Magisk is installed after TWRP, Magisk's "backup" of the "stock boot image" is not vanilla. This means that in order to take the OTA, I have to flash the vanilla boot image.
0 - Update your patched_boot.img
If you don't have a patched_boot.img for your current Magisk (eg. my patched_boot.img was old, since I had installed several Magisk updates), you should build a new patched_boot.img so that when you boot it, the system will continue to work.
Push the vanilla image to the phone.
Code:
adb push vanilla_boot.img /sdcard
Then get Magisk to install using the "Select and Patch a File" method, select the file you uploaded. Then pull down the patched image.
Code:
adb pull /sdcard/Download/magisk_patched.img patched_boot.img
1 - Prepare to OTA
For some reason, my carrier does not like the OTA process so I always turn on Airplane mode + Wifi.
Get to fastboot and check the current slot.
Code:
adb reboot bootloader
fastboot getvar current-slot
My current slot was b
Flash the system and vendor partitions (if necessary).
Code:
fastboot flash system_b vanilla_system.img
fastboot flash vendor_b vanilla_vendor.img
Flash vanilla and boot the patched image (so that Magisk is active and the OTA can be applied).
Code:
fastboot flash boot_b vanilla_boot.img
fastboot boot patched_boot.img
2 - Do the OTA
Install OTA (DO NOT REBOOT)
If the OTA fails
If the OTA fails, you can find out which partitions it doesn't like from the logcat. If you have a fastboot image, you can reflash the affected partitions. As previously mentioned, I've had to flash all of boot, vendor and system for each OTA.
Code:
adb logcat | grep update_engine
...
07-01 06:52:38.470 E/update_engine(935): [0701/065238.470683:ERROR:delta_performer.cc(990)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
07-01 06:52:38.470 E/update_engine(935): [0701/065238.470931:ERROR:delta_performer.cc(995)] Expected: sha256|hex = A4AD686D7BF628486668446221D0089BF5915DBC1158C83D30A06222FE7D2ACB
07-01 06:52:38.471 E/update_engine(935): [0701/065238.471002:ERROR:delta_performer.cc(998)] Calculated: sha256|hex = 4CADBE88EC1C019913A0B416EB9031840D4BA6B2287A3FC814A2B8B7F9871F7D
07-01 06:52:38.473 E/update_engine(935): [0701/065238.471072:ERROR:delta_performer.cc(1009)] Operation source (offset:size) in blocks: 0:5221,5461:405,5869:1,5873:343,6221:589
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473233:ERROR:delta_performer.cc(1191)] ValidateSourceHash(source_hash, operation, source_fd_, error) failed.
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473340:ERROR:delta_performer.cc(298)] Failed to perform BROTLI_BSDIFF operation 187, which is the operation 0 in partition "boot"
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473411:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
07-01 06:52:38.739 E/SystemUpdate(15410): [Execution,NonStreamingAbApplyAction] Installation failed with error code: 20.
3 - Backup the vanilla boot image
Note that you need to pull from the other slot (in my case, a).
Code:
adb shell
su
dd if=/dev/block/by-name/boot_a of=/sdcard/vanilla_boot.img bs=1024k
Backup system.img and vendor.img too (if required).
Code:
dd if=/dev/block/by-name/system_a of=/sdcard/vanilla_system.img bs=1024k
dd if=/dev/block/by-name/vendor_a of=/sdcard/vanilla_vendor.img bs=1024k
4 - Magisk patch the other slot
Use Magisk to "Install to Inactive Slot (After OTA)" (DO NOT REBOOT)
5 - Backup the patched boot image
Note that you need to pull from the other slot (in my case, a).
Code:
dd if=/dev/block/by-name/boot_a of=/sdcard/patched_boot.img bs=1024k
exit
exit
# back on your computer
adb pull /sdcard/vanilla_boot.img
adb pull /sdcard/patched_boot.img
Pull down system and vendor images too (if required).
Code:
adb pull /sdcard/vanilla_system.img
adb pull /sdcard/vanilla_vendor.img
Now you can let Magisk reboot. This is the moment of truth...
At this point you should have an upgraded, Magisk-enabled system and backups of the vanilla and patched boot images. Congratulations on completing the OTA!
If the system fails to boot
There's a few things to try before giving up if the system fails to boot...
1) Boot without Magisk (fastboot boot vanilla_boot.img). Probably indicates that a Magisk module you have is no longer compatible.
2) Boot TWRP (fastboot boot twrp.img) and poke at things. As an example, I used the /sdcard/mm program (part of Magisk Manager for recovery) to disable EdXposed when the OTA to Android 10 failed to boot.
6 - Restore TWRP
It is possible to boot TWRP from fastboot so you don't strictly need to install TWRP. I like to have it available anyway.
Old version info...
I had been using the official TWRP 3.2.3, which worked great up until 10.0.9.0. With 10.0.9.0, I couldn't get to TWRP, I just got the system destroyed screen. I could fastboot boot it, but it couldn't mount /data (a problem it has always had).
I figured out that TWRP 3.3.1-dees_troy (from the official TWRP site) works with 10.0.9.0 and up. What's more, it works (can decrypt /data) if you fastboot boot it, not just after install. So you could in theory simply not install TWRP and fastboot boot if in the event that you actually need it.
I know that people have their own favourite versions, with the offain version being popular (didn't work for me). There's OrangeFox too (also didn't work for me).
In summary, I recommend Official TWRP 3.3.1-dees_troy but if you have a favourite alternative, feel free to use it instead.
TWRP thread: https://forum.xda-developers.com/mi-a2-lite/development/official-twrp-daisy-t3855396
Download link: https://dl.twrp.me/daisy/
Restoring TWRP is the same as installing it the first time. This is the process that I use.
Flash vanilla boot, then install TWRP to it.
Code:
adb reboot bootloader
fastboot boot twrp-3.3.1-dees_troy-daisy.img
Install TWRP
Code:
adb push twrp-installer-3.3.1-dees_troy-daisy.zip /sdcard
Use TWRP to install twrp-installer-3.3.1-dees_troy-daisy.zip
I install my modified bootanimation.zip at this time.
Mount System from TWRP (it is normally already mounted for me).
From a shell:
Code:
adb shell
cd /sdcard
cp bootanimation.zip /system/system/media/bootanimation.zip
Umount System
You must re-install Magisk after installing TWRP.
Code:
adb reboot bootloader
fastboot boot patched_boot.img
Use Magisk to "Direct Install (Recommended)"
Reboot
For some reason, my carrier does not like the OTA process so at this point I normally power off the phone rather than just rebooting. When the phone boots, I can turn off airplane mode and check that a mobile data connection can be made.
7 - Confirm that everything works
Make sure the system comes up and Magisk Manager says that Magisk is installed.
Make sure you can get to TWRP. Boot while holding VOL+ or
Code:
adb reboot recovery
Make sure TWRP can see your files.
Congratulations! You have installed an OTA while keeping Magisk and TWRP!
8 - Backup boot.img with TWRP + Magisk (optional)
If you want a copy of the boot.img with both Magisk and TWRP. This pulls from the now-current slot (in my case, a). I'm not totally sure of the value of this, since I can't get fastboot to boot this image. It may come in handy if you upgrade TWRP and that breaks (since you can flash this back rather than having to install the old TWRP again).
Code:
adb shell
su
cd /sdcard
dd if=/dev/block/by-name/boot_a of=twrp_boot.img bs=1024k
exit
exit
# back on the computer
adb pull /sdcard/twrp_boot.img
Thanks. Could you upload or indicate where we can get the necessary files?
Will i loose all user data and internal storage wiped if i do this?
Thanks for sharing, looks complicated, also i think you should use a fixed twrp, since the official dont have acces to sdcard.
rossarnie said:
Thanks. Could you upload or indicate where we can get the necessary files?
Click to expand...
Click to collapse
If you have Magisk, you should already have the vanilla and patched boot.img files.
Of you don't already have Magisk, just follow the install procedure here. https://forum.xda-developers.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
If you're running 10.0.4.0 without magisk and need to extract your vanilla boot.img. Use fastboot to boot into twrp and then you can do the DD command to extract boot. Use adb pull to save it to PC.
I used official TWRP from here.
https://forum.xda-developers.com/mi-a2-lite/development/official-twrp-daisy-t3855396
Apparently there's a different twrp that can access the external SD card. I don't have an external SD card so I don't need it.
dr.bahaeddin said:
Will i loose all user data and internal storage wiped if i do this?
Click to expand...
Click to collapse
I didn't lose any data.
I've never had a problem with Magisk. TWRP does tend to bootloop after install, which is why I install magisk again.
You should be able to flash the patched or vanilla boot if twrp is boot looping to fix it too. Just won't have twrp anymore.
a1291762 said:
I didn't lose any data.
Click to expand...
Click to collapse
Mind you. I have a backup of my apps and data that's off of my phone so even if I do need to factory reset I can get it back. That's a longer and more complicated guide.
Txatxiquesi said:
looks complicated.
Click to expand...
Click to collapse
Before I had twrp the standard Magisk ota process was enough. But that loses twrp and with twrp in my magsik backup, the uninstall didn't work. So extra steps are needed. Plus some extra steps to make backups of important files for the next OTA
a1291762 said:
If you have Magisk, you should already have the vanilla and patched boot.img files.
Click to expand...
Click to collapse
Hmm... This may not be the case. I'm careful to make backups but it's easy to skip this.
If you don't have a patched boot image you can backup your current boot partition from a root shell. You need to find out if you are booting a or b slot. Then
dd if=/dev/block/by-name/boot_a of=/sdcard/patched_boot.img bs=1024k
Magisk puts old stock backups into /data. I had 4 files in there which makes it hard to know what each file is.
That's why I made sure to backup my vanilla boot image immediately.
If you're stuck without a vanilla 10.0.4.0 boot you can't do the OTA. I can upload mine somewhere when I get home tonight if it's not already online.
a1291762 said:
...If you're stuck without a vanilla 10.0.4.0 boot you can't do the OTA. I can upload mine somewhere when I get home tonight if it's not already online.
Click to expand...
Click to collapse
This would be very helpful, please
FunkmasterC said:
This would be very helpful, please
Click to expand...
Click to collapse
Here is the backup I made of the 10.0.4.0 vanilla boot.img. You'll need to decompress this before flashing.
URL REMOVED
What's new on 10.0.7.0 bro? Should me wait for 10.1 update if im on 10.0.4.0 rooted?
10.0.7.0 has the March security patches. I haven't noticed any actual changes.
Thank you, your Linux commands are sick, I never know I can get the vanilla and patched boot.img like that.
Cheer~
is there an update for file version 10.0.8.0??
I only just got the notification this morning. I'll do the upgrade tonight but I expect the same process will work.
I just used the same process to go from 10.0.7.0 to 10.0.8.0. This time I was installing to slot b instead of slot a, but otherwise, things were the same.
A side note... I hadn't got around to installing TWRP 3.3.0 so I did that but it couldn't mount /data. TWRP 3.2.3 can mount /data, so I installed that again.
a1291762 said:
I just used the same process to go from 10.0.7.0 to 10.0.8.0. This time I was installing to slot b instead of slot a, but otherwise, things were the same.
A side note... I hadn't got around to installing TWRP 3.3.0 so I did that but it couldn't mount /data. TWRP 3.2.3 can mount /data, so I installed that again.
Click to expand...
Click to collapse
I have successfully updated to 10.0.8.0 with Magisk 18.1, now on Magisk 19.1, everything is running fine. I'd like to also install TWRP but refrain from doing so because of the problems (bootloops, crashes, etc) the official TWRP 3.2.3 shows with decryption in Pie and mounting external or even internal sdcard. I wonder if the latter is fixed in the inofficial fixed version. I think the benefit of TWRP is not worth the effort of repeating a1291762 wonderful tricky procedure on the monthly OTA update basis.
However the procedure is very smart, a back-to-the-roots approach of former days... great, I like it.
But I don't understand how a patched_boot.img can be created from an empty file (boot_a)?
[dd if=/dev/block/by-name/boot_a of=patched_boot.img bs=1024k] Locating the boot_a in </dev/block/by-name/> reveals a boot_a file with 0 bytes. Moreover, to unzip the zipped stock boot Image in </data/stock_boot*.img> or </sbin/.magisk/mirror/data/> I am looking for a command that just returns the boot file rather than expanding it to the full partition. Weird, can anybody help?
Thanks again to a1291762
grufty47
It appears that it is not possible to add some boot.img as attachment
grufty47 said:
I'd like to also install TWRP but refrain from doing so because of the problems (bootloops, crashes, etc) the official TWRP 3.2.3 shows with decryption in Pie and mounting external or even internal sdcard.
Click to expand...
Click to collapse
I use official TWRP 3.2.3. Only really to fix bootloop problems.
I don't have a SD and no problems mounting data.
Lots of people following the TWRP install guide seem to get bootloop. I solve that by patching boot with Magisk. Some people recommend installing an old about image.
If you have a backup of boot you can at least restore that if you have problems.
grufty47 said:
But I don't understand how a patched_boot.img can be created from an empty file (boot_a)?
Click to expand...
Click to collapse
Welcome to Unix, where nearly everything is a file.
Hard disk? /dev/sda
Partition? /dev/sda1
File? /mnt/sda1/file.txt
In this case, boot_a is a way to access a partition on the phone's flash. Actually a link (shortcut) to /dev/mmcblk0p52. Partition number 53 on flash chip 1. The size can't be seen because it's a device and not a file.
grufty47 said:
I am looking for a command that just returns the boot file rather than expanding it to the full partition.
Click to expand...
Click to collapse
dd is a command to read a device. The partition is 64M big so that's the size of the file. gzip can compress well because the actual image is only 24M big and the rest is empty.
Magisk knows how to do it. A tool called magiskboot but I don't know where it lives or how to run it.
I found this header from magiskboot. It shows how the boot.img is structured.
https://github.com/topjohnwu/Magisk/blob/master/native/jni/magiskboot/bootimg.h
I just did the 10.0.9.0 OTA. I added a section of updating your patched_boot.img (since the Magisk updates I did made my old one useless) and I changed the backup instructions due to changes in Magisk 19. If you know where the stock boot lives before reboot, please let me know.

Can I Modify boot.img to install Magisk in "Core Only"?

I have a Google Pixel 3a (Google Store), bootloader unlocked, been on Magisk Canary since I got it. When I updated to Android 10, one of the modules I had installed (Miracast enabler) was/is not compatible and caused a bootloop (I know, I'm stupid). Flashing the stock boot.img of course solves the problem because root is gone. This is an A/B boot device an 10 so:
- TWRP cannot decrypt /data which means I cannot access /data/cache
- No access to /data/cache means I cannot add the 'disable_magisk' file to boot Core Only mode
- No data/cache access also means I cannot simply delete the module/s
- Magisk through TWRP command prompt or adb are useless because, again, I cannot access /data/cache
The only possible solution I can think of is to modify my boot.img to boot Magisk in Core Only mode so I can remove the module, then flash a proper modified boot.img to regain full Magisk capability. I have poured over online documentation and cannot seem to find the answer on how, if possible, I can do this. Magisk's own documentation seems to suggest the only solution is to wipe /data.
Is there any way I can modify a boot.img to boot Magisk in Core Only mode always? Thank you!
MichRT said:
I have a Google Pixel 3a (Google Store), bootloader unlocked, been on Magisk Canary since I got it. When I updated to Android 10, one of the modules I had installed (Miracast enabler) was/is not compatible and caused a bootloop (I know, I'm stupid). Flashing the stock boot.img of course solves the problem because root is gone. This is an A/B boot device an 10 so:
- TWRP cannot decrypt /data which means I cannot access /data/cache
- No access to /data/cache means I cannot add the 'disable_magisk' file to boot Core Only mode
- No data/cache access also means I cannot simply delete the module/s
- Magisk through TWRP command prompt or adb are useless because, again, I cannot access /data/cache
The only possible solution I can think of is to modify my boot.img to boot Magisk in Core Only mode so I can remove the module, then flash a proper modified boot.img to regain full Magisk capability. I have poured over online documentation and cannot seem to find the answer on how, if possible, I can do this. Magisk's own documentation seems to suggest the only solution is to wipe /data.
Is there any way I can modify a boot.img to boot Magisk in Core Only mode always? Thank you!
Click to expand...
Click to collapse
Here you go :
https://forum.xda-developers.com/showpost.php?p=80190577&postcount=554
Since then there was also a patch to magisk to resolve this kind of issue.
While you can't boot you can still use "magisk --remove-modules" through adb shell (or twrp I guess), which will automatically remove all your modules next time you boot.
reyqn said:
Since then there was also a patch to magisk to resolve this kind of issue.
While you can't boot you can still use "magisk --remove-modules" through adb shell (or twrp I guess), which will automatically remove all your modules next time you boot.
Click to expand...
Click to collapse
You have to use last magisk (above 19.4 if my memories are right).
HpNoTiQ said:
Here you go :
https://forum.xda-developers.com/showpost.php?p=80190577&postcount=554
Click to expand...
Click to collapse
This looks like it might work, so thank you! I found a similar, though different solution (below)
reyqn said:
Since then there was also a patch to magisk to resolve this kind of issue.
While you can't boot you can still use "magisk --remove-modules" through adb shell (or twrp I guess), which will automatically remove all your modules next time you boot.
Click to expand...
Click to collapse
I ran into the issue that while boot-looping with a magisk patched boot img, I wasn't able to run the command, adb wasn't finding the phone. I tried again after booting TWRP and it basically threw an 'error - command not found'.
HpNoTiQ said:
You have to use last magisk (above 19.4 if my memories are right).
Click to expand...
Click to collapse
I think you are right, in beta/canary channel
@Tulsadiver gave me a hand with this, see here: https://forum.xda-developers.com/showpost.php?p=80398385&postcount=35997
Thank you guys!

[MAGISK][ROOT][BOOT.IMG] How to patch the Oneplus 8, 8T and 8 Pro stock Boot Image (boot.img) from the currently installed Stock ROM

Quick and concise how to for obtaining a Stock Boot Image from your Oneplus 8, 8T or 8 Pro device and patching with Magisk to create a fastboot flashable patched boot.img.
DISCLAIMER:
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked, broken or dead devices. This is a high-level
* how to for users with a basic knowledge of ADB and Fastboot. YOU alone are
* choosing to make these modifications, and you are solely responsible for your
* device's fit for use and wellbeing.
*
* Backup your data!
*
*/
PREREQUISITS:
An unpatched Stock Boot.img running on your device
General knowledge and understanding of ADB and Fastboot
Download latest op8, op8p, or op8t Horizon Kernel img from [e.g., op8p_7.img]:
https://dl.akr-developers.com/?dir=oneplus/horizon_kernel/R/images
Download latest Magisk Canary build from Github [e.g., app-debug.apk]:
https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/app-debug.apk
DEVICE/PC OPERATIONS:
→ ADB
Enumerate devices
Code:
adb devices
Boot into Fastboot
Code:
reboot bootloader
→ FASTBOOT
Enumerate devices
Code:
fastboot devices
Determine the current slot (A/B), whichever slot you're on should be the "good" img
Code:
fastboot getvar current-slot
Boot with the custom kernel downloaded from Horizon to use root [NOTE: Include the full path of the img if not in the same directory]
e.g., fastboot boot "C:\Users\User\Downloads\op8p_R7.img"​
Code:
fastboot boot xxxxxxx.img
→ ADB
Copy the boot.img from each slot to the root of the device
Code:
adb shell
su
dd if=/dev/block/sde11 of=/sdcard/boot_a.img
dd if=/dev/block/sde35 of=/sdcard/boot_b.img
→ Android Device [NOTE: Some Android 11 devices experience patching issues on the Beta Channel like bootloop] [NOTE: Some users experience issues on Canary like no SIM detected; if so switch to Beta]
Install Magisk app-debug.apk (Canary)
Go to Settings → Update Channel → Canary
Go to Home → Install → Install → Select and Patch A File
Navigate to internal storage and select the stock boot.img [choose the img from whichever slot you're on]
When it’s done patching copy the file, named magisk_patched.img, from the root → Downloads of your device to PC
→ ADB
Code:
reboot bootloader
→ FASTBOOT
Test to ensure it boots before flashing; if not you'll need to patch the other img
Code:
fastboot boot magisk_patched.img
→ Android Device
If the device boots and you have root in the Magisk Manager app, reboot the device into Fastboot then flash the active slot [NOTE: Both slots do not need to be flashed; just the current active slot]
→ FASTBOOT
Flash the patched image file [NOTE: Include the full path of the img if not in the same directory]
e.g., fastboot flash boot_b "C:\Users\User\Downloads\magisk_patched.img"
Code:
fastboot flash boot magisk_patched.img
fastboot reboot
- OR -​
Code:
fastboot flash boot_a magisk_patched.img
fastboot reboot
- OR -​
Code:
fastboot flash boot_b magisk_patched.img
fastboot reboot
ADDITIONAL RESOURSES:
→ FASTBOOT
If you need to set the other slot to be the active slot use:
Code:
fastboot --set-active=a
- OR -​
Code:
fastboot --set-active=b
→ ADB
ADB Magisk Bootloop Fix
Code:
adb shell
magisk --remove-modules
→ OTA Help
Magisk stock boot.img missing fix [NOTE: Android 11 onwards, the /sbin folder might not exist, so Magisk will randomly create a folder under /dev and use it as the base folder]
Rename to: stock_boot_0.img
Compress with gzip = stock_boot_0.img.gz
Copy stock_boot_0.img.gz file to the root of: /data
Edit the config file: /dev/xxxxxxx/.magisk/config → Change SHA1= to 0
Magisk Manager → Uninstall Magisk → Restore Images
→ ADB
Determine the random folder name generated by Magisk on Android 11+
Code:
ls -laR /dev | grep '.magisk/rootdir'
→ ADB
Determine the Boot Image partition location [NOTE: Will list all partitions; look for boot_a and boot_b]
Code:
ls /dev/block/bootdevice/by-name/ -all
Tried some other way on android 11 but failed, so back to android 10.
maybe i won't get android 11 until TWRP is work.
can't easily backup data without root is very annoying, thanks for the work!
I have followed every step, but root only last until I restart my Oneplus.
What am I doing wrong? Why want the device stay rooted?
mrram said:
I have followed every step, but root only last until I restart my Oneplus.
What am I doing wrong? Why want the device stay rooted?
Click to expand...
Click to collapse
Guessing here, but have a second look at these two commands:
Code:
fastboot boot magisk_patched.img
△ This will NOT flash the rooted image, it will only boot up once so you can test it or use it for temporary root
verses
Code:
fastboot flash boot magisk_patched.img
▲ This will flash the rooted image and is used after you've tested the patched image to be sure it doesn't bootloop and to have persistent root
If I use this Horizon kernel to boot with root on 11.0.4.4, could I use directly Magisk 22.0 to root the device permanently? Thanks in advance.
MagikGab said:
If I use this Horizon kernel to boot with root on 11.0.4.4, could I use directly Magisk 22.0 to root the device permanently? Thanks in advance.
Click to expand...
Click to collapse
I only use the Horizon to boot then grab my kernel to patch with Magisk. You could use the Horizon kernel, but you would have to flash it, not just boot it. So, root device, backup stock dtbo, flash Horizon & dtbo, re-root if lost during flash. I would recommend against that until there's a custom recovery available in case there were any issues. Additionally, you must backup your stock dtbo if you ever want to return to stock. You should visit the Horizon thread for more details, but again if you're not familiar with kennel mods you might not want to start learning on a device without a custom recovery.
CarvedArt said:
I only use the Horizon to boot then grab my kernel to patch with Magisk. You could use the Horizon kernel, but you would have to flash it, not just boot it. So, root device, backup stock dtbo, flash Horizon & dtbo, re-root if lost during flash. I would recommend against that until there's a custom recovery available in case there were any issues. Additionally, you must backup your stock dtbo if you ever want to return to stock. You should visit the Horizon thread for more details, but again if you're not familiar with kennel mods you might not want to start learning on a device without a custom recovery.
Click to expand...
Click to collapse
I'd like only to root my device, remaining as more stock as possible, for now. If I want to avoid using a custom kernel (also for the rooting process), should I extract the boot.img with Python, then patch it with Magisk 22? Thanks in advance for your reply, but I'm coming from a Xiaomi that was quite easier to root
MagikGab said:
I'd like only to root my device, remaining as more stock as possible, for now. If I want to avoid using a custom kernel (also for the rooting process), should I extract the boot.img with Python, then patch it with Magisk 22? Thanks in advance for your reply, but I'm coming from a Xiaomi that was quite easier to root
Click to expand...
Click to collapse
Just follow the steps above -- that'll get you a stock kernel (your current kernel) patched with Magisk and permanently rooted. The above process is only using the Horizon kernel to boot your device with root so that you can extract your kernel and patch it. The final result will be as stock as you can get with root.
Hey everyone. OP8 Pro user here. Just took OTA going from 11.0.9.9 running Magisk Canary 23 to the newest 11.0.10.10. I restored images before taking the OTA and reinstalled magisk to the other slot like I always do to retain root. Ive now lost root and am trying to boot the last two versions of the Horizon kernel. Ive tried the two latest ones (r9.2 and r9.2.1 from February 2021) and while they do boot my phone, I cant get SU access to extract the stock images.
Anything else that anyone things I should try? All i want from Christmas is root.
Isn't there a more easy way to obtain root?
That's strange. I use OnePlus smartphones with LineageOS for years now and cannot remember to execute such a complicated procedure. Just now I got a OnrPlus 8, installed LineageOS and Magisk and restored my apps with Titanium. So, it definitely worked.
Now, after a Lineage system update, root is gone.
Unfortunately I cannot tell exactly how I installed Magisk. I have a very poor memory. Think I just installed the app and said either just "install" or patched the zip with TRWP
But I definitely never downloaded or extracted any boot image manually.
Has anyone an explanation for this?
Even more strange: I just tried to flash magisk.zip again with TRWP. Now it tells me
"Magisk patched boot image detected"
and later:
"Failed to mount '/system_root' (Device or resource busy)"
After reboot the Magisk app now offers me three choices in the install tab:
- choose a file and patch (only this one existed before)
- direct installation (recommended)
- install into inactive slot (after OTA)
I don't understand the last one and tried the recommendet one.
Now, root is there again. Do I have to do this after each update? With my OnePlus5 I didn't.
Unfortunately I have another problem with my OnePlus8 and Lineage:
I'm using AdAway which replaces the hosts file, but on my OP8 it cannot.
"Unable to cppy the hosts file to /System partition. Please check if the Magisk Systemless module is active"
What does it mean? The Magisk app says: "ramdisk yes"
tosho1 said:
Unfortunately I have another problem with my OnePlus8 and Lineage:
I'm using AdAway which replaces the hosts file, but on my OP8 it cannot.
"Unable to cppy the hosts file to /System partition. Please check if the Magisk Systemless module is active"
What does it mean? The Magisk app says: "ramdisk yes"
Click to expand...
Click to collapse
Magisk → Settings (Gear icon) → Systemless hosts ← Click it
tosho1 said:
Isn't there a more easy way to obtain root?
That's strange. I use OnePlus smartphones with LineageOS for years now and cannot remember to execute such a complicated procedure. Just now I got a OnrPlus 8, installed LineageOS and Magisk and restored my apps with Titanium. So, it definitely worked.
Now, after a Lineage system update, root is gone.
Unfortunately I cannot tell exactly how I installed Magisk. I have a very poor memory. Think I just installed the app and said either just "install" or patched the zip with TRWP
But I definitely never downloaded or extracted any boot image manually.
Has anyone an explanation for this?
Even more strange: I just tried to flash magisk.zip again with TRWP. Now it tells me
"Magisk patched boot image detected"
and later:
"Failed to mount '/system_root' (Device or resource busy)"
After reboot the Magisk app now offers me three choices in the install tab:
- choose a file and patch (only this one existed before)
- direct installation (recommended)
- install into inactive slot (after OTA)
I don't understand the last one and tried the recommendet one.
Now, root is there again. Do I have to do this after each update? With my OnePlus5 I didn't.
Click to expand...
Click to collapse
LineageOS is not the stock ROM so it's slightly different and not covered in this thread.
Thank you, CarvedArt. I wasn't aware of this.
Does anyone have the latest stable Android 13 patched boot image for the IN2015 that they can share with me ?

Categories

Resources