Root & TWRP!

Search This thread

CalebQ42

Senior Member
Jan 4, 2014
168
127
Note: I am no expert at this. I used this to get TWRP and root, but it there is no guarentee it won't brick your phone. Only do this if you know what your doing. Before you start you must have an unlocked bootloader, which will delete all your data. Here's the instructions (If you need help, feel free to post a comment):

  1. Download Magisk's installer zip on your phone from https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445 (Google Pay only works with Magisk v19.0+)
  2. Download arter97's kernel .img to your PC. This kernel currently is the only reliable way to get TWRP. https://forum.xda-developers.com/razer-phone-2/development/arter97-kernel-razer-phone-2-t3914996
  3. Reboot your phone into bootloader mode (Turn off then back on while holding vol down).
    • Make sure your phone is recognized by Windows before proceeding. Follow this guide to setup the proper drivers and fastboot.
  4. Flash arter97's kernel by running
    Code:
    fastboot flash boot arter97-kernel-*.img
    1. If you run into any issues, then you will probably need to specify the slot to flash. Reboot back into your system.
    2. Turn on Android Debugging and run
      Code:
      adb shell getprop ro.boot.slot_suffix
      and make note if the output is _a or _b
    3. Reboot back into bootloader
      • If _a use
        Code:
        fastboot flash boot_a arter97-kernel-*.img
      • if _b use
        Code:
        fastboot flash boot_b arter97-kernel-*.img
  5. Reboot to recovery (either through bootloader mode or hold vol up while rebooting).
  6. Install the Magisk .zip from TWRP.
  7. Be amazed by the possibilities.

Old instructions (Should always work to get root):

  1. Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
  2. Extract and copy the boot.img file to your device
  3. Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
  4. Tap install, select Patch Boot Image File, and select the boot.img (If using the default file manager click the overflow menu and show internal storage)
  5. Copy the patched_boot.img back over to your PC
  6. Flash the patched_boot.img to your device via fastboot (Turn off then back on while holding vol down) and run
    Code:
    fastboot flash boot patched_boot.img
    .
    1. If you run into any issues, then you will need to specify the slot to flash.
    2. Turn on Android Debugging and run
      Code:
      adb shell getprop ro.boot.slot_suffix
      and make note if the output is _a or _b
    3. Reboot back into bootloader
      • If _a use
        Code:
        fastboot flash boot_a patched_boot.img
      • if _b use
        Code:
        fastboot flash boot_b patched_boot.img
  7. Reboot, and open up magisk manager to confirm everything is working. After an OTA update you may have to re-apply due to it using a different slot.

Note: the phone wasn't properly recognized by my computer when in bootloader mode so I had to install the Google adb drivers and manually set the driver used to Google Bootloader Interface (or something like that)
 
Last edited:

CurtisMJ

Senior Member
May 23, 2013
633
532
I found you needed to specify boot_a or boot_b specifically as the bootloader tended to mess up the suffix(it tried "bootb_b"????). So I had to first run "fastboot getvar all" to check the current slot.
I also found the commands are executed much more reliably if you enter the command first and press enter so fastboot goes into the "waiting for device" state and then boot into the bootloader and afterwards plug in the cable so fastboot executes the command as soon as it connects.
 

Twiggy000b

Senior Member
Oct 27, 2015
220
48
figured itd be as easy as that. this will be my first up to date device in years, att sending it to me in the mail. should get it by the 6th :eek:. but glad to see theres root! hopefully lineage to follow <3
 
  • Like
Reactions: xttweaponttx

CalebQ42

Senior Member
Jan 4, 2014
168
127
I found you needed to specify boot_a or boot_b specifically as the bootloader tended to mess up the suffix(it tried "bootb_b"????). So I had to first run "fastboot getvar all" to check the current slot.
I also found the commands are executed much more reliably if you enter the command first and press enter so fastboot goes into the "waiting for device" state and then boot into the bootloader and afterwards plug in the cable so fastboot executes the command as soon as it connects.
Lol, bootb_b:laugh:. For me at least it worked fine without specifying the slot, though I may change the instructions to specify the slot
 

ctakah27

