[GUIDE] Unlock/Flash/Root for the Pixel 2 (walleye) - Google Pixel 2 Guides, News, & Discussion

Introduction
Hello everyone, this is a guide to assist you with customizing your Pixel 2! I will be going over installing fastboot and adb, unlocking your bootloader, how to flash the factory images for clean flashes and upgrades, and how to root. Please feel free to ask any questions if you need clarification. Enjoy!
This information has been distilled from Google's official factory image site and the Magisk thread.
Installing fastboot and adb
Thankfully, Google has provided just adb, fastboot, and systrace as a simple zip file, making this process super easy. You MUST be on at LEAST 26.0.2 for the commands in this guide to work. When in doubt, grab the latest copy and install them using the following instructions.
SDK Platform-Tools for Windows
SDK Platform-Tools for Mac
SDK Platform-Tools for Linux
Windows:
Unzip the folder somewhere on your hard drive.
Go to the folder containing the adb and fastboot files and type "cmd" in the path bar at the top.
A command prompt should open with the current folder showing on the prompt.
Type the following commands:
Code:
adb --version
fastboot --version
You should see some information appear. If that is the case, you were successful!
Mac/Linux:
Unzip the folder somewhere on your hard drive.
Navigate to that folder with your terminal.
Run the following commands:
Code:
sudo install adb dmtracedump e2fsdroid etc1tool fastboot hprof-conv make_f2fs mke2fs mke2fs.conf sload_f2fs sqlite3 /usr/local/bin
sudo mkdir -p /usr/local/lib64
sudo install lib64/libc++.so /usr/local/lib64
Type the following commands:
Code:
adb --version
fastboot --version
You should see the version information, along with telling you they are installed to /usr/local/bin. If so, you were successful!
Unlocking the bootloader
WARNING: This WILL wipe your entire phone. Please make copies or backups of any important data. This can also go wrong rendering your device inoperable. Proceed with caution.
On your phone, open Settings, navigate to "System" then "About phone", and tap on the build number 7 times.
Go one menu up, click on "Developer options", and turn on USB debugging and OEM unlocking.
In your terminal, type the following command:
Code:
adb reboot bootloader
Run the following command:
Code:
fastboot flashing unlock
Follow the prompts on your device then reboot!
Flashing factory images
NOTE #1: You CANNOT downgrade factory images. Google has prevented users from doing so to keep them safe from vulernabilities that were patched. You should only upgrade or reinstall the current image.
NOTE #2: If you have mounted /system as rw at any point (like in TWRP), you must upgrade using the factory image method. OTAs will fail because they cannot verify the integrity of the disk since its verity data has been changed.
NOTE #3: Flashing the factory images requires an unlocked bootloader. Flashing the OTA zips does not (but if anything goes wrong, you may not be able to recover without an RMA).
Updating to a new release (factory image):
Download the latest factory image from Google's website.
Reboot into the bootloader:
Code:
adb reboot bootloader
Unzip the factory image.
Inside you will see a bootloader image, a radio image, an image zip file, and a couple of flash scripts.
If you are on Windows, open the "flash-all.bat" file in a text editor. If you are on Mac or Linux, open the "flash-all.sh" instead.
Remove the "-w" flag before the fastboot command towards the end of the file. This will prevent fastboot from formatting your device.
Run the flash all script! Open a command prompt, navigate to the folder with the script, and run one of the following commands:
Windows:
Code:
flash-all
Mac/Linux:
Code:
./flash-all.sh
Reboot once it is finished!
Updating to a new release (OTA zip):
Download the latest OTA zip from Google's website
Reboot into recovery:
Code:
adb reboot recovery
Hold down the power button and push volume up
Select "Apply update from ADB"
Run the following command from the folder containing the OTA zip:
Code:
adb sideload <zip_name>.zip
Reboot once it is finished!
Clean flashing a factory image (wipe everything):
Download the latest factory image from Google's website
Reboot into the bootloader:
Code:
adb reboot bootloader
Unzip the factory image.
Run the flash all script! Open a command prompt, navigate to the folder with the script, and run one of the following commands:
Windows:
Code:
flash-all
Mac/Linux:
Code:
./flash-all.sh
Reboot once it is finished!
Rooting with Magisk
NOTE #4: This section assumes you are not going to install TWRP. If you are, skip to the next section and just flash the latest Magisk zip after installing TWRP.
Download the Magisk zip from the official thread and install the manager from the zip.
Grab a boot image to patch (either the one from the latest factory image or a custom kernel one) and push it to your device:
Code:
adb push <path_to_file> /sdcard/Download
Open Magisk Manager and click the Install button.
Click "Install" at the first prompt then choose "Patch Boot Image File". A file manager will pop up.
Select the boot image you want to patch and let Magisk Manager patch it.
Pull it off your device:
Code:
adb pull /sdcard/MagiskManager/patched_boot.img
Reboot into the bootloader:
Code:
adb reboot bootloader
Flash the boot image and reboot.
Code:
fastboot flash boot patched_boot.img
fastboot reboot
Open Magisk Manager and you should be rooted!
Installing TWRP
NOTE #5: If you just want to temporarily boot TWRP to flash Magisk and your custom kernel, you can just skip flashing the installer zip in this process.
NOTE #6: TWRP can be unstable at times given the way that security has been set up on this device (lack of decryption, failing to boot, etc).
Download both the TWRP image and zip installer from the official site.
Temporarily boot the TWRP image.
Code:
fastboot boot <path_to_twrp_image>
Flash the TWRP installer zip.
Reinstall Magisk and your custom kernel if you had them.
Reboot and profit!
Common issues
Outdated fastboot/adb: This device requires the latest fastboot and adb binaries to work properly. A lot of common quick adb/fastboot installation guides link to installers that are old. Please manually install the latest using the information at the beginning of the thread!
Using a USB-3.0 or USB-C port: Some newer USB ports do not work with fastboot. Issues manifest as weird errors during a flash. Use a different USB cable/port.
Closing statements
If there are any procedures you would like to see added (like flashing a custom kernel or booting TWRP), I am happy to add them if requested. Also, when requesting help, please be as specific as possible where you get confused. I want this guide to be clear as possible.

Reserved

Reserved

Stuck on this step
Run the flash all script! Open a command prompt, navigate to the folder with the script, and run one of the following commands:
How do I navigate in command prompt? When I typed flash-all, it said it is not a internal command etc. When I dragged and dropped flash-all into the command prompt, it said C:\Users\W Balls\Downloads\SAMPWND_SYSTEMROOT_ADB_FILES>"C:\Users\****** Jim\Downloads\walleye-opd1.170816.025-factory-4752baae\walleye-opd1.170816.025\flash-all.bat"
error: cannot load 'bootloader-walleye-mw8998-002.0059.00.img'
rebooting into bootloader...
OKAY [ 0.004s]
finished. total time: 0.004s
error: cannot load 'radio-walleye-g8998-00122-1708311414.img'
rebooting into bootloader...
OKAY [ 0.010s]
finished. total time: 0.015s
W/ ( 6448): Unable to open 'image-walleye-opd1.170816.025.zip': No such file or directory
error: failed to open zip file 'image-walleye-opd1.170816.025.zip': I/O Error
Press any key to exit...

You are calling the flash-all.bat out of a differende directory (C:\Users\W Balls\Downloads\SAMPWND_SYSTEMROOT_ADB_FILES) therefore it can't find the system image files since they are located under C:\U sers\****** Jim\Downloads\walleye-opd1.170816.025-factory-4752baae\walleye-opd1.170816.025. Make sure you extract your image to that directory, open up a command promt and navigate to it with "cd C:\Users\W Balls\Downloads\SAMPWND_SYSTEMROOT_ADB_FILES" and call the flash-all.bat from there.
Check out this for basic command line stuff https://www.digitalcitizen.life/command-prompt-how-use-basic-commands
---------- Post added at 10:58 AM ---------- Previous post was at 10:56 AM ----------
I tried this and it seems the magisk manager isn't able to download magisk on its own at least on my device:
Code:
DownloadManager: [356] Stop requested with status HTTP_DATA_ERROR: Unable to resolve host "forum.xda-developers.com": No address associated with hostname
DownloadManager: [356] Finished with status WAITING_TO_RETRY
EDIT: Seems like DNS66 was blocking the download patching was scucessfull now.
This is weird, can't I make 2 posts in a row??

Anybody figure out a solution for flashing when on MacOs High Sierra? Platform tools 26.0 1 was a fix for high Sierra, yet 26.0.2 seemed to have lost that commit, so fastboot doesn't work at all. Wondering if it's safe to use 26.0.1 on the pixel 2

nathanchance said:
Flashing factory images
Click to expand...
Click to collapse
First, thanks for putting this together. I've rooted using your method.
Regarding OTA updates: I've read that if we've rooted, we will need to un-root before we can receive an OTA update. Is this always true, or only if we've installed a custom recovery like TWRP? It would be really handy to have a guide on how to un-root, update, then re-root.
Related - let's say that for whatever reason, we have to flash an OTA update manually, rather than actually getting it OTA. Do we lose root by doing so?
Thanks!

JayBlack_686 said:
First, thanks for putting this together. I've rooted using your method.
Regarding OTA updates: I've read that if we've rooted, we will need to un-root before we can receive an OTA update. Is this always true, or only if we've installed a custom recovery like TWRP? It would be really handy to have a guide on how to un-root, update, then re-root.
Related - let's say that for whatever reason, we have to flash an OTA update manually, rather than actually getting it OTA. Do we lose root by doing so?
Thanks!
Click to expand...
Click to collapse
Magisk's OTA section should clear up some of your doubts: https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md#ota-installation-tips

nathanchance said:
Magisk's OTA section should clear up some of your doubts: https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md#ota-installation-tips
Click to expand...
Click to collapse
Looks really straightforward, thank you! Might be cool to point to it in the OP. I bet I'm not the only one who was only vaguely aware of the impact that rooting has on how we get OTAs. Then again, maybe everyone else wants to run custom ROMs.

JayBlack_686 said:
Looks really straightforward, thank you! Might be cool to point to it in the OP. I bet I'm not the only one who was only vaguely aware of the impact that rooting has on how we get OTAs. Then again, maybe everyone else wants to run custom ROMs.
Click to expand...
Click to collapse
Good point, I'll add it here in a bit
Sent from my Pixel 2 XL using XDA Labs

OTA vs factory image
Howdy,
really appreciate @nathanchance for putting this together. Would you mind adding a few lines about the differences between OTA and factory images. As a layman i haven't got the foggiest idea which route to go and would appreciate some wisdom. Thanks!

Thank you so much for this guide but can anybody please explain how you can tell which image to patch ?
I am unable to get this to work magisk is showing this message: stock kernel cannot be patched please use a custom kernel
i downloaded: walleye-opd1.170816.010-factory-63083164.zip
unsure as to whether this is correct for my phone as they are quite a few and its unclear how to tell
i have a pixel 2 from the UK that was factory unlocked and i unlocked the boot loader
what am i doing wrong please help

tango650 said:
Howdy,
really appreciate @nathanchance for putting this together. Would you mind adding a few lines about the differences between OTA and factory images. As a layman i haven't got the foggiest idea which route to go and would appreciate some wisdom. Thanks!
Click to expand...
Click to collapse
The primary difference is that the OTA can be flashed on an unlocked bootloader and is designed not to wipe your phone.
UpGrad3 said:
Thank you so much for this guide but can anybody please explain how you can tell which image to patch ?
I am unable to get this to work magisk is showing this message: stock kernel cannot be patched please use a custom kernel
i downloaded: walleye-opd1.170816.010-factory-63083164.zip
unsure as to whether this is correct for my phone as they are quite a few and its unclear how to tell
i have a pixel 2 from the UK that was factory unlocked and i unlocked the boot loader
what am i doing wrong please help
Click to expand...
Click to collapse
Are you supplying the boot image to Magisk? Show me a screenshot of what Magisk says when it tries to patch.

Thanks @nathanchance for this. I'm not a technical person, but can follow directions. This is the 4th phone that I've rooted following directions of some very smart and talented people here on XDA. I don't do this kind of thing everyday, and am not up on programming or coding or whatever you guys call it now days.
All I ended up doing is taking the OTA from Google to the .025. Then followed the Magisk rooting instructions to get root. I had Unlocked it the first day I turned the phone on, I haven't put my SIM in yet, but will play around with it a little more, and finish setting it up,
Again, thanks for the GUIDE to this Pixel 2 phone.

nathanchance said:
The primary difference is that the OTA can be flashed on an unlocked bootloader and is designed not to wipe your phone.
Are you supplying the boot image to Magisk? Show me a screenshot of what Magisk says when it tries to patch.
Click to expand...
Click to collapse
That is what i get. I have even flashed the whole factory image to the phone and still get this

@UpGrad3 you need to extract the boot.img out of your zip (walleye-opd1.170816.010-factory-63083164.zip) file and process this one, I'll guess you tried with the whole zip?? Also you can "attach" pictures to the post and not include the full res with the image tags...

@drmason I did extract the img from the zip. I followed the instructions exactly which is why im so confused as to what is going on ? Ok sorry i will do in future.
Amended post

UpGrad3 said:
@drmason I did extract the img from the zip. I followed the instructions exactly which is why im so confused as to what is going on ? Ok sorry i will do in future.
Amended post
Click to expand...
Click to collapse
You got the boot.img from the zip file that was inside the zip file?
from https://forum.xda-developers.com/showpost.php?p=74429474&postcount=90
Step by step
1. Download and extract factory image. Mine was taimen-opd1.170816.010-factory-c796ddb4.zip
***2. Once extracted go into the folder and extract image-taimen-opd1.170816.010.zip.
There you will find the boot.img.
---------- Post added at 08:36 AM ---------- Previous post was at 08:27 AM ----------
nathanchance said:
Good point, I'll add it here in a bit
Sent from my Pixel 2 XL using XDA Labs
Click to expand...
Click to collapse
@nathanchance, one more suggestion for the OP: at one point I was looking at using the stock boot img and couldn't figure out how to get it. Later, I found the below post, where the first two steps are essentially "open the zip inside the zip for the boot.img" to extract the stock boot image. Maybe it's really obvious, but I didn't get it.
https://forum.xda-developers.com/showpost.php?p=74429474&postcount=90

@UpGrad3 you are using the latest Magisk Manager 5.4.1 for this?

JayBlack_686 said:
You got the boot.img from the zip file that was inside the zip file?
from https://forum.xda-developers.com/showpost.php?p=74429474&postcount=90
Step by step
1. Download and extract factory image. Mine was taimen-opd1.170816.010-factory-c796ddb4.zip
***2. Once extracted go into the folder and extract image-taimen-opd1.170816.010.zip.
There you will find the boot.img.
---------- Post added at 08:36 AM ---------- Previous post was at 08:27 AM ----------
this is where i was going wrong i was using a file that had bootloader in the name rather than going into the second zip and finding boot
@nathanchance, one more suggestion for the OP: at one point I was looking at using the stock boot img and couldn't figure out how to get it. Later, I found the below post, where the first two steps are essentially "open the zip inside the zip for the boot.img" to extract the stock boot image. Maybe it's really obvious, but I didn't get it.
https://forum.xda-developers.com/showpost.php?p=74429474&postcount=90
Click to expand...
Click to collapse
drmason said:
@UpGrad3 you are using the latest Magisk Manager 5.4.1 for this?
Click to expand...
Click to collapse
yes i was
although im now stuck on the bootscreen with the G any suggestions ?
Fixed.
incase it happens to anyone else. i restored the factory image again then started the root procedure. im now rooted and fully working

Related

Using System Image to Update your Nexus 6 (no data loss)

Tired of waiting for the OTA? Can't use it because you're rooted? Don't want to wipe your entire phone? No problem! Here's how you can upgrade with Google's Nexus factory images without wiping your apps or sdcard.
NOTE: You must have your bootloader unlocked. If you've never unlocked your bootloader, I don't think there's any way to do this without wiping your data.
STEP 1: Install fastboot
Fastboot is Google's utility for flashing factory images. You can also use it to flash custom recoveries like TWRP and CWM. The standard way to get is is through Google's Android SDK, but that's a bit heavy-duty, so you can also download just the most important tools (fastboot and adb) separately, packaged by users. Here are some links:
Official Google Android SDK (cross-platform): http://developer.android.com/sdk/index.html#Other[1]
Unofficial for Windows: http://developer.android.com/sdk/index.html#Other[2]
Unofficial Mac/Linux: http://code.google.com/p/adb-fastboot-install/[3]
Windows users might also need to install drivers: http://developer.android.com/sdk/win-usb.html[4] (can any Windows users confirm whether it's necessary?)
STEP 2: Prepare factory image
Download the latest Nexus 6 factory image at https://developers.google.com/android/nexus/images#shamu[5]
Unzip it and open the resulting folder
Unzip the "image-shamu-*.zip" file in there
You should now be looking at something like this: http://i.imgur.com/mzrfwrP.png [6]
STEP 3: Flash! (Ah-ahhhhh! [7] )
Connect your phone to your computer via USB, and enter the bootloader. You can enter the bootloader by holding down the power and volume-down buttons to boot. Once you see the bootloader, you can release the buttons.
Open a terminal/command prompt. The syntax might be slightly different on Windows than on Mac or Linux, but basically the same. Anything you see in <> you need to replace, e.g. with the actual path to your factory image folder. The rest you should be able to copy and paste. (Tip: you can easily enter a folder path into your terminal/command prompt by simply dragging the folder onto your terminal window. This works on Mac, Windows, and the vast majority of Linux GUIs.) Enter these commands:
cd </path/to/shamu-lmy47d>
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
Reboot the bootloader.
fastboot flash radio radio-shamu-d4.0-9625-02.95.img
cd <image-shamu-lmy47d>
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash system system.img
If you DO NOT use a custom recovery (like TWRP or CWM), then also: fastboot flash recovery recovery.img
Don't worry if you see messages like "target reported max download size of 1073741824 bytes". Just wait and let it finish.
Reboot your phone and enjoy. It's normal for the first boot to take a while. Going from Kitkat to Lollipop took about 20 minutes. Going from 5.0 to 5.0.1 took 5-10, I think. YMMV.
A WORD OF WARNING: If you're moving between ROMs, you generally should do a complete reset, including wiping data. Many users have reported problems going from KitKat to Lollipop without wiping data and recommend a factory reset anyway. If you're okay with wiping everything, you can simply use Google's included flash-all scripts, or flash the userdata.img file yourself. Personally, I'm not going to bother wiping adta for an incremental update like 5.0.1->5.1. As always, be sure to back up your data!
Shamelessly stolen from: http://www.reddit.com/r/Nexus5/comments/2phqy7/howto_upgrade_android_using_nexus_factory_images/
Shouldn't you also fastboot reboot bootloader after radio flash?
This is the scenic route.
I tried to update using wugz, without unlocking the bootloader. failed. Oh well, I'll wait to receive ota
Unless this method doesnt require unlocking?
If you have an OTA zip file, this is different than using a System Img?
I do not think you need to lose data or unlock your bootloader?
Found a link for the OTA zip file.
If I remember right you can copy the zip to you phone with a USB cable.
Go into the bootloader, Volume Down and Power.
Select the zip.
I did not think you needed a terminal and all the commands if you had the OTA zip on your phones SD card.
Am I wrong does something like this not work?
or
I can just wait.....
This worked great.
I was unbranded with VZ sim, unlocked, rooted with TWRP recovery. Didn't want to lose all that nor my apps or data. This method upgrades to 5.1 without any loss.
When I was done with the flashing, I rebooted to TWRP recovery (not system) in order to wipe dalvik and cache (just to be certain). I wiped and then rebooted to system. TWRP noticed I didn't have SuperSU installed so it installed it for me. Meaning, once I got my system rebooted, I still had root too.
All in all, this process worked great for me. Thanks.
I run the first two commands
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
fastboot reboot-bootloader
they worked, then i moved to the radio
fastboot flash radio radio-shamu-d4.0-9625-02.95.img
but it failed.
Any idea?
---------- Post added 14th March 2015 at 12:17 AM ---------- Previous post was 13th March 2015 at 11:53 PM ----------
Nikos2k said:
I run the first two commands
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
fastboot reboot-bootloader
they worked, then i moved to the radio
fastboot flash radio radio-shamu-d4.0-9625-02.95.img
but it failed.
Any idea?
Click to expand...
Click to collapse
This is the message after the radio flash command:
fastboot flash radio radio-shamu-d4.0-9625-02.95.img
target reported max download size of 536870912 bytes
sending 'radio' (85422 KB)...
OKAY [ 2.697s]
writing 'radio'...
(bootloader) flashing modem ...
(bootloader) flashing modem ...**☺
FAILED (unknown status code)
finished. total time: 3.721s​
Why the failed message?
I'm decrypted. Will this re encrypt my Nexus or do I have to flash a non enforce img?
Thank you, this really helped.
Since my bootloader was locked i had to unlock it as well.
Had a bit of a scare with the whole erasing screen staying on for too long.
Went back and redid the process, and went downstairs for 5 minutes, came back and phone was booted.
Anyway, thank you again
Will this work on an encrypted phone?
mikeadamz said:
Tired of waiting for the OTA? Can't use it because you're rooted? Don't want to wipe your entire phone? No problem! Here's how you can upgrade with Google's Nexus factory images without wiping your apps or sdcard.
<<snip>>
Click to expand...
Click to collapse
I don't suggest that anyone read and follow someone else's instructions when doing something like this. Not because the instructions are wrong or anything, but because blindly following instructions doesn't involve *understanding* anything.
So rather than reading and following instructions, read and UNDERSTAND the process of installing factory images as delivered with the factory images (flash-all.sh). If you UNDERSTAND the process and what everything does, then (a) you *already know* what needs to be adjusted to do what you want, and (b) if something starts going wrong in the middle of it, you will understand why, and what to do to correct it.
mikeadamz said:
cd </path/to/shamu-lmy47d>
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
Click to expand...
Click to collapse
First, thanks for the write up, I do greatly appreciate it. Second, thanks for the tip on dragging file locations into the command prompt. Very helpful.
Now my question. When I did this I tried using exactly the steps above and had no luck whatsoever. I'd cd to the location of the img files as noted and it would say fastboot is unrecognized as an internal or external command. I moved the file into the fastboot location and got the same issue. I finally ran the fastboot from the adb folder location and just referenced the full file path for each img file (using the drag and drop method) and everything went swimmingly. My question is just about using fastboot. Should it have worked when I used cd to go to the img file location? Is there something I need to do to make it work as you described?
Thanks!
Nick
Nick D said:
First, thanks for the write up, I do greatly appreciate it. Second, thanks for the tip on dragging file locations into the command prompt. Very helpful.
Now my question. When I did this I tried using exactly the steps above and had no luck whatsoever. I'd cd to the location of the img files as noted and it would say fastboot is unrecognized as an internal or external command. I moved the file into the fastboot location and got the same issue. I finally ran the fastboot from the adb folder location and just referenced the full file path for each img file (using the drag and drop method) and everything went swimmingly. My question is just about using fastboot. Should it have worked when I used cd to go to the img file location? Is there something I need to do to make it work as you described?
Thanks!
Nick
Click to expand...
Click to collapse
Install this:
http://forum.xda-developers.com/showthread.php?t=2588979
Now ADB and fastboot are installed system wide. Put your files anywhere, I use the desktop. Hold shift and right click on wherever your files are and select "open command prompt here" and flash away. Simplified, no more dragging and dropping.
Will try with the new update (5.1.1 (LMY48M)) to ensure it works. Thanks!
[/COLOR]
handyarrow said:
Will this work on an encrypted phone?
Click to expand...
Click to collapse
Have been flashing this zip in twrp after the fastboot stage without an issue for the last few updates - http://forum.xda-developers.com/nexus-6/development/mod-disable-force-encryption-rom-kernel-t3000788
Flashed LMY48M with fastboot method and it works great.
My phone is encrypted.

