[GUIDE] Root Android Pie With Magisk

Search This thread

NourHazem I

Member
Oct 20, 2018
5
4
Frist You Must Unlock BootLoader

Second You Must Have Pc With Android platform tools (They Exist Also For MacOS And Linux)

BOOTLOADER UNLOCK

First thing to do: unlock the bootloader (if you didn't already do this, obviously). Smartphones with Android One are much easier to unlock compared to other Xiaomi phones with MIUI (where you have to ask for authorization and wait for weeks).
CAUTION: when you unlock the bootloader, the phone will reset, erasing all your saved data. Backup your data before unlocking.
1. Go to Settings > System > About phone > and tap many times on "Build number" until you unlock "Developer options".
2. Go back to the previous page, where you can find now "Developer options". Go there and enable the "OEM unlocking" option (and it's better to never disable this).
3. Now you can shutdown your phone, then turn it on while holding the "Volume down" button pressed. Release it when you see the Fastboot screen.
4. Now connect the phone with your PC via USB cable, open an administrative command prompt, move to the directory where the Android platform tools are placed and unlock the bootloader with the following command:
Code:
Code:
fastboot oem unlock
The phone will reboot, erasing all the data.
Now you unlocked your phone's bootloader and can continue to the next section

Download This https://mega.nz/#!3aZ3AICJ!YAHEVP5dQ2bgnV0_oDd3O4MBzdVt1qT_9HfqGWvVzCE

open an administrative command prompt, move to the Android platform tools directory and then write the following command:
Code:
Fastboot boot boot_rooted.img

If everything works the phone should boot normally. Open Magisk Manager and it should ask to install Magisk, if not you must tap on the "Install" button. Then choose "Install" > "Direct Install (Recommended)" to install Magisk on the phone, and reboot when finished.

HOW TO APPLY OTA UPDATES

IMPORTANT: OTA updates will work only if all the partitions on the smartphone are untouched. Magisk Manager can restore the original boot.img following this section of the guide, but if you tampered directly with the system partition (e.g. manually editing build.prop) or other partitions, OTA will refuse to install.
You can try to fix OTA updates without the need to flash the whole original fastboot ROM, by flashing only the tampered partitions (usually only "system") with the corresponding img file found inside the fastboot ROM zip. Check the "Troubleshooting" section of this guide for details.
12. When you know that a new OTA update is available and you want to install it, open Magisk Manager, and tap on "Uninstall" > "Restore Images" but very important: absolutely don't reboot the phone now!
Important note: Magisk Manager will restore the boot.img that was found on the phone while installing Magisk. If the boot.img was already non-vanilla (for example you flashed the boot.img with TWRP before installing Magisk), Magisk Manager will backup that modified version of boot.img, and when restored the OTA will not work, as that's not a vanilla boot.img.
13. Close Magisk Manager and go to "Settings" > "System" > "System update" and install the OTA update. After the update is downloaded, a two-stages update will begin.
14. When both stages of the update process completed, it will ask to restart: DON'T DO IT!. Open Magisk Manager again and tap on "Install" > "Install" > "Install to Inactive Slot (After OTA)" and after that you can tap on "Reboot".
After the reboot you will have the updated Android version with Magisk already working.

I'm 12 Years Old Don't Worry I Test It On My Mi A2 Lite Thanks

I Take Some Things From https://xdaforums.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
 
Last edited:

ashikalone

Member
Aug 18, 2017
6
1
Frist You Must Unlock BootLoader

Second You Must Have Pc With Android platform tools (They Exist Also For MacOS And Linux)

BOOTLOADER UNLOCK

First thing to do: unlock the bootloader (if you didn't already do this, obviously). Smartphones with Android One are much easier to unlock compared to other Xiaomi phones with MIUI (where you have to ask for authorization and wait for weeks).
CAUTION: when you unlock the bootloader, the phone will reset, erasing all your saved data. Backup your data before unlocking.
1. Go to Settings > System > About phone > and tap many times on "Build number" until you unlock "Developer options".
2. Go back to the previous page, where you can find now "Developer options". Go there and enable the "OEM unlocking" option (and it's better to never disable this).
3. Now you can shutdown your phone, then turn it on while holding the "Volume down" button pressed. Release it when you see the Fastboot screen.
4. Now connect the phone with your PC via USB cable, open an administrative command prompt, move to the directory where the Android platform tools are placed and unlock the bootloader with the following command:
Code:

The phone will reboot, erasing all the data.
Now you unlocked your phone's bootloader and can continue to the next section

Download This https://mega.nz/#!3aZ3AICJ!YAHEVP5dQ2bgnV0_oDd3O4MBzdVt1qT_9HfqGWvVzCE

open an administrative command prompt, move to the Android platform tools directory and then write the following command:


If everything works the phone should boot normally. Open Magisk Manager and it should ask to install Magisk, if not you must tap on the "Install" button. Then choose "Install" > "Direct Install (Recommended)" to install Magisk on the phone, and reboot when finished.

HOW TO APPLY OTA UPDATES

IMPORTANT: OTA updates will work only if all the partitions on the smartphone are untouched. Magisk Manager can restore the original boot.img following this section of the guide, but if you tampered directly with the system partition (e.g. manually editing build.prop) or other partitions, OTA will refuse to install.
You can try to fix OTA updates without the need to flash the whole original fastboot ROM, by flashing only the tampered partitions (usually only "system") with the corresponding img file found inside the fastboot ROM zip. Check the "Troubleshooting" section of this guide for details.
12. When you know that a new OTA update is available and you want to install it, open Magisk Manager, and tap on "Uninstall" > "Restore Images" but very important: absolutely don't reboot the phone now!
Important note: Magisk Manager will restore the boot.img that was found on the phone while installing Magisk. If the boot.img was already non-vanilla (for example you flashed the boot.img with TWRP before installing Magisk), Magisk Manager will backup that modified version of boot.img, and when restored the OTA will not work, as that's not a vanilla boot.img.
13. Close Magisk Manager and go to "Settings" > "System" > "System update" and install the OTA update. After the update is downloaded, a two-stages update will begin.
14. When both stages of the update process completed, it will ask to restart: DON'T DO IT!. Open Magisk Manager again and tap on "Install" > "Install" > "Install to Inactive Slot (After OTA)" and after that you can tap on "Reboot".
After the reboot you will have the updated Android version with Magisk already working.

I'm 12 Years Old Don't Worry I Test It On My Mi A2 Lite Thanks

I Take Some Things From https://xdaforums.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
May i use this method on my a2 lite running android pie
 

harvey

Senior Member
Jan 21, 2006
63
13
Also if you are only 12, you didn't take "some things" from bubuxp's thread, but almost the whole story. I would prefer if mod could close this thread.
 

thorin0815

Senior Member
Apr 27, 2017
561
265
Germany
Xiaomi Poco X3 Pro
Why do we need a separated Pie root guide, when the only difference for Pie is a newer patched boot image which you can make yourself with Magisk and the fitting OTA/Fastboot files?

We really need a mod for our A2 Lite forum, there are too many "useless" posts and threads inside. Feels like MIUI forum and not XDA. ;)
 
Last edited:
  • Like
Reactions: harvey and hossman

alenaki123

Senior Member
Jun 13, 2018
59
2
OTA

Frist You Must Unlock BootLoader

Second You Must Have Pc With Android platform tools (They Exist Also For MacOS And Linux)

BOOTLOADER UNLOCK

First thing to do: unlock the bootloader (if you didn't already do this, obviously). Smartphones with Android One are much easier to unlock compared to other Xiaomi phones with MIUI (where you have to ask for authorization and wait for weeks).
CAUTION: when you unlock the bootloader, the phone will reset, erasing all your saved data. Backup your data before unlocking.
1. Go to Settings > System > About phone > and tap many times on "Build number" until you unlock "Developer options".
2. Go back to the previous page, where you can find now "Developer options". Go there and enable the "OEM unlocking" option (and it's better to never disable this).
3. Now you can shutdown your phone, then turn it on while holding the "Volume down" button pressed. Release it when you see the Fastboot screen.
4. Now connect the phone with your PC via USB cable, open an administrative command prompt, move to the directory where the Android platform tools are placed and unlock the bootloader with the following command:
Code:
Code:
fastboot oem unlock
The phone will reboot, erasing all the data.
Now you unlocked your phone's bootloader and can continue to the next section

Download This https://mega.nz/#!3aZ3AICJ!YAHEVP5dQ2bgnV0_oDd3O4MBzdVt1qT_9HfqGWvVzCE

open an administrative command prompt, move to the Android platform tools directory and then write the following command:
Code:
Fastboot boot boot_rooted.img

If everything works the phone should boot normally. Open Magisk Manager and it should ask to install Magisk, if not you must tap on the "Install" button. Then choose "Install" > "Direct Install (Recommended)" to install Magisk on the phone, and reboot when finished.

HOW TO APPLY OTA UPDATES

IMPORTANT: OTA updates will work only if all the partitions on the smartphone are untouched. Magisk Manager can restore the original boot.img following this section of the guide, but if you tampered directly with the system partition (e.g. manually editing build.prop) or other partitions, OTA will refuse to install.
You can try to fix OTA updates without the need to flash the whole original fastboot ROM, by flashing only the tampered partitions (usually only "system") with the corresponding img file found inside the fastboot ROM zip. Check the "Troubleshooting" section of this guide for details.
12. When you know that a new OTA update is available and you want to install it, open Magisk Manager, and tap on "Uninstall" > "Restore Images" but very important: absolutely don't reboot the phone now!
Important note: Magisk Manager will restore the boot.img that was found on the phone while installing Magisk. If the boot.img was already non-vanilla (for example you flashed the boot.img with TWRP before installing Magisk), Magisk Manager will backup that modified version of boot.img, and when restored the OTA will not work, as that's not a vanilla boot.img.
13. Close Magisk Manager and go to "Settings" > "System" > "System update" and install the OTA update. After the update is downloaded, a two-stages update will begin.
14. When both stages of the update process completed, it will ask to restart: DON'T DO IT!. Open Magisk Manager again and tap on "Install" > "Install" > "Install to Inactive Slot (After OTA)" and after that you can tap on "Reboot".
After the reboot you will have the updated Android version with Magisk already working.

I'm 12 Years Old Don't Worry I Test It On My Mi A2 Lite Thanks

I Take Some Things From https://xdaforums.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952




Waiting I do not understand if I'm running my phone and installing a magician please update will not work?

---------- Post added at 06:37 PM ---------- Previous post was at 05:54 PM ----------

Waiting I do not understand if I'm running my phone and installing a magician please update will not work?


f i unlock bootloader, root and install magisk ota update i will not work ???
 

NourHazem I

Member
Oct 20, 2018
5
4
Updates will work if you install it if you got ota go to magisk manager

Click uninstall>restore images>go install ota do not reboot>go magisk manager and click install select>inactive slot (after ota)
 

luckyvictor

Senior Member
Mar 30, 2010
156
3
I don't see Magisk Manager after doing boot patched_boot.img. It actually run successfully, the phone restarted after the command.

My Build number is PKQ1.180917.001.V10.0.2.0.PDLMIFJ, I tried both of these patched, V10.0.2.0.PDLMIFJ Patched Boot Image: Link
V10.0.1.0.PDLMIFJ Patched Boot Image: Link
 

easyfly

Senior Member
Jun 15, 2008
72
5
Ravenna
Redmi Note 8 Pro
I don't see Magisk Manager after doing boot patched_boot.img. It actually run successfully, the phone restarted after the command.

My Build number is PKQ1.180917.001.V10.0.2.0.PDLMIFJ, I tried both of these patched, V10.0.2.0.PDLMIFJ Patched Boot Image: Link
V10.0.1.0.PDLMIFJ Patched Boot Image: Link
You need install manually magisk manager ,you can download apk from official website, after from magisk manager you can install magisk 18.0 ...this is my experience
 
thanks man, following your guide I was able to root this bad boy. Much more complicated than anything I've ever rooted as I've usually got TWRP installed but for whatever reason it's unable to decrypt my system and even after a fresh wipe I still can't install so this method worked great for me, we'll see how OTA updates go...

EDIT: Seems to be after a reboot I am no longer rooted, do I need to fastboot flash that patched boot image everytime I reboot?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Frist You Must Unlock BootLoader

    Second You Must Have Pc With Android platform tools (They Exist Also For MacOS And Linux)

    BOOTLOADER UNLOCK

    First thing to do: unlock the bootloader (if you didn't already do this, obviously). Smartphones with Android One are much easier to unlock compared to other Xiaomi phones with MIUI (where you have to ask for authorization and wait for weeks).
    CAUTION: when you unlock the bootloader, the phone will reset, erasing all your saved data. Backup your data before unlocking.
    1. Go to Settings > System > About phone > and tap many times on "Build number" until you unlock "Developer options".
    2. Go back to the previous page, where you can find now "Developer options". Go there and enable the "OEM unlocking" option (and it's better to never disable this).
    3. Now you can shutdown your phone, then turn it on while holding the "Volume down" button pressed. Release it when you see the Fastboot screen.
    4. Now connect the phone with your PC via USB cable, open an administrative command prompt, move to the directory where the Android platform tools are placed and unlock the bootloader with the following command:
    Code:
    Code:
    fastboot oem unlock
    The phone will reboot, erasing all the data.
    Now you unlocked your phone's bootloader and can continue to the next section

    Download This https://mega.nz/#!3aZ3AICJ!YAHEVP5dQ2bgnV0_oDd3O4MBzdVt1qT_9HfqGWvVzCE

    open an administrative command prompt, move to the Android platform tools directory and then write the following command:
    Code:
    Fastboot boot boot_rooted.img

    If everything works the phone should boot normally. Open Magisk Manager and it should ask to install Magisk, if not you must tap on the "Install" button. Then choose "Install" > "Direct Install (Recommended)" to install Magisk on the phone, and reboot when finished.

    HOW TO APPLY OTA UPDATES

    IMPORTANT: OTA updates will work only if all the partitions on the smartphone are untouched. Magisk Manager can restore the original boot.img following this section of the guide, but if you tampered directly with the system partition (e.g. manually editing build.prop) or other partitions, OTA will refuse to install.
    You can try to fix OTA updates without the need to flash the whole original fastboot ROM, by flashing only the tampered partitions (usually only "system") with the corresponding img file found inside the fastboot ROM zip. Check the "Troubleshooting" section of this guide for details.
    12. When you know that a new OTA update is available and you want to install it, open Magisk Manager, and tap on "Uninstall" > "Restore Images" but very important: absolutely don't reboot the phone now!
    Important note: Magisk Manager will restore the boot.img that was found on the phone while installing Magisk. If the boot.img was already non-vanilla (for example you flashed the boot.img with TWRP before installing Magisk), Magisk Manager will backup that modified version of boot.img, and when restored the OTA will not work, as that's not a vanilla boot.img.
    13. Close Magisk Manager and go to "Settings" > "System" > "System update" and install the OTA update. After the update is downloaded, a two-stages update will begin.
    14. When both stages of the update process completed, it will ask to restart: DON'T DO IT!. Open Magisk Manager again and tap on "Install" > "Install" > "Install to Inactive Slot (After OTA)" and after that you can tap on "Reboot".
    After the reboot you will have the updated Android version with Magisk already working.

    I'm 12 Years Old Don't Worry I Test It On My Mi A2 Lite Thanks

    I Take Some Things From https://xdaforums.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
    2
    Why do we need a separated Pie root guide, when the only difference for Pie is a newer patched boot image which you can make yourself with Magisk and the fitting OTA/Fastboot files?

    We really need a mod for our A2 Lite forum, there are too many "useless" posts and threads inside. Feels like MIUI forum and not XDA. ;)
    1
    OP should be ashamed of copying the entire guide and pasting It with a new link and poor formating.