• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Guide] Root

Search This thread

Tesla74

Senior Member
Dec 18, 2010
528
151
Root Guide

** Root will void the warranty and disable OTA updates **

boot.img patch method

I don't recommend updating the firmware OTA before rooting. There is a chance you will update your phone to a firmware that hasn't been released yet on the ASUS website. New updates are released OTA first and then about a week or two later they are posted on the ASUS website. If by chance you updated the firmware OTA and the firmware isn't on the ASUS website, you'll have to wait for the firmware to be posted before you can root.

If already rooted and updating firmware skip to 5b

1. Make a folder called ROG Phone to store all files needed

2. Download the following to the ROG Phone folder
-- Unlock Tool, aka Unlock Device App
---- https://dlcdnets.asus.com/pub/ASUS/..._SIGNED_UnlockTool_9.1.0.7_180912_fulldpi.apk
-- Latest Firmware - Under Firmware click on See All Downloads | Look at version number, not dates
---- Match SKU/Region - Example: WW->WW, CN->CN, JP->JP
------ Settings > System > About phone > Software information
-------- https://www.asus.com/us/Phone/ROG-Phone/HelpDesk_BIOS/
-- Minimal ADB and Fastboot - Portable
---- https://devsjournal.com/download-minimal-adb-fastboot-tool.html
-- Payload Dumper
---- Attatched image_extrator.zip script
-- Python
---- https://www.python.org/downloads/
-- Magisk Manager
---- https://github.com/topjohnwu/Magisk/releases

