[TWRP + MAGISK] FULLPROOF Guide for all Razers! Wifi Fix!

Search This thread

nikitis

Senior Member
Jun 23, 2010
75
53
This is the new official way to root the Razer! Please forget all older methods. If you follow this guide, you will not have problems.

Ok, so there isn't some file you download to fix the Wifi, but this is how you make it work, when you swear you've tried everything.
(Trust me you didn't even if you think you did.)

So I'm a very smart person and I realized why so many people are running into this problem. It's because they are used to a bad habit with the Pixel XL phones. I was a prior Pixel XL phone owner and the bad habit that I have and that you guaranteed failed to realize what you did if you have broken wifi was, you didn't flash the TWRP.zip version.

You see, with the Pixel XL, most people realized that flashing TWRP permanently was not required on the Pixel XL and therefore we only booted the TWRP.img image every time we needed to flash something. Well that flat out does NOT work here on the Razer phone and it's the reason everyone is having issues with Wifi not working after flashing Magisk. You see I figured out that TWRP.zip flashes itself onto the stock boot.img image, and when it does so, it does it in such a way that it appears stock still to Magisk. Magisk then happens to flash itself onto the image in a proper way. If you use just the stock boot.img image and flash Magisk onto it, it also detects it as a stock image, but something is bugged in the formatting which breaks Wifi. So you cannot just take a stock boot.img and flash magisk onto it and expect it to work.

In fact when you fastboot twrp.img && fastboot reboot, it literally overwrites the stock boot.img for one side. (Current slot that you are on.) Before factory images, you are then required to store the boot.img from the other slot you did not boot from. (This was what was not explained very well for the lamen to understand.) Before factory images, if you failed to do this, and flashed TWRP.zip then you basically no longer have a clean boot.img file on either slot. (Now that we have factory images, we can just extract boot.img from there and use only it.)

Therein lies the fix. You need to ensure that you have a clean boot.img from the factory images provided by Razer, you then need the TWRP.img and TWRP.zip versions. You also need Magisk v16. (Latest works great.)

Guide coming in a second, but for those who just need to reset and fix Wifi regardless of your current state here's how:

1.) Obtain boot.img from the latest Razer factory image. (If you are not already on the latest, best to just flash it using Razers guide to restore using factory image.) https://developer.razerzone.com/razer-phone-dev-tools/factory-images/
2.) Obtain TWRP.img and TWRP.zip from https://dl.twrp.me/cheryl
3.) Obtain Magisk from: https://forum.xda-developers.com/attachment.php?attachmentid=4427150&d=1519237503
4.) Now that you have all 3 files. I will explain twice to make this easy for the lamen depending on which slot you are starting out on.
5.) Push all 3 files to /sdcard by ensuring all 3 files are inside of your platform-tools folder with adb.exe and fastboot.exe, and with the following command: "adb push boot.img /sdcard", then "adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard", then "adb push Magisk-v16.0.zip /sdcard"
6.) Now boot into fastboot by doing: "adb reboot bootloader"
7.) It's always good to test if your drivers are working by doing: "fastboot devices" If you get a serial number then it's working fine, and use a good Grade USB-A to USB-C cable.
8.) Once in the bootloader and you see "Download Mode", type: "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot"
9.) You should now be in TWRP. Select the reboot button and check which slot you are on and follow instructions accordingly below: (Skip down to "Slot B Instructions" if you are starting out on Slot B.)

Slot A Instructions:
1.) Verify that you are in Slot A by going to Reboot, then viewing what slot you are currently on. It should say Slot A.
2.) Back out and go to "Install", then select "Install IMG" button at the bottom, then browse to the boot.img file.
3.) Select boot.img and swipe to install.
4.) Go back to the main menu, and select the "Reboot" button and change your slot to Slot B.
5.) Once verified it states Slot B, select Bootloader to go back to "Download Mode" This will force it to SlotB, and re-run "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot".
6.) Once there, to go the "Install" button, and select "Install IMG" button, and select and flash boot.img again. This will give you a clean boot.img on Slot B, as well as Slot A.

Your phone is now corrected, and you can do it the proper way.

7.) Doesn't matter which flash you are on now. Go to "Install" button in the main menu, and select "Install Zip", and select the TWRP-installer-3.2.1-0-cheril.zip file. Swipe to complete. This will PATCH BOTH Boot.img images! This is required!
8.) Reboot to System so that it can get a proper boot and verify that Wifi works. (It should if you followed instructions to the letter.)
9.) Once done, type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) This takes you straight to recovery without overwriting. Go to the install button and install a zip, and select the Magisk-v16.0.zip file, and reboot to System. Congratulations! It should be working, but we've only flashed one side, we want to cover both banks, so we need to flash magisk on the second bank as well. (This is optional, but nice to have in case your phone decides to switch banks due to some error and root will still work if you do continue.)
10.) If it is and you want to be more complete. Type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) go to the Reboot Button, and change your slot, then select "Recovery" to force a reboot to force the slot change. Then go to the Install Button and select Magisk-V16.0.zip and flash it over the boot.img from the new slot we just changed too.

Now both banks are flashed properly, and it doesn't matter which one you boot from, it should work with Wifi.

Slot B Instructions: (Skip if you started originally on Slot A, you are done.)
1.) Verify that you are in Slot B by going to Reboot, then viewing what slot you are currently on. It should say Slot B.
2.) Back out and go to "Install", then select "Install IMG" button at the bottom, then browse to the boot.img file.
3.) Select boot.img and swipe to install.
4.) Go back to the main menu, and select the "Reboot" button and change your slot to Slot A.
5.) Once verified it states Slot A, select Bootloader to go back to "Download Mode" This will force it to Slot A, and re-run "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot".
6.) Once there, to go the "Install" button, and select "Install IMG" button, and select and flash boot.img again. This will give you a clean boot.img on Slot A, as well as Slot B.

Your phone is now corrected, and you can do it the proper way.

7.) Doesn't matter which flash you are on now. Go to "Install" button in the main menu, and select "Install Zip", and select the TWRP-installer-3.2.1-0-cheril.zip file. Swipe to complete. This will PATCH BOTH Boot.img images! This is required!
8.) Reboot to System so that it can get a proper boot and verify that Wifi works. (It should if you followed instructions to the letter.)
9.) Once done, type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) This takes you straight to recovery without overwriting. Go to the install button and install a zip, and select the Magisk-v16.0.zip file, and reboot to System. Congratulations! It should be working, but we've only flashed one side, we want to cover both banks, so we need to flash magisk on the second bank as well. (This is optional, but nice to have in case your phone decides to switch banks due to some error and root will still work if you do continue.)
10.) If it is and you want to be more complete. Type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) go to the Reboot Button, and change your slot, then select "Recovery" to force a reboot to force the slot change. Then go to the Install Button and select Magisk-V16.0.zip and flash it over the boot.img from the new slot we just changed too.

Now both banks are flashed properly, and it doesn't matter which one you boot from, it should work with Wifi.

This is how you correct and ensure you are rooted if you screwed up.

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

Now for instructions to do it the clean way for the first time. (For those who did not muck up their phone and waited patiently to do it right the first time.)

1.) Type: adb reboot bootloader
2.) Type: "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot"
3.) Once booted into TWRP via the image. Push the 3 files: "adb push boot.img /sdcard", then "adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard", then "adb push Magisk-v16.0.zip /sdcard"
4.) Once pushed, on the phone, select the Install button, then select "Install IMG" button, and select boot.img, then swipe to install.
5.) Once installed, go back to the Install button, and then "Install Zip", then select TWRP-Installer-3.2.1-0-cheryl.zip and install the zip.
6.) This will Patch TWRP onto both boot.img's which should both be clean up to this point. (factory image shouldn't be required)
7.) Now that TWRP.zip has been installed to both boot.img's, you must reboot to SYSTEM!
8.) Once back in the phone verify Wifi still works, then do: "adb reboot recovery" (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!)
9.) Once in recovery, go to the install button, and select Install Zip, and select Magisk-v16.0.zip.
10.) Once this is done, you should do this to the other Slot. To accomplish this without screwing it up, go to the Reboot button from the main menu and switch slots. Once slots are switched, select Recovery to reboot into recovery (even though you are already in Recovery, we need a reboot to force the slot change for it to flash the correct boot flash slot) and force a Slot swap.
11.) Now verify that the Slot swapped via the "Reboot" button, back out, and install, then install zip, and select Magisk-v16.0.zip again. and swipe to install.

12.) Reboot into System or swap slots if you want and reboot into System, it should work either way, and Wifi will work!

Congratulations!
 
Last edited:

dillalade

Senior Member
Sep 28, 2009
1,543
366
Richmond
I refrained from rooting because of the numerous sour experiences.

This guide puts me at ease in now proceeding with root.

Good work OP ;)
 
Last edited by a moderator:

Mike02z

Senior Member
Feb 3, 2012
1,953
795
Greenville, SC
OnePlus 9 Pro
phone no longer recognises as been connected after rebooting into bootloader via command prompt