Nexus Player Stuck In Bootloop

Hello,
I'm hoping to get some help with my Nexus Player that has been down since N Preview 1.
To preface this, yes I've been rooting and romming for years, I would not consider myself a "newb" in the slightest but no matter what I try, I can't get this working.
I enrolled in the dev program and did the OTA for Preview 1. It got pretty laggy so I went into settings and just had it reboot. Ever since I rebooted it, it's been stuck in a boot loop.
I tried the following things in this order using stock recovery only because for some reason I can't get it to flash a custom recovery (and yes, bootloader is unlocked):
1. Wipe cache via stock recovery
2. Factory reset
3. Flash factory marshmallow image via bootloader
4. Manually flash each partition separately
5. Wipe individual partitions and then reflash their respective images
6. Nexus Root Toolkit automated "Back to stock" feature
7. Flash Google's OTA Zip file
8. Ask for help on XDA.
Regardless of what I do or how I do it, I get errors in the command prompt when flashing via fastboot and when I try to do anything via stock recovery I get the error that you see in the video.
Any help would really be appreciated.
https://www.youtube.com/embed/RVctbNjKnRE
Here's a follow up video that shows the errors that I'm getting in detail.
Thanks again for your help.
Is there really anyone that can help me?
Which method did you use to try to flash a custom recovery? Nexus Root Toolkit fails for that function but I have had success when I use the fastboot flash recovery command manually. If you manage to get TWRP 3.0.2-0 to flash and reboot in to it, you can try flashing the latest system.img file from the recovery mode's GUI (after you've saved the file on to an external storage device).
Thanks. I'm know I tried to flash twrp manually at some point but I'll give it a shot. I may also try the "Boot into Custom Recovery" that a lot of the toolkits offer. Although, I'm pretty sure I've tried that in the past too.
I'll update with results.
GabbyWC said:
Which method did you use to try to flash a custom recovery? Nexus Root Toolkit fails for that function but I have had success when I use the fastboot flash recovery command manually. If you manage to get TWRP 3.0.2-0 to flash and reboot in to it, you can try flashing the latest system.img file from the recovery mode's GUI (after you've saved the file on to an external storage device).
Click to expand...
Click to collapse
Alright,
I tried flashing via fastboot and the command prompt completes and says it's finished but when I reboot to recovery I just get the standard Android recovery.
I tried locking the bootloader so I could then unlock it and force a factory reset but it wouldn't even allow me to lock it.
Again the command prompt made it seem like it worked just fine but it didn't actually do it.
Try the fastboot boot recovery (filename) command as an alternative. I suggest not using the current version of Nexus Root Toolkit for anything recovery-related when it comes to the Nexus Player. In other words, use the AndroidSDKSlim package and try things manually with the command prompt.
Okay. I'll give it a shot.
GabbyWC said:
Try the fastboot boot recovery (filename) command as an alternative. I suggest not using the current version of Nexus Root Toolkit for anything recovery-related when it comes to the Nexus Player. In other words, use the AndroidSDKSlim package and do things with the command line utility.
Click to expand...
Click to collapse
That command won't even work for me.
Fastboot boot recovery [file path to twrp]
https://goo.gl/photos/mYKGkxEfsaJE6gXK7
According to the attached picture, the actual command may be slightly different. Based on your most recent pictures, however, it seems that you may not be going through the manual process as I would expect. What I mean, for example, is:
1) Download AndroidSDKSlim.zip and extract it to your C: drive. Copy the twrp.img file to the platform-tools folder.
2) Use the search function of Windows 10 to load cmd.exe.
3) Navigate to the platform-tools directory by using the cd (directory path) command.
4) After you've navigated in to the platform-tools folder, try the recovery flash command I suggested earlier or the one shown in the attached screenshot.
GabbyWC said:
According to the attached picture, the actual command may be slightly different. Based on your most recent pictures, however, it seems that you may not be going through the manual process as I would expect. What I mean, for example, is:
1) Download AndroidSDKSlim.zip and extract it to your C: drive. Copy the twrp.img file to the platform-tools folder.
2) Use the search function of Windows 10 to load cmd.exe.
3) Navigate to the platform-tools directory by using the cd (directory path) command.
4) After you've navigated in to the platform-tools folder, try the recovery flash command I suggested earlier or the one shown in the attached screenshot.
Click to expand...
Click to collapse
I've uploaded what I did to YouTube.
Okay, I watched your video. The picture I attached in my previous post says to type in fastboot boot twrp.img whereas you still left in the word recovery before the file name.
GabbyWC said:
Okay, I watched your video. The picture I attached in my previous post says to type in fastboot boot twrp.img whereas you still left in the word recovery before the file name.
Click to expand...
Click to collapse
Holy moly, didn't even notice! I'll try now and report back!
GabbyWC said:
Okay, I watched your video. The picture I attached in my previous post says to type in fastboot boot twrp.img whereas you still left in the word recovery before the file name.
Click to expand...
Click to collapse
Alright! I tried it and instead of rebooting into a recovery, it just reboots the bootloader.
Which recovery does it boot in to if you then use the bottom button to access recovery mode immediately after this step?
---------- Post added at 04:54 PM ---------- Previous post was at 04:39 PM ----------
If that still doesn't let you in to the custom recovery, I'll quote WugFresh on something else you can try with his Nexus Root Toolkit (if you haven't already done so).
2. The toolkit can be used to flash these factory packages, but if you are experiencing "system.img" not found errors, due to a possible issue with google's package - simply enable FORCE FLASH MODE, which is in the toolkits main options menu (just make sure you have selected the correct device before flashing).
3. If you experienced any weirdness or you device is messed up, simply use "Flash Stock + Unroot' with "Softbrick mode" to restore your device back to stock (you can also use this to flash Lollipop directly - which, as I just mentioned - may be good to enable force flash mode first).
See next post.
GabbyWC said:
Which recovery does it boot in to if you then use the bottom button to access recovery mode immediately after this step?
---------- Post added at 04:54 PM ---------- Previous post was at 04:39 PM ----------
If that still doesn't let you in to the custom recovery, I'll quote WugFresh on something else you can try with his Nexus Root Toolkit (if you haven't already done so).
2. The toolkit can be used to flash these factory packages, but if you are experiencing "system.img" not found errors, due to a possible issue with google's package - simply enable FORCE FLASH MODE, which is in the toolkits main options menu (just make sure you have selected the correct device before flashing).
3. If you experienced any weirdness or you device is messed up, simply use "Flash Stock + Unroot' with "Softbrick mode" to restore your device back to stock (you can also use this to flash Lollipop directly - which, as I just mentioned - may be good to enable force flash mode first).
Click to expand...
Click to collapse
I get the stock Android recovery if I reboot into recovery immediately after that step using the hardware button.
Also, I've tried the force flash through NRT, I've tried manually flashing each image via NRT (and via command prompt via fastboot). It seems to be able to write every single partition EXCEPT the system partition, and clearly it's having issues getting a recovery to stick too.
It's unfortunate that none of these troubleshooting ideas has worked for you. If a preview image of Android N caused this, I'm starting to think that a factory image of a stable Android N release may be necessary to fully flash the device.
GabbyWC said:
It's unfortunate that none of these troubleshooting ideas has worked for you. If a preview image of Android N caused this, I'm starting to think that a factory image of a stable Android N release may be necessary to fully flash the device.
Click to expand...
Click to collapse
I don't think that will work. Regardless of what image I'm flashing that shouldn't change the fact that I can't write to the system partition at all or that a recovery won't stick.
GabbyWC said:
It's unfortunate that none of these troubleshooting ideas has worked for you. If a preview image of Android N caused this, I'm starting to think that a factory image of a stable Android N release may be necessary to fully flash the device.
Click to expand...
Click to collapse
So I've waited all this time to flash the stable Nougat build on this Nexus Player and I'm still seeing all the same errors.
When I boot into stock recovery and "adb sideload" the update I get errors saying "unable to mount cache" and when I try to flash via fastboot I get errors saying it can't write the system partition.
I wish we could get some more attention to this thread, this is beginning to seem like it's impossible...

[Root] Zenfone 2 Official Android 6.0 Root + Xposed and Downgrade

**WARNING** You need to have background knowledge of adb, fastboot, twrp, sideload.. before you can go on with this thread.
1. All credits go to @shakalaca. If you like his work, please make him a small donation for encouragement.
2. This is a systemless root. Yet you need to unlook Lollipop before upgrading to Marshmallow.
3. Flashing the attached SuperSU file modifies stock boot.img. In case you receive an OTA file later, do
**REMEMBER to FLASH BACK TO STOCK Android 6.0 BOOT.IMG** to unroot before upgrading to official Android 6.0.
Root:
1. Unlock your device in Lollipop, then upgrade to Android 6.0
2. Once you are in Android 6.0, fire the following command to boot twrp. <twrp.img> is the twrp recovery file. This TWRP is recommended.
HTML:
adb reboot-bootloader
fastboot boot <twrp.img>
3. adb sideload the attached SuperSu file in twrp. /OR install the SuperSU in twrp if you saved it in device storage.
4. reboot system. You will see a warning screen saying "Your device has failed Verification". Ignored it and wait for the reboot.
5. Done
Unroot:
Just flash back stock boot.img
Xposed:
1.Flash the attached Xposed file from twrp.
2.use Material Design Xposed Installer: Download Xposed Installer here
Downgrade to Lollipop:
In case you need to downgrade to Lollipop, follow the instructions with care. Do it at your risk.
Refer to Asus Zentalk Forum and grab the required files from there.
HTML:
fastboot flash token bom-token.bin
fastboot flash ifwi ifwi_ann_a0-mofd_v1-ze551ml.bin
fastboot flash fastboot droidboot.img
fastboot flash splashscreen splashscreen_ze551ml.img
fastboot reboot-bootloader
Now you are back in Lollipop. You can flash back stock recovery(.184 recommended), wipe the device(cache/userdata/system) and then sideload back stock LP or MM as you wish. OR, you can flash custom recovery/boot/system.img start from here.
Good luck!
It worked!Thank you master!I bow now....
I just need root on 6.0.1. Is this going to achieve that?
MikeyLee said:
I just need root on 6.0.1. Is this going to achieve that?
Click to expand...
Click to collapse
According to op it will
Sent from my ASUS_Z00AD using Tapatalk
It does work, but YMMV, my phone is one of the few that works completely with the beta software. But before running fastboot cmd in adb. Use adb reboot recovery, then fastboot cmd. Phone will reboot twice after sideload of SU.
pokey006 said:
It does work, but YMMV, my phone is one of the few that works completely with the beta software. But before running fastboot cmd in adb. Use adb reboot recovery, then fastboot cmd. Phone will reboot twice after sideload of SU.
Click to expand...
Click to collapse
Hi Brother would you like be so patient and provide us with detailed toturial for less advanced users?
samcjtsai said:
1. All credits go to @shakalaca and I just try to recap his threads posted in Taiwan Asus Zentalk forum. Although this is reported working in the forum but, as usual, do it at your risk and I won't be able to answer your questions.
2. Android 6.0 is still not unlocked. Device will be locked once you upgrade to 6.0
3. You can downgrade to Lollipop and unlock again.
4. The following SuperSU file contains a modified boot.img. In case you receive an OTA file later, do
**REMEMBER to FLASH BACK TO STOCK Android 6.0 BOOT.IMG** before upgrading to official Android 6.0.
Root:
1. Make sure your zenfone 2 is unlocked before upgrading to Android 6.0 from Lollipop.
2. Once you are in Android 6.0, fire the following command to boot twrp. <twrp.img> is the twrp recovery file. Version 2.8.7.7 is recommended.
HTML:
fastboot boot <twrp.img>
3. adb sideload the attached SuperSu file in twrp.
4. reboot system. You will see a warning screen saying "Your device has failed Verification". Ignored it and wait for the reboot.
5. Done
Xposed:
1.Flash the attached Xposed file from twrp.
2.use Material Design Xposed Installer: link
Downgrade to Lollipop:
Refer to this and get the files from the links. Note the first commnad line is the revised one by @shakalaca and it should work.
HTML:
fastboot flash token bom-token.bin
fastboot flash ifwi ifwi_ann_a0-mofd_v1-ze551ml.bin
fastboot flash fastboot droidboot.img
fastboot flash splashscreen splashscreen_ze551ml.img
Click to expand...
Click to collapse
Works like a charm !! Thanks !!
kamyk70 said:
Hi Brother would you like be so patient and provide us with detailed toturial for less advanced users?
Click to expand...
Click to collapse
Assuming that everyone knows how to use adb and its commands
1: Well first make sure adb and drivers are on your pc.
2: Plug phone in make sure USB debugging is on
3: In adb cmd window type "adb devices" to make sure phone is recognized, if so proceed
4: type "adb reboot recovery" phone should boot into recovery with android robot on screen
5: Then type "fastboot boot <twrp.img>" twrp.img is whatever your file is named
6: phone will boot into recovery, go to adb sideload in recovery
7: type "adb sideload <SU.zip>" or whatever you have it named
8: After it's done loading reboot from recovery, it will reboot twice and the screen will say as per OP
9: After phone optimizes...enjoy root.
This is for advanced users
when update to 6.0. bootloader unlocked again ! how can i flash twrp ?
pokey006 said:
Assuming that everyone knows how to use adb and its commands
1: Well first make sure adb and drivers are on your pc.
2: Plug phone in make sure USB debugging is on
3: In adb cmd window type "adb devices" to make sure phone is recognized, if so proceed
4: type "adb reboot recovery" phone should boot into recovery with android robot on screen
5: Then type "fastboot boot <twrp.img>" twrp.img is whatever your file is named
6: phone will boot into recovery, go to adb sideload in recovery
7: type "adb sideload <SU.zip>" or whatever you have it named
8: After it's done loading reboot from recovery, it will reboot twice and the screen will say as per OP
9: After phone optimizes...enjoy root.
This is for advanced users
Click to expand...
Click to collapse
To that to work does WE need to have bootloader UNLOCKED ? just really confused atm.
Vouga said:
To that to work does WE need to have bootloader UNLOCKED ? just really confused atm.
Click to expand...
Click to collapse
No it does not
Vouga said:
To that to work does WE need to have bootloader UNLOCKED ? just really confused atm.
Click to expand...
Click to collapse
He's using whats called "tethered TWRP". It's basically running twrp on your phone from your computer instead of actually installing it (which would require unlocking).
Sent from my ASUS_Z00A using Tapatalk
kenbo111 said:
He's using whats called "tethered TWRP". It's basically running twrp on your phone from your computer instead of actually installing it (which would require unlocking).
Sent from my ASUS_Z00A using Tapatalk
Click to expand...
Click to collapse
Thank You for explaining that to me, appreciated!
To downgrade to Lollipop, is it possible to just use AsusFlashToolInstaller and flash raw firmware? Any harms by doing that?
Thank you in advance.
euthic said:
To downgrade to Lollipop, is it possible to just use AsusFlashToolInstaller and flash raw firmware? Any harms by doing that?
Thank you in advance.
Click to expand...
Click to collapse
You need to adb sideload all LP .184 images first then use Asus FlashTool to flash RAW Firmware.
Sent from my ASUS_Z00AD using XDA-Developers mobile app
root works perfect along with systemless xposed, but i still cant pass safenet check..(super su disabled, and also xposed) so no AP.. is that normal ?
pokey006 said:
Assuming that everyone knows how to use adb and its commands
1: Well first make sure adb and drivers are on your pc.
2: Plug phone in make sure USB debugging is on
3: In adb cmd window type "adb devices" to make sure phone is recognized, if so proceed
4: type "adb reboot recovery" phone should boot into recovery with android robot on screen
5: Then type "fastboot boot <twrp.img>" twrp.img is whatever your file is named
6: phone will boot into recovery, go to adb sideload in recovery
7: type "adb sideload <SU.zip>" or whatever you have it named
8: After it's done loading reboot from recovery, it will reboot twice and the screen will say as per OP
9: After phone optimizes...enjoy root.
This is for advanced users
Click to expand...
Click to collapse
Maybe I'm doing something wrong but my phone isn't recognised when trying to flash twrp from the dead bot before recovery? Just says waiting for device. Already checked device manager as well
ponhei9502 said:
Maybe I'm doing something wrong but my phone isn't recognised when trying to flash twrp from the dead bot before recovery? Just says waiting for device. Already checked device manager as well
Click to expand...
Click to collapse
Guess your ZF2 is not unlocked in LP first, so that you can't see twrp booting. Since you are in Android 6.0 now, try to downgrade to LP, Unlock it, upgrade to 6.0 and then root.
samcjtsai said:
**WARNING** You need to have background knowledge of adb, fastboot, twrp, sideload.. before you can go on with this thread.
1. All credits go to @shakalaca and I just recap his threads posted in Taiwan Asus Zentalk forum. Although this is reported working in the forum, as usual, do it at your risk and I won't be able to answer your questions.
2. Android 6.0 is still not unlocked. Device will be locked once you upgrade to 6.0
3. You can downgrade to Lollipop and unlock again.
4. The following SuperSU file contains a modified boot.img. In case you receive an OTA file later, do
**REMEMBER to FLASH BACK TO STOCK Android 6.0 BOOT.IMG** before upgrading to official Android 6.0.
Root:
1. Make sure your zenfone 2 is unlocked before upgrading to Android 6.0 from Lollipop.
2. Once you are in Android 6.0, fire the following command to boot twrp. <twrp.img> is the twrp recovery file. Version 2.8.7.7 is recommended.
HTML:
fastboot boot <twrp.img>
3. adb sideload the attached SuperSu file in twrp.
4. reboot system. You will see a warning screen saying "Your device has failed Verification". Ignored it and wait for the reboot.
5. Done
Xposed:
1.Flash the attached Xposed file from twrp.
2.use Material Design Xposed Installer: link
Downgrade to Lollipop:
Refer to this and get the files from the links. Note the first commnad line is the revised one by @shakalaca and it should work.
HTML:
fastboot flash token bom-token.bin
fastboot flash ifwi ifwi_ann_a0-mofd_v1-ze551ml.bin
fastboot flash fastboot droidboot.img
fastboot flash splashscreen splashscreen_ze551ml.img
Click to expand...
Click to collapse
Where are these files again? They aren't in the zip
thanks, works great, was able to downgrade to lollipop with no problem what so ever. Install twrp, gain root again, and rockin custom roms...

[Guide][Root] How to install the latest Google software update

This guide is primarily intended for rooted users, since stock users can just take the OTA.
Key points
User data and applications are kept intact
You do not have to remove your PIN, password, or fingerprint
You do not have to remove TWRP, Magisk, your custom kernel, dtbo, or anything
This is intended for monthly security updates; developer previews and beta releases may or may not work with this method. You're welcome to try, but all may not work as expected
Installing Update:
Make sure you have the latest Google SDK Platform Tools. Extract the archive to a location of your choosing (creates platform-tools folder)
Get the latest walleye Factory Image (not OTA) from Google's Developer Page and save to a location of your choosing
Extract the archive, and open the extracted folder. You should see a list of files:
bootloader-walleye-[version string].img
flash-all.bat
flash-all.sh
flash-base.sh
image-walleye-[version string].zip
radio-walleye-[version string].img
Open the flash-all script (flash-all.bat for Windows, flash-all.sh for Linux/OSX) in your favorite text editor.
Find the line that reads "fastboot -w update image-walleye-[version].zip and remove "-w" (the wipe user data switch). Save and close the flash-all script.
Move (cut and paste, etc) all of these files to the platform-tools folder.
Enable USB Debugging from the Developer Options menu on your device (press "Build Number" 7 times if not already visible)
With your device plugged into the computer, open a command prompt in the platform-tools folder
Windows: Open the folder, hold down Shift and right click inside the folder, "Open Command window here"
Linux: If you're on Linux you already know how to do this
OSX: Open a folder in a terminal
Reboot to bootloader:
Code:
adb reboot bootloader
Execute update script in terminal:
Windows:
Code:
flash-all.bat
Linux/OSX:
Code:
./flash-all.sh
The device will reboot a few times while updating
Restoring root and/or a custom recovery
Download latest:
TWRP image
Magisk zip
TWRP zip
(Optional) Custom kernel zip
Place all files in the platform-tools folder
Reboot to bootloader
Boot TWRP image.
Code:
fastboot boot [twrp image filename].img
Push zip files to /tmp
Code:
adb push [magisk filename].zip /tmp
Optional: TWRP persistent installation + custom kernel:
Code:
adb push [twrp filename].zip /tmp
adb push [custom kernel filename].zip /tmp
Install Magisk:
Code:
adb shell twrp install /tmp/[magisk filename].zip
Optional: TWRP persistent installation + custom kernel:
Code:
adb shell twrp install /tmp/[twrp filename].zip
adb shell twrp install /tmp/[custom kernel filename].zip
adb shell twrp install /tmp/[magisk filename].zip
Reboot to system
[ Reserved ]
[ Reserved Post ]
Thanks for the guide
Sent from my Pixel 2 using Tapatalk
Thanks for that, but do not forget to mention to enable usb debugging mode, to account for people who are new to this community.
I'm having trouble Installing Magisk on Step 6. Every time I enter the code it says it can't locate the Magisk file for some reason.
Pianobeats said:
I'm having trouble Installing Magisk on Step 6. Every time I enter the code it says it can't locate the Magisk file for some reason.
Click to expand...
Click to collapse
Oops, my instructions were to push to /tmp but the flashing portion left that directory out. I updated the original post.
atifaslam7 said:
Thanks for that, but do not forget to mention to enable usb debugging mode, to account for people who are new to this community.
Click to expand...
Click to collapse
My thought was that if someone is following this guide, they're already rooted, so would already know to have USB Debugging enabled. I'll add it though for completeness sake.
ehi guys! i have one last doubt before updating to the latest factory image: i have a verizon pixel 2, bootloader unlocked, magisk installed on OPM1.171019.013, will i be able to keep my bootloader unlocked after i flash the latest factory image? i definitely don't want to lock it as i read the unlock command is not working anymore..
thanks a lot!
Thanks for the guide. Worked flawlessly!
daede86 said:
ehi guys! i have one last doubt before updating to the latest factory image: i have a verizon pixel 2, bootloader unlocked, magisk installed on OPM1.171019.013, will i be able to keep my bootloader unlocked after i flash the latest factory image? i definitely don't want to lock it as i read the unlock command is not working anymore..
thanks a lot!
Click to expand...
Click to collapse
Relocking your bootloader is not necessary to flash this. Bootloader will remain unlocked after flashing.
Telperion said:
Note: As of the February security update, TWRP 3.2.1-0 cannot decrypt the /data/ partition. When prompted for your PIN, cancel. You can keep /system/ read-only.
Click to expand...
Click to collapse
TWRP 3.2.1-1 and 3.2.1-2 are able to decrypt /data and /sdcard. MTP still doesn't work, but you can place files on the sdcard via USB in system.
socal87 said:
TWRP 3.2.1-1 and 3.2.1-2 are able to decrypt /data and /sdcard. MTP still doesn't work, but you can place files on the sdcard via USB in system.
Click to expand...
Click to collapse
This is hit and miss, for example 3.2.1-2 won't decrypt /data/ for me on P DP1. Others though have no problem decrypting data.
I kept the instructions the same, but took out the decryption note. Even if your TWRP can decrypt /data/ it's not strictly necessary for this process, so there's consistency in the guide in spite of inconsistent TWRP behavior.
Telperion said:
This is hit and miss, for example 3.2.1-2 won't decrypt /data/ for me on P DP1. Others though have no problem decrypting data.
I kept the instructions the same, but took out the decryption note. Even if your TWRP can decrypt /data/ it's not strictly necessary for this process, so there's consistency in the guide in spite of inconsistent TWRP behavior.
Click to expand...
Click to collapse
This honestly doesn't surprise me in the least; I would expect that Android P might use a different security scheme, so the decryption mechanism that works with Oreo may not be forward compatible.
For persistent twrp don’t you need to fastboot flash the recovery partition with the twrp image?
floepie said:
For persistent twrp don’t you need to fastboot flash the recovery partition with the twrp image?
Click to expand...
Click to collapse
There is no recovery partition, the recovery is now part of the boot image. You have to boot the TWRP image, then flash the TWRP zip which will patch the boot image in both slots.
Right I meant the boot partition. But this contradicts the main guide here where it indicates the necessity to flash both the twrp image to the boot partition (not just boot to the image on your PC), AND flash the twrp zip to make it persistent.
You don’t need to worry about the twrp zip at all if all you want to do is fastboot boot the twrp image.
floepie said:
Right I meant the boot partition. But this contradicts the main guide here where it indicates the necessity to flash both the twrp image to the boot partition (not just boot to the image on your PC), AND flash the twrp zip to make it persistent.
Click to expand...
Click to collapse
Not sure which guide you're referring to, but nathanchance's guide as far as I saw lined up with mine.
Sorry delete
Has there been a workaround created for those of us who can't unlock bootloader because OEM can't be unlocked? Wiping the phone and skipping wizard did not work for me. I'm just trying to root so I can delete apps I don't want.
Can someone tell me about the installing OTA.zip without unrooting or uninstalling the magisk. Is it possible to update through OTA on rooted stock ROM? Or what if we update using the OTA which comes automatically from Google?
Sent from my Pixel 2 using Tapatalk
nickporwal said:
Can someone tell me about the installing OTA.zip without unrooting or uninstalling the magisk. Is it possible to update through OTA on rooted stock ROM? Or what if we update using the OTA which comes automatically from Google?
Click to expand...
Click to collapse
That's not possible, which is why this process exists.

Root & TWRP!

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):
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+)
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
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.
Flash arter97's kernel by running
Code:
fastboot flash boot arter97-kernel-*.img
If you run into any issues, then you will probably need to specify the slot to flash. Reboot back into your system.
Turn on Android Debugging and run
Code:
adb shell getprop ro.boot.slot_suffix
and make note if the output is _a or _b
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
Reboot to recovery (either through bootloader mode or hold vol up while rebooting).
Install the Magisk .zip from TWRP.
Be amazed by the possibilities.
Old instructions (Should always work to get root):
Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
Extract and copy the boot.img file to your device
Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
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)
Copy the patched_boot.img back over to your PC
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
.
If you run into any issues, then you will need to specify the slot to flash.
Turn on Android Debugging and run
Code:
adb shell getprop ro.boot.slot_suffix
and make note if the output is _a or _b
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
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)
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.
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 . but glad to see theres root! hopefully lineage to follow <3
Twiggy000b said:
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 . but glad to see theres root! hopefully lineage to follow <3
Click to expand...
Click to collapse
I know the feeling, my last device was the Nexus 5
my last "decent" device was the essential phone. then i went to the xperia xa2 ultra, then the iphone 6 then.... zte quest. -.-
CurtisMJ said:
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.
Click to expand...
Click to collapse
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
CalebQ42 said:
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):
Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
Extract and copy the boot.img file to your device
Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
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)
Copy the patched_boot.img back over to your PC
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`.
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.
Click to expand...
Click to collapse
Does this destroy all data? Do I need to unlock bootloader? Does it matter where I place the boot.img on my device?
CalebQ42 said:
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
Click to expand...
Click to collapse
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 ----------
ctakah27 said:
Does this destroy all data? Do I need to unlock bootloader? Does it matter where I place the boot.img on my device?
Click to expand...
Click to collapse
Yes, yes and not really (you get a file chooser so you just need to locate it)
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!
CalebQ42 said:
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!
Click to expand...
Click to collapse
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.
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.
CalebQ42 said:
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!
Click to expand...
Click to collapse
jonchance_84 said:
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.
Click to expand...
Click to collapse
They have the image for AT&T
EAIaIQobChMIwYzbk7j_3gIVRZRpCh0RMwdoEAEYASAAEgLPifD_BwE
Warrior1988 said:
They have the image for AT&T
EAIaIQobChMIwYzbk7j_3gIVRZRpCh0RMwdoEAEYASAAEgLPifD_BwE
Click to expand...
Click to collapse
I see the separate firmware. I'm only asking because of past shadyness from AT&T trying to tell manufacturers what to do. Years ago on my Xperia x10, if on AT&T firmware, you needed to flash the global generic firmware to get around their crap.
CalebQ42 said:
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):
Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
Extract and copy the boot.img file to your device
Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
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)
Copy the patched_boot.img back over to your PC
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
.
If you run into any issues, then you will need to specify the slot to flash.
Turn on Android Debugging and run
Code:
adb shell getprop ro.boot.slot_suffix
and make note if the output is _a or _b
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
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.
Click to expand...
Click to collapse
Would this procedure be the same as far as mac/win?
I understand all of that, I am simply asking if someone has tried this with the AT&T variant yet. I want to know before I go order this phone.
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.
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
andy1011 said:
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
Click to expand...
Click to collapse
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
CurtisMJ said:
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
Click to expand...
Click to collapse
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.
andy1011 said:
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.
Click to expand...
Click to collapse
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

Categories

Resources