[Guide][Root] How to install the latest Google software update - Google Pixel 2 Guides, News, & Discussion

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.

Related

[GUIDE] Unlock/Flash/Root for the Pixel 2 (walleye)

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

[Guide][Root] Magisk without TWRP on Android P

Via Magisk Manager:
This method does not need root, and also does not require a custom recovery.
However, you MUST have a stock boot image dump beforehand, and you also have to be able to flash the patched boot image, either through fastboot mode
REQUIREMENTS -
1 - Setup adb and fastboot on your PC.
2- Stock boot image (boot.img) of your device (extract file from factory image android P)
3 - Last Magisk Manager (v 5.8.3)
4 - Active Internet connection
5 - Active mind and patience.
6 - Devices must is unlock bl.
This Boot-Image is for boot android P PPR1.180610.009:
https://drive.google.com/open?id=166pE9aMk-jqns3JM74enFhsaDY6-c3yJ
Magisk Manager
https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
==================================================
Step 1: Patching the stock boot.img
1- Copy the stock boot.img of your device to your phone's internal storage.
2- Install the latest Magisk Manager
3- Launch Magisk Manager app
4- If prompted to install Magisk, select NO THANKS
5- If you're planning to flash the patched boot image,For normal users leave it as the default .img
6-Press Setting>Update Channel>Beta
7- Press Install > Install > Patch Boot Image File, and select your stock boot image file
Navigate to the location of the stock boot.img you copied earlier on, then Select it
8- Magisk Manager should begin downloading the magisk zip file used for patching
9- Once download is complete, MagiskManager will automatically patch the boot file and store it under SDcard/MagiskManager/patched_boot.img
Step 2: Flashing the patched boot.img
1- Copy the patched_boot.img from your phone's internal storage to folder adb or platform-tools on PC (directory>SDcard/MagiskManager/patched_boot.img)
2- You could also use Fastboot to flash the patched_boot.img or boot.img (if you've renamed then the command must reflect the file name) as outlined below
How to Flash patched_boot.img using Fastboot
1- Setup adb and fastboot on your PC.
2- Unlock the phone's Bootloader (if its not unlocked)
3-Re-enable USB debugging on the phone
4- Connect the phone to the PC via USB cord
5- Boot into fastboot mode.
code
-adb reboot bootloader
6- Flash the patched_boot and reboot by typing in the commands below into adb CMD prompt window and hitting Enter after each line -
Quote:
Code:
fastboot devices
fastboot flash boot patched_boot.img
fastboot reboot
-Verify root using Root Checker
Try at your own Risk
CREDITS
@topjohnwu (Magisk)
Sadly goes into a bootloop for me - no idea why though
This worked for me. I had magisk installed and took the pie update. No more root. D/l the factory image and extracted the boot image to the files folder...pissmeoff they changed the name of the icon... and magisk patched the image and saved it in its folder. Found the file, moved it to the laptop then flashed it.
reawo said:
Sadly goes into a bootloop for me - no idea why though
Click to expand...
Click to collapse
I think you made a mistake.
I always did that method pre Pie and it always worked but now I end up in a bootloop and I did everything according to guide
reawo said:
I always did that method pre Pie and it always worked but now I end up in a bootloop and I did everything according to guide
Click to expand...
Click to collapse
I think you use my file(boot.img) for patch_boot.img from magisk manager.
I think you must check your build number devices.
You must use file boot.img from your factory image for root.
9.0.0 (PPR1.180610.009, Aug 2018) >This is version for my devices
9.0.0 (PPR1.180610.011, Aug 2018, Telstra) >?
hey mate thanks for the input, I got a normal non testra (whatever that is) taimen - tried your boot.img and before that I tried the one from the factory image, both result in a boot loop.
I went through all stages of the Android p beta and in the end, to try solve this, I also non wipe flashed the factory image all to get the same result
could you sent me a drive Link to the patched version of yours or something?
reawo said:
hey mate thanks for the input, I got a normal non testra (whatever that is) taimen - tried your boot.img and before that I tried the one from the factory image, both result in a boot loop.
I went through all stages of the Android p beta and in the end, to try solve this, I also non wipe flashed the factory image all to get the same result
could you sent me a drive Link to the patched version of yours or something?
Click to expand...
Click to collapse
This is file patch_boot.img from my devices.
https://drive.google.com/open?id=1nVEpoGam-VY1YT3GBbG6HNfhnT2NqRin
newyesor said:
This is file patch_boot.img from my devices.
https://drive.google.com/open?id=1nVEpoGam-VY1YT3GBbG6HNfhnT2NqRin
Click to expand...
Click to collapse
Also doesnt work, i thought so - didnt do anything different than when it worked - no idea why it doesn't though
Is there a way to see or read out any protocols regarding this?
I receive also a bootloop and I didnt make any mistake. I also used this method pre Pie, I read that alot of users have problems with rooting Pie atm, even with TWRP
reawo said:
Also doesnt work, i thought so - didnt do anything different than when it worked - no idea why it doesn't though
Is there a way to see or read out any protocols regarding this?
Click to expand...
Click to collapse
You use adb last version for flash patch_boot.img ?
I think you should flash factory image new again and factory reset your devices.
You are use stock kernel or other kernel on your devices.
newyesor said:
You use adb last version for flash patch_boot.img ?
I think you should flash factory image new again and factory reset your devices.
You are use stock kernel or other kernel on your devices.
Click to expand...
Click to collapse
I downloaded all the latest adb and fastboot. Never touched kernel or did custom recovery, always used the magisk method since i am on a pixel device. i also got the issue that my pc doesnt recognize my pixel from time to time, you think i should do a complete wipe?
I don't sure.
You are use platfrom-tool from sdk lastversion?(for flash via fastboot mode)
@reawo
I think you should flash factory image new again and factory reset your devices.
Step 1: Patching the stock boot.img
1- Copy the stock boot.img of your device to your phone's internal storage.
2- Install the latest Magisk Manager
3- Launch Magisk Manager app
4- If prompted to install Magisk, select NO THANKS
5- If you're planning to flash the patched boot image,For normal users leave it as the default .img
6-Press Setting>Update Channel>Beta ,and close this app.****
7- Open app again and Press Install > Install > Patch Boot Image File, and select your stock boot image file
Navigate to the location of the stock boot.img you copied earlier on, then Select it
8- Magisk Manager should begin downloading the magisk zip file used for patching (This process is not failed)***
9- Once download is complete, MagiskManager will automatically patch the boot file and store it under SDcard/MagiskManager/patched_boot.img
Step 2: Flashing the patched boot.img
1- Copy the patched_boot.img from your phone's internal storage to folder adb or platform-tools on PC (directory>SDcard/MagiskManager/patched_boot.img)
2- You could also use Fastboot to flash the patched_boot.img or boot.img (if you've renamed then the command must reflect the file name) as outlined below
How to Flash patched_boot.img using Fastboot
1- Setup adb and fastboot on your PC.
2- Unlock the phone's Bootloader (if its not unlocked)
3-Re-enable USB debugging on the phone
4- Connect the phone to the PC via USB cord
5- Boot into fastboot mode.
code
-adb reboot bootloader
6- Flash the patched_boot and reboot by typing in the commands below into adb CMD prompt window and hitting Enter after each line -
Quote:
Code:
fastboot devices
fastboot flash boot patched_boot.img
fastboot reboot
-Verify root using Root Checker
Try at your own Risk
Will work on the verizon variant (bootloader locked)?
sabi95190 said:
Will work on the verizon variant (bootloader locked)?
Click to expand...
Click to collapse
Nope. If it were that easy for bootloader locked Verizon phones, it would have been done months ago.
What happens if you lock the bootloader after all of this?
DarkSilentSC said:
What happens if you lock the bootloader after all of this?
Click to expand...
Click to collapse
You'll wipe the phone, lose root, and be stock.
DarkSilentSC said:
What happens if you lock the bootloader after all of this?
Click to expand...
Click to collapse
When still rooted and modified? You might very well brick it. Relocking while modified is borderline insanity.
TonikJDK said:
When still rooted and modified? You might very well brick it. Relocking while modified is borderline insanity.
Click to expand...
Click to collapse
"Borderline"???? More like certifiably insane! ?

[GUIDE] Flashing and updating custom ROMs

Flashing for Dummies
In this guide we'll go over how to flash custom ROMs with root and TWRP in addition to updating
this guide will always be updated
Read the ENTIRE guide before you start
Code:
Your warranty is now void.
We are not responsible for bricked devices, bootloop... Please
do some research if you have any concerns about mods
included in these GUIDES before using them! YOU are choosing to
make these modifications.
things to keep in mind:
1- when you flash a ROM through TWRP, it will flash to your inactive slot, that's why you need to switch slot after flashing it and then flash everything else, think of it like an OTA update except you need to switch active slot yourself
2- when you change your active slot in TWRP, it will only change after you reboot, your active slot will always be the one you're currently booted on
3- the order of flashing anything that modifies boot is
1) TWRP
2) custom kernel
3) noverity
4)Magisk
if you're not sure, flash stock boot of your rom and do it again, flashing TWRP will break Magisk, flashing a custom kernel will break magisk, flashing TWRP after flashing a custom kernel will most likely get you a bootloop
Before you begin
you need to unlock your bootloader first https://forum.xda-developers.com/mi-a2/how-to/unlock-bootloader-n-root-magisk-easy-t3856800
It is no longer required to be on stock Oreo before flashing, but I currently still recommend you do so as there might be some minor bugs on some custom roms, but otherwise everything will work just fine.
get latest platform-tools if you haven't already, using an older one WILL result in errors
platform-tools
extract it and open the folder
hold shift then right click on an empty space then click "open command window here"
if you're on windows 10, doing that will open power shell instead, inside power shell, type "cmd" and press enter, use cmd for everything below
if you're coming from stock, you need to do this first
type the following command (data and files will be wiped)
Code:
fastboot -w
fastboot set_active b
Notes:
Pixel Experience includes Gapps, do not flash them after the rom
many roms include TWRP, such as Havoc, AICP and many others, check ROM thread first, if it includes it then don't flash TWRP.
Flashing custom ROMs and other stuff
download latest TWRP img and zip from https://twrp.me/xiaomi/xiaomimia2.html and place it in the same folder you extracted platform-tools to
NOTE: if you are on stock then use TWRP 3.2.3 img, not 3.3
note: if you're having issues with official TWRP, I've built an unofficial one with F2FS support which you can try here
be careful if you switch to F2FS, it will only work with a recovery that supports it and a ROM that supports it, no stock.
rename the img to twrp.img
in cmd, type
Code:
fastboot boot twrp.img
if you get a bootloop, force shutdown (power + volume down) and try again
using MTP copy the files needed to flash to your phone
if MTP doesn't work, you have the following options
1) wipe data from TWRP, try again
2) advanced > file manager, go to /data/media , if there is nothing in there, create a new folder called 0 there by going to Advanced > Terminal and typing the following commands
Code:
cd /data/media
mkdir 0
then reboot to bootloader and try again
3) try using PBRP for MTP, then go back to TWRP PBRP
4) use adb sideload:
in TWRP, go to Advanced > adb sideload, then on PC
Code:
adb sideload file.zip
do that for each thing you want to flash
(you can type adb sideload then drag and drop the file you want to flash onto cmd, make sure there's a space between sideload and the file you want to flash)
5) use adb push. follow methode 2 to create the folder, then in cmd, type this command
Code:
adb push file.zip /data/media/0/
do that for each file you need
after you got the files on your phone, it's time to flash
remember that when flashing a ROM, it will flash to your inactive slot, in this guide I'll assume your active slot is B, use "fastboot set_active b" in fastboot if you'd like to follow along
First go to wipe > advanced and select System and Data then wipe, then you can start flashing
1- flash the ROM zip
2- flash TWRP zip, so you can boot to TWRP without the need of a PC (ONLY if the ROM doesn't include it already)
3- switch your active slot (to A if you are on B and to B if you were on A)
4- reboot recovery
5- flash Gapps if required by the ROM you're flashing, Opengapps nano is recommended, you can get it here http://Opengapps.org
6- (optional) flash a custom kernel if desired/needed
7- (optional) flash DM-VERITY & FORCEENCRYPT DISABLER zip , this will disable DM verity and encryption in vendor, this is not required by most custom ROMs as they will disable encryption anyway, it is most useful on stock, and in the possibility that the ROM you're flashing does not disable encryption
8- flash Magisk
9- reboot to system
IMPORTANT, if you get an error while flashing ROM zip, do the following
use latest official TWRP, if you're already using it, then the ROM you're flashing is one of the older ROMs
previously, ROMs and TWRP used Jasmine as a codename for our device, while the real codename is Jasmine_sprout, this caused some issues, newer ROMs and TWRP now use the correct codename, but that means new TWRP can not flash older ROMs, and so you will need some simple modifications to the ROM zip:
1- open the ZIP using WinRAR on PC or X-plore on phone
2- go to META-INF/com/android/metadata and open it as text
3- on the last line, edit 'pre-device=jasmine' to 'pre-device=jasmine_sprout'
4- save it and try flashing again
Switching between custom ROMs
follow the same flashing instructions, you can boot directly to TWRP by holding power + volume up, wipe data and system first then flash ROM and the rest.
Updating Custom ROMs
For OFFICIAL ROMs which support A/B OTA it's very easy
1- once you get a notification that an update is available, download and install with the system updater but don't reboot (If the ROM includes TWRP then don't do any of the following steps, just reboot)
2- go to Magisk, Downloads, search for "TWRP A/B Retention Script" and install it
3- on the main Magisk page, click install > install > Install to Inactive Slot (After OTA)
4- once Magisk finishes, reboot, you will now be on the opposite slot with both Magisk and TWRP installed.
for Unofficial ROMs with no OTA or Official ROMs that don't support A/B OTA, you'll need to use TWRP, do not wipe anything:
1- boot to TWRP
2- flash the ROM zip
3- flash TWRP zip (ONLY IF the ROM doesn't include TWRP)
4- switch your active slot (to A if you are on B and to B if you were on A)
5- reboot recovery
6- flash Gapps if required by the ROM you're flashing, Opengapps nano is recommended, you can get it here http://Opengapps.org
7- (optional) flash a custom kernel if desired/needed
8- (optional) flash DM-VERITY & FORCEENCRYPT DISABLER zip , this will disable DM verity and encryption in vendor, this is not required by most custom ROMs as they will disable encryption anyway, it is most useful on stock, and in the possibility that the ROM you're flashing does not disable encryption
9- flash Magisk
10- reboot to system
Very good and very well detailed guide. This guide will be useful to those who are not so familiar with Flashing ROMs especially in our device with partitions.
Thank you for making this, as many users were asking this thing. Keep it up!
does rebooting to twrp gets stuck on twrp logo after flashing twrp zip?
its been an issue on stock or maybe i have been doing to wrong...
after wipe commands and setting active slot b,
i reboot into fastboot boot twrp.img and flash the rom and Im getting mount failed /system
is that normal?
Edit: NVM, it is normal. I successfully flashed Carbon ROM in my device. Thanks for this awesome guide.
This is great thank you. Going to try it once I get bored of stock rom.
@AxL said:
after wipe commands and setting active slot b,
i reboot into fastboot boot twrp.img and flash the rom and Im getting mount failed /system
is that normal?
Edit: NVM, it is normal. I successfully flashed Carbon ROM in my device. Thanks for this awesome guide.
Click to expand...
Click to collapse
Yes it's normal because you wiped system
levai_spencer said:
does rebooting to twrp gets stuck on twrp logo after flashing twrp zip?
its been an issue on stock or maybe i have been doing to wrong...
Click to expand...
Click to collapse
twrp.zip has a bootloop for TWRP when it is flash
Candy_Pineapple said:
twrp.zip has a bootloop for TWRP when it is flash
Click to expand...
Click to collapse
No, if you follow the instructions it works
coming from stock to pE I followed exacty the steps.
then flash CR. Here what Ive done
i-wipe cache,data,system for both partition using twrp
ii- set partition to B in twrp and flash zip
iii- set partition to A in twrp and reboot into bootloop
iv- set partition to B in twrp and reboot successfully
so what partition is my CR now?
which partition should i install gapps,kernel and magisk?
Thanks.
notJimz said:
coming from stock to pE I followed exacty the steps.
then flash CR. Here what Ive done
i-wipe cache,data,system for both partition using twrp
ii- set partition to B in twrp and flash zip
iii- set partition to A in twrp and reboot into bootloop
iv- set partition to B in twrp and reboot successfully
so what partition is my CR now?
which partition should i install gapps,kernel and magisk?
Thanks.
Click to expand...
Click to collapse
It's in B, because you didn't reboot after switching slot initially in twrp, stay in B and boot recovery then flash Gapps and the rest
Nebrassy said:
It's in B, because you didn't reboot after switching slot initially in twrp, stay in B and boot recovery then flash Gapps and the rest
Click to expand...
Click to collapse
You are right. I miss the first bl reboot.
I follow the step back and reboot after switch partition.
Only now i got the concept for A/B flashing. And my os in A now.
Thanks for the guide. Really helpful.
notJimz said:
You are right. I miss the first bl reboot.
I follow the step back and reboot after switch partition.
Only now i got the concept for A/B flashing. And my os in A now.
Thanks for the guide. Really helpful.
Click to expand...
Click to collapse
No prob, keep connected and click the tx button
Matteo (AIO Project Founder)
Hello,
after make adb push file.zip /data/media/0
I receive the next message
adb: error: failed to get feature set: no devices/emulators found
Please advice.
Thanks
Roviva said:
Hello,
after make adb push file.zip /data/media/0
I receive the next message
adb: error: failed to get feature set: no devices/emulators found
Please advice.
Thanks
Click to expand...
Click to collapse
What's the output of adb devices?
Nebrassy said:
What's the output of adb devices?
Click to expand...
Click to collapse
I entered in fastboot mode,:
C:\Users\DELL\AppData\Local\Android\Sdk\platform-tools>.\adb devices
List of devices attached
C:\Users\DELL\AppData\Local\Android\Sdk\platform-tools>
If I enter the command "adb devices" in normal mode (no fastboot) appear:
C:\Users\DELL\AppData\Local\Android\Sdk\platform-tools>adb devices
List of devices attached
a341410 device
Roviva said:
I entered in fastboot mode,:
C:\Users\DELL\AppData\Local\Android\Sdk\platform-tools>.\adb devices
List of devices attached
C:\Users\DELL\AppData\Local\Android\Sdk\platform-tools>
Click to expand...
Click to collapse
Adb devices
While in twrp, adb won't work while in fastboot, follow the guide carefully
Nebrassy said:
Adb devices
While in twrp, adb won't work while in fastboot, follow the guide carefully
Click to expand...
Click to collapse
Hello,
In your guide I dont understand the next part:
using MTP copy the files needed to flash to your phone
if MTP doesn't work, you have the following options
1) wipe data from TWRP, try again
If I made the step 1 above: I enter in the TWRP, select wipe, then, select wipe, advance wipe, select data and then swipe to wipe. After this reboot system, the telephone start but in normal mode, like restored.
2) advanced > file manager, go to /data/media , if there is nothing in there, create a new folder called 0 there by going to Advanced > Terminal and typing the following commands
I follow the step 2, in data/media appear a folder TWRP then i dont created a folder called 0
Then I go to advanced >> adb sideload and in the pc i wrote "adb sideload twrp.zip.
You write file.zip, I dont understand what is this file?
I dont understand what do you mean in the step 3: "try using PBRP for MTP, then go back to TWRP PBRP"
Code:
cd /data/media
mkdir 0
then reboot to bootloader and try again
3) try using PBRP for MTP, then go back to TWRP PBRP
4) use adb sideload:
in TWRP, go to Advanced > adb sideload, then on PC
Code:
adb sideload file.zip
do that for each thing you want to flash
(you can type adb sideload then drag and drop the file you want to flash onto cmd, make sure there's a space between sideload and the file you want to flash)
5) use adb push. follow methode 2 to create the folder, then in cmd, type this command
Code:
adb push file.zip /data/media/0/
do that for each file you need
Roviva said:
Hello,
In your guide I dont understand the next part:
using MTP copy the files needed to flash to your phone
if MTP doesn't work, you have the following options
1) wipe data from TWRP, try again
2) advanced > file manager, go to /data/media , if there is nothing in there, create a new folder called 0 there by going to Advanced > Terminal and typing the following commands
I follow the step 2, in data/media appear a folder TWRP then i dont created a folder called 0
Then I go to advanced >> adb sideload and in the pc i wrote "adb sideload twrp.zip.
You write file.zip, I dont understand what is this file?
I dont understand what do you mean in the step 3: "try using PBRP for MTP, then go back to TWRP PBRP"
Code:
cd /data/media
mkdir 0
then reboot to bootloader and try again
3) try using PBRP for MTP, then go back to TWRP PBRP
4) use adb sideload:
in TWRP, go to Advanced > adb sideload, then on PC
Code:
adb sideload file.zip
do that for each thing you want to flash
(you can type adb sideload then drag and drop the file you want to flash onto cmd, make sure there's a space between sideload and the file you want to flash)
5) use adb push. follow methode 2 to create the folder, then in cmd, type this command
Code:
adb push file.zip /data/media/0/
do that for each file you need
Click to expand...
Click to collapse
File.zip, as in the file you want to copy, you change that to the name of the file you want to copy
PBRP is another recovery, you can try booting it if twrp doesn't work to copy
Nebrassy said:
File.zip, as in the file you want to copy, you change that to the name of the file you want to copy
PBRP is another recovery, you can try booting it if twrp doesn't work to copy
Click to expand...
Click to collapse
hello,
I dont know how to follow:
flash the ROM zip
2- flash TWRP zip, so you can boot to TWRP without the need of a PC
3- switch your active slot (to A if you are on B and to B if you were on A)
4- reboot recovery
I wiped data and storage then I press back.
I flashed the PBRP that I pushed to data/media/TWRP
After flash I returned to the menu of PBRP
I switched to A
When I reboot, a warning message that "NO OS SYSTEM IS INSTALLED" appear.
I reboot to recovery but after this, the telephone does not restart. the screen "androidone" appear and dont advance...
How can I install the PBRP and magisk?
I succesfull push the files to the telephone but when flash the PBRP I cannot follow......
Roviva said:
hello,
I dont know how to follow:
flash the ROM zip
2- flash TWRP zip, so you can boot to TWRP without the need of a PC
3- switch your active slot (to A if you are on B and to B if you were on A)
4- reboot recovery
I wiped data and storage then I press back.
I flashed the PBRP that I pushed to data/media/TWRP
After flash I returned to the menu of PBRP
I switched to A
When I reboot, a warning message that "NO OS SYSTEM IS INSTALLED" appear.
I reboot to recovery but after this, the telephone does not restart. the screen "androidone" appear and dont advance...
How can I install the PBRP and magisk?
I succesfull push the files to the telephone but when flash the PBRP I cannot follow......
Click to expand...
Click to collapse
You didn't flash a rom, obviously it won't boot