Did you verify you have a functional ABD Composite driver in Device Manager? This sort of thing is almost always ADB Composite driver related if ADB works but fastboot does not. Check device manager and see if you have a device with a yellow asterisk next to it when you phone is connected and in Download mode. I use the Samsung ADB Composite drivers on all phones I've had and it work fine.
 

kickassdave

Senior Member
Oct 2, 2010
2,201
641
Google Pixel 6 Pro
Xiaomi Pad 5 Pro
Hmm... I followed to the letter. On your last step. I switched back to A, then hit reboot to recovery (to then reboot system via recovery) and it switched to "Download mode".

It's still recognised in Fastboot, but it's stuck at download mode.

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

P.s. to anyone else - don't do what I did. At the very last step, just boot it while it's still in slow B. Worked a treat.

Thank you my friend!

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

omg... so... do NOT forget. If you start this BEFORE you have unlocked the bootloader, then unlocking it will ERASE ALL DATA (that's not my issue).

The issue with that is it reverts all system updates. So once I finally got back to my home screen with Magisk installed etc.... I immediately got a system update which I couldn't perform.

WOOP DE DOO!

Full flash of Global Image (goodbye Three!!) and running through the latter steps again. Should be me finally sorted.. (post midnight UK time)

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

Nope. On switching to slot B (clean flash of global image), I get "Updater process ended with ERROR: 1; Error installing zip file '/sdcard/magisk.zip' "

It worked for slot_A... so not sure what's going on here?

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

OK so slot A definitely works fine. But I can't get slot B to flash Magisk with the global image. It was actually working with the Three image, but I decided I wanted to make my phone unbranded during this process.

If any ideas on how to bypass the error for Magisk on install for Slot_B - let me know! Goodnight!
 
Last edited:

Mokonae

New member
Mar 1, 2018
1
0
Can't detect devices

Hello, needed some input here on what to do. Mine is a fresh install, just bought the device, so it tried following the steps but got stuck very shortly after.
At first my PC didn't manage to find the device, so i installed the latest usb drivers and it worked. However, once i reboot it into bootloader,
adb devices / fastboot devices doesn't show anything connected. I opened device manager to find my Phone with (!) mark, so i tried installing the drivers manually for Android ADB Interface, Android Bootloader Interface, and Android Composite ADB Interface. Tried both 3 and tried to check for devices, but nothing showing up. If i do any commands it just says waiting for devices.
What should i do in this case? Thanks!
 

M1cky

Senior Member
Apr 22, 2011
104
18
Dublin
Hello, needed some input here on what to do. Mine is a fresh install, just bought the device, so it tried following the steps but got stuck very shortly after.
At first my PC didn't manage to find the device, so i installed the latest usb drivers and it worked. However, once i reboot it into bootloader,
adb devices / fastboot devices doesn't show anything connected. I opened device manager to find my Phone with (!) mark, so i tried installing the drivers manually for Android ADB Interface, Android Bootloader Interface, and Android Composite ADB Interface. Tried both 3 and tried to check for devices, but nothing showing up. If i do any commands it just says waiting for devices.
What should i do in this case? Thanks!

I have the exact same issue, word for word.
 

silvercat

Senior Member
Sep 4, 2008
433
166
Singapore
Hello, needed some input here on what to do. Mine is a fresh install, just bought the device, so it tried following the steps but got stuck very shortly after.
At first my PC didn't manage to find the device, so i installed the latest usb drivers and it worked. However, once i reboot it into bootloader,
adb devices / fastboot devices doesn't show anything connected. I opened device manager to find my Phone with (!) mark, so i tried installing the drivers manually for Android ADB Interface, Android Bootloader Interface, and Android Composite ADB Interface. Tried both 3 and tried to check for devices, but nothing showing up. If i do any commands it just says waiting for devices.
What should i do in this case? Thanks!
When you are in bootloader install the driver. Android ADB interface is the correct one. Once done restart your pc and check in cmd 'fastboot devices' and see if it shows your device serial number
 

parky169

Senior Member
Jan 8, 2011
122
15
Leeds
i still have same problem as quite a few on here,device not showing once in download mode.i have been flashing roms and mods since htc wildfire so not new to this,but this is giving me a headache.if anyone has a solution please help thanks in advance
 

mikeandjaimie

Senior Member
Aug 5, 2010
914
157
Kingston
I think part of the problem is which version of the adb/fastboot/drivers you are using.. For the Razer phone they MUST BE the latest.. You need to get rid of the old ones and JUST install the newest from Google.. Dont use any of the "packages" on XDA as all the ones I've seen haven't been updated.

I had my laptop setup working adb/Fastboot/drivers that ran with my 6p fine but with razer phone I always had issues... Ie ADB would see it, but Fastboot wouldn't.. Fastboot commands would get stuck, or not even work, etc.. After much fighting I had to get the platform tools and drivers from Google directly and uninstall the previous versions of both,, did a fresh install of them and now have no problems.
 

leapfrog2

Senior Member
Jul 18, 2015
83
12
D:\platform-tools>fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot
error: cannot load 'twrp-3.2.1-0-cheryl.img': No such file or directory

I can't seem to boot to twrp.
Any thoughts? I'm already rooted via magisk but I need TWRP to do other stuff.
 

parky169

Senior Member
Jan 8, 2011
122
15
Leeds
hi thanks everything worked great,only downfall is as soon as i rebooted there was a system update which i cant install now...never mind cant win them all.lets hope for some rom magic now..thanks again
 

nikitis

Senior Member
Jun 23, 2010
75
53
For anyone having driver issues. Use the latest Google usb drivers from google. Your phone is in fact two devices with only one active at a time. Adb driver is for when an OS has been loaded such as twrp or android itself. Fastboot driver is the Samsung USB driver is the one that works for this device when in fastboot or download mode provided by the google USB driver set. That's because this phone uses a Samsung bootloader chip same as the Galaxy notes do which also use download mode based bootloader's. (Except ours are unlockable.?)

For software: Use latest platform-tools from Google. Just Google search "platform-tools" then select Windows (unless on Linux) for adb.exe and fastboot.exe. Put all files mentioned in the OP in this same Directory.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 30
    This is the new official way to root the Razer! Please forget all older methods. If you follow this guide, you will not have problems.

    Ok, so there isn't some file you download to fix the Wifi, but this is how you make it work, when you swear you've tried everything.
    (Trust me you didn't even if you think you did.)

    So I'm a very smart person and I realized why so many people are running into this problem. It's because they are used to a bad habit with the Pixel XL phones. I was a prior Pixel XL phone owner and the bad habit that I have and that you guaranteed failed to realize what you did if you have broken wifi was, you didn't flash the TWRP.zip version.

    You see, with the Pixel XL, most people realized that flashing TWRP permanently was not required on the Pixel XL and therefore we only booted the TWRP.img image every time we needed to flash something. Well that flat out does NOT work here on the Razer phone and it's the reason everyone is having issues with Wifi not working after flashing Magisk. You see I figured out that TWRP.zip flashes itself onto the stock boot.img image, and when it does so, it does it in such a way that it appears stock still to Magisk. Magisk then happens to flash itself onto the image in a proper way. If you use just the stock boot.img image and flash Magisk onto it, it also detects it as a stock image, but something is bugged in the formatting which breaks Wifi. So you cannot just take a stock boot.img and flash magisk onto it and expect it to work.

    In fact when you fastboot twrp.img && fastboot reboot, it literally overwrites the stock boot.img for one side. (Current slot that you are on.) Before factory images, you are then required to store the boot.img from the other slot you did not boot from. (This was what was not explained very well for the lamen to understand.) Before factory images, if you failed to do this, and flashed TWRP.zip then you basically no longer have a clean boot.img file on either slot. (Now that we have factory images, we can just extract boot.img from there and use only it.)

    Therein lies the fix. You need to ensure that you have a clean boot.img from the factory images provided by Razer, you then need the TWRP.img and TWRP.zip versions. You also need Magisk v16. (Latest works great.)

    Guide coming in a second, but for those who just need to reset and fix Wifi regardless of your current state here's how:

    1.) Obtain boot.img from the latest Razer factory image. (If you are not already on the latest, best to just flash it using Razers guide to restore using factory image.) https://developer.razerzone.com/razer-phone-dev-tools/factory-images/
    2.) Obtain TWRP.img and TWRP.zip from https://dl.twrp.me/cheryl
    3.) Obtain Magisk from: https://forum.xda-developers.com/attachment.php?attachmentid=4427150&d=1519237503
    4.) Now that you have all 3 files. I will explain twice to make this easy for the lamen depending on which slot you are starting out on.
    5.) Push all 3 files to /sdcard by ensuring all 3 files are inside of your platform-tools folder with adb.exe and fastboot.exe, and with the following command: "adb push boot.img /sdcard", then "adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard", then "adb push Magisk-v16.0.zip /sdcard"
    6.) Now boot into fastboot by doing: "adb reboot bootloader"
    7.) It's always good to test if your drivers are working by doing: "fastboot devices" If you get a serial number then it's working fine, and use a good Grade USB-A to USB-C cable.
    8.) Once in the bootloader and you see "Download Mode", type: "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot"
    9.) You should now be in TWRP. Select the reboot button and check which slot you are on and follow instructions accordingly below: (Skip down to "Slot B Instructions" if you are starting out on Slot B.)

    Slot A Instructions:
    1.) Verify that you are in Slot A by going to Reboot, then viewing what slot you are currently on. It should say Slot A.
    2.) Back out and go to "Install", then select "Install IMG" button at the bottom, then browse to the boot.img file.
    3.) Select boot.img and swipe to install.
    4.) Go back to the main menu, and select the "Reboot" button and change your slot to Slot B.
    5.) Once verified it states Slot B, select Bootloader to go back to "Download Mode" This will force it to SlotB, and re-run "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot".
    6.) Once there, to go the "Install" button, and select "Install IMG" button, and select and flash boot.img again. This will give you a clean boot.img on Slot B, as well as Slot A.

    Your phone is now corrected, and you can do it the proper way.

    7.) Doesn't matter which flash you are on now. Go to "Install" button in the main menu, and select "Install Zip", and select the TWRP-installer-3.2.1-0-cheril.zip file. Swipe to complete. This will PATCH BOTH Boot.img images! This is required!
    8.) Reboot to System so that it can get a proper boot and verify that Wifi works. (It should if you followed instructions to the letter.)
    9.) Once done, type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) This takes you straight to recovery without overwriting. Go to the install button and install a zip, and select the Magisk-v16.0.zip file, and reboot to System. Congratulations! It should be working, but we've only flashed one side, we want to cover both banks, so we need to flash magisk on the second bank as well. (This is optional, but nice to have in case your phone decides to switch banks due to some error and root will still work if you do continue.)
    10.) If it is and you want to be more complete. Type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) go to the Reboot Button, and change your slot, then select "Recovery" to force a reboot to force the slot change. Then go to the Install Button and select Magisk-V16.0.zip and flash it over the boot.img from the new slot we just changed too.

    Now both banks are flashed properly, and it doesn't matter which one you boot from, it should work with Wifi.

    Slot B Instructions: (Skip if you started originally on Slot A, you are done.)
    1.) Verify that you are in Slot B by going to Reboot, then viewing what slot you are currently on. It should say Slot B.
    2.) Back out and go to "Install", then select "Install IMG" button at the bottom, then browse to the boot.img file.
    3.) Select boot.img and swipe to install.
    4.) Go back to the main menu, and select the "Reboot" button and change your slot to Slot A.
    5.) Once verified it states Slot A, select Bootloader to go back to "Download Mode" This will force it to Slot A, and re-run "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot".
    6.) Once there, to go the "Install" button, and select "Install IMG" button, and select and flash boot.img again. This will give you a clean boot.img on Slot A, as well as Slot B.

    Your phone is now corrected, and you can do it the proper way.

    7.) Doesn't matter which flash you are on now. Go to "Install" button in the main menu, and select "Install Zip", and select the TWRP-installer-3.2.1-0-cheril.zip file. Swipe to complete. This will PATCH BOTH Boot.img images! This is required!
    8.) Reboot to System so that it can get a proper boot and verify that Wifi works. (It should if you followed instructions to the letter.)
    9.) Once done, type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) This takes you straight to recovery without overwriting. Go to the install button and install a zip, and select the Magisk-v16.0.zip file, and reboot to System. Congratulations! It should be working, but we've only flashed one side, we want to cover both banks, so we need to flash magisk on the second bank as well. (This is optional, but nice to have in case your phone decides to switch banks due to some error and root will still work if you do continue.)
    10.) If it is and you want to be more complete. Type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) go to the Reboot Button, and change your slot, then select "Recovery" to force a reboot to force the slot change. Then go to the Install Button and select Magisk-V16.0.zip and flash it over the boot.img from the new slot we just changed too.

    Now both banks are flashed properly, and it doesn't matter which one you boot from, it should work with Wifi.

    This is how you correct and ensure you are rooted if you screwed up.

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

    Now for instructions to do it the clean way for the first time. (For those who did not muck up their phone and waited patiently to do it right the first time.)

    1.) Type: adb reboot bootloader
    2.) Type: "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot"
    3.) Once booted into TWRP via the image. Push the 3 files: "adb push boot.img /sdcard", then "adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard", then "adb push Magisk-v16.0.zip /sdcard"
    4.) Once pushed, on the phone, select the Install button, then select "Install IMG" button, and select boot.img, then swipe to install.
    5.) Once installed, go back to the Install button, and then "Install Zip", then select TWRP-Installer-3.2.1-0-cheryl.zip and install the zip.
    6.) This will Patch TWRP onto both boot.img's which should both be clean up to this point. (factory image shouldn't be required)
    7.) Now that TWRP.zip has been installed to both boot.img's, you must reboot to SYSTEM!
    8.) Once back in the phone verify Wifi still works, then do: "adb reboot recovery" (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!)
    9.) Once in recovery, go to the install button, and select Install Zip, and select Magisk-v16.0.zip.
    10.) Once this is done, you should do this to the other Slot. To accomplish this without screwing it up, go to the Reboot button from the main menu and switch slots. Once slots are switched, select Recovery to reboot into recovery (even though you are already in Recovery, we need a reboot to force the slot change for it to flash the correct boot flash slot) and force a Slot swap.
    11.) Now verify that the Slot swapped via the "Reboot" button, back out, and install, then install zip, and select Magisk-v16.0.zip again. and swipe to install.

    12.) Reboot into System or swap slots if you want and reboot into System, it should work either way, and Wifi will work!

    Congratulations!
    3
    I was one of the users who bricked their phones using the old guide but following this guide I am now rooted with Magisk. In order too boot I had to swap back to my original boot slot (A) before I could boot though :)
    3
    I can't get this to work. I'm updated to the latest OTA, the July security patch. As soon as I flash twrp.zip in TWRP and then reboot to check if WiFi is still working (which it was still working), my phone rolls back to the May security patch. Why is this happening? After several attempts at rooting my phone, I gave up and flashed the factory img to return to stock. Any ideas?

    I wouldn't use the guide in the OP since it's NOT the way to keep WIFI working even though the method does keep WIFI intact. + The method used is now outdated and unnecessary.

    For those who want to root on the latest update, I've written down a quick guide below how to do it. It's very easy and straightforward.
    Razer provides a guide on how to flash factory images and how to install drivers+ADB/FASTBOOT here: LINK.
    I'm assuming you got ADB/Fastboot working if you followed Razers instructions in the link above, now let's get into it.

    Preparation/Optional Steps:
    1. Flash the Factory Image from May 2018 by following Razers instructions.
    2. Let your device boot and skip through setup. (I recommend not even signing in to Google Play Store yet, just skip everything you can)
    3. Go to "Settings > System > System Update" and update your phone to the latest version, this will make your phone use "Slot B" as the updated Android OS.
    4. Once the update is installed, reboot.
    5. When your phone has booted up again, go into "Settings > System > About Phone" and tap Build Number until Developer Options are unlocked.
    6. Go to Developer Options and enable OEM Unlocking (if it's not enabled) and USB Debugging.

    How to flash TWRP + Magisk on latest update:
    1. Connect the phone to your computer.
    2. Open a Command Prompt where you got your ADB installed. Double check that ADB is working by typing "adb devices". (without the quotes " ", this applies to all commands below aswell)
    3. Download latest Magisk and twrp.img/twrp-Installer.zip. Save them in the same folder where your ADB is installed.
    4. Push the following files to your device via ADB by typing "adb push Magisk-v17.1.zip /sdcard" and "adb push twrp-installer-3.2.2-0-cheryl.zip /sdcard".
    5. Verify that the files got pushed to your device properly by locating them on your phone.
    6. Boot your phone into Download Mode by typing "adb reboot bootloader"
    7. Once your phone boots to Download mode, type "fastboot boot twrp-3.2.2-0-cheryl.img", your phone should now reboot into twrp-recovery WITHOUT flashing over your stock boot.img. (Step 7 can be buggy sometimes and your phone doesnt boot, if that's the case just force shut it down and reboot your phone to download mode again and repeat step 7.)
    8a. Once you're in TWRP, swipe to allow modifications and then check that your active slot is B by going to the Reboot menu in TWRP, if it is: GOOD. Now go back to twrp main menu and click the install button.
    8b. *Recommended*: Backup your updated ota boot.img in twrp before doing the steps below, since there are no factory images for latest OTA.
    9. Flash twrp-installer-3.2.2-0-cheryl.zip and then flash Magisk-v17.1.zip and reboot.
    10. Done and WIFI should still be working and you got Magisk with root access on latest update.
    3
    Weird question i have.

    Why is there 2 boot slots and what is the use/point of them?

    What does ut really mean when you have 2 boot slots? Is it for system verification or something?

    Thanks.

    https://source.android.com/devices/tech/ota/ab/
    1
    This is the new official way to root the Razer! Please forget all older methods. If you follow this guide, you will not have problems.

    Ok, so there isn't some file you download to fix the Wifi, but this is how you make it work, when you swear you've tried everything.
    (Trust me you didn't even if you think you did.)

    So I'm a very smart person and I realized why so many people are running into this problem. It's because they are used to a bad habit with the Pixel XL phones. I was a prior Pixel XL phone owner and the bad habit that I have and that you guaranteed failed to realize what you did if you have broken wifi was, you didn't flash the TWRP.zip version.

    You see, with the Pixel XL, most people realized that flashing TWRP permanently was not required on the Pixel XL and therefore we only booted the TWRP.img image every time we needed to flash something. Well that flat out does NOT work here on the Razer phone and it's the reason everyone is having issues with Wifi not working after flashing Magisk. You see I figured out that TWRP.zip flashes itself onto the stock boot.img image, and when it does so, it does it in such a way that it appears stock still to Magisk. Magisk then happens to flash itself onto the image in a proper way. If you use just the stock boot.img image and flash Magisk onto it, it also detects it as a stock image, but something is bugged in the formatting which breaks Wifi. So you cannot just take a stock boot.img and flash magisk onto it and expect it to work.

    In fact when you fastboot twrp.img && fastboot reboot, it literally overwrites the stock boot.img for one side. (Current slot that you are on.) Before factory images, you are then required to store the boot.img from the other slot you did not boot from. (This was what was not explained very well for the lamen to understand.) Before factory images, if you failed to do this, and flashed TWRP.zip then you basically no longer have a clean boot.img file on either slot. (Now that we have factory images, we can just extract boot.img from there and use only it.)

    Therein lies the fix. You need to ensure that you have a clean boot.img from the factory images provided by Razer, you then need the TWRP.img and TWRP.zip versions. You also need Magisk v16. (Latest works great.)

    Guide coming in a second, but for those who just need to reset and fix Wifi regardless of your current state here's how:

    1.) Obtain boot.img from the latest Razer factory image. (If you are not already on the latest, best to just flash it using Razers guide to restore using factory image.) https://developer.razerzone.com/razer-phone-dev-tools/factory-images/
    2.) Obtain TWRP.img and TWRP.zip from https://dl.twrp.me/cheryl
    3.) Obtain Magisk from: https://forum.xda-developers.com/attachment.php?attachmentid=4427150&d=1519237503
    4.) Now that you have all 3 files. I will explain twice to make this easy for the lamen depending on which slot you are starting out on.
    5.) Push all 3 files to /sdcard by ensuring all 3 files are inside of your platform-tools folder with adb.exe and fastboot.exe, and with the following command: "adb push boot.img /sdcard", then "adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard", then "adb push Magisk-v16.0.zip /sdcard"
    6.) Now boot into fastboot by doing: "adb reboot bootloader"
    7.) It's always good to test if your drivers are working by doing: "fastboot devices" If you get a serial number then it's working fine, and use a good Grade USB-A to USB-C cable.
    8.) Once in the bootloader and you see "Download Mode", type: "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot"
    9.) You should now be in TWRP. Select the reboot button and check which slot you are on and follow instructions accordingly below: (Skip down to "Slot B Instructions" if you are starting out on Slot B.)

    Slot A Instructions:
    1.) Verify that you are in Slot A by going to Reboot, then viewing what slot you are currently on. It should say Slot A.
    2.) Back out and go to "Install", then select "Install IMG" button at the bottom, then browse to the boot.img file.
    3.) Select boot.img and swipe to install.
    4.) Go back to the main menu, and select the "Reboot" button and change your slot to Slot B.
    5.) Once verified it states Slot B, select Bootloader to go back to "Download Mode" This will force it to SlotB, and re-run "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot".
    6.) Once there, to go the "Install" button, and select "Install IMG" button, and select and flash boot.img again. This will give you a clean boot.img on Slot B, as well as Slot A.

    Your phone is now corrected, and you can do it the proper way.

    7.) Doesn't matter which flash you are on now. Go to "Install" button in the main menu, and select "Install Zip", and select the TWRP-installer-3.2.1-0-cheril.zip file. Swipe to complete. This will PATCH BOTH Boot.img images! This is required!
    8.) Reboot to System so that it can get a proper boot and verify that Wifi works. (It should if you followed instructions to the letter.)
    9.) Once done, type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) This takes you straight to recovery without overwriting. Go to the install button and install a zip, and select the Magisk-v16.0.zip file, and reboot to System. Congratulations! It should be working, but we've only flashed one side, we want to cover both banks, so we need to flash magisk on the second bank as well. (This is optional, but nice to have in case your phone decides to switch banks due to some error and root will still work if you do continue.)
    10.) If it is and you want to be more complete. Type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) go to the Reboot Button, and change your slot, then select "Recovery" to force a reboot to force the slot change. Then go to the Install Button and select Magisk-V16.0.zip and flash it over the boot.img from the new slot we just changed too.

    Now both banks are flashed properly, and it doesn't matter which one you boot from, it should work with Wifi.

    Slot B Instructions: (Skip if you started originally on Slot A, you are done.)
    1.) Verify that you are in Slot B by going to Reboot, then viewing what slot you are currently on. It should say Slot B.
    2.) Back out and go to "Install", then select "Install IMG" button at the bottom, then browse to the boot.img file.
    3.) Select boot.img and swipe to install.
    4.) Go back to the main menu, and select the "Reboot" button and change your slot to Slot A.
    5.) Once verified it states Slot A, select Bootloader to go back to "Download Mode" This will force it to Slot A, and re-run "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot".
    6.) Once there, to go the "Install" button, and select "Install IMG" button, and select and flash boot.img again. This will give you a clean boot.img on Slot A, as well as Slot B.

    Your phone is now corrected, and you can do it the proper way.

    7.) Doesn't matter which flash you are on now. Go to "Install" button in the main menu, and select "Install Zip", and select the TWRP-installer-3.2.1-0-cheril.zip file. Swipe to complete. This will PATCH BOTH Boot.img images! This is required!
    8.) Reboot to System so that it can get a proper boot and verify that Wifi works. (It should if you followed instructions to the letter.)
    9.) Once done, type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) This takes you straight to recovery without overwriting. Go to the install button and install a zip, and select the Magisk-v16.0.zip file, and reboot to System. Congratulations! It should be working, but we've only flashed one side, we want to cover both banks, so we need to flash magisk on the second bank as well. (This is optional, but nice to have in case your phone decides to switch banks due to some error and root will still work if you do continue.)
    10.) If it is and you want to be more complete. Type: "adb reboot recovery". (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!) go to the Reboot Button, and change your slot, then select "Recovery" to force a reboot to force the slot change. Then go to the Install Button and select Magisk-V16.0.zip and flash it over the boot.img from the new slot we just changed too.

    Now both banks are flashed properly, and it doesn't matter which one you boot from, it should work with Wifi.

    This is how you correct and ensure you are rooted if you screwed up.

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

    Now for instructions to do it the clean way for the first time. (For those who did not muck up their phone and waited patiently to do it right the first time.)

    1.) Type: adb reboot bootloader
    2.) Type: "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot"
    3.) Once booted into TWRP via the image. Push the 3 files: "adb push boot.img /sdcard", then "adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard", then "adb push Magisk-v16.0.zip /sdcard"
    4.) Once pushed, on the phone, select the Install button, then select "Install IMG" button, and select boot.img, then swipe to install.
    5.) Once installed, go back to the Install button, and then "Install Zip", then select TWRP-Installer-3.2.1-0-cheryl.zip and install the zip.
    6.) This will Patch TWRP onto both boot.img's which should both be clean up to this point. (factory image shouldn't be required)
    7.) Now that TWRP.zip has been installed to both boot.img's, you must reboot to SYSTEM!
    8.) Once back in the phone verify Wifi still works, then do: "adb reboot recovery" (IMPORTANT!!! DO NOT DO DOWNLOAD MODE AND BOOT THE TWRP.IMG as it will OVERWRITE ALL OF YOUR WORK THUS FAR!)
    9.) Once in recovery, go to the install button, and select Install Zip, and select Magisk-v16.0.zip.
    10.) Once this is done, you should do this to the other Slot. To accomplish this without screwing it up, go to the Reboot button from the main menu and switch slots. Once slots are switched, select Recovery to reboot into recovery (even though you are already in Recovery, we need a reboot to force the slot change for it to flash the correct boot flash slot) and force a Slot swap.
    11.) Now verify that the Slot swapped via the "Reboot" button, back out, and install, then install zip, and select Magisk-v16.0.zip again. and swipe to install.

    12.) Reboot into System or swap slots if you want and reboot into System, it should work either way, and Wifi will work!

    Congratulations!

    I tried this. When I go into "bootloader" my pc wont see my phone so I cant even send it commands to do anything. Please help if you know how to get around this.