3. Unlock bootloader
-- Connect the phone to the PC via the side port on your phone
-- Select USB File Transfer on the phone; If problems connecting, update drivers on the PC
-- Copy the Unlock Tool to your phone's Downloads folder
-- This voids the warranty and disables OTA updates
-- This will force a factory reset, so backup your data
-- Use File Manager (in ASUS folder) on your phone to run the Unlock Tool from the Downloads folder
-- If asked for Pin select "Use your Google account" in white text (can't see) below the Pin request
---- Pin request YouTube: https://www.youtube.com/watch?v=aPKAEGptfas

4. Enable Developer on the phone
-- Settings > System > About phone > Software information
---- Tap "Build number" 7 times

5. Update phone to latest downloadable firmware
-- 5a
-- Open the ROG Phone folder and enable view file extensions
---- File > Change folder and search options > Click View tab > Uncheck Hide extensions for known file types > Click OK
-- Unzip Minimal ADB and Fastboot - Portable file
-- 5b
-- Copy the firmware to the Minimal ADB and Fastboot folder and rename firmware.zip
-- Turn on USB debugging
---- Settings > System > Developer options
------ Enable "USB debugging"
-- Connect the phone to the PC via the side port on your phone
-- Select USB debugging on your phone.
-- From the Minimal ADB and Fastboot folder run cmd-here.exe
-- From the command prompt (black window) type the following:
adb devices
-- To check the connection
adb reboot recovery
-- Select ADB on phone
adb sideload firmware.zip
-- Check that your phone was updated to the latest firmware
---- Settings > System > About phone > Software information
If by chance adb sideload doesn't work, try copying the firmware to the root directory (folder) on the phone and then reboot to install. Don't change the name of the firmware while using this method and you can't skip updates. So if there are two updates out from your current version, you'll have to install both.

6. Extract the boot.img file from the firmware using Payload Dumper
-- Use the attached image extractor script
---- Requires Python; Look at readme.txt

7. Patch boot.img using Magisk Manager
** Make sure that boot.img is from the same firmware version that is on the phone **
-- Turn off USB debugging
---- Settings > System > Developer options
------ Disable "USB debugging"
-- Connect the phone to the PC via the side port on your phone
-- Select USB File Transfer on the phone
-- Copy Magisk Manager and boot.img to your phone's Downloads folder
-- Use File Manager (in ASUS folder) on your phone to run Magisk Manager from the Downloads folder
---- Magisk Manager requires access to the Internet via wifi or mobile network
-- More Information
---- https://www.google.com/search?q=How...Methods)&ie=utf-8&oe=utf-8&client=firefox-b-1
------ Look at Method 2
-- Copy patched_boot.img from the phone's Downloads folder to the Minimal ADB and Fastboot folder

8. Flash patched_boot.img
** Make sure that patched_boot.img is from the same firmware version that is on the phone **
-- Put phone into fastboot mode
---- While the phone is off, hold down volume up and power buttons
-- Connect the phone to the PC via the side port on your phone
-- From the Minimal ADB and Fastboot folder run cmd-here.exe
-- From the command prompt (black window) type the following:
fastboot devices
-- To check the connection
fastboot flash boot patched_boot.img
fastboot reboot

--------------------------------------------------------------------------------

Some users couldn't get a connection to a PC via a PC's Type-C USB port and had to use a Type-C to Type-A USB cable.
https://www.amazon.com/gp/product/B...00__o00_s00?tag=detailedview-20&ie=UTF8&psc=1

If by chance something went wrong and your phone locks up on boot, this raw WW firmware install will get you back up and going (so far it has worked for everyone). This can also be used to relock the bootloader, but it will not restore OTA updates.
https://drive.google.com/file/d/155ZDnBjHeknppthFtNpGadicSNvBGokP/view?usp=sharing
Download and unzip
Reboot phone into fastboot mode
Run flashall_AFT.cmd

..
 

Attachments

  • image_extrator.zip
    207.4 KB · Views: 1,507
  • custom_channel.zip
    945 bytes · Views: 389
Last edited:

Rashad83

Senior Member
May 13, 2011
1,158
746
ASUS ROG Phone II
Quick Root Guide

1. Unlock bootloader
https://dlcdnets.asus.com/pub/ASUS/..._SIGNED_UnlockTool_9.1.0.7_180912_fulldpi.apk

2. Download unofficial TWRP by shakalaca (Doesn't fully work, but can flash files from USB drive)
Download the TWRP that matches your firmware version and rename twrp.img
https://mega.nz/#F!pst3URCQ!l_N503AsNmytaErhmuiwqg

3. Put phone into fastboot mode (volume down + power button)
Connect to the computer using the side USB port

4. Download Minimal ADB and Fastboot and flash twrp.img
https://devsjournal.com/download-minimal-adb-fastboot-tool.html
fastboot flash boot twrp.img

5. Download Magisk Manager, Magisk, and Magisk Unistaller onto a USB drive
https://github.com/topjohnwu/Magisk/releases

6. Flash Magisk with TWRP and install Magisk Manager to root

I don't have the phone yet, but if anyone wants to add to this guide to make it more accurate, I'll update this post.
Before running the fastboot command run: "fastboot devices" without quotations. To make sure the device is recognized and connected.

Nice write up!. By the way there is an update to the system a small one maybe 70+ MB. Minor stability update.
 
Last edited:
  • Like
Reactions: Tesla74

Tesla74

Senior Member
Dec 18, 2010
528
151
Before running the fastboot command run: "fastboot devices" without quotations. To make sure the device is recognized and connected.

Nice write up!. By the way there is an update to the system a small one maybe 70+ MB. Minor stability update.

Thanks, I updated post. I was wondering after the system update, does TWRP still work because of encryption? Or does TWRP need to be updated for every system update?
 

Rashad83

Senior Member
May 13, 2011
1,158
746
ASUS ROG Phone II
Thanks, I updated post. I was wondering after the system update, does TWRP still work because of encryption? Or does TWRP need to be updated for every system update?
Once you flash TWRP you will not be able to update through OTA. You will have to download the update manually and then flash it, once you do that i believe it flashes the stock boot.img which removes TWRP. When that happens you will have to flash a compatible TWRP for the new update.

That's how i understand it, personally i haven't rooted yet so i can't be 100% certain.

Also it's recommended by TWRP team to return to stock before updating the system and then flashing TWRP.

---------- Post added at 08:04 AM ---------- Previous post was at 07:49 AM ----------

Does the unlock bootloader tool REALLY erases all everything, or it's just ASUS warning so they cover their end if user data is lost?

It's not just ASUS, Any Android device once you unlock the bootloader the user data is erased. So better backup!. By the way ASUS has a backup tool for all your apps and data i haven't tried it yet, give it a try.
 
Last edited:
  • Like
Reactions: Tesla74

mbze430

Senior Member
Feb 28, 2007
1,549
175
Southeast Missouri
That is correct. When I had my Pixel 2 XL (or any phone for that matter). When you flash TWRP on to the recovery the OTA update will always fail. You will have to either find the original recovery or the whole rom and reflash it.

---------- Post added at 04:07 PM ---------- Previous post was at 04:05 PM ----------

---------- Post added at 08:04 AM ---------- Previous post was at 07:49 AM ----------

[/COLOR]

It's not just ASUS, Any Android device once you unlock the bootloader the user data is erased. So better backup!. By the way ASUS has a backup tool for all your apps and data i haven't tried it yet. so check it out.[/QUOTE]

Dang it! I just setup the phone exactly the way I wanted it too.
 

Tesla74

Senior Member
Dec 18, 2010
528
151
Once you flash TWRP you will not be able to update through OTA. You will have to download the update manually and then flash it, once you do that i believe it flashes the stock boot.img which removes TWRP. When that happens you will have to flash a compatible TWRP for the new update.

That's how i understand it, personally i haven't rooted yet so i can't be 100% certain.

Also it's recommended by TWRP team to return to stock before updating the system and then flashing TWRP.

Thanks! I hope shakalaca keeps updating TWRP with the new firmwares. Sounds like recovery.img will have to be extracted from the firmware and flashed before updating.
 
  • Like
Reactions: Rashad83

Rashad83

Senior Member
May 13, 2011
1,158
746
ASUS ROG Phone II
You will not find any file under the name of recovery.img. I tried looking for it in the stock firmware before no such file exists. The only way I think to do it is by flashing all of the boot.img where it resides I think.

Fastboot flash boot boot.img
 

Tesla74

Senior Member
Dec 18, 2010
528
151
You will not find any file under the name of recovery.img. I tried looking for it in the stock firmware before no such file exists. The only way I think to do it is by flashing all of the boot.img where it resides I think.

Fastboot flash boot boot.img

I wasn't able to find either recovery.img or boot.img in the firmware.

boot.img vs recovery.img always confuses me. I wonder if updating with the update.zip method really needs stock recovery?
 
Last edited:

Rashad83

Senior Member
May 13, 2011
1,158
746
ASUS ROG Phone II
I wasn't able to find either recovery.img or boot.img in the firmware.

boot.img vs recovery.img always confuses me. I wonder if updating with the update.zip method really needs stock recovery?
You need the payload dumber app on windows to extract the payload file which contains all the .img files which boot.img is one of them.
The boot.img contains the kernel and other important files needed to boot the device, while the recovery contains all the recovery settings responsible for reseting the device and updating, wiping actions.
From the comments i saw about recovering the phone after a bootloop it seems stock recovery isn't needed but i could be wrong. We will need input from others who have done it.
On my previous phone i could go back to stock rom without stock recovery as long it's the same rom build. So you will need to flash the same stock rom you are currently on and then flash the update.
 
  • Like
Reactions: Tesla74

mbze430

Senior Member
Feb 28, 2007
1,549
175
Southeast Missouri
I ran into some trouble. after running bootloader unlocker apk. it is now asking for a PIN. I tried the PIN I used when setting up the fingerprint reader and it doesn't work. It won't let me setup the phone again now.

Also got into the stock Recovery and did a user/data factory reset

Anyone suggestions?
 

Marco589

Senior Member
Dec 3, 2013
270
40
Como
4. Put phone into fastboot mode (volume down + power button)
Connect to the computer using the side USB port
By pressing volume down + Power button, the phone goes into recovery mode not fastboot.

It's easiest doing it by adb:
Adb devices
If the phone Is found:
Adb reboot bootloader

That's what I did when I root my Rog :)

I ran into some trouble. after running bootloader unlocker apk. it is now asking for a PIN. I tried the PIN I used when setting up the fingerprint reader and it doesn't work. It won't let me setup the phone again now.

Also got into the stock Recovery and did a user/data factory reset

Anyone suggestions?
I was in the same situation, but if you check carefully you will see "use your account Google" it's just below of the pin request.
(It's written in White )
 
Last edited:
  • Like
Reactions: Tesla74

Tesla74

Senior Member
Dec 18, 2010
528
151
By pressing volume down + Power button, the phone goes into recovery mode not fastboot.

It's easiest doing it by adb:
Adb devices
If the phone Is found:
Adb reboot bootloader

That's what I did when I root my Rog :)


I was in the same situation, but if you check carefully you will see "use your account Google" it's just below of the pin request.
(It's written in White )

Thanks! I"ve updated the guide for both issues.
 
  • Like
Reactions: Marco589

Rashad83

Senior Member
May 13, 2011
1,158
746
ASUS ROG Phone II
Thanks! I"ve updated the guide for both issues.
To go to fastboot mode the hardware method will be by:

1. Holding (Power+Volume Up) until you see "Republic of Gamers" logo then release.
2. If the phone is turned off; hold the volume up only and connect the usb c to the phone(make sure the usb wire is connected to the PC already "It's basically the same as holding the power button except you'r getting the power from the usb"). You will go directly to "fastboot mode/ bootloader mode" i used to do this before on my phones, will also work on the ROG phone.
 
Last edited:
  • Like
Reactions: Tesla74

Tesla74

Senior Member
Dec 18, 2010
528
151
To go to fastboot mode the hardware method will be by:

1. Holding (Power+Volume Up) until you see "Republic of Gamers" logo then release.
2. If the phone is turned off; hold the volume up only and connect the usb c to the phone(make sure the usb wire is connected to the PC already "It's basically the same as holding the power button except you'r getting the power from the usb"). You will go directly to "fastboot mode/ bootloader mode" i used to do this before on my phones, will also work on the ROG phone.

Thanks! I updated the guide and added link to your post.
 
  • Like
Reactions: Rashad83

mbze430

Senior Member
Feb 28, 2007
1,549
175
Southeast Missouri
I loaded TWRP but I can't flash Magisk on it. Can't read the /system partition.

Worse off, I am stuck at the ROG logo even after reboot.

what can I do to get the phone to at least boot back to the OS?

-----Update------
Nevermind I extracted the payload.bin and fastboot flash boot boot.img from there and it booted up again.
 
Last edited:

Marco589

Senior Member
Dec 3, 2013
270
40
Como
I loaded TWRP but I can't flash Magisk on it. Can't read the /system partition.

Worse off, I am stuck at the ROG logo even after reboot.

what can I do to get the phone to at least boot back to the OS?

-----Update------
Nevermind I extracted the payload.bin and fastboot flash boot boot.img from there and it booted up again.
In order to flash Magisk v17.3, you need to load Magisk and magisk unistaller on a USB drive, then boot into recovery , select USB storage then flash magisk.
 

kgptzac

Senior Member
Aug 13, 2010
212
27
Need info on flashing twrp. Are all attempts done on firmware version 23 (where latest shakalaca version of TWRP is supported)? Is there no way to get TWRP working on firmware version 43?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Root Guide

    ** Root will void the warranty and disable OTA updates **

    boot.img patch method

    I don't recommend updating the firmware OTA before rooting. There is a chance you will update your phone to a firmware that hasn't been released yet on the ASUS website. New updates are released OTA first and then about a week or two later they are posted on the ASUS website. If by chance you updated the firmware OTA and the firmware isn't on the ASUS website, you'll have to wait for the firmware to be posted before you can root.

    If already rooted and updating firmware skip to 5b

    1. Make a folder called ROG Phone to store all files needed

    2. Download the following to the ROG Phone folder
    -- Unlock Tool, aka Unlock Device App
    ---- https://dlcdnets.asus.com/pub/ASUS/..._SIGNED_UnlockTool_9.1.0.7_180912_fulldpi.apk
    -- Latest Firmware - Under Firmware click on See All Downloads | Look at version number, not dates
    ---- Match SKU/Region - Example: WW->WW, CN->CN, JP->JP
    ------ Settings > System > About phone > Software information
    -------- https://www.asus.com/us/Phone/ROG-Phone/HelpDesk_BIOS/
    -- Minimal ADB and Fastboot - Portable
    ---- https://devsjournal.com/download-minimal-adb-fastboot-tool.html
    -- Payload Dumper
    ---- Attatched image_extrator.zip script
    -- Python
    ---- https://www.python.org/downloads/
    -- Magisk Manager
    ---- https://github.com/topjohnwu/Magisk/releases

    3. Unlock bootloader
    -- Connect the phone to the PC via the side port on your phone
    -- Select USB File Transfer on the phone; If problems connecting, update drivers on the PC
    -- Copy the Unlock Tool to your phone's Downloads folder
    -- This voids the warranty and disables OTA updates
    -- This will force a factory reset, so backup your data
    -- Use File Manager (in ASUS folder) on your phone to run the Unlock Tool from the Downloads folder
    -- If asked for Pin select "Use your Google account" in white text (can't see) below the Pin request
    ---- Pin request YouTube: https://www.youtube.com/watch?v=aPKAEGptfas

    4. Enable Developer on the phone
    -- Settings > System > About phone > Software information
    ---- Tap "Build number" 7 times

    5. Update phone to latest downloadable firmware
    -- 5a
    -- Open the ROG Phone folder and enable view file extensions
    ---- File > Change folder and search options > Click View tab > Uncheck Hide extensions for known file types > Click OK
    -- Unzip Minimal ADB and Fastboot - Portable file
    -- 5b
    -- Copy the firmware to the Minimal ADB and Fastboot folder and rename firmware.zip
    -- Turn on USB debugging
    ---- Settings > System > Developer options
    ------ Enable "USB debugging"
    -- Connect the phone to the PC via the side port on your phone
    -- Select USB debugging on your phone.
    -- From the Minimal ADB and Fastboot folder run cmd-here.exe
    -- From the command prompt (black window) type the following:
    adb devices
    -- To check the connection
    adb reboot recovery
    -- Select ADB on phone
    adb sideload firmware.zip
    -- Check that your phone was updated to the latest firmware
    ---- Settings > System > About phone > Software information
    If by chance adb sideload doesn't work, try copying the firmware to the root directory (folder) on the phone and then reboot to install. Don't change the name of the firmware while using this method and you can't skip updates. So if there are two updates out from your current version, you'll have to install both.

    6. Extract the boot.img file from the firmware using Payload Dumper
    -- Use the attached image extractor script
    ---- Requires Python; Look at readme.txt

    7. Patch boot.img using Magisk Manager
    ** Make sure that boot.img is from the same firmware version that is on the phone **
    -- Turn off USB debugging
    ---- Settings > System > Developer options
    ------ Disable "USB debugging"
    -- Connect the phone to the PC via the side port on your phone
    -- Select USB File Transfer on the phone
    -- Copy Magisk Manager and boot.img to your phone's Downloads folder
    -- Use File Manager (in ASUS folder) on your phone to run Magisk Manager from the Downloads folder
    ---- Magisk Manager requires access to the Internet via wifi or mobile network
    -- More Information
    ---- https://www.google.com/search?q=How...Methods)&ie=utf-8&oe=utf-8&client=firefox-b-1
    ------ Look at Method 2
    -- Copy patched_boot.img from the phone's Downloads folder to the Minimal ADB and Fastboot folder

    8. Flash patched_boot.img
    ** Make sure that patched_boot.img is from the same firmware version that is on the phone **
    -- Put phone into fastboot mode
    ---- While the phone is off, hold down volume up and power buttons
    -- Connect the phone to the PC via the side port on your phone
    -- From the Minimal ADB and Fastboot folder run cmd-here.exe
    -- From the command prompt (black window) type the following:
    fastboot devices
    -- To check the connection
    fastboot flash boot patched_boot.img
    fastboot reboot

    --------------------------------------------------------------------------------

    Some users couldn't get a connection to a PC via a PC's Type-C USB port and had to use a Type-C to Type-A USB cable.
    https://www.amazon.com/gp/product/B...00__o00_s00?tag=detailedview-20&ie=UTF8&psc=1

    If by chance something went wrong and your phone locks up on boot, this raw WW firmware install will get you back up and going (so far it has worked for everyone). This can also be used to relock the bootloader, but it will not restore OTA updates.
    https://drive.google.com/file/d/155ZDnBjHeknppthFtNpGadicSNvBGokP/view?usp=sharing
    Download and unzip
    Reboot phone into fastboot mode
    Run flashall_AFT.cmd

    ..
    4
    <Pie Installation Instruction (no OTA or no side loading)>
    1. reboot fastboot
    2. Version WW-15.1630.1907.98 raw firmware flash
    3. reboot system
    4. Turn on USB debugging
    5. Download firmware (Version WW-16.0410.1910.91)
    (link : https://www.asus.com/us/Phone/ROG-Phone/HelpDesk_Download/)
    and Copy zip file to your phone's root
    6. reboot
    7. It will be updated automatically.

    <Root>
    1. Set the pin number in the security settings.
    2. Download and setup unlock.apk
    (link : https://www.asus.com/us/Phone/ROG-Phone/HelpDesk_Download/)
    3. After rebooting, go into fastboot mode Install TWRP.
    (twrp-3.3.1-0-Z01Q-16.0410.1910.91.img)
    (link : https://mega.nz/#F!pst3URCQ!l_N503AsNmytaErhmuiwqg)
    ==========================================
    fastboot devices
    fastboot flash boot twrp-3.3.1-0-Z01Q-16.0410.1910.91.img
    ==========================================
    4. reboot system
    5. Download and copy (magisk 20.0 / manager 7.4.0) to storage
    6. install manager
    7. reboot twrp recovery
    8. Enter the pin number to decrypt, flash magisk
    9. reboot system
    10. Enjoy root

    My English is short........Translated by Google Translator. :(

    ---------- Post added at 05:40 PM ---------- Previous post was at 05:29 PM ----------

    img.jpg


    img.jpg
    4
    I just tested and did a quick write-up. I've updated the guide.

    Interesting, thank you kindly for the writeup, although I found a different link and procedure altogether, using the compiled binary available here: Moderator Edit: Link Removed

    This one doesn't require Python as it's a compiled native binary and it seems to work (thanks Rashad83!), insofar as I am now able to get the boot.img from the payload.bin file.

    Now, whether or not this boot.img is correct and actually works on the phone is something I'll need to test, but so far the binary available on that link seems to do the job well.
    4
    I would first try to extract the boot.img from the firmware that is currently installed on your phone and flashing it. I would skip the patch part, but the rest of the instructions in the OP are the same. Once you have the latest firmware installed I would use the boot.img patch method of rooting instead of TWRP.

    Thank you for fast replying. :D
    I found a page of a fix with "Fastboot". It auto-reinstall the whole device.

    https://drive.google.com/file/d/1LSw6N0JIquE2cos9GMnPhOsPSWjejcpD/view

    There you can download it. After Download. Extract and use "flashall_AFT.cmd" or "flashall_Linux.sh" in Fastboot-Mode.
    For everyone who get in a bootloop too. (Ver. WW__ZS600KL_15.1616.1808.23)

    Thank You Tesla for you help. :D :victory:
    2
    I did it!!!
    It works!
    @Tesla74 I attached 2 pics, maybe you can add in the guide (if you need them)

    Thanks! I've added the photos to the OP. I've removed the TWRP method from the guide until we get updated TWRP.