Magisk canary build running on QDP1

tested and working
DP1 no wipe, run TWRP skip password if it asks, push latest magisk canary build to /mnt and flash
you will have root though i cant seem to update magisk.apk or zip through the app cheers guys
EDIT
Just uninstalled magisk that flashed with canary build from telegram chat and downloaded lastest apk from github canary. and working fine!!!
attached is an updated installer should work fine!!
Anyone?
ne0ns4l4m4nder said:
Anyone?
Click to expand...
Click to collapse
Yep can confirm that the latest canary build is working great. John Wu pulls through again in record time.
And just an extra disclaimer for the sake of clarity this is only working on the previous gen Pixels. The 3/3 XL are still a work in progress for the time being.
couldnt install says invalid zip format
mysara saad said:
couldnt install says invalid zip format
Click to expand...
Click to collapse
Yeah that zip has an extra folder inside of it for some reason. Just use the one from the magisk canary thread.
https://forum.xda-developers.com/apps/magisk/dev-magisk-canary-channel-bleeding-edge-t3839337
I had to remove lock screen security first too since TWRP wasn't decrypting properly with it on. GL
You don't need to decrypt, just skip and push the magisk.zip to /mnt and install
Here's how I got to rooted q from the latest rooted stock p without wiping my internal memory. Please note that I do not have any passwords or patterns on my phone, so this works if you do not have encryption. Just make sure you back your phone up to your computer first just in case something goes wrong :
0. With your phone hooked to the computer, boot into bootloader and type "fastboot devices" to make sure your phone shows up. This is optional and just something I do to make sure everything is working as it should.
1. Download the factory image from here: https://developer.android.com/preview/download.html
2. Download and install the canary magisk manager from here: https://forum.xda-developers.com/apps/magisk/dev-magisk-canary-channel-bleeding-edge-t3839337. Go to settings and change the update channel to canary. There will now be a new update, tap install but select "download only".
3. Unzip the factory image.
4. Open the "flash-all.bat" file in a text editor and remove the -w flag after the fastboot command near the bottom of the file.
5. Obtain the STOCK boot.img and dtbo.img of the system rom you are CURRENTLY running.
6. Type "adb devices" with your phone hooked up to the computer to make sure that you have a good connection and your phone has debugging on and authorized.
7. Reboot into TWRP and wipe Dalvik/ART cache, System, and Data.
8. Reboot into bootloader.
9. Take a command prompt to where your current stock boot.img and dtbo.img files are.
10. Command: fastboot flash boot {name_of_your_stock_boot.img}
11. Command: fastboot flash dtbo {name_of_your_stock_dtbo.img}
12. Now take your command prompt to where your unzipped q rom is.
13. Command: flash-all
14. When it's finished, your phone will reboot.
15. Download the latest twrp img and zip here: https://dl.twrp.me/taimen/
16. Once your phone is rebooted, go into settings and enable usb debugging.
17. Open a command prompt where you downloaded the twrp image.
17. Command: adb reboot bootloader
18. Command: fastboot boot {name_of_twrp_image_you_downloaded.img}
19. Flash the TWRP zip and the canary magisk zip you downloaded earlier and reboot.
19. uneseesery steps that dont work...
hanschke said:
19. uneseesery steps that dont work...
Click to expand...
Click to collapse
That is exactly what I did to get on rooted q from rooted p, without losing anything on my internal storage, and it does work. If you can tell me any "uneseesery" steps here I'm all ears.
hanschke said:
19. uneseesery steps that dont work...
Click to expand...
Click to collapse
I don't think so..I rooted through that step only..