Senior Member
Oct 20, 2010
476
87
NYC
With the release of the factory images we can achieve root via Magisk boot image patching. Note: I am no expert at this. I used this to achieve root, but it there is no guarentee it won't brick your phone. Only do this if you know what your doing. Before you start you must have an unlocked bootloader. Here's the instructions (If you need help, feel free to post a comment):

  1. Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
  2. Extract and copy the boot.img file to your device
  3. Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
  4. Tap install, select Patch Boot Image File, and select the boot.img (If using the default file manager click the overflow menu and show internal storage)
  5. Copy the patched_boot.img back over to your PC
  6. Flash the patched_boot.img to your device via fastboot (Turn off then back on while holding vol down and run `fastboot flash boot patched_boot.img`.
  7. Reboot, and open up magisk manager to confirm everything is working.

Note: the phone wasn't properly recognized by my computer so I had to install the Google adb drivers and manually set the driver to Google Bootloader interface (or something like that)

I also tried to install some Android Pie GSIs, but none of them worked.

Does this destroy all data? Do I need to unlock bootloader? Does it matter where I place the boot.img on my device?
 

CurtisMJ

Senior Member
May 23, 2013
633
532
Lol, bootb_b:laugh:. For me at least it worked fine without specifying the slot, though I may change the instructions to specify the slot
Interesting. The bootloader isn't exactly what I'd call a masterpiece of coding (weird cause I still maintain the ROM is excellent) so it might have just been a momentary glitch.

---------- Post added at 10:54 PM ---------- Previous post was at 10:53 PM ----------

Does this destroy all data? Do I need to unlock bootloader? Does it matter where I place the boot.img on my device?
Yes, yes and not really (you get a file chooser so you just need to locate it)
 
  • Like
Reactions: ctakah27

Warrior1988

Senior Member
Jun 28, 2015
332
262
32
I updated the post a bit with instructions on how to flash to a specific slot.
Tonight I'm going to try compiling TWRP for the first time ever (unless someone beats me to in). Wish me luck!

Good luck it's a easier process compare to years ago. I would do it but I have no need for root or custom recovery. If you fail on the TWRP I will do it in time for people.
 
Last edited:
  • Like
Reactions: Ventigo

jonchance_84

Senior Member
Aug 2, 2009
281
114
East Texas
Razer Phone 2
Is this working on the AT&T version of this phone? Or would you need to flash the global firmware in order for this to work? Looking to upgrade to this phone and I want to be sure I can get root. The rest looks to be coming fairly quickly.
 

Warrior1988

Senior Member
Jun 28, 2015
332
262
32
I updated the post a bit with instructions on how to flash to a specific slot.
Tonight I'm going to try compiling TWRP for the first time ever (unless someone beats me to in). Wish me luck!

Is this working on the AT&T version of this phone? Or would you need to flash the global firmware in order for this to work? Looking to upgrade to this phone and I want to be sure I can get root. The rest looks to be coming fairly quickly.

They have the image for AT&T

EAIaIQobChMIwYzbk7j_3gIVRZRpCh0RMwdoEAEYASAAEgLPifD_BwE
 
  • Like
Reactions: jonchance_84

ctakah27

Senior Member
Oct 20, 2010
476
87
NYC
With the release of the factory images we can achieve root via Magisk boot image patching. Note: I am no expert at this. I used this to achieve root, but it there is no guarentee it won't brick your phone. Only do this if you know what your doing. Before you start you must have an unlocked bootloader, which will delete all your data. Here's the instructions (If you need help, feel free to post a comment):

  1. Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
  2. Extract and copy the boot.img file to your device
  3. Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
  4. Tap install, select Patch Boot Image File, and select the boot.img (If using the default file manager click the overflow menu and show internal storage)
  5. Copy the patched_boot.img back over to your PC
  6. Flash the patched_boot.img to your device via fastboot (Turn off then back on while holding vol down) and run
    Code:
    fastboot flash boot patched_boot.img
    .
    1. If you run into any issues, then you will need to specify the slot to flash.
    2. Turn on Android Debugging and run
      Code:
      adb shell getprop ro.boot.slot_suffix
      and make note if the output is _a or _b
    3. Reboot back into bootloader
      • If _a use
        Code:
        fastboot flash boot_a patched_boot.img
      • if _b use
        Code:
        fastboot flash boot_b patched_boot.img
  7. Reboot, and open up magisk manager to confirm everything is working. After an OTA update you may have to re-apply due to it using a different slot.

Note: the phone wasn't properly recognized by my computer so I had to install the Google adb drivers and manually set the driver to Google Bootloader interface (or something like that)

I also tried to install some Android Pie GSIs, but none of them worked.
Would this procedure be the same as far as mac/win?
 
  • Like
Reactions: Same Old Dude

charlie.s

Senior Member
Feb 15, 2005
176
31
I love a rooted phone, but as far as I know, if you unlock the bootloader, Netflix will no longer work in HD mode. To me, this is a deal-breaker. If anyone knows about a work-around, I'd love to know.
 

andy1011

Member
Dec 6, 2018
7
0
Razer phone 2 root

so im kinda new to rooting this type of phone and to the android boot scheme in general. i have a razer phone 2 and have attempted (febaly) to root it using this meathod. after installing the google adb drivers i was unable to see the device from my pc when it was in fastboot and unable to send commands, after installing the drivers again with windows update it ran even though no device was detected with this message
">fastboot flash boot patched_boot.img
Sending 'boot_b' (19268 KB) OKAY [ 0.523s]
Writing 'boot_b' OKAY [ 0.179s]
Finished. Total time: 0.718s"
it then blackscreened, i then tried a factory reset from recovery, and it is now in a bootloop... any advice?
update: no longer in boot loop but now is full blackscreen after a glitchy install screen
 
Last edited:

CurtisMJ

Senior Member
May 23, 2013
633
532
so im kinda new to rooting this type of phone and to the android boot scheme in general. i have a razer phone 2 and have attempted (febaly) to root it using this meathod. after installing the google adb drivers i was unable to see the device from my pc when it was in fastboot and unable to send commands, after installing the drivers again with windows update it ran even though no device was detected with this message
">fastboot flash boot patched_boot.img
Sending 'boot_b' (19268 KB) OKAY [ 0.523s]
Writing 'boot_b' OKAY [ 0.179s]
Finished. Total time: 0.718s"
it then blackscreened, i then tried a factory reset from recovery, and it is now in a bootloop... any advice?
update: no longer in boot loop but now is full blackscreen after a glitchy install screen
Since it's already wiped the easiest way to fix it is to probably flash the full factory image. Did you happen to update to the MR2 update prior to following this guide? Doing this on MR2 will soft brick. Not entirely sure in what way, but I assume it would be similar to what you experienced. If you were still on MR0 you can actually just fastboot flash the original kernel image to fix it. I just finished rooting MR2 so I'll post that next
 
Last edited:

andy1011

Member
Dec 6, 2018
7
0
Since it's already wiped the easiest way to fix it is to probably flash the full factory image. Did you happen to update to the MR2 update prior to following this guide? Doing this on MR2 will soft brick. Not entirely sure in what way, but I assume it would be similar to what you experienced. If you were still on MR0 you can actually just fastboot flash the original kernel image to fix it. I just finished rooting MR2 so I'll post that next

this is what im trying to do. however i have no way of flashing to the device as adb is unable to see the device.
 

CurtisMJ

Senior Member
May 23, 2013
633
532
this is what im trying to do. however i have no way of flashing to the device as adb is unable to see the device.
Adb and fastboot are separate things. You should only need download mode and fastboot. What are you trying to use ADB for? If in doubt, the guide on Razer's website should be quite sufficient
EDIT: You can get to download mode by holding Vol Down and Power Button while the device is off. You can force reboot by holding down power for approx 15s as well
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    Note: I am no expert at this. I used this to get TWRP and root, but it there is no guarentee it won't brick your phone. Only do this if you know what your doing. Before you start you must have an unlocked bootloader, which will delete all your data. Here's the instructions (If you need help, feel free to post a comment):

    1. Download Magisk's installer zip on your phone from https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445 (Google Pay only works with Magisk v19.0+)
    2. Download arter97's kernel .img to your PC. This kernel currently is the only reliable way to get TWRP. https://forum.xda-developers.com/razer-phone-2/development/arter97-kernel-razer-phone-2-t3914996
    3. Reboot your phone into bootloader mode (Turn off then back on while holding vol down).
      • Make sure your phone is recognized by Windows before proceeding. Follow this guide to setup the proper drivers and fastboot.
    4. Flash arter97's kernel by running
      Code:
      fastboot flash boot arter97-kernel-*.img
      1. If you run into any issues, then you will probably need to specify the slot to flash. Reboot back into your system.
      2. Turn on Android Debugging and run
        Code:
        adb shell getprop ro.boot.slot_suffix
        and make note if the output is _a or _b
      3. Reboot back into bootloader
        • If _a use
          Code:
          fastboot flash boot_a arter97-kernel-*.img
        • if _b use
          Code:
          fastboot flash boot_b arter97-kernel-*.img
    5. Reboot to recovery (either through bootloader mode or hold vol up while rebooting).
    6. Install the Magisk .zip from TWRP.
    7. Be amazed by the possibilities.

    Old instructions (Should always work to get root):

    1. Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
    2. Extract and copy the boot.img file to your device
    3. Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
    4. Tap install, select Patch Boot Image File, and select the boot.img (If using the default file manager click the overflow menu and show internal storage)
    5. Copy the patched_boot.img back over to your PC
    6. Flash the patched_boot.img to your device via fastboot (Turn off then back on while holding vol down) and run
      Code:
      fastboot flash boot patched_boot.img
      .
      1. If you run into any issues, then you will need to specify the slot to flash.
      2. Turn on Android Debugging and run
        Code:
        adb shell getprop ro.boot.slot_suffix
        and make note if the output is _a or _b
      3. Reboot back into bootloader
        • If _a use
          Code:
          fastboot flash boot_a patched_boot.img
        • if _b use
          Code:
          fastboot flash boot_b patched_boot.img
    7. Reboot, and open up magisk manager to confirm everything is working. After an OTA update you may have to re-apply due to it using a different slot.

    Note: the phone wasn't properly recognized by my computer when in bootloader mode so I had to install the Google adb drivers and manually set the driver used to Google Bootloader Interface (or something like that)
    6
    So is the procedure different for MR2?
    The primary difference is just that there's no factory images yet. Judging from the first Razer phone, they are usually about one update behind. Maybe they'll be different this time, but I couldn't wait. I mean it might work, but you'll be running an older kernel which could have all sorts of random issues.
    I've attached the stock boot image for MR2 I patched from the factory image and OTA package which should work for this guide (did for me at least). I promise I didn't do anything evil with it ;)
    I'm planning on writing a guide on patching the factory images so others can verify but yeah, you'll have to trust me for now lol.

    I SHOULD CLARIFY THIS WOULD BE THE STOCK BOOT FOR GLOBAL MR2! I don't know if the 3 kernel is the same. AT&T is very likely different
    6
    I updated the post a bit with instructions on how to flash to a specific slot.
    Tonight I'm going to try compiling TWRP for the first time ever (unless someone beats me to in). Wish me luck!
    3
    Just so everyone knows Razer released an official guide to install the fastboot drivers for the rp1 & 2 so your computer will recognize it. As well as a full guide on how to flash the stock img or your own. Links below.

    How to install fastboot drivers.
    https://s3.amazonaws.com/cheryl-factory-images/How_to_Install_Android_Fastboot_Drivers_on_Windows.pdf

    How to flash stock image or your own.
    https://developer.razer.com/razer-phone-dev-tools/factory-images/?_ga=2.255495496.1549164694.1545031042-920010378.1544877102?_ga=2.255495496.1549164694.1545031042-920010378.1544877102
    3
    Usually you would tail out the logcat onto a PC while checking for an OTA and the URL would usually be in there somewhere. There are a couple guides around if you search. You kind of just have to look for it though. There is /data/ota_package where it's stored as well if you're rooted (I know, just thought I'd mention it). As a hint, they come from Google servers, not Razer's. I had root so I'll admit to not knowing what exactly you're looking for. There was a post previously where someone had done it the ADB way. I'll try to find it.

    ---------- Post added at 11:15 PM ---------- Previous post was at 11:10 PM ----------

    Here it is:
    https://forum.xda-developers.com/showpost.php?p=78467585&postcount=5 @translucentfocus Would it be possible to share what the log line with the URL looked like?

    EDIT: Method I used posted here: https://forum.xda-developers.com/android/help/how-to-grab-url-ota-update-android-t3144782


    Hey! Sorry I wasn't able to get to this sooner. Sorry it's not a step-by-step guide. My method was (if my memory serves correctly)

    1. Setup up adb with the phone
    2. Restart the phone to reduce log traffic
    3. Start the update download (not checking for update... actually downloading it--if you have crazy fast internet you can pause it once it starts in case something goes wrong and you have to try capturing the URL again)
    4. Save the adb log
    5. Search through the log for .zip was my method... it was pretty obvious when I found the OTA
    6. The link I found looked like this where SHAHASHNUMBERS was the hash of the file: https://android.googleapis.com/packages/ota-api/razer_aura_cheryl2/SHAHASHNUMBERS.zip
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone