Finally... Android 10 with working root!!!! - Google Pixel 2 XL Guides, News, & Discussion

So i've been having a hell of a time getting the latest image working on my phone... For a bit, I was soft bricked, even after running deuces and formatting user data and what not. For a while had to go back to android 8.1 (kinda nice having PIP/split screen mode!!). Finally figured it all out today... Download: The latest Magisk, the latest TWRP both .img and installer .zip. Then latest factory image, extract with winrar, go to extracted folder and extract the big .zip again with winrar, load deuces into that folder, put phone in fastboot (hold vol - and power or adb reboot bootloader).
Open an admin command prompt (admin maybe not necessary) and here we go: fastboot --set-active=a
Run Deuces, once finished go to admin command prompt and: fastboot boot twrp-3.3.0-0-taimen.img adb push twrp-pixel2-installer-taimen-3.3.0-0.zip /sdcard adb push Magisk-v19.4.zip /sdcard
Reboot, took a while to start, open magisk, says not installed, so click install, download zip only or patch boot? I just went to the factory image folder, pushed "boot.img" to phone, and selected that.
Read a bunch of threads saying like, find/extract your own boot image (which i don't think was necessary) but if you did want to do that, the location for pixel 2 xl is: /dev/block/sde8
Hopefully that makes sense, let me know if you have comments/questions/smart remarks

noob
Zooandbio4me said:
So i've been having a hell of a time getting the latest image working on my phone... For a bit, I was soft bricked, even after running deuces and formatting user data and what not. For a while had to go back to android 8.1 (kinda nice having PIP/split screen mode!!). Finally figured it all out today... Download: The latest Magisk, the latest TWRP both .img and installer .zip. Then latest factory image, extract with winrar, go to extracted folder and extract the big .zip again with winrar, load deuces into that folder, put phone in fastboot (hold vol - and power or adb reboot bootloader).
Open an admin command prompt (admin maybe not necessary) and here we go: fastboot --set-active=a
Run Deuces, once finished go to admin command prompt and: fastboot boot twrp-3.3.0-0-taimen.img adb push twrp-pixel2-installer-taimen-3.3.0-0.zip /sdcard adb push Magisk-v19.4.zip /sdcard
Reboot, took a while to start, open magisk, says not installed, so click install, download zip only or patch boot? I just went to the factory image folder, pushed "boot.img" to phone, and selected that.
Read a bunch of threads saying like, find/extract your own boot image (which i don't think was necessary) but if you did want to do that, the location for pixel 2 xl is: /dev/block/sde8
Hopefully that makes sense, let me know if you have comments/questions/smart remarks
Click to expand...
Click to collapse
I have just bought my pixel2xl, and recieved it the DAY 10 came out.
I have not had an a/b device, my last phone was the note 4 verizon, and the tabs2 i currently have.
could you perhaps make a simple list, of what this has ?
Currently i can adb devices with linux in my phone, and fastboot reboot bootloader ?
what is "run Deuces"
i presume fastboot --set-active=a means you are setting to write to the a partition ?
the first part,is where do i download the factory image ? google ? then unzip and sideload " push boot.img ?" the file to the /sdcard folder with the other files for twrp and magisk ?
thanks a lot for the announcment. i seriously just got my usb cable attached and ran fastboot, when i searched in xda and found your post. thanks alot

Ok.
I got it kinda figured out.
Gonna make a how 2 for noobs
Step 1. Download magisk and Google image for your device to your favorite machine.
Step 2. Dow load the newest adb tools from Google to your machine. Install and make sure your adb tools are in your $PATH
On my Linux machine, I unzipped the files and copied them to my local binary folder in ~/bin
3. Extract the Google image for your device, the extract the partitions zip file.
4. Go-to the folder and Sidleload the image to your phone
Code:
adb push *.img /sdcard/
5 . GOTO where you downloaded your magisk*.apk
And install with adb
adb install *.apk
6. Open your phone, and open magisk.
Patch the boot.img file you placed in /sdcard/
7. Pull the new patched file from your phone to your computer.
adb pull /sdcard/Download/*.img
That's as far as I got this morning.
Will update you all with the finished commands then copy it over to a how-to guide for noobs.

Yayy

Everytime uninstall magisk and get it working reboots bootloop, and or I try to install a module it boot loops

Related

[GUIDE] Linux Ubuntu: Unlocking Bootloader / Rooting Nexus S

One thing I've noticed is there isn't a lot of documentation for getting set up and unlocking your bootloader on a Linux OS. Setting up your machine to get adb and fastboot to recognize your device takes a tiny bit of extra work on a Linux operating system, but what exactly needs to be done may not be clear to everyone. Whether it's because you're new to the Android SDK/adb, somewhat new to Linux, or can't simply can't seem to find the Vendor Code for the Nexus S. (For those who are looking specifically for this, it's '18d1', and I assume will be the same on all Nexus devices to come; If this means nothing to you right now, read on.)
Disclaimer: I take no responsibility if something goes wrong (if it does, it should be fixable though), Unlocking your bootloader voids your warranty (but you can lock it back), Unlocking the bootloader will wipe your entire phone, including USB Storage; so make a copy of all those family photos and other files you may have put onto the USB storage if you want to keep them.
For the sake of sanity, this guide assumes you are using Ubuntu. If you're using something else (or different applications), there are terminal commands offered, and you probably have an idea on how to adapt the given instructions to your Linux OS.
Preparation: Installing the Android SDK, ADB, Fastboot & Setting Up Your Nexus S to be Recognized
1. Download the Android SDK for Linux: http://dl.google.com/android/android-sdk_r08-linux_86.tgz
2. Save it in a folder of your choice. I chose to keep it in my Downloads folder, myself. If you'd like, you can rename it to the simpler name of 'AndroidSDK.tgz'. The rest of the guide will assume that you did, because I'm lazy, and it makes things simpler; it will also assume you saved it in Downloads. If you feel that you have the intuition to rename and edit the path names based on your own choices, then fine; but if you're utterly lost here, just stick with what I'm doing; download to 'Downloads', rename to 'AndroidSDK.tgz'.
3. Now that you have it, navigate to the folder you downloaded it to, right-click, and click 'Extract' to unzip it. If for some reason you cannot do this, open up a terminal and try this command:
Code:
tar zxvf /home/<your-user-name>/Downloads/AndroidSDK.tgz
You may have to adjust the command if you didn't save it under Downloads or didn't rename the file to AndroidSDK.tgz.
4. Now, we'll install adb and some other software packages by starting up the Android SDK and AVD Manager. Start it either by:
- Navigating to your AndroidSDK folder, going to the 'tools' folder and double-clicking the file called 'android'; if a popup opens asking you what you want to do with it click 'Run'.
- Using this command:
Code:
/home/<your-user-name>/Downloads/AndroidSDK/tools/android
5. In Android SDK and AVD Manager, click on "Available packages". Check the box next to "Android SDK Tools, revision 8" and "Android SDK Platform-tools", and click on "Install Selected" then "Install". When prompted click "Yes" to restart ADB.
6.You should now have a folder in /home/<your-user-name>/Downloads/AndroidSDK/ called "platform-tools".
7. Download fastboot here: http://developer.htc.com/adp.html
- Save it to the aforementioned platform-tools folder.
- Now, navigate to the file, right click it, click 'Properties', go to the 'Permissions' Tab and check 'Allow executing file as program'. Alternatively, run this command:
Code:
chmod +x /home/<your-user-name>/Downloads/AndroidSDK/platform-tools/fastboot
8. Now to set things up so adb and fastboot recognize your Nexus.
- Type this command into a terminal:
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
- Paste this into the blank file:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
- Click save and close.
- Then, type the following terminal command:
Code:
sudo restart udev
9. Almost done with preparations! Run this command:
Code:
gedit .bashrc
And add this line to the top of the file:
Code:
#AndroidDev PATH
export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools
Then save the file and close.
10. Download this file and save it to /home/<your-user-name>/Downloads/AndroidSDK/platform-tools: http://www.mediafire.com/?4pe5y906zr67nfh
10.We're ready to go!
Unlocking the Bootloader on your Nexus S and Rooting
Once again, unlocking your bootloader wipes everything on your device, including USB storage. Make a backup of any files you want to keep.
1. On your Nexus S, go to Menu>Settings>Applications. Select "Development" and check the box next to "USB debugging"
2. Power off the phone, and then hold down the Volume Up button and the Power button simultaneously to get into Bootloader/Fastboot mode. Connect your Nexus to the computer via USB.
3. Run this command to unlock your bootloader: (Once again WIPES EVERYTHING!)
Code:
fastboot oem unlock
Hit Enter and on your phone you will be prompted to confirm the action. (Use Volume +/- buttons to choose, power button to confirm choice) Confirm. At this point you will have an unlocked bootloader.
4. Copy/paste the following into the Terminal window:
Code:
fastboot flash recovery /home/<your-user-name>/AndroidSDK/platform-tools/recovery-clockwork-herring.img
5. Use the Volume +/- buttons to choose the Recovery option, then press the power button.
6. In Recovery, go to 'mounts and storage' and choose 'mount USB storage'.
7. Go to this page: http://forum.xda-developers.com/showthread.php?t=682828
About 1/5 of the way down on that page, find the link for "su-2.3.6.1-ef-signed.zip", which is the link for the Froyo version of Superuser. Control-click (right click) on that link and choose "Download Link As..." Save that file to your desktop and then copy it to the main directory of your mounted phone.
8. Click 'Unmount'. Go back to 'mounts and storage' and choose 'mount /system'. Then Go Back and choose 'install zip from sdcard'>'choose zip from sdcard'>su-2.3.6.1-ef-signed.zip
9. When it's finshed installing, reboot. You are now rooted.
Special Thanks
Amin Sabet; I used your Mac guide as a reference and copy/pasted some things for convenience.
Koush; For first posting the unlocking information, developing ClockworkMod Recovery, and ROM Manager. You should probably hook him up with a donation. https://www.paypal.com/us/cgi-bin/w...63663d3faee8d9384d85353843a619606282818e091d0
Michael.B.; for suggesting adding the platform-tools folder to the .bashrc file.
Linus Torvalds; Without which we'd have neither Android nor Ubuntu.
Feel free to leave your comments on the guide below.
Good guide for beginners, I would throw in how to update their path so they can just type adb or fastboot
On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ and platform-tools directories to it. If you don't see a line setting the path, you can add one:
export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools
Click to expand...
Click to collapse
Be sure to update your username above.
Thanks a lot man, great guide. I didn't get my NS yet but this is gonna be very useful soon
ps: someone please stick this
Michael.B. said:
Good guide for beginners, I would throw in how to update their path so they can just type adb or fastboot
Be sure to update your username above.
Click to expand...
Click to collapse
Thanks for the tip. I added your tip and instructions for marking fastboot as executable.
Stuck due to the thread's usefulness
I forgot to ask: will this work for 64 bit systems?
nicholasbgr said:
I forgot to ask: will this work for 64 bit systems?
Click to expand...
Click to collapse
It should work just fine.
Thanks, got me rooted nice and quickly.
BlackOtaku said:
It should work just fine.
Click to expand...
Click to collapse
Yes but don't forget to install 32 libs.
Thanks for guide
Useful !
I'm waiting for cyanogen ROM so i'll able to install
Cheers
To confirm, yes it works on 64bit. I am running that
Thanks for the confirmation, guys
Good stuff, much appreciated.
I'm working on a simple shell script that should automate some of the more menial tasks while holding the user's hand through the process. I should have it up later today.
UPDATE: It's up! Link on the first page.
Sent from my Nexus S using XDA App
question:
If I use
Code:
fastboot boot recovery.img
instead of
Code:
fastboot flash recovery recovery.img
will i get OTA updates?
confiq said:
question:
If I use
Code:
fastboot boot recovery.img
instead of
Code:
fastboot flash recovery recovery.img
will i get OTA updates?
Click to expand...
Click to collapse
Or, I don't get OTA until i change OS with zip file (ex: su app) ?
confiq said:
Or, I don't get OTA until i change OS with zip file (ex: su app) ?
Click to expand...
Click to collapse
You shouldn't flash the recovery in the boot partition, I think that will cause problems with the phone period. :S
If you flash a custom boot.img (which this guide doesn't cover, though the script will flash Superboot) or kernel like Paul's Superboot, Supercurio's Voodoo Kernel, or Koush's insecure boot.img, OTA updates will fail to install. OTA updates will also reflash your recovery back to stock. One of the devs around here will probably start modifying them so they don't check the boot.img or reflash the recovery though.
Thanks for this! Worked perfectly
Hi all,
I have a strange problem. I can install ClockworkMod recovery but, when I reboot the phone, I don't have superuser installed and su doesn't work. If I reboot the phone, I have to install the recovery every time. It seems it isn't permanent.
Thanks
Matroska
matroska said:
Hi all,
I have a strange problem. I can install ClockworkMod recovery but, when I reboot the phone, I don't have superuser installed and su doesn't work. If I reboot the phone, I have to install the recovery every time. It seems it isn't permanent.
Thanks
Matroska
Click to expand...
Click to collapse
To fix the problem, before selecting zip file, you have to select mount /system. Then go to apply update.zip and proceed as usual.
Thanks
ok im stock
with this part fastboot oem unlock ware i put this code in my terminal of my pc ,,i put the cell in fasboot , i intall everiting if i put that code in my terminal
bash: /home/toshiba/.bashrc: line 2: syntax error near unexpected token `('
bash: /home/toshiba/.bashrc: line 2: `export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools# ~/.bashrc: executed by bash(1) for non-login shells.'
[email protected]:~$ fastboot oem unlock
fastboot: command not found
[email protected]:~$
what can i do or im doing wrong

No OS but only CWM recovery

I want to flash a rom but i can't save the zip files to my storage. What do i do?
I have no os but only cwm. Please help, thanks.
dicksonjoe said:
I want to flash a rom but i can't save the zip files to my storage. What do i do?
I have no os but only cwm. Please help, thanks.
Click to expand...
Click to collapse
ADB Sideload
1. Connect your phone make sure it's actually connected. No errors in Device Manager
2. Rename the downloaded ROM you want to flash to something basic, like rom.zip (Names can get rather long)
3. Open CMD (command prompt), & navigate it to the folder you placed the ROM in. or just press shift and right click on the folder where the rom is and select open command prompt here
4. Boot to recovery on your phone and enable the ADB sideload function. Under Advanced in TWRP...not sure about CWM
5. in CMD type adb sideload rom.zip or what ever the name of the .zip is
6. Let TWRP or CWM flash the zip and prompt for reboot.
7. Reboot and be happy, your phone is fixed!
You can then transfer the gapps to your internal storage and flash the normal way through your reecovery or just go through the same process for the gapps after you flash the rom.
I am having trouble installing the adb file.
I don't know what mode my phone needs to be on in order to install adb file.
dicksonjoe said:
I am having trouble installing the adb file.
I don't know what mode my phone needs to be on in order to install adb file.
Click to expand...
Click to collapse
Installing adb doesnt have to do with what mode your phone is in.

help please

i format my Nexus 4 on twrp recovery using advance wipe and i checked all the box there, and when i rebooted its stuck on google logo, what should i do?
Well why would you do that? If you selected everything under advanced in twrp, that means that you have also wiped the system partition so there is no rom to boot into, hence why you are stuck at the google logo. You will need to use adb to copy a rom onto your phone, and then flash it via twrp. Instructions:
1. Setup adb: http://www.redmondpie.com/how-to-set-up-android-adb-and-fastboot-on-windows-tutorial/
2. Install Koush's universal adb driver (google this for the download)
3. Put the phone into twrp
4. Download a rom on your pc and move it to your desktop. Rename it to "rom.zip".
5. Open a command prompt window and run the following commands:
Code:
adb devices
If your phones serial number shows up, continue. If not, reinstall drivers.
Code:
cd Desktop
adb push rom.zip /sdcard/
6. After its finished pushing, go to install within twrp and flash it.
when i typed in cd desktop it says "The system cannot find the path specified". and when i continue to adb push rom.zip /sdcard/ it says "cannot stat rom.zip: no such file or directory"
it worked, thanks for your help.
I hope you realized when you checked all the boxes, you checked to wipe the internal storage which holds all your personal data.
And you checked to wipe /system partition which house the operating system, of course there wouldn't be anything to boot into.
sent from xda premium app

Remove root from 6T

Hi guys!
I need to remove magisk, root and lock the booloader for my device. How can I do it?
Thanks
Download the Magisk uninstall zip (same site where you load the Magisk zip file or see the how to root threads) and flash it with twrp (same way as you flashed the Magisk zip or see the how to root threads).
Next do the same as you did to unlock the bootloader, change the command from unlock to lock.
That should do it.
Sent from my OnePlus6T using XDA Labs
-MrMM- said:
Download the Magisk uninstall zip (same site where you load the Magisk zip file or see the how to root threads) and flash it with twrp (same way as you flashed the Magisk zip or see the how to root threads).
Next do the same as you did to unlock the bootloader, change the command from unlock to lock.
That should do it.
Sent from my OnePlus6T using XDA Labs
Click to expand...
Click to collapse
so I don't need to flash strock rom?
thanks!
lele90 said:
so I don't need to flash strock rom?
thanks!
Click to expand...
Click to collapse
EDIT: I'm not able to unistall it due to: "I cannot access /data please uninstall with Magisk Manager"
Currently I did a factory reset, software install (from 6t settings) and lock bootloader...
I was not able to unistall magisk with ZIP
lele90 said:
Hi guys!
I need to remove magisk, root and lock the booloader for my device. How can I do it?
Thanks
Click to expand...
Click to collapse
If you cannot get the unroot/un-install for Magisk to work you can do it manually. Here is how using Linux, sorry not a windows user, so you need to find a utility to unzip the GZ file if this is the case, 7zip? The /data folder contains your backup and when you boot the device up normally you can pull the file down to your PC , then use fastboot to flash the un-=compressed boot image back to A or B (or both) sides.
1. adb shell to the rooted device and type $su to enter super user, $ cd /data to look at the data folder.
2. Locate the img.gz file with the long name such as stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz and copy it to your sdcard folder so you can pull it off the handset. Use $cp /data/stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz /sdcard/ . exit from the shell and back to the pc
3. de-compress the stock_boot file to boot.img. using $gunzip stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz
4. start the device in fastboot mode, using adb you can type $ adb reboot bootloader or hold power and vol-
5. $ fastboot flash boot_a stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img
This will restore your un-patched boot image
PulpoRojo said:
If you cannot get the unroot/un-install for Magisk to work you can do it manually. Here is how using Linux, sorry not a windows user, so you need to find a utility to unzip the GZ file if this is the case, 7zip? The /data folder contains your backup and when you boot the device up normally you can pull the file down to your PC , then use fastboot to flash the un-=compressed boot image back to A or B (or both) sides.
1. adb shell to the rooted device and type $su to enter super user, $ cd /data to look at the data folder.
2. Locate the img.gz file with the long name such as stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz and copy it to your sdcard folder so you can pull it off the handset. Use $cp /data/stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz /sdcard/ . exit from the shell and back to the pc
3. de-compress the stock_boot file to boot.img. using $gunzip stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz
4. start the device in fastboot mode, using adb you can type $ adb reboot bootloader or hold power and vol-
5. $ fastboot flash boot_a stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img
This will restore your un-patched boot image
Click to expand...
Click to collapse
MMM sorry I'm not a linux user...
But is enough to do a factory reset, restore the firmware (via software update in settings menu) ? Or I need to flash the stock firmware in that way: https://forum.xda-developers.com/oneplus-6t/how-to/rom-stock-fastboot-roms-oneplus-6t-t3862516 ?
lele90 said:
MMM sorry I'm not a linux user...
But is enough to do a factory reset, restore the firmware (via software update in settings menu) ? Or I need to flash the stock firmware in that way: https://forum.xda-developers.com/oneplus-6t/how-to/rom-stock-fastboot-roms-oneplus-6t-t3862516 ?
Click to expand...
Click to collapse
Try to flash the entire update file from OnePlus.com:
https://www.oneplus.com/support/softwareupgrade/details?code=9
Download the file, place it in your root internal storage (the parent dir of the Downloads folder), and flash it locally from the settings>system update>local upgrade menu.
ducted said:
Try to flash the entire update file from OnePlus.com:
https://www.oneplus.com/support/softwareupgrade/details?code=9
Download the file, place it in your root internal storage (the parent dir of the Downloads folder), and flash it locally from the settings>system update>local upgrade menu.
Click to expand...
Click to collapse
Already done and then locked my bootloader! Thanks
lele90 said:
Hi guys!
I need to remove magisk, root and lock the booloader for my device. How can I do it?
Thanks
Click to expand...
Click to collapse
Why do you want to do all that? You can prevent applications from detecting root access using magisk. Just saying...
papadi said:
Why do you want to do all that? You can prevent applications from detecting root access using magisk. Just saying...
Click to expand...
Click to collapse
It does not work for my Home banking app ... I need it!
PulpoRojo said:
If you cannot get the unroot/un-install for Magisk to work you can do it manually. Here is how using Linux, sorry not a windows user, so you need to find a utility to unzip the GZ file if this is the case, 7zip? The /data folder contains your backup and when you boot the device up normally you can pull the file down to your PC , then use fastboot to flash the un-=compressed boot image back to A or B (or both) sides.
1. adb shell to the rooted device and type $su to enter super user, $ cd /data to look at the data folder.
2. Locate the img.gz file with the long name such as stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz and copy it to your sdcard folder so you can pull it off the handset. Use $cp /data/stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz /sdcard/ . exit from the shell and back to the pc
3. de-compress the stock_boot file to boot.img. using $gunzip stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz
4. start the device in fastboot mode, using adb you can type $ adb reboot bootloader or hold power and vol-
5. $ fastboot flash boot_a stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img
This will restore your un-patched boot image
Click to expand...
Click to collapse
I tried this and now am stuck on the unlocked bootloader screen (where is says your boot loader is unlocked and software integrity cannot be guarenteed...), any ideas?
dipole said:
I tried this and now am stuck on the unlocked bootloader screen (where is says your boot loader is unlocked and software integrity cannot be guarenteed...), any ideas?
Click to expand...
Click to collapse
Did you press power off button? if yes, you stopped the boot...
PulpoRojo said:
If you cannot get the unroot/un-install for Magisk to work you can do it manually. Here is how using Linux, sorry not a windows user, so you need to find a utility to unzip the GZ file if this is the case, 7zip? The /data folder contains your backup and when you boot the device up normally you can pull the file down to your PC , then use fastboot to flash the un-=compressed boot image back to A or B (or both) sides.
1. adb shell to the rooted device and type $su to enter super user, $ cd /data to look at the data folder.
2. Locate the img.gz file with the long name such as stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz and copy it to your sdcard folder so you can pull it off the handset. Use $cp /data/stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz /sdcard/ . exit from the shell and back to the pc
3. de-compress the stock_boot file to boot.img. using $gunzip stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img.gz
4. start the device in fastboot mode, using adb you can type $ adb reboot bootloader or hold power and vol-
5. $ fastboot flash boot_a stock_boot_c875a8ab786c64b38c6e87ffc1911f4e7b274142.img
This will restore your un-patched boot image
Click to expand...
Click to collapse
lele90 said:
Did you press power off button? if yes, you stopped the boot...
Click to expand...
Click to collapse
I forgot the _a after boot (boot_a). i just rerooted to fix my issue so haven't tried with the correct boot_a.
Question though, shouldn't that be boot_a and boot_b? still trying to get my head around the two slots..
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img

[Guide] OnePlus 8T EASY ROOT (for all unlocked variants)

DO NOT FOLLOW THIS GUIDE IF YOU HAVE ANDROID 12
Visit this thread for more information
________________________________________________________
CAVEAT
I've only tested this on my device running Android 11 (KB2005 / KB05AA), but it should be universally helpful as it's using your own boot.img so there's no need to find a matching package for your variant and os version.
CREDIT
The steps were buried across a few threads, I'm posting this so it'll be easier for others to find the information. All credit goes to xb360, FullOfHell, and TheUnkn0wn.
INFO​The basic rundown is:
Use the semi-broken TWRP package to give yourself temporary su access through adb.
Extract the boot.img your phone is currently using to your pc.
Reboot to OxygenOS, copy over the boot.img you just extracted and then use Magisk to patch it.
Copy the boot.img back to your pc and use adb to temporarily boot your phone with it, giving you root access until reboot.
Use your temporary root access to allow Magisk to patch your internal as-yet unmodified boot.img to give you permanent root.
There seems to be some confusion in the thread, I'll try to clear up what's happening and why:
The primary issue at hand is that you can't root your device without already having root privileges, for security reasons. Without a custom recovery like TWRP, there are a few more steps than usual (but mostly simple stuff).​
Because we don't flash anything with this guide, it shouldn't cause any permanent bootloops if you use the wrong boot.img, if you get stuck in one just power cycle your phone. ​
Updating with OTAs should be the same process as the other guides here.​
Because of changes in Android, devices that launched with Android 10 and above will not allow you to modify the system partition, even with root. This is not a fault of this rooting method.​
Prerequisites:
ADB and Fastboot installed.​
An unlocked bootloader and USB debugging enabled.​
Android 11. (Android 12 introduced problems with this method, per other users. See link at top of page)​
________________________________________________________
STEPS:​
1. Connect your phone to your pc and boot it into fastboot mode. You can leave it connected throughout this guide.
2. On your computer open a terminal/cmd prompt. Set the directory (on your pc) you want to work from, I'm using the desktop:
for Windows, type cd C:\Users\Yourname\Desktop​for Mac, type cd desktop or cd /Users/yourname/Desktop​
Spoiler: How to set up adb and fastboot properly
To usb adb and fastboot commands outside of the folder those programs are located in, you'll need to add their location to the PATH list so your terminal can still find them when it's pointing to a different folder. If you want to skip this step, set the directory to the folder that contains adb instead of the desktop.
3. Next, use the terminal to check which A/B partition is active on your phone:
Code:
fastboot getvar all
a. You'll find it on this line: (bootloader) current-slot:a/b​b. For simplicity I'll be referring to boot_a.img throughout the guide, make sure to use boot_b.img if that's the one marked as active on your device. ​​
4. Download the semi-broken TWRP package to your desktop. We'll be using it to extract a copy of your active boot_a.img. It will give you temporary su access via adb, but there won't be a gui. Only boot from it, DO NOT FLASH IT:
Code:
fastboot boot recovery.img
adb shell
dd if=/dev/block/by-name/boot_a of=/sdcard/boot_a.img
exit
adb pull /sdcard/boot_a.img boot_a.img
adb reboot
5. Copy the extracted boot_a.img file to a user accessible area of your phone, like your downloads folder.
6. Install the latest Magisk Canary apk on your phone. Open it and:
a. Select the Install option.​b. Use Select and Patch a File on boot_a.img​
7. Copy the patched magisk_patched_a.img file back to your computer. In terminal, type adb reboot bootloader to get back to fastboot mode.
8. Temporarily boot with the patched image that corresponds to the active partition, DO NOT FLASH IT:
Code:
fastboot boot magisk_patched_a.img
Spoiler: Why we're booting and not flashing.
You could flash this boot.img, but it's safer to temporarily boot from it without overwriting your existing image in case anything went wrong along the way. The effect is that you still get root access without modifying your device, and then you can use the much safer Magisk direct install option, which has some safeguards in place.
9. By booting with the patched image, you now have temporary root access. To make it permanent open Magisk:
a. Select the Install option.​b. Use Direct Install (Recommended) to root your internal boot.img​
10. Reboot and verify it worked.
Forgot to tag it... if an admin is able to do so I'd appreciate it.
Just applied for a bootloader unlock today. When i get approved ill attempt this guide.
I am currently on T-Mobile 11.0.5.7.KB09CB.
Unlike other methods prvoided here for the 8T I got this method to work. Thank you very much!
clarification update: I own the t-mobile kb2007 model of phone
a couple of notes for any either newBs or old OPO users rejoining the party with a new onplus phone..
Some prework I had to do for my OnePlus 8T KB2005
-ensure you have the correct ADB driver installed, I installed the "15sec adb installer 1.4.2" found here on xda, watch the videos provided.
-ensure to unlock your bootloader first (*this will wipe your device.. didn't think about that..no pain no gain...)
-With device in bootloader/fastboot, run: fastboot flashing unlock
-verify with your phone to accept
-phone will reboot, just through the setup, I just skipped it all and opted for offline setup..
-renable OEM lock and USB debug
-restart back into bootloader/fastboot
-now you are ready to root
Just came here to say that this is the most genius way to go about it and thanks OP for this solution. To add your screen would flicker in TWRP but you just want to type adb reboot bootloader after you are done copying off the boot files from your phone. Thanks OP!
After performing this, I am unable to write to /system even with root?
Unable to get through with es explorer, root explorer pro, or even use a app like Titanium to move a user app to system,unable to get r/w access.
Thanks in advance
lordxcom said:
After performing this, I am unable to write to /system even with root?
Unable to get through with es explorer, root explorer pro, or even use a app like Titanium to move a user app to system,unable to get r/w access.
Thanks in advance
Click to expand...
Click to collapse
I'm having the same issue although its more tied in with removing youtube as a system app for vanced
lordxcom said:
After performing this, I am unable to write to /system even with root?
Unable to get through with es explorer, root explorer pro, or even use a app like Titanium to move a user app to system,unable to get r/w access.
Thanks in advance
Click to expand...
Click to collapse
Actually Is not possible on devices borned with android 10 or above.
giacomowrc said:
Actually Is not possible on devices borned with android 10 or above.
Click to expand...
Click to collapse
To be clear, you're saying this isn't a fault with this root method and is just a security measure since Android 10?
Mpolo87 said:
To be clear, you're saying this isn't a fault with this root method and is just a security measure since Android 10?
Click to expand...
Click to collapse
Yes of course.
Mpolo87 said:
CAVEAT
I've only tested this on my device (KB2005 / KB05AA), but it should be universally helpful as it's using your own boot.img so there's no need to find a matching package for your variant.
CREDIT
The steps were buried across a few threads, I'm posting this so it'll be easier for others to find the information. All credit goes to xb360, FullOfHell, and TheUnkn0wn.
INFO​The basic rundown is:
Use the semi-broken TWRP package to give temporary su access through adb.​
Extract boot_a.img and boot_b.img to your computer.​
Reboot into OxygenOS and copy boot_a.img and boot_b.img back to your phone.​
Use Magisk to patch both images.​
Copy the patched images back to your computer.​
Use fastboot to temporarily boot using the patched image, giving you temporary root.​
Use Magisk to direct install for permanent root.​
Prerequisites:
ADB and Fastboot installed.​
An unlocked bootloader and USB debugging enabled.​
________________________________________________________
STEPS:​
1. Get the semi-broken TWRP .img. This won't give you a gui but will give you su access over adb. You DON'T want to flash this, we're just booting with it temporarily.
2. Restart your phone into fastboot mode.
3. On your computer open a terminal/cmd prompt and set the directory where you want to dump the files (ex: cd /your/path/here). Run the following:
Code:
fastboot boot recovery.img
adb shell
dd if=/dev/block/by-name/boot_a of=/sdcard/boot_a.img
dd if=/dev/block/by-name/boot_b of=/sdcard/boot_b.img
exit
adb pull /sdcard/boot_a.img boot_a.img
adb pull /sdcard/boot_b.img boot_b.img
4. Copy the extracted files to a user accessible area of your phone.
5. Install the latest Magisk Canary release to your phone.
a. Select the Install option.​b. Use Select and Patch a File on both boot_a.img and boot_b.img​c. You should rename them or make note of the new names given by Magisk. You'll need to use one or the other depending on which partition is active. ​
6. Copy the patched .img files back to your computer.
7. Restart your phone back into fastboot mode.
8. On your computer, run:
Code:
fastboot getvar all
9. Find which A/B partition is active on this line: (bootloader) current-slot:a/b
10. Temporarily boot with the patched image that corresponds to the active partition, DO NOT FLASH IT:
Code:
fastboot boot patched-boot-a/b.img
11. You now have temporary root access, to make it permanent open Magisk:
a. Select the Install option.​b. Use Direct Install (Recommended) to root your internal boot.img​
12. Reboot and verify it worked.
Click to expand...
Click to collapse
hey there! I was just about to try this method but confused with this syntax -- don't mind the quotes
"On your computer open a terminal/cmd prompt and set the directory where you want to dump the files (ex: cd /your/path/here)"
I'm painfully confused about this: cd /your/path/here. is this done during fastboot? I know fastboot commands but adb is where my brain doesn't get it. Please elaborate further and thanks.
sameog said:
hey there! I was just about to try this method but confused with this syntax -- don't mind the quotes
"On your computer open a terminal/cmd prompt and set the directory where you want to dump the files (ex: cd /your/path/here)"
I'm painfully confused about this: cd /your/path/here. is this done during fastboot? I know fastboot commands but adb is where my brain doesn't get it. Please elaborate further and thanks.
Click to expand...
Click to collapse
When you open a terminal or command prompt on your computer it is, by default, 'pointing' to a certain folder. Since we're pulling files from the phone to pc it'll dump there, so it's easiest to set the location in advance, for your own convenience. You can just make a folder on your desktop and drag it onto the terminal window to automatically input that path after typing cd, which just means 'change directory'. This isn't a fastboot or adb thing, just a feature of terminals, so you'd do this in advance.
Mpolo87 said:
When you open a terminal or command prompt on your computer it is, by default, 'pointing' to a certain folder. Since we're pulling files from the phone to pc it'll dump there, so it's easiest to set the location in advance, for your own convenience. You can just make a folder on your desktop and drag it onto the terminal window to automatically input that path after typing cd, which just means 'change directory'. This isn't a fastboot or adb thing, just a feature of terminals, so you'd do this in advance.
Click to expand...
Click to collapse
Attached are 2 photos -- the 1st photo is the "before" I dragged my intended folder into command prompt. the 2nd photo is the "after" I dragged my intended folder into command prompt. Still hella confused.
Please note: I love this guide. It's cohesive and well-written. I just need pictures to "see" on what and where to do. I'm visual.
UPDATE: I followed the tuturial to the best of my ability and I got nothing. I'm giving up and taking a step back.
PS C:\Program Files (x86)\platform-tools_r30.0.5-windows> ./fastboot boot recovery.img
Sending 'boot.img' (64964 KB) OKAY [ 1.660s]
Booting OKAY [ 0.084s]
Finished. Total time: 1.939s
PS C:\Program Files (x86)\platform-tools_r30.0.5-windows> ./adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
OnePlus8T:/ # dd if=/dev/block/by-name/boot_a of=/sdcard/boot_a.img
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.194981 s, 492 M/s
OnePlus8T:/ # dd if=/dev/block/by-name/boot_b of=/sdcard/boot_b.img
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.185497 s, 518 M/s
OnePlus8T:/ # exit
PS C:\Program Files (x86)\platform-tools_r30.0.5-windows> ./adb pull /sdcard/boot_a.img boot_a.img
/sdcard/boot_a.img: 1 file pulled, 0 skipped. 27.7 MB/s (100663296 bytes in 3.470s)
PS C:\Program Files (x86)\platform-tools_r30.0.5-windows> ./adb pull /sdcard/boot_b.img boot_b.img
/sdcard/boot_b.img: 1 file pulled, 0 skipped. 32.0 MB/s (100663296 bytes in 2.997s)
PS C:\Program Files (x86)\platform-tools_r30.0.5-windows> ./adb reboot
PS C:\Program Files (x86)\platform-tools_r30.0.5-windows>
sameog said:
Attached are 2 photos -- the 1st photo is the "before" I dragged my intended folder into command prompt. the 2nd photo is the "after" I dragged my intended folder into command prompt. Still hella confused.
Click to expand...
Click to collapse
You're missing the command "cd" before the path to change the directory to the new one. It should be cd C:\Users\Mr. Lew\Desktop\oneplus 8t boot image then press enter. Now you can reference any file in that folder by just the name without its entire path as a prefix being required.
A difficult method
zengin said:
Diğer yöntemden hiç de kolay değil.
Click to expand...
Click to collapse
huh?
Honestly, if there's a kind of soul out there who can share their unpatched kb2007 boot image (tmobile version), I would greatly appreciate it. I'm been banging my head on the wall with this for about 2 months with no help. I've received TONS of half-baked one liner answers but no "full-scale" tutorial. I'm giving up on this.
NOTE: I'm just frustrated guys. Not bashing the OP. It shouldn't be this hard but it became this way.
sameog said:
Honestly, if there's a kind of soul out there who can share their unpatched kb2007 boot image (tmobile version), I would greatly appreciate it. I'm been banging my head on the wall with this for about 2 months with no help. I've received TONS of half-baked one liner answers but no "full-scale" tutorial. I'm giving up on this.
NOTE: I'm just frustrated guys. Not bashing the OP. It shouldn't be this hard but it became this way.
Click to expand...
Click to collapse
While this is a temporary solution, it is also a bad solution because you can land with not being able to boot your phone every time an incremental update comes along.

Categories

Resources