[Guide] Enable ADB on the stock OxygenOS recovery

Since we don't have TWRP yet for our 8T, having ADB enabled on the stock recovery can be really helpful if you are unlocked and rooted.
For example, removing problematic magisk modules.
I tried to install the EdExposed module and ended with a boot loop. To get back I had to flash the stock boot.img again and reconfigure all my modules again.
Having ADB enabled in OOS recovery will let us delete the problematic module at /data/adb/modules without having to delete the working modules.
Credit goes to @s3axel for the Post in Oneplus 8 forums
Quoting the procedure to create the modified recovery.img :
s3axel said:
Description of the method to modify recovery by yourself:
Prerequisites:
Android Image Kitchen (credit to osm0sis for providing this tool)
the original recovery image file (henceforth called "recovery.img"). You can extract this yourself from an update zip file by unpacking "payload.bin" and then use a tool like payload_dumper (credit to vm03 for providing this) to extract the recovery.img file
Now do the following:
unpack image with Image Kitchen --> this will create a "ramdisk" and a "Split_img" directory with the unpacked content within
navigate into the "ramdisk" folder and use a text editor (on windows preferably Notepad++) to edit the file "prop.default"
look for entry "ro.adb.secure" and change entry value from "1" to "0". Note this entry can occur multiple times (I noticed twice), change each --> this will prevent adb from asking for authorization (the recovery does not provide such a dialogue)
look for entry "ro.debuggable" and change this from "0" to "1" --> this actually enables ADB
look for entry "ro.secure" and change this from "1" to "0" --> may be unnecessary but I wanted to avoid brick in case a modified recovery would result in such a behavior
save textfile
repack the image with Android Image Kitchen and voila:
you have a new modified recovery image you can flash
Click to expand...
Click to collapse
Installation Procedure:
s3axel said:
Prerequisites:
Oneplus 8T
unlocked bootloader
access to fastboot on the phone
adb and fastboot
Installation:
Reboot the phone to fastboot, then flash the recovery from fastboot with the command
Code:
fastboot flash recovery <filename>
(with <filename> being the name of the recovery in the format of "recovery.img" you wish to flash)
Uninstall:
Same as installation, but flash the original stock recovery instead.
Usage:
Boot up recovery, enter the encryption key if the file system is encrypted. Then connect the phone to a PC and you are ready to go with adb. E.g. by using
Code:
adb shell
to open a shell and access the file system. Magisk modules are located in /data/adb/modules, deleting the corresponding directory there will remove the module in question.
Step-by-step this would be:
Code:
cd /data/adb/modules
to change to the Magisk modules directory
Code:
ls
to list the content of this directory, each module has its own directory, usually with a well-recognizable name
Code:
rm -r <directory>
to delete the directory in question. Tip: in console TAB-autocomplete works
Notes of caution:
ADB security is disabled as I could not get the recovery to allow for authorizing a connected computer. As a consequence, any computer connected is automatically authorized in ADB, although with an encrypted filesystem at least no data is accessible without the key.
with direct ADB access to your file system you can easily wreck you phone requiring a factory reset or even reinstallation of the OS from fastboot - please be careful about what you are doing
Credits: Thanks to osm0sis for Android kitchen and all great developers for the Oneplus devices.
Click to expand...
Click to collapse
Pre-patched files for the lazy (upto 11.0.4.5):
To find your model and build:
Code:
adb shell getprop ro.product.model
KB2001
adb shell getprop ro.build.version.ota
OnePlus8TOxygen_15.I.16_GLO_0160_2010150110
KB2000 / KB05?? - Chinese Variant
11.0.1.2 Hydrogen_15.H.16_OTA_0160_all_2010150101_4101
STOCK recovery.img
adb patched recovery
KB2001 / KB05DA - Indian Variant
11.0.1.2 - OnePlus8TOxygen_15.I.16_GLO_0160_2010150110
STOCK recovery.img
adb patched recovery
11.0.2.3 - OnePlus8TOxygen_15.I.17_OTA_0170_all_2010240047
STOCK recovery.img
adb patched recovery
11.0.3.4 - OnePlus8TOxygen_15.I.18_OTA_0180_all_2011010208
STOCK recovery.img
adb patched recovery
11.0.4.5 - OnePlus8TOxygen_15.I.19_OTA_0190_all_2011101438_3032f.zip
STOCK recovery.img
adb patched recovery
KB2003 / KB05BA - EU Variant
11.0.1.2 - OnePlus8TOxygen_15.E.17_GLO_0170_2010150108
STOCK recovery.img
adb patched recovery
11.0.2.3 - OnePlus8TOxygen_15.E.18_OTA_0180_all_2010240038
STOCK recovery.img
adb patched recovery
11.0.3.4 - OnePlus8TOxygen_15.E.19_OTA_0190_all_2011010157
STOCK recovery.img
adb patched recovery
11.0.4.5 - OnePlus8TOxygen_15.E.20_OTA_0200_all_2011101442_ed5dc.zip
STOCK recovery.img
adb patched recovery
KB2005 / KB05AA - International Variant thanks to @card13
https://drive.google.com/drive/folders/1-i4P8sWPfyqwgYvBsKWAAftQW7m66Z70?usp=sharing
KB2007 / KB05CB - T-Mobile Variant
¯\_(ツ)_/¯
Code:
❯ adb devices
List of devices attached
75317573 recovery
❯ adb shell
# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 3648448 40396 3608052 2% /
tmpfs 3837328 1160 3836168 1% /dev
tmpfs 3837328 0 3837328 0% /mnt
tmpfs 3837328 0 3837328 0% /apex
tmpfs 3837328 4 3837324 1% /linkerconfig
tmpfs 3837328 24 3837304 1% /tmp
/dev/block/sda11 491464 140484 350980 29% /mnt/vendor/op2
/dev/block/sda20 11760 164 11596 2% /metadata
/dev/block/dm-3 1516540 1511956 4584 100% /vendor
/dev/block/sda2 27632 10452 17180 38% /mnt/vendor/persist
/dev/block/dm-7 110397292 6627020 103770272 7% /data
I will edit this post over time with few notes/misc stuff.
For some reason, the only way we can boot into the recovery is to perform a fastboot flash.
Fastboot boot recovery.img does not seem to work and I have no idea why. (Even on stock recovery.img!!)
It just ends up in a black screen.
If someone could explain why it'll be great, cuz if we can just temporarily boot into the patched recovery, we can pull the boot.img files and provide root for all the variants of the 8T without waiting for a full OTA, with the below method:
Next, there *might* be a way to root other variants of 8T which do not have the full OTA zips
WARNING: I am NOT responsible if this does not work. you have been advised! This can render your recovery partition unusable until OnePlus releases full OTA ZIPs for all variants of the 8T!
Unlike boot.img, I was actually successful in flashing the EU KB2003 recovery.img on my Indian variant KB2001. running OOS 11.0.1.2.KB05DA
So I tried to flash the adb-patched recovery.img from the EU OTA into my Indian 8T and I was able to enter the adb shell as root!
Now I can easily get the image of all the partitions as well. Here's a snippet from my PC:
Code:
~/oss_stuff/Android-Image-Kitchen
❯ adb devices
List of devices attached
75317573 recovery
~/oss_stuff/Android-Image-Kitchen
❯ adb shell
# ls -al /dev/block/bootdevice/by-name/boo*
lrwxrwxrwx 1 root root 16 1970-01-03 04:30 /dev/block/bootdevice/by-name/boot_a -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 1970-01-03 04:30 /dev/block/bootdevice/by-name/boot_b -> /dev/block/sde35
Copy the active slot (b in my case) as boot.img to sdcard and reboot:
Code:
# dd if=/dev/block/bootdevice/by-name/boot_b of=/data/media/0/boot.img
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.247740 s, 388 M/s
# reboot
I am already rooted, so I am expecting magisk manager to detect a magisk patched bootimage.
And it did. Screenshot attached.
Again I AM NOT 100% SURE IF ALL THE VARIANTS CAN FLASH THE SAME RECOVERY.IMG.
Since there is no full OTA Available, if the patched recovery does not work you will have to wait for the full ZIP to be released to restore your recovery. You have been warned!
DroidFreak32 said:
I will edit this post over time with few notes/misc stuff.
For some reason, the only way we can boot into the recovery is to perform a fastboot flash.
Fastboot boot recovery.img does not seem to work and I have no idea why. (Even on stock recovery.img!!)
It just ends up in a black screen....
Click to expand...
Click to collapse
Sadly I have no real explanation either, but I had the same effect during my testing - I assumed it's related to some mechanism around the encryption of the partitions.
Cheers & thanks for continuing this for the 8T !
Sorry but I want to ask a noob question: can I use this method to adb sideload a FULL OTA zip via this recovery as currently when I'm trying to switch to EU OOS from IN OOS, the local upgrader says that I can't install an older version of OOS
dijia1124 said:
Sorry but I want to ask a noob question: can I use this method to adb sideload a FULL OTA zip via this recovery as currently when I'm trying to switch to EU OOS from IN OOS, the local upgrader says that I can't install an older version of OOS
Click to expand...
Click to collapse
No I don't think this recovery allows flashing in the first place.
DroidFreak32 said:
No I don't think this recovery allows flashing in the first place.
Click to expand...
Click to collapse
Well, first of all, nice of you to post this for everybody. I had did this following the same tutorial, my first day I received my phone itself, and I also encountered the same issue of unable to boot recovery img.
Btw, you are right. OnePlus disabled adb sideload in their A/B devices. I researched extensively and couldn't find a way to re-enable it.
Well, even if it was present, it will only allow zips with signed keys from OP to be flashed, so not a replacement for TWRP anyway.
As for flashing OP updates and other custom roms, you can use fastbootd.
@theincognito Did you ever figure out the reason why they disabled ADB and ADB Sideloading? And do you know if OnePlus has a workaround (new protocol or command to accomplish the same effect)?
card13 said:
@theincognito Did you ever figure out the reason why they disabled ADB and ADB Sideloading? And do you know if OnePlus has a workaround (new protocol or command to accomplish the same effect)?
Click to expand...
Click to collapse
First of all, ADB was there to facilitate ADB sideloading. Once sideloading went away, they removed ADB entirely.
As for removing sideloading, as far as I can understand, it started when they switched to A/B partition for their phones, because by default, A/B devices don't have a dedicated recovery partition(like Pixel/Android One phones). So they removed it.
However, from OnePlus 8, OnePlus brought back the dedicated recovery partition while still using A/B. So, now, if they want, they could bring back the sideloading, imo.
As for workaround, there are only 2 options: TWRP (or any custom recovery) and fastbootd.
You can flash stock roms via fastbootd, but that involves extracting the zip via payload and flashing the images individually. As for custom roms, from fastbootd, you can use "fastboot update <rom.zip>". As simple as that.
@theincognito Thank you for the info it is very, very informative and gives me a lot of ideas of what to try next!
@DroidFreak32 I uploaded all my Recovery files to my GDrive, along with all my rooting files. https://drive.google.com/drive/folders/1-i4P8sWPfyqwgYvBsKWAAftQW7m66Z70?usp=sharing
Hace latest ota 11.0.3.4 BA recovery modified and recovery stock?
---------- Post added at 01:23 AM ---------- Previous post was at 01:22 AM ----------
card13 said:
@theincognito Thank you for the info it is very, very informative and gives me a lot of ideas of what to try next!
@DroidFreak32 I uploaded all my Recovery files to my GDrive, along with all my rooting files. https://drive.google.com/drive/folders/1-i4P8sWPfyqwgYvBsKWAAftQW7m66Z70?usp=sharing
Click to expand...
Click to collapse
Have latest ota 11.0.3.4 BA recovery modified and recovery stock?
hmm. seems, they changed something with the adb rights in 11.0.3.4.
ls /data is also permitted.
(edit: i used adb-recovery to delete a magisk module previous on 11.0.2.3)
ChillDuder said:
hmm. seems, they changed something with the adb rights in 11.0.3.4.
ls /data is also permitted.
(edit: i used adb-recovery to delete a magisk module previous on 11.0.2.3)
Click to expand...
Click to collapse
It's working fine here
What's your 8t model?
Also updated the op with links for patched recovery from 11.0.3.4
DroidFreak32 said:
It's working fine here
What's your 8t model?
Also updated the op with links for patched recovery from 11.0.3.4
Click to expand...
Click to collapse
KB2003
Thank you. I'll flash again later. Maybe i did something wrong in the prop file.
if your device been rooted and grant su for adb shell, you can also use CMD to enter commands "
>adb shell
$su
#magisk --remove-modules
"to remove all modules and reboot;
others,you had to flash the stock boot.img again
hanajoruno said:
if your device been rooted and grant su for adb shell, you can also use CMD to enter commands "
>adb shell
$su
#magisk --remove-modules
"to remove all modules and reboot;
others,you had to flash the stock boot.img again
Click to expand...
Click to collapse
su in adb shell dont worked for me (su binary isnt installed from magisk)
but for whatever reason, i have to reboot normaly, and via advanced poweroff menu directly to recovery. then it worked flawless. weird. previous i reboot to fastboot and from there to recovery. seems that this maybe is a differnce.
Thank you! Thank you so much. I tried a risky module and it crashed my phone. I was so scared as I had a lot of important data which I didn't backup. I followed your guide and I was able to remove the module and boot properly. I just can't thank you enough. You saved my life.
@liver20 No I am still on 11.0.1.2 since I haven't had time this week (life loves to get in the way) to unroot -> Apply Incremental OTA update file -> re-root.
I'm getting the black screen even after flashing the recovery. I can get into adb but have no way of decrypting? I am not able to enter my pattern. Am I missing something here?
xDanVitox said:
I'm getting the black screen even after flashing the recovery. I can get into adb but have no way of decrypting? I am not able to enter my pattern. Am I missing something here?
Click to expand...
Click to collapse
What's your oos build and 8t variant?
Have you tried manualy patching the recovery image yourself from your oos build instead of using the patched images by me?
DroidFreak32 said:
What's your oos build and 8t variant?
Have you tried manualy patching the recovery image yourself from your oos build instead of using the patched images by me?
Click to expand...
Click to collapse
I'm on 11.0.4.5 - KB2005
I did, yes. I used the broken TWRP to pull the recovery off of my phone and patched that. I tried using the one from unpacked kebab image as well. Tried booting and flashing and both give the same result. They both "work" but result in blank screen. Flashing back my backup original copy from my phone returns normal function.
Am I supposed to be seeing my pattern input the same as stock?
And thanks for the response!

Categories

Resources