[GUIDE] How to Root OnePlus 7T without TWRP

Search This thread

paps79

Senior Member
Jul 4, 2011
112
77
Hello guys,

I'm on HD1903 (EU), OxygenOS 10.0.16.HD65BA, rooted with Magisk and with no custom recovery.

I went ahead and downloaded OxygenOS 11.0.0.2 update assuming it was going to prompt me before installation so I could uninstall Magisk and then reinstall on the inactive slot so I could preserve root.

However, the f***** went on and installed itself (WTF?) and now I'm prompted to reboot.

Is there a way I can retain root right now or do I have to go through the whole process of rooting again?
Does that mean I need a patched boot image and adb access, would that wipe any data?

Thanks for your help!
 

GilX

Senior Member
Aug 31, 2015
76
32
Edmonton
Hello guys,

I'm on HD1903 (EU), OxygenOS 10.0.16.HD65BA, rooted with Magisk and with no custom recovery.

I went ahead and downloaded OxygenOS 11.0.0.2 update assuming it was going to prompt me before installation so I could uninstall Magisk and then reinstall on the inactive slot so I could preserve root.

However, the f***** went on and installed itself (WTF?) and now I'm prompted to reboot.

Is there a way I can retain root right now or do I have to go through the whole process of rooting again?
Does that mean I need a patched boot image and adb access, would that wipe any data?

Thanks for your help!
I'm in the same process right now. But I assume nothing changed. After installing update, dont reboot. Install magisk in inactive slot. Then again direct install magisk. Reboot. Hopefully modules wont mess up. Cross fingers.
 
  • Like
Reactions: paps79

paps79

Senior Member
Jul 4, 2011
112
77
After reading a bit on reddit I went ahead and did just that, minus the direct install you mention above.

Everything works great!
Good luck and thanks for the reply.
 

Eddiemc

Senior Member
Mar 15, 2010
1,416
540
@paps79
Just use Mauriofrio's tool:


(Tick off boot twrp and root, choose oldest twrp and use manual for magisk. Point to wherever you've downloaded the latest)


Edit:
Ah, too late😁
Well, for anybody else, the tool is gold. Easier than everything else.
 

chwb205

New member
Oct 11, 2020
3
0
Hello

I recently OTA updated my HD1907 to 11.0.0.2.HD65AA, I had root working fine before update and before rebooting I used the Magisk install after OTA update function which seemed successful. However root was not preserved going into Android 11 but OS update was fine. I extracted the boot.img from the original update file using the Python payload dumper method and used Magisk Manager on the phone to patch the file. In the past (Android 10) I could flash boot.img to "boot" for this process but now going into Android 11 fastboot cmd bounces back a message saying boot doesn't exist and I need to specify boot_b or boot_a. Attempted installation to boot_b, boot_a, and then both all resulted in bootloop error "Unable to parse kernel.log" which could be fixed by flashing the original unpatched boot.img. I then tried to just boot it with "fastboot boot" cmd the patched img to see if I could get into the OS with temporary root to direct install, that was unsuccessful as well. I have used lastest Magisk 22.1 as well as canary to no aval and am just hitting a roadblock on this. Does anyone have any information that could help point the way on this? Thank you.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hello, guys.

    I would like to ask a (noob) question.
    I am on 10.0.16HD65AA.
    I would like to update Magisk (now on 21.4), but I am afraid may I mesh up something...
    Should I install the Magisk app (that, as I see now, it says install and not update [?!]) or I should update Magisk Manager (at the top) and if yes, what is the correct method (direct install or to inactive slot) OR maybe something else?

    Thanks in advance...
    Open magisk, update the app(install), open magisk again, update magisk framework/direct install.
    Reboot 👍

    Installation to inactive slot is only done after taking a OTA.
    1
    Hello guys,

    I'm on HD1903 (EU), OxygenOS 10.0.16.HD65BA, rooted with Magisk and with no custom recovery.

    I went ahead and downloaded OxygenOS 11.0.0.2 update assuming it was going to prompt me before installation so I could uninstall Magisk and then reinstall on the inactive slot so I could preserve root.

    However, the f***** went on and installed itself (WTF?) and now I'm prompted to reboot.

    Is there a way I can retain root right now or do I have to go through the whole process of rooting again?
    Does that mean I need a patched boot image and adb access, would that wipe any data?

    Thanks for your help!
    I'm in the same process right now. But I assume nothing changed. After installing update, dont reboot. Install magisk in inactive slot. Then again direct install magisk. Reboot. Hopefully modules wont mess up. Cross fingers.
  • 57
    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://forum.xda-developers.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://forum.xda-developers.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
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone