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

Development [RECOVERY][UNOFFICIAL] TWRP for ASUS ROG Phone 5 & ROG Phone 5S

Search This thread

JazonX

Senior Member
Dec 16, 2009
1,828
725
Xiaomi Mi 11 Ultra
Here's my trip around the sun;

Downloaded the file twrp-3.5.2_11-2zs673ks.img and renamed it to just twrp.img. (So it's easier to type in CMD).
Placed it on the root of my C: Drive where I keep all my flash files.

Shut down phone, Then Volume up and power to go to fastboot mode. That's the screen where it shows some options like Power On, Recovery Mode and Reboot. Just stay there, dont select anything.

Connected the cable via side USB port and executed the following commands;

0023.png


First command to check connectivity, second command is to boot to TWRP.
No flashing !! remember always; new TWRP cannot be flashed through fastboot because recovery is a part of the existing partition, not a separate one like it used to be on Android 8 and below.

Once you execute the above command, be patient. Your phone will come back to bootloader screen making it look like it failed. Just wait, it will reboot again and it will go to TWRP. Now you can enter you pin code, and enter the recovery.
I flashed a kernel, I cleared my dalvik cache .. everything went well.




Now if you want to keep TWRP permanent;

Copy the twrp.img to your phone memory, preferably downloads folder of the phone, and follow the above steps mentioned - again up to entering TWRP.

In TWRP, select advanced, and you will see the below screen -

Screenshot_2021-09-16-07-36-25 (Medium).png


Select the option - Install Recovery Ramdisk and it will ask where your TWRP.img is, and point it to the file you earlier saved in the phone / downloads folder. This will flash TWRP within the kernel making it permanent along with your kernel.

That's it, reboot and enjoy.

EDIT : How to get to TWRP again;
From CMD - send adb reboot recovery or
shut down phone, Volume UP + Power .. In bootloader press volume down until you see recovery mode, and then press the power button once to select it.
 
Last edited:

Anubarak16

Senior Member
Oct 24, 2014
137
42
ASUS ROG Phone 5
I'm on the ROG 5 - Ultimate WW Bro ...

I did TWRP already ...

What's the error ?
Thank you... Seems it has to be an error with my device in that case. https://forum.xda-developers.com/t/...og-phone-5-rog-phone-5s.4333661/post-85639901

I'm totally out of ideas what to try next. I guess twrp won't be available for my phone but I don't know why. Is there something special that needs to be done before that's not mentioned? (except unlocking bootloader of course) I have the latest drivers installed, already flashed my boot image and have root permissions but I can't boot twrp
 

JazonX

Senior Member
Dec 16, 2009
1,828
725
Xiaomi Mi 11 Ultra
Thank you... Seems it has to be an error with my device in that case. https://forum.xda-developers.com/t/...og-phone-5-rog-phone-5s.4333661/post-85639901

I'm totally out of ideas what to try next. I guess twrp won't be available for my phone but I don't know why. Is there something special that needs to be done before that's not mentioned? (except unlocking bootloader of course) I have the latest drivers installed, already flashed my boot image and have root permissions but I can't boot twrp

Can you spare some more information about the device?

* CN or WW / Convert or Factory ROM ? Current firmware version
* Fastboot version you've mentioned, - not sure how to check. Mine is the latest from Google Platform tools. Did you get the same or is it minimal fastboot or something similar ?
* System -> Regulatory Labels -What's the Model Number ?
* If you got root access - What's the code in the file - Vendor / Factory / Country ?
 

Anubarak16

Senior Member
Oct 24, 2014
137
42
ASUS ROG Phone 5
Goddammit it works now... I didn't know I had to install phone drivers twice.. Not only when the phone is attached normally but also a second time when the phone is in the bootloader after reboot command. Never had this issue before with any phone that it's considered as a totally different device after bootloader rebot.

Sorry for the trouble
 
Goddammit it works now... I didn't know I had to install phone drivers twice.. Not only when the phone is attached normally but also a second time when the phone is in the bootloader after reboot command. Never had this issue before with any phone that it's considered as a totally different device after bootloader rebot.

Sorry for the trouble

I come from an era when every device was like that, so I always assume it can't be that when people post about the phone not being recognized.
 

mikalovtch

Recognized Developer
Nov 14, 2010
258
1,665
24
Moscow
Thank you, but one other thing if I can, this twrp is permanent and I can reboot into it without pc or I need fastboot to boot in recovery??
To keep TWRP permanent, you need to fastboot boot tarp firstly, and while in TWRP, choose Advanced ->Flash current TWRP, then TWRP will be installed. You will need to reinstall magisk if it was previously installed.
 
  • Like
Reactions: Alexio34

Anubarak16

Senior Member
Oct 24, 2014
137
42
ASUS ROG Phone 5
In order to reduce those "how do I install it" questions it might be a good idea to pin a guide somewhere how to install it.
I bet most people won't go through all posts instead they just read the first one and end up wondering why nothing is installed.
 
  • Like
Reactions: Alexio34

Alexio34

Member
Sep 15, 2021
12
2
To keep TWRP permanent, you need to fastboot boot tarp firstly, and while in TWRP, choose Advanced ->Flash current TWRP, then TWRP will be installed. You will need to reinstall magisk if it was previously installed.
Thank you very much, so if I want to flash a custom kernel, I’ll need to reflash twrp pressing flashing current twrp and then after that reinstall magisk? Thanks again
 
Flashing a custom kernel doesn't affect TWRP or Magisk.

Flashing a custom kernel also won't install / restore Magisk. The custom builds are meant to retain Magisk, but don't actually perform any of the installation.

You can install TWRP over a custom kernel and the kernel will remain, but Magisk will be gone and need to be reinstalled. At this point, the app will only allow you to patch a supported image (img / tar, but also supports win without saying it) and the custom kernels include none of those. This means you need a Magisk recovery zip or need a backup of the kernel to patch with Magisk.

You can also install a custom kernel over TWRP, but you would need to already have Magisk patched in after installing TWRP or install it after the kernel (see above).

TL;DR

Edit: there was an even easier way

Have a copy of Magisk apk, the kernel zip from this thread, and the twrp image (just in case) on your sdcard.
Boot TWRP and do Advanced -> Flash current TWRP
Install Magisk through TWRP
Reboot to system
Install the kernel zip

You'll have all three installed and running
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    Code:
    *** Disclaimer ***
    
    All flashing is done at your own risk!
    While nothing from this thread should break your device,
    don't come back here blaming anyone if it does!

    Introduction

    Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and

    Images



    Prerequisites

    Installation instructions

    Fastboot Install Method:
    You will need the platform-tools from the Android SDK on your computer. Find the Android command line tools section on the page linked and install the SDK tools package. From the SDK Manager, download only the platform-tools to get adb and fastboot binaries.

    Windows users will need proper drivers installed on their computer. You can try the Naked ADB drivers or the Universal ADB drivers if you don't already have a working driver installed

    On your device, go into Settings -> About and find the Build Number and tap on it 7 times to enable developer settings. Press back and go into Developer Options and enable USB debugging. From your computer, open a command prompt and type:
    Code:
    Code:
    adb reboot bootloader
    You should now be in fastboot mode.

    Download the correct image file and copy the file into the same folder as your adb and fastboot binaries. Rename the image to twrp.img and type:
    Code:
    Code:
    fastboot boot twrp.img

    Now you are booted into TWRP, but it is NOT permanently installed. To install it permanently, use the "Flash current TWRP" option in the Advanced menu. This will install the currently booted TWRP permanently to both slots. NOTE: If you were previously rooted, you will need to re-install the root apk/zip as the TWRP install will overwrite it!

    Device Changelog

    Current version: 3.5.2_11-2:
    3.5.2_11-2
    • Common version for all ROG 5 versions.
    • Fixed decryption issue
    3.5.2_11-0:

    Initial version (Tested only on ROG Phone 5S, need info about ROG Phone 5).



    Device Changelog


    Known issues

    Device-specific
    • USB-OTG not working
    • Battery Status not working

    Bug reporting

    If you have an issue, the first step is to post a recovery log so we can determine the cause of the issue. This is done in recovery using Advanced -> Copy Log, or adb pull /tmp/recovery.log. Once a log is uploaded we can determine how best to proceed. NOTE: Posts that are reporting bugs or issues without an accompanying recovery log will be ignored! Additionally, providing details about your device setup, including variant, firmware version, and exact steps to reproduce your issue will also be helpful in diagnosing the problem.

    If your issue is determined to be a bug, please consider posting it to our github issues log. It's pretty much impossible for us to keep up with the more than 40 threads that we have for the devices that we "directly" support. If you have a significant problem that cannot be answered in this thread, your best bet is to contact us via our website. If you see someone that's struggling, feel free to point it out to us. We need your help to help us keep track of all of our devices! Thanks!

    Additional Help/Support

    Live support is available on Zulip.

    Credits

    @Freak07 and @Captain_Throwback for advices
    @Qtr1st and @danfrid for testing
    5
    Here's my trip around the sun;

    Downloaded the file twrp-3.5.2_11-2zs673ks.img and renamed it to just twrp.img. (So it's easier to type in CMD).
    Placed it on the root of my C: Drive where I keep all my flash files.

    Shut down phone, Then Volume up and power to go to fastboot mode. That's the screen where it shows some options like Power On, Recovery Mode and Reboot. Just stay there, dont select anything.

    Connected the cable via side USB port and executed the following commands;

    0023.png


    First command to check connectivity, second command is to boot to TWRP.
    No flashing !! remember always; new TWRP cannot be flashed through fastboot because recovery is a part of the existing partition, not a separate one like it used to be on Android 8 and below.

    Once you execute the above command, be patient. Your phone will come back to bootloader screen making it look like it failed. Just wait, it will reboot again and it will go to TWRP. Now you can enter you pin code, and enter the recovery.
    I flashed a kernel, I cleared my dalvik cache .. everything went well.




    Now if you want to keep TWRP permanent;

    Copy the twrp.img to your phone memory, preferably downloads folder of the phone, and follow the above steps mentioned - again up to entering TWRP.

    In TWRP, select advanced, and you will see the below screen -

    Screenshot_2021-09-16-07-36-25 (Medium).png


    Select the option - Install Recovery Ramdisk and it will ask where your TWRP.img is, and point it to the file you earlier saved in the phone / downloads folder. This will flash TWRP within the kernel making it permanent along with your kernel.

    That's it, reboot and enjoy.

    EDIT : How to get to TWRP again;
    From CMD - send adb reboot recovery or
    shut down phone, Volume UP + Power .. In bootloader press volume down until you see recovery mode, and then press the power button once to select it.
    2
    Flashing a custom kernel also won't install / restore Magisk. The custom builds are meant to retain Magisk, but don't actually perform any of the installation.

    You can install TWRP over a custom kernel and the kernel will remain, but Magisk will be gone and need to be reinstalled. At this point, the app will only allow you to patch a supported image (img / tar, but also supports win without saying it) and the custom kernels include none of those. This means you need a Magisk recovery zip or need a backup of the kernel to patch with Magisk.

    You can also install a custom kernel over TWRP, but you would need to already have Magisk patched in after installing TWRP or install it after the kernel (see above).

    TL;DR

    The easiest way (for me) to install TWRP with a custom kernel was to
    boot and install TWRP
    make a backup of the boot
    reboot to system
    patch the boot in Magisk
    return to TWRP and install the patched boot image.
    That seems like a lot of unnecessary steps. If you already have Magisk installed, then you must have the Magisk apk somewhere already. That being the case, why not just:
    -Boot and install TWRP
    -Install Magisk apk in TWRP (this re-installs it after the TWRP install overwrites it)
    -Reboot to system and profit

    The custom kernel won't be affected at all, and you'll be restored to your previously rooted state. Fiddling around with patched boot images doesn't seem reasonable for such a simple operation. TWRP is supposed to make things easier, not more complicated.