[GUIDE] How to Root OnePlus 7T without TWRP

Search This thread

mauronofrio

Recognized Developer
Jun 29, 2012
4,360
13,814
27
Castellana Grotte
toolaio.tk
So today with some testers i managed to make root on OnePlus 7T, I want to specify that 95% of the work was done by @topjohnwu (Magisk creator). For now you should use only Magisk Canary files

I will explain 2 different guides:

First Root Guide:

This guide is for a specific rom version, so you will need to use a specific patched boot.img

- Download the patched_boot.img
- Reboot your device in bootloader-fastboot mode
- Flash the patched_boot.img in the boot partition:
Code:
fastboot flash boot boot.img
replace "boot.img" with the patched_boot.img path

- Reboot the device
- Install Magisk Manager



Second Root Guide:

This guide is more generic than the first one, you should use this one if you are unable to find a specific patched boot.img

- Download a patched_boot.img (you should try with the latest one)
- Reboot your device in bootloader-fastboot mode
- Boot the patched_boot.img:
Code:
fastboot boot boot.img
replace "boot.img" with the patched_boot.img path

- Reboot the device
- Install Magisk Manager
- Click on Install, then direct install and wait the end of the process
- Reboot the device


Third Root Guide:
Guide by @gpz1100

TIPS:

Actually you should use only Magisk canary files Magisk 20.3
You can get the stock boot images from the fastboot rom: https://xdaforums.com/oneplus-7t/how-to/rom-stock-fastboot-roms-oneplus-7t-t3979213

Actually i'm using magisk manager canary and magisk canary debug to patch the boot.img, I don't recommend updating magisk, if you don't want to see the updates install the normal magisk manager

Magisk 20.3 fully support OnePlus 7T and 7T Pro

HOW TO UPDATE a ROM and KEEP ROOT:
Before all Disable all magisk modules
Be sure to use Canary Magisk Manager and Canary Magisk (debug)
You can update a stock rom from phone settings with local upgrade:
- Update the Rom WITHOUT REBOOT;
- Open Magisk Manager;
- In Magisk Manager, click on Install/Install/Direct Install;
- Again in Magisk Manager, click on Install/Install/Inactive Slot;
- Reboot.


Download:

Patched/Stock Boot Images: https://www.androidfilehost.com/?w=files&flid=300177

Reccomended ADB and Fastboot binaries:

Adb and Fastboot Installer

Donations:



Credits:
@RohanAJoshi
 
Last edited:

jesrani

Senior Member
Mar 29, 2011
1,067
82
Mumbai
Honor 20
OnePlus 7T
I am on 10.0.3 begin so i should flash the magisk patched boot image of this version, is that correct? With what should i flash, sdk tools or any other specific tool? Is there any portable adb toolkit and do i need to copy the not image in the same folder as adb?
Edit : I tried but the device was locked so unlocked it after finding instructions on xda. Never knew it would wipe everything including internal storage also :(
Need to install everything again and have lost data of last few days. But I got root so that's the only consolation. Also a lesson never to make unnecessary haste. But it's fine. Won't repeat the mistake again.
 
Last edited:

nick_22

Senior Member
Sep 16, 2012
144
46
I am on 10.0.3 begin so i should flash the magisk patched boot image of this version, is that correct? With what should i flash, sdk tools or any other specific tool? Is there any portable adb toolkit and do i need to copy the not image in the same folder as adb?
Edit : I tried but the device was locked so unlocked it after finding instructions on xda. Never knew it would wipe everything including internal storage also :(
Need to install everything again and have lost data of last few days. But I got root so that's the only consolation. Also a lesson never to make unnecessary haste. But it's fine. Won't repeat the mistake again.

See OP, its clearly mentioned there. You have to flash this via fastboot and not any custom recovery. Firstly setup adb on your PC and then check the commands. Its very easy. Do some googling and still if its difficult for you, come back and ask.
 

Tagtag123

Senior Member
Sep 26, 2010
407
136
I am on 10.0.3 begin so i should flash the magisk patched boot image of this version, is that correct? With what should i flash, sdk tools or any other specific tool? Is there any portable adb toolkit and do i need to copy the not image in the same folder as adb?
Edit : I tried but the device was locked so unlocked it after finding instructions on xda. Never knew it would wipe everything including internal storage also :(
Need to install everything again and have lost data of last few days. But I got root so that's the only consolation. Also a lesson never to make unnecessary haste. But it's fine. Won't repeat the mistake again.

Welcome to the android scene, reminds me of the old psx scene :cool:
 

nick_22

Senior Member
Sep 16, 2012
144
46
I installed some rogue module, that was not supposed to be installed on OP 7T. Due to this, now I am not able to boot into patched boot. I had to re-flash my stock boot.img to boot into my phone. Can you please help? I want to uninstall that particular module thats all. Tried doing something with your TWRP, but it wont show my system or storage at all.
 
  • Like
Reactions: haden111

jesrani

Senior Member
Mar 29, 2011
1,067
82
Mumbai
Honor 20
OnePlus 7T
@mauronofrio, thanks so much for this. I had some queries :
1) Is the internal storage always wiped when bootloader is unlocked or did I do something wrong?
2) I have switched off auto-download of updates and also disabled automatic system updates in Developer settings. Is this correct? How to proceed when an update is available in future?
3) Will TWRP be developed or is it not useful for OP7T?
 

RohanAJoshi

Senior Member
Mar 17, 2011
2,454
1,671
Pune
OnePlus 8 Pro
Samsung Galaxy S22 Plus
I installed some rogue module, that was not supposed to be installed on OP 7T. Due to this, now I am not able to boot into patched boot. I had to re-flash my stock boot.img to boot into my phone. Can you please help? I want to uninstall that particular module thats all. Tried doing something with your TWRP, but it wont show my system or storage at all.

Get your stock boot.img from 1st post.
Reboot to bootloader.
And do this command
fastboot flash boot boot.img
fastboot reboot

Device will boot unrooted.

---------- Post added at 05:58 AM ---------- Previous post was at 05:55 AM ----------

jesrani;80464121 [user=4712355 said:
@mauronofrio[/user], thanks so much for this. I had some queries :
1) Is the internal storage always wiped when bootloader is unlocked or did I do something wrong?
2) I have switched off auto-download of updates and also disabled automatic system updates in Developer settings. Is this correct? How to proceed when an update is available in future?
3) Will TWRP be developed or is it not useful for OP7T?

1. Yes, always wipe
2. Just update as usual, let update go, after installation complete, don't reboot device. Go to magisk, install, install on inactive slot. Reboot. You will be rooted (Warning : this is not tested on 7T, this method from 7)
3. TWRP will be developed but some good dev like @mauronofrio need device for this, as of now, no hopes for twrp. We are lucky that we got root.
 

jesrani

Senior Member
Mar 29, 2011
1,067
82
Mumbai
Honor 20
OnePlus 7T
1. Yes, always wipe
2. Just update as usual, let update go, after installation complete, don't reboot device. Go to magisk, install, install on inactive slot. Reboot. You will be rooted (Warning : this is not tested on 7T, this method from 7)
3. TWRP will be developed but some good dev like @mauronofrio need device for this, as of now, no hopes for twrp. We are lucky that we got root.

Thanks. Yes, root is good enough right now.
By "update as usual", do you mean through OTA? I think the phone reboots after update is downloaded and then installs the update but not sure. So once it reboots after updating, should I go to Magisk and install root?
Should I keep Magisk update channel to Canary or Canary(Debug)? It's already showing an update as available. Should I update it?
 

Aswin08

Senior Member
Dec 31, 2012
940
1,021
OnePlus 7T
Samsung Galaxy Watch 4
Thanks. Yes, root is good enough right now.
By "update as usual", do you mean through OTA? I think the phone reboots after update is downloaded and then installs the update but not sure. So once it reboots after updating, should I go to Magisk and install root?
Should I keep Magisk update channel to Canary or Canary(Debug)? It's already showing an update as available. Should I update it?

In older devices like OP5T it happens like this, not in newer devices. OP7T has seamless updates, its installs while device is turned on in second partition.
 

mauronofrio

Recognized Developer
Jun 29, 2012
4,360
13,814
27
Castellana Grotte
toolaio.tk
I installed some rogue module, that was not supposed to be installed on OP 7T. Due to this, now I am not able to boot into patched boot. I had to re-flash my stock boot.img to boot into my phone. Can you please help? I want to uninstall that particular module thats all. Tried doing something with your TWRP, but it wont show my system or storage at all.

So, modules are saved in /data , the only way to remove them without root actually is wiping data, if you can't now, you can just flash the stock boot.img because without root the modules can't work. Usually you can remove all magisk stuff using magisk uninstaller.

@mauronofrio, thanks so much for this. I had some queries :
1) Is the internal storage always wiped when bootloader is unlocked or did I do something wrong?
2) I have switched off auto-download of updates and also disabled automatic system updates in Developer settings. Is this correct? How to proceed when an update is available in future?
3) Will TWRP be developed or is it not useful for OP7T?

1) yes
2) for rom updates i will pubblish a guide in the first post in some minutes
3) yes it will be developed but actually is needed a bit of time because twrp is not working for op7t (due to android 10)
 

jesrani

Senior Member
Mar 29, 2011
1,067
82
Mumbai
Honor 20
OnePlus 7T
So, modules are saved in /data , the only way to remove them without root actually is wiping data, if you can't now, you can just flash the stock boot.img because without root the modules can't work. Usually you can remove all magisk stuff using magisk uninstaller.



1) yes
2) for rom updates i will pubblish a guide in the first post in some minutes
3) yes it will be developed but actually is needed a bit of time because twrp is not working for op7t (due to android 10)
Should I keep Magisk update channel to Canary or Canary(Debug)? It's already showing an update as available. Should I update it?
 

ayujain555

Member
Feb 2, 2012
6
1
Help please. I have returned to Android after 5years with OnePlus 7t and trying to root it. I am trying this method but not being able to successfully root it. Steps I have tried
Went to fastboot mode by restarting the phone but I don't get an option to install the patched image file. And even boatloader is locked. Do I need to unlock the bootloader. And I unlock will I loose my data. Sorry for silly question I have completely forgot about Android.
 

nick_22

Senior Member
Sep 16, 2012
144
46
So, modules are saved in /data , the only way to remove them without root actually is wiping data, if you can't now, you can just flash the stock boot.img because without root the modules can't work. Usually you can remove all magisk stuff using magisk uninstaller.



1) yes
2) for rom updates i will pubblish a guide in the first post in some minutes
3) yes it will be developed but actually is needed a bit of time because twrp is not working for op7t (due to android 10)

Ok. Got it. So, I have already booted back to unrooted mode now. And I cant wipe my data again. Thanks for your response.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 63
    So today with some testers i managed to make root on OnePlus 7T, I want to specify that 95% of the work was done by @topjohnwu (Magisk creator). For now you should use only Magisk Canary files

    I will explain 2 different guides:

    First Root Guide:

    This guide is for a specific rom version, so you will need to use a specific patched boot.img

    - Download the patched_boot.img
    - Reboot your device in bootloader-fastboot mode
    - Flash the patched_boot.img in the boot partition:
    Code:
    fastboot flash boot boot.img
    replace "boot.img" with the patched_boot.img path

    - Reboot the device
    - Install Magisk Manager



    Second Root Guide:

    This guide is more generic than the first one, you should use this one if you are unable to find a specific patched boot.img

    - Download a patched_boot.img (you should try with the latest one)
    - Reboot your device in bootloader-fastboot mode
    - Boot the patched_boot.img:
    Code:
    fastboot boot boot.img
    replace "boot.img" with the patched_boot.img path

    - Reboot the device
    - Install Magisk Manager
    - Click on Install, then direct install and wait the end of the process
    - Reboot the device


    Third Root Guide:
    Guide by @gpz1100

    TIPS:

    Actually you should use only Magisk canary files Magisk 20.3
    You can get the stock boot images from the fastboot rom: https://xdaforums.com/oneplus-7t/how-to/rom-stock-fastboot-roms-oneplus-7t-t3979213

    Actually i'm using magisk manager canary and magisk canary debug to patch the boot.img, I don't recommend updating magisk, if you don't want to see the updates install the normal magisk manager

    Magisk 20.3 fully support OnePlus 7T and 7T Pro

    HOW TO UPDATE a ROM and KEEP ROOT:
    Before all Disable all magisk modules
    Be sure to use Canary Magisk Manager and Canary Magisk (debug)
    You can update a stock rom from phone settings with local upgrade:
    - Update the Rom WITHOUT REBOOT;
    - Open Magisk Manager;
    - In Magisk Manager, click on Install/Install/Direct Install;
    - Again in Magisk Manager, click on Install/Install/Inactive Slot;
    - Reboot.


    Download:

    Patched/Stock Boot Images: https://www.androidfilehost.com/?w=files&flid=300177

    Reccomended ADB and Fastboot binaries:

    Adb and Fastboot Installer

    Donations:



    Credits:
    @RohanAJoshi
    47
    Thinking out loud here for a universal general method.

    Goal: To get root/magisk installed

    Requirements: Stock device with unlocked bootloader only (no other mods), most recent ota update applied and system rebooted. Fastboot and adb windows executables.

    1) Enable advanced reboot and usb debugging in developer options
    2) Reboot to bootloader

    3) Boot to twrp (obtain image from https://xdaforums.com/oneplus-7t/development/recovery-unofficial-twrp-recovery-t3976961 ) fastboot boot twrp.img (or whatever you named it).

    4) Once booted, enter adb
    adb shell
    5) type
    dd if=/dev/block/bootdevice/by-name/boot of=/tmp/boot.img
    exit

    5.5) Copy file to the pc
    adb pull /tmp/boot.img stock_boot.img
    6) Reboot phone back to android
    6.5) Copy boot.img back to phone
    adb push stock_boot.img /sdcard/boot.img

    7) Make sure wifi or lte is connected
    8) Install Magisk Manager apk (from OP)
    9) Open Magisk Manager and select advanced options. Enable both of these:
    Preserve force encryption
    Preserve avb 2.0/dm-verity

    Tap 3 horizontal lines top left and select settings, choose channel Canary.

    Then select option to install Magisk (not manager). Choose the option that say from file.

    10) Point to the boot.img on the internal storage (/sdcard).
    11) It will do its thing then come back with a done message. File /sdcard/download/magisk_patched.img will be created.

    12) You need to copy this file to your pc, either use mtp or adb
    adb pull /sdcard/download/magisk_patched.img

    13) Reboot the phone into bootloader mode using the power button.
    14) Flash the file from #12 - fastboot flash boot magisk_patched.img
    15) Done!

    These steps might seem much, but really this process is fairly simple and straight forward. The main benefit is you're patching the exact kernel/boot.img that's from your device. No version or region issues to be concerned about. Given all the boot.img files between the different threads on here, I think this is safer.

    This also eliminates the need to boot into an older kernel that may have issues with the current build (experienced this myself, only had lte, no wifi).

    Thoughts?

    Update 12-23-2019: Updated step 9 to include setting advanced options before patching, channel selection.

    Update 1-1-2020: Cleaned up paths as /sdcard from twrp is only a virtual path, not present once booted in android. Clarified commands in steps 4-6.5.

    If you want to test the image before actually flashing, use:
    fastboot boot magisk_patched.img

    Once phone is booted, open magisk manager and check to successful installation status. If all is good, reboot back into bootloader and follow step 14
    16
    Hey there.. Can you somehow share your educated guess about a fully functioning twrp for thud device? I read about the android 10 changes on the twrp page and so I'm aware of the issues. Coz I really miss full system access in case something goes wrong with a module etc..
    Totally not asking for an Eta, just wanted to read your thoughts :)

    The TWRP can't be compiled under android 10, there are a bit of problems, let's explain some of them:
    1. The twrp used the -eng build to include a lot of modules needed for a working twrp, in android 10 -eng builds can't be used anymore, so the code should be re-written;
    2. .arm modules can't be used anymore in android 10 so they should be re-write in .cpp;
    3. android 10 introduced /super partition (it existed also on Pie but it was never used), so a new method to manage system, vendor and product partitions (maybe also odm? i don't remember now), these 3 partitions are included dynamically in this big partition and TWRP actually is not able do manage it (It's not really easy, there is a metadata, the partitions can only mounted in read only mode, to flash a new partition you should write in the metadata also the size of the new partition and a lot of newer things). Obviously on a/b devices there is only 1 /super partition that contains system, vendor and product partitions 2 times (because of 2 slots). Teorically this is a minor problem, to flash rom is need only of a new update_engine_sideload (but this is the next point);
    4. update_engine_sideload should be updated to support /super partition (Easy thing, i already did it, also if i didn't tested it)
    5. Decrytpion changed again in Android 10, there are a bit of things to do to make it working again

    Actually the main problem is the point 1, without that is stupid to work on others things. when the twrp will be bootable (compiled under android 10) maybe all others devs (me included) can start work to the others points and maybe some new problems will come.
    12
    Isn't there a way to do it with my own files? People here talk of stock boot images.

    Just read through the pages...This was posted on page 9 by @Hanuta1. I have adapted it a little as not all of it is required anymore.

    1. Download the OxygenOS 10.0.4 zip for your region and device from OnePlus
    2. Extract the boot.img with payload_dumper
    3. After extracting the boot image copy the boot image to your device.
    4. Install Magisk Manager
    5. Open Magisk Manager and go to the Advanced Settings and set Preserve AVB 2.0/dm-verity.
    6. Press install for magisk and take option two where you can select an image file.
    7. Select the image file which you copied to your device and patch it. After patching you can find the file in your downloads folder (maybe you need to replug your device into your computer)
    8. Copy the patched file on your computer.
    9. Boot into fastboot mode and then flash the patched image to your device with "fastboot flash boot imagename_patched.img"
    10. If all is successfull then type into the command window "fastboot reboot" and your device should then reboot into a rooted oxygen OS.
    10
    Make sure you tick "preserve dm verity" in advanced settings before patching boot.img

    done, 38,21 MB. Try to boot from it.

    edit: done :) it works

    Patched boot.img, European, from OnePlus7TOxygen_14.E.06_OTA_006_all_1910122142_a6ac3d238.zip

    https://drive.google.com/open?id=1JnIBeRQ-9s-JfIwcgKNwO_zBodj4gcGw
    MD5: f7ba21d9107c52096cad47c2cfd4882b
    SHA-1: a662582f8c34f2f59158a7f677de957055a670b7