THIS GUIDE IS FOR THE T-MOBILE ONEPLUS 8 5G ONLY!!!!
This method has only been tested on the above mentioned device. It may be possible to use *parts* of this guide on other oneplus/android devices, but you do so at your own risk!
Furthermore no warranty or liability of any kind is offered or implied for any damages to any person(s), devices, or other property by following, or otherwise using any information contained in this guide be it inaccurate information or otherwise.
By using this guide you're agreeing to these terms.
MAKE SURE TO READ THROUGH THE ENTIRE GUIDE BEFORE ATTEMPTING TO FOLLOW IT!
That said I've done my best to ensure this guide is an accurate representaion of the steps I followed to do the things laid out in this guide.
Required items:
Bootloader unlock token from OnePlus.
adb fastboot drivers installed to path. (Not provided)
Now that all that is out of the way. Let's get started!
Rooting with provided boot.imgThis method has only been tested on the above mentioned device. It may be possible to use *parts* of this guide on other oneplus/android devices, but you do so at your own risk!
Furthermore no warranty or liability of any kind is offered or implied for any damages to any person(s), devices, or other property by following, or otherwise using any information contained in this guide be it inaccurate information or otherwise.
By using this guide you're agreeing to these terms.
MAKE SURE TO READ THROUGH THE ENTIRE GUIDE BEFORE ATTEMPTING TO FOLLOW IT!
That said I've done my best to ensure this guide is an accurate representaion of the steps I followed to do the things laid out in this guide.
Required items:
Bootloader unlock token from OnePlus.
adb fastboot drivers installed to path. (Not provided)
Now that all that is out of the way. Let's get started!
1. Make sure that you are running some version of Android 11 via Settings>About phone.
2. Take note of your Build Number you'll need that later.
3. Click on build number five times to enable developer options.
4. Navigate to developer options under Settings>System>Developer options.
Turn on oem unlocking, as well as usb debugging & turn off automatic updates.
5. Open a cmd prompt on your pc, or terminal on linux. Enter the following lines.
*Check the always allow from this device checkbox then hit allow.
You should see your device listed. If it says unrecognized re-enter the line above.
*Your device should reboot into fastboot. Once it has proceed.
6. Now we must unlock the bootloader. cd to the directory where you have saved your unlock token.
For example if you saved it to the Desktop of a windows machine the directory would most likely be
users/*yourusernamehere*/Desktop.
7. Enter the following lines. One at a time.
*Follow the prompts on your device to unlock your bootloader *****THIS WILL WIPE YOUR DEVICE SO MAKE SURE TO BACKUP YOUR DATA*****
8. Get past setup on your device re-enable developer options, and usb debugging, turn off automatic updates.
9. Follow the process to get back into fastboot via adb.
10. Remember your build number. Download the boot image that matches your build number here:
https://www.androidfilehost.com/?w=files&flid=322713
(I've only tested this on the device I pulled from, but unless something drastic has changed since the last time I dealt with stuff like this these should work fine as long as the device is a Tmobile OP8, and the build number is the same.)
(I will try to keep this updated as new updates are released, but work keeps me rather busy so it may not always be quickly.)
11. Now open a cmd prompt (if you haven't already) navigate to where you saved the boot img. Enter the following.
*You see your device listed in that case proceed.
*If the process completes without errors then continue
then
*If the process completes without errors then continue
finally
12. Your device should boot up. Install the magisk manager app if it is not installed. Open MM & follow the prompts to finish setup. Enable magisk hide, and reboot. SafetyNet should pass.
Congrats! You have a Tmobile Oneplus 8 with root!
2. Take note of your Build Number you'll need that later.
3. Click on build number five times to enable developer options.
4. Navigate to developer options under Settings>System>Developer options.
Turn on oem unlocking, as well as usb debugging & turn off automatic updates.
5. Open a cmd prompt on your pc, or terminal on linux. Enter the following lines.
Code:
adb devices
*Check the always allow from this device checkbox then hit allow.
You should see your device listed. If it says unrecognized re-enter the line above.
Code:
adb reboot bootloader
*Your device should reboot into fastboot. Once it has proceed.
6. Now we must unlock the bootloader. cd to the directory where you have saved your unlock token.
For example if you saved it to the Desktop of a windows machine the directory would most likely be
users/*yourusernamehere*/Desktop.
7. Enter the following lines. One at a time.
Code:
fastboot flash cust-unlock unlock_code.bin
Code:
fastboot oem unlock
*Follow the prompts on your device to unlock your bootloader *****THIS WILL WIPE YOUR DEVICE SO MAKE SURE TO BACKUP YOUR DATA*****
8. Get past setup on your device re-enable developer options, and usb debugging, turn off automatic updates.
9. Follow the process to get back into fastboot via adb.
10. Remember your build number. Download the boot image that matches your build number here:
https://www.androidfilehost.com/?w=files&flid=322713
(I've only tested this on the device I pulled from, but unless something drastic has changed since the last time I dealt with stuff like this these should work fine as long as the device is a Tmobile OP8, and the build number is the same.)
(I will try to keep this updated as new updates are released, but work keeps me rather busy so it may not always be quickly.)
11. Now open a cmd prompt (if you haven't already) navigate to where you saved the boot img. Enter the following.
Code:
fastboot devices
Code:
fastboot flash boot_a boot.img
then
Code:
fastboot flash boot_b boot.img
finally
Code:
fastboot reboot
12. Your device should boot up. Install the magisk manager app if it is not installed. Open MM & follow the prompts to finish setup. Enable magisk hide, and reboot. SafetyNet should pass.
Congrats! You have a Tmobile Oneplus 8 with root!
Using/Acquiring your own boot.img
This section of the guide will assume you are familiar with using adb/adb shell commands, as well as being familiar with android, and other terms.
To put it plainly it will be a lot less hand holdy lol. This process requires root. So technically you won't be required to pull you're own image.
However it should be noted that doing so will streamline the process for later in the event that you need to restore to stock, and re-root later on.
*****YOU MUST BEGIN ON ANDROID 10 TO USE THIS METHOD*****
If you are not downgrade via the msmtool, re-unlock your bootloader & make sure automatic updates are disabled in developer options.
Let's begin.
1. Connect your phone to your pc with usb debugging enabled & reboot into fastboot.
2. Copy a Magisk zip file to your internal storage.
3. Boot the latest twrp (DO NOT TRY TO BOOT OR INSTALL TWRP ON AN ANDROID 11 DEVICE TWRP DOES NOT CURRENTLY SUPPORT IT!!!!)
4. Flash the magisk zip and reboot.
5. Download & install the latest update, but do not reboot.
6. Open magisk click install>Install to inactive slot(after ota).
*Before rebooting make a note of which slot magisk says it's installing to.
We will need this later to know which boot image slot to pull from.
7. Reboot through magisk.
*You should now be on the latest update with root.
8.Open a cmd prompt and enter the following
then
*grant the su request on your device.
9. Now we must find the location of both boot paritiions. Enter the following
10. This will display a list of all partitions on the device there are 2 we must make a note of, and 1 that is optional but highly recommended.
These are boot_a, boot_b, and optionally persist.
Open a notepad, and copy and those lines into a txt document and save.
(You can optionally delete the part of the lines before boot_a, boot_b etc. To make it easier to read.)
11. Now whichever slot magisk flashed to is what we need to pull from open your previously saved txt document, and find the path to which slot it is
Ex: /dev/block/******
12. In the command propt enter the following.
NOTE: If you wish to backup your persist partition then repeat step 12. Replacing the "if" path with that of the persist partition you made note of earlier, and the boot.img part of the "of" path with persist.img.
13. Copy those files from your internal storage to your pc using explorer or adb pull -p from the command prompt in the directory you would like them stored.
And that's it Congrats! You've learned how to pull your own boot.img from your device, and have root on android 11!
If you ever need to restore from stock you can just update back to android 11, and flash your boot images via fastboot.
Note: I would recommend storing your boot images in folders named as the Build Number to ensure you don't mix them up. YOU WILL NEED TO REPULL YOUR BOOT IMAGES AFTER EVERY UPDATE!
To put it plainly it will be a lot less hand holdy lol. This process requires root. So technically you won't be required to pull you're own image.
However it should be noted that doing so will streamline the process for later in the event that you need to restore to stock, and re-root later on.
*****YOU MUST BEGIN ON ANDROID 10 TO USE THIS METHOD*****
If you are not downgrade via the msmtool, re-unlock your bootloader & make sure automatic updates are disabled in developer options.
Let's begin.
1. Connect your phone to your pc with usb debugging enabled & reboot into fastboot.
2. Copy a Magisk zip file to your internal storage.
3. Boot the latest twrp (DO NOT TRY TO BOOT OR INSTALL TWRP ON AN ANDROID 11 DEVICE TWRP DOES NOT CURRENTLY SUPPORT IT!!!!)
Code:
fastboot boot recovery "twrp.img"
*****replace twrp.img with the filename of your twrp minus the quotes.*****
4. Flash the magisk zip and reboot.
5. Download & install the latest update, but do not reboot.
6. Open magisk click install>Install to inactive slot(after ota).
*Before rebooting make a note of which slot magisk says it's installing to.
We will need this later to know which boot image slot to pull from.
7. Reboot through magisk.
*You should now be on the latest update with root.
8.Open a cmd prompt and enter the following
Code:
adb shell
then
Code:
su
9. Now we must find the location of both boot paritiions. Enter the following
Code:
ls /dev/block/bootdevice/by-name/ -all
10. This will display a list of all partitions on the device there are 2 we must make a note of, and 1 that is optional but highly recommended.
These are boot_a, boot_b, and optionally persist.
Open a notepad, and copy and those lines into a txt document and save.
(You can optionally delete the part of the lines before boot_a, boot_b etc. To make it easier to read.)
11. Now whichever slot magisk flashed to is what we need to pull from open your previously saved txt document, and find the path to which slot it is
Ex: /dev/block/******
12. In the command propt enter the following.
Code:
dd if=/dev/block/***** of=/sdcard/boot.img
*****Replace the "*'s" with the rest of the path for the slot you need!*****
NOTE: If you wish to backup your persist partition then repeat step 12. Replacing the "if" path with that of the persist partition you made note of earlier, and the boot.img part of the "of" path with persist.img.
13. Copy those files from your internal storage to your pc using explorer or adb pull -p from the command prompt in the directory you would like them stored.
And that's it Congrats! You've learned how to pull your own boot.img from your device, and have root on android 11!
If you ever need to restore from stock you can just update back to android 11, and flash your boot images via fastboot.
Note: I would recommend storing your boot images in folders named as the Build Number to ensure you don't mix them up. YOU WILL NEED TO REPULL YOUR BOOT IMAGES AFTER EVERY UPDATE!
Updating in the future
To update to new Android versions & keep root follow these steps.
1. Make sure automatic updates in developer options are off.
2. Download and install the update, BUT DO NOT REBOOT.
3. Open magisk select install>Install to inactive slot(after ota).
4. Reboot through magisk.
5. You should reboot into the update with root preserved.
6. Pull the new patched boot image if you wish.
1. Make sure automatic updates in developer options are off.
2. Download and install the update, BUT DO NOT REBOOT.
3. Open magisk select install>Install to inactive slot(after ota).
4. Reboot through magisk.
5. You should reboot into the update with root preserved.
6. Pull the new patched boot image if you wish.
A few things to leave you with.
It's been a while since I've dabbled with this side of development (I've mostly been focusing on app development, and occasionally magisk rom development.)
So.
Some things, and processes in this guide may change as future updates occur.
I'll try to update it as neccesary, but my work usually keeps me pretty busy.
Don't be afraid to ask any questions or suggest any corrections to this guide.
I'll do my best help anyone with any problems or issues, but be sure to provide as much information as humanly possbile to help me or others assist with the problem.
It's been a while since I've dabbled with this side of development (I've mostly been focusing on app development, and occasionally magisk rom development.)
So.
Some things, and processes in this guide may change as future updates occur.
I'll try to update it as neccesary, but my work usually keeps me pretty busy.
Don't be afraid to ask any questions or suggest any corrections to this guide.
I'll do my best help anyone with any problems or issues, but be sure to provide as much information as humanly possbile to help me or others assist with the problem.
Last edited: