[GUIDE][OP7][9.0/10.0/11.0] Unlock Bootloader | TWRP | Root with Magisk | Update

Search This thread

strongst

Senior Moderator - Developer Committee
Staff member
Sep 18, 2007
13,735
18,634
thank's
HTC Desire
Smart Watches
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/

Introduction
This thread is dedicated to newbies and rooting, so if you're familiar with the whole procedure, you're done:)
Just ask questions about every step and you'll receive help!

Downloads

TWRP Installer ZIP and TWRP IMG for Android 9/10: https://forum.xda-developers.com/oneplus-7/development/recovery-unofficial-twrp-recovery-t3932943
TWRP for Android 11(including instructions, thank's to @Nebrassy ): https://forum.xda-developers.com/t/recovery-11-unofficial-teamwin-recovery-project.4289455/
  • TWRP Installer ZIP = For example twrp-3.4.0-10-guacamole-unified-installer-mauronofrio.zip
  • TWRP IMG = For example twrp-3.4.0-10--guacamole-unified-Q-mauronofrio.img
  • Check for Pie or Q TWRP IMG! If you have Android Pie, choose Pie TWRP IMG, if you have Android Q, choose Q TWRP IMG.
  • The TWRP Installer ZIP works on Android Pie(9)/Q(10)
Magisk ZIP: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445


Hints
  • If you need to update TWRP or Magisk, always keep older versions of both in hand(Magisk canary or beta may have issues)
  • Remove your lockscreen protection which also removes encryption to prebvent mounting issues within TWRP
Before proceeding
  • Your Windows PC should already recognized your device with the USB cable
  • Use an USB cable provided with the phone
  • Make sure your Windows Explorer is set up to have file extensions enabled to avoid file name issues
  • This process will FORMAT/WIPE/DELETE your internal storage and every file of your phone, so please back it off your device at first!
  • Also keep a boot.img from your current system in place if anything went wrong so you can flash it via fastboot, see "Rooting without TWRP" for how to get it.

Rooting with TWRP (Android 9/10)


Steps for unlocked bootloader with TWRP AND Root(Magisk)

1. Follow this guide to unlock your Oneplus 7 bootloader(wipes everything on your device, works for OP7 pro and OP7): https://forum.xda-developers.com/showpost.php?p=79741564&postcount=2.
2. Your phones bootloader is now unlocked, leave the phone plugged to your PC
3. Make sure you have enabled USB-Debugging and Advanced Reboot under developer options(see step 1 how to enable it all) again after the first boot of the wiped device, since this gets reset
4. Copy the latest "TWRP installer ZIP" and "Magisk ZIP" to the phones internal storage.
5. Copy the "TWRP IMG" to the "platform-tools" folder from step 1.
6. Open command window or PowerShell window again if you did not closed it before within the "platform-tools" folder from step 1
7. Type
Code:
adb devices
to see if your device is connected and recognized sucessfully by your PC.
8. Type
Code:
adb reboot bootloader
to reboot to fastboot mode.
9. Type
Code:
fastboot boot recoveryimgfilename.img
to temporary boot TWRP, where recoveryimgfilename.img is the name of your downloaded TWRP *.img file, so watch your file name!.
10. Enter your screen lock PIN within TWRP if you have set it up before.
11. Allow modifications.
12. Now you have temporary booted twrp recovery. To make it stick permanently you need to flash the "TWRP installer ZIP" from your phones storage from step 4.
13. Hit "install" and navigate to the "TWRP installer ZIP" file and select it for installation(dont boot the system now!).
14. Go back and flash "Magisk ZIP" the same way as for TWRP Zip otherwise your device will not boot!
15. Thats all, you can unplug the USB cable and boot the device to your system. Your device is now bootloader unlocked with TWRP and Magisk:highfive:



Steps for unlocked bootloader with TWRP WITHOUT Root(Magisk)
1. Follow this guide to unlock your Oneplus 7 bootloader(wipes everything on your device, works for OP7 pro and OP7): https://forum.xda-developers.com/showpost.php?p=79741564&postcount=2.
2. Your phones bootloader is now unlocked, leave the phone plugged to your PC
3. Make sure you have enabled USB-Debugging and Advanced Reboot under developer options(see step 1 how to enable it all) again after the first boot of the wiped device, since this gets reset
4. Copy the latest "TWRP IMG" to the phones internal storage.
5. Copy the latest "TWRP IMG" to the "platform-tools" folder from step 1.
6. Open command window or PowerShell window again if you did not closed it before within the "platform-tools" folder from step 1
7. Type
Code:
adb devices
to see if your device is connected and recognized sucessfully by your PC.
8. Type
Code:
adb reboot bootloader
to reboot to fastboot mode.
9. Type
Code:
fastboot boot recoveryimgfilename.img
to temporary boot TWRP, where recoveryimgfilename.img is the name of your downloaded TWRP *.img file, so watch your file name!.
10. Enter your screen lock PIN within TWRP if you have set it up before.
11. Allow modifications.
12. Now you have temporary booted twrp recovery. To make it stick permanently you need to flash the "TWRP IMG" from your phones storage from step 4
13. Navigate to advanced menu within TWRP, click on "Install Recovery Ramdisk" and select the "TWRP IMG". This will patch the boot image which does Magisk otherwise.
14. Thats all, you can unplug the USB cable and boot the device to your system. Your device is now bootloader unlocked with TWRP:highfive:


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Rooting without TWRP (Android 9/10/11)


Also useful to get stock recovery and kernel --> Recovery is within boot.img on A/B devices like OP7;)
Refer here for unlocking the bootloader.

1. Download the payload dumper tool to your PC from here and extract it
2. Download the FULL OxygenOS Rom zip(The version your phone is running) and extract the payload.bin
3. Put payload.bin to "payload_input" folder o the extracted tool
4. Run payload_dumper.exe from the tool's folder
5. Extracted img files are in "payload_output" folder
6. Now you have your own boot.img for your Rom
7. Copy it to your phone
8. Patch the boot.img with Magisk directly on your device: Magisk Manager App -> hit install after your Magisk version -> hit "Select and Patch a file"
9. Copy the patched boot.img (it should be in the Download folder of your device named something like "magisk_patched-22100_bjjRn.img") back to your PC
10. Reboot your device to fastboot
11. Flash the patched magisk_patched-22100_bjjRn.img
Code:
fastboot flash boot_a magisk_patched-22100_bjjRn.img
fastboot flash boot_b magisk_patched-22100_bjjRn.img
12. Reboot your device. Now you have your phone rooted without the need of TWRP (Check with Magisk Manager App)


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Update your rooted OxygenOS (Android 9/10)

Steps for UPDATE OxygenOS via OTA and keep unlocked bootloader, TWRP, Root(Magisk)

1. [OPTIONAL, but highly recommended]Backup everything in case of issues!
2. Go to Magisk Manager App and uninstall all modules
2.1 [Optional]: For some modules(read those instructions) you should do an reboot now, then proceed
3. Go to Android settings -> system -> system update and hit "Download & Install Now", don't reboot yet!
4. (not for Android 11)Flash "TWRP ZIP" within Magisk Manager App like a Module: Magisk Manager App -> Menu -> Modules "+". This installs TWRP to both a/b partitions.
5. Install Magisk via Magisk Manager App again: Magisk Manager App -> hit install after your Magisk version -> hit "install to inactive slot"
6. Reboot your device
7. Reinstall your Magisk Modules(maybe a reboot is necessary)
Your device is now updated via OTA and you keep TWRP and Root:highfive:


Steps for UPDATE OxygenOS via local upgrade and keep unlocked bootloader, TWRP, Root(Magisk)

1. [OPTIONAL, but highly recommended]Backup everything in case of issues!
2. Download the full rom zip file and place it into the root folder of your storage(/storage/emulated/0)
3. Go to Magisk Manager App and uninstall all modules
2.1 [Optional]: For some modules(read those instructions) you should do an reboot now, then proceed
4. Go to Android settings -> system -> system update and hit gear icon top right -> local upgrade, don't reboot yet!
5. (not for Android 11)Flash "TWRP ZIP" within Magisk Manager App like a Module: Magisk Manager App -> Menu -> Modules "+". This installs TWRP to both a/b partitions.
6. Install Magisk via Magisk Manager App again: Magisk Manager App -> hit install after your Magisk version ->hit "install to inactive slot"
7. Reboot your device
8. Reinstall your Magisk Modules(maybe a reboot is necessary)
Your device is now updated via local upgrade and you keep TWRP and Root:highfive:





If you have any issues, just feel free to ask!
 
Last edited:
D

Deleted member 5408779

Guest
@strongst you should maybe write in your guide that magisk flash is a must! Without phone won't boot if it's stock.
There are a lot of people who wanna flash TWRP without magisk. I don't know why they do that it makes no sense for me. :D
 
Last edited by a moderator:

strongst

Senior Moderator - Developer Committee
Staff member
Sep 18, 2007
13,735
18,634
thank's
HTC Desire
Smart Watches
@strongst you should maybe write in your guide that magisk flash is a must! Without phone won't boot if it's stock.
There are a lot of people who wanna flash TWRP without magisk. I don't know why they do that it makes no sense for me. :D
I made it a little bit more clear, thanks, that's an common issue across several devices and requested often enough :cowboy:
 

strongst

Senior Moderator - Developer Committee
Staff member
Sep 18, 2007
13,735
18,634
thank's
HTC Desire
Smart Watches
Thank you for the quick tutorial. For me it looks very similar to the procedure with the OnePlus 5, am I right?

Does this indicate, that an EFS Backup is also to create the same way? https://forum.xda-developers.com/oneplus-5/how-to/oneplus-5-unlock-bootloader-flash-twrp-t3624877

BR
Axel
There's something different after unlocking the bootloader(which is the same). Twrp and magisk installation is different due to treble.

For EFS you can backup with twrp or local terminal

dd if=/dev/block/sdf2 of=/sdcard/modemst1.bin bs=512
 
Last edited:
  • Like
Reactions: daitalos

Camack

Senior Member
Mar 31, 2018
79
4
Portland
Thanks for the guide, my OnePlus 7 came with 9.5.5 and I want to clean flash to the latest 9.5.8. I have already unlocked the bootloader, boot into TWRP and installed TWRP, are these the correct steps to flash 9.5.8 as I'm confused with the A/B partition?

1. Wipe data, cache, system and internal storage
2. Flash 9.5.8 signed flashable zip
3. Flash kernel and Magisk or the other way round?
 

strongst

Senior Moderator - Developer Committee
Staff member
Sep 18, 2007
13,735
18,634
thank's
HTC Desire
Smart Watches
Thanks for the guide, my OnePlus 7 came with 9.5.5 and I want to clean flash to the latest 9.5.8. I have already unlocked the bootloader, boot into TWRP and installed TWRP, are these the correct steps to flash 9.5.8 as I'm confused with the A/B partition?

1. Wipe data, cache, system
2. Flash 9.5.8 signed flashable zip
3. Flash kernel and Magisk or the other way round?
1. Wipe data, cache, system and internal storage
2. Flash 9.5.8 signed flashable zip with current twrp
3. Flash twrp installer zip with current twrp
4. Flash magisk zip with current twrp
5. Reboot

Make sure not to FORMAT internal data, otherwise you wipe the files you want to flash as it formats sdcard
 
  • Like
Reactions: pycxe-01

Camack

Senior Member
Mar 31, 2018
79
4
Portland
1. Wipe data, cache, system and internal storage
2. Flash 9.5.8 signed flashable zip with current twrp
3. Flash twrp installer zip with current twrp
4. Flash magisk zip with current twrp
5. Reboot

Make sure not to FORMAT internal data, otherwise you wipe the files you want to flash as it formats sdcard
Thanks, so I boot into TWRP first and then do step 1 and 2? Also, which step should I flash custom kernel?
 

murti52

Senior Member
Oct 21, 2013
1,328
548
Navi Mumbai
OnePlus 11
Hi, a new OP7 User here. I wanted to know how can i keep my data decrypted? i have installed TWRP but i want to decrypt my data and also keep it the same after updated newer updates. Is it possible? I was able to do it on my OP3T, so wanted to know if its possible on OP7 as well
 

strongst

Senior Moderator - Developer Committee
Staff member
Sep 18, 2007
13,735
18,634
thank's
HTC Desire
Smart Watches

strongst

Senior Moderator - Developer Committee
Staff member
Sep 18, 2007
13,735
18,634
thank's
HTC Desire
Smart Watches
I think i messed up real bad, now when iam booting the phone, a message comes, your device is corrupt. It can't be trusted and will not boot.
That message is the bootloader unlocked warning and comes every time as soon as you unlocked the bootloader.

Flashing DM verity patch can only be done when you format internal storage which wipes everything of your internal storage. You can't "decrypt" your existing data permanently with this.
 

murti52

Senior Member
Oct 21, 2013
1,328
548
Navi Mumbai
OnePlus 11
That message is the bootloader unlocked warning and comes every time as soon as you unlocked the bootloader.

Flashing DM verity patch can only be done when you format internal storage which wipes everything of your internal storage. You can't "decrypt" your existing data permanently with this.

No, this is not the same, i can't even go to fastboot or anything, it's hardbricked.
 

murti52

Senior Member
Oct 21, 2013
1,328
548
Navi Mumbai
OnePlus 11

Sadly it didn't worked, as phone doesn't gets detected on pc, keeps on rebooting. Gave it to service center and they are also not able to solve it ??. So a replacement for me ?

Edit : i think the force decryption was the culprit. When i rebooted, system was crashing. Op3t had its specific force decrypt file, not a general one, So i think as the development moves forward, op7 will also get it's own. Hoping the best ?
 
Last edited:

strongst

Senior Moderator - Developer Committee
Staff member
Sep 18, 2007
13,735
18,634
thank's
HTC Desire
Smart Watches
Sadly it didn't worked, as phone doesn't gets detected on pc, keeps on rebooting. Gave it to service center and they are also not able to solve it ??. So a replacement for me ?

Edit : i think the force decryption was the culprit. When i rebooted, system was crashing. Op3t had its specific force decrypt file, not a general one, So i think as the development moves forward, op7 will also get it's own. Hoping the best ?
This file also works on OP7 pro, so it should also work on normal op7. I think the issue comes from something other.
 
  • Like
Reactions: murti52

murti52

Senior Member
Oct 21, 2013
1,328
548
Navi Mumbai
OnePlus 11
This file also works on OP7 pro, so it should also work on normal op7. I think the issue comes from something other.

Then there must be some issue with my flashing sequence. Btw, The service centre repaired the issue and i have rooted it and using bluespark with stock rom. I'll give the zip another try later on when a new update comes. Thanks for the help :)
 
  • Like
Reactions: strongst

Top Liked Posts

  • There are no posts matching your filters.
  • 29
    Code:
    #include <std_disclaimer.h>
    /*
    *
    * We are not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at us for messing up your device, we will laugh at you.
    *
    */

    Introduction
    This thread is dedicated to newbies and rooting, so if you're familiar with the whole procedure, you're done:)
    Just ask questions about every step and you'll receive help!

    Downloads

    TWRP Installer ZIP and TWRP IMG for Android 9/10: https://forum.xda-developers.com/oneplus-7/development/recovery-unofficial-twrp-recovery-t3932943
    TWRP for Android 11(including instructions, thank's to @Nebrassy ): https://forum.xda-developers.com/t/recovery-11-unofficial-teamwin-recovery-project.4289455/
    • TWRP Installer ZIP = For example twrp-3.4.0-10-guacamole-unified-installer-mauronofrio.zip
    • TWRP IMG = For example twrp-3.4.0-10--guacamole-unified-Q-mauronofrio.img
    • Check for Pie or Q TWRP IMG! If you have Android Pie, choose Pie TWRP IMG, if you have Android Q, choose Q TWRP IMG.
    • The TWRP Installer ZIP works on Android Pie(9)/Q(10)
    Magisk ZIP: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445


    Hints
    • If you need to update TWRP or Magisk, always keep older versions of both in hand(Magisk canary or beta may have issues)
    • Remove your lockscreen protection which also removes encryption to prebvent mounting issues within TWRP
    Before proceeding
    • Your Windows PC should already recognized your device with the USB cable
    • Use an USB cable provided with the phone
    • Make sure your Windows Explorer is set up to have file extensions enabled to avoid file name issues
    • This process will FORMAT/WIPE/DELETE your internal storage and every file of your phone, so please back it off your device at first!
    • Also keep a boot.img from your current system in place if anything went wrong so you can flash it via fastboot, see "Rooting without TWRP" for how to get it.

    Rooting with TWRP (Android 9/10)


    Steps for unlocked bootloader with TWRP AND Root(Magisk)

    1. Follow this guide to unlock your Oneplus 7 bootloader(wipes everything on your device, works for OP7 pro and OP7): https://forum.xda-developers.com/showpost.php?p=79741564&postcount=2.
    2. Your phones bootloader is now unlocked, leave the phone plugged to your PC
    3. Make sure you have enabled USB-Debugging and Advanced Reboot under developer options(see step 1 how to enable it all) again after the first boot of the wiped device, since this gets reset
    4. Copy the latest "TWRP installer ZIP" and "Magisk ZIP" to the phones internal storage.
    5. Copy the "TWRP IMG" to the "platform-tools" folder from step 1.
    6. Open command window or PowerShell window again if you did not closed it before within the "platform-tools" folder from step 1
    7. Type
    Code:
    adb devices
    to see if your device is connected and recognized sucessfully by your PC.
    8. Type
    Code:
    adb reboot bootloader
    to reboot to fastboot mode.
    9. Type
    Code:
    fastboot boot recoveryimgfilename.img
    to temporary boot TWRP, where recoveryimgfilename.img is the name of your downloaded TWRP *.img file, so watch your file name!.
    10. Enter your screen lock PIN within TWRP if you have set it up before.
    11. Allow modifications.
    12. Now you have temporary booted twrp recovery. To make it stick permanently you need to flash the "TWRP installer ZIP" from your phones storage from step 4.
    13. Hit "install" and navigate to the "TWRP installer ZIP" file and select it for installation(dont boot the system now!).
    14. Go back and flash "Magisk ZIP" the same way as for TWRP Zip otherwise your device will not boot!
    15. Thats all, you can unplug the USB cable and boot the device to your system. Your device is now bootloader unlocked with TWRP and Magisk:highfive:



    Steps for unlocked bootloader with TWRP WITHOUT Root(Magisk)
    1. Follow this guide to unlock your Oneplus 7 bootloader(wipes everything on your device, works for OP7 pro and OP7): https://forum.xda-developers.com/showpost.php?p=79741564&postcount=2.
    2. Your phones bootloader is now unlocked, leave the phone plugged to your PC
    3. Make sure you have enabled USB-Debugging and Advanced Reboot under developer options(see step 1 how to enable it all) again after the first boot of the wiped device, since this gets reset
    4. Copy the latest "TWRP IMG" to the phones internal storage.
    5. Copy the latest "TWRP IMG" to the "platform-tools" folder from step 1.
    6. Open command window or PowerShell window again if you did not closed it before within the "platform-tools" folder from step 1
    7. Type
    Code:
    adb devices
    to see if your device is connected and recognized sucessfully by your PC.
    8. Type
    Code:
    adb reboot bootloader
    to reboot to fastboot mode.
    9. Type
    Code:
    fastboot boot recoveryimgfilename.img
    to temporary boot TWRP, where recoveryimgfilename.img is the name of your downloaded TWRP *.img file, so watch your file name!.
    10. Enter your screen lock PIN within TWRP if you have set it up before.
    11. Allow modifications.
    12. Now you have temporary booted twrp recovery. To make it stick permanently you need to flash the "TWRP IMG" from your phones storage from step 4
    13. Navigate to advanced menu within TWRP, click on "Install Recovery Ramdisk" and select the "TWRP IMG". This will patch the boot image which does Magisk otherwise.
    14. Thats all, you can unplug the USB cable and boot the device to your system. Your device is now bootloader unlocked with TWRP:highfive:


    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Rooting without TWRP (Android 9/10/11)


    Also useful to get stock recovery and kernel --> Recovery is within boot.img on A/B devices like OP7;)
    Refer here for unlocking the bootloader.

    1. Download the payload dumper tool to your PC from here and extract it
    2. Download the FULL OxygenOS Rom zip(The version your phone is running) and extract the payload.bin
    3. Put payload.bin to "payload_input" folder o the extracted tool
    4. Run payload_dumper.exe from the tool's folder
    5. Extracted img files are in "payload_output" folder
    6. Now you have your own boot.img for your Rom
    7. Copy it to your phone
    8. Patch the boot.img with Magisk directly on your device: Magisk Manager App -> hit install after your Magisk version -> hit "Select and Patch a file"
    9. Copy the patched boot.img (it should be in the Download folder of your device named something like "magisk_patched-22100_bjjRn.img") back to your PC
    10. Reboot your device to fastboot
    11. Flash the patched magisk_patched-22100_bjjRn.img
    Code:
    fastboot flash boot_a magisk_patched-22100_bjjRn.img
    fastboot flash boot_b magisk_patched-22100_bjjRn.img
    12. Reboot your device. Now you have your phone rooted without the need of TWRP (Check with Magisk Manager App)


    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Update your rooted OxygenOS (Android 9/10)

    Steps for UPDATE OxygenOS via OTA and keep unlocked bootloader, TWRP, Root(Magisk)

    1. [OPTIONAL, but highly recommended]Backup everything in case of issues!
    2. Go to Magisk Manager App and uninstall all modules
    2.1 [Optional]: For some modules(read those instructions) you should do an reboot now, then proceed
    3. Go to Android settings -> system -> system update and hit "Download & Install Now", don't reboot yet!
    4. (not for Android 11)Flash "TWRP ZIP" within Magisk Manager App like a Module: Magisk Manager App -> Menu -> Modules "+". This installs TWRP to both a/b partitions.
    5. Install Magisk via Magisk Manager App again: Magisk Manager App -> hit install after your Magisk version -> hit "install to inactive slot"
    6. Reboot your device
    7. Reinstall your Magisk Modules(maybe a reboot is necessary)
    Your device is now updated via OTA and you keep TWRP and Root:highfive:


    Steps for UPDATE OxygenOS via local upgrade and keep unlocked bootloader, TWRP, Root(Magisk)

    1. [OPTIONAL, but highly recommended]Backup everything in case of issues!
    2. Download the full rom zip file and place it into the root folder of your storage(/storage/emulated/0)
    3. Go to Magisk Manager App and uninstall all modules
    2.1 [Optional]: For some modules(read those instructions) you should do an reboot now, then proceed
    4. Go to Android settings -> system -> system update and hit gear icon top right -> local upgrade, don't reboot yet!
    5. (not for Android 11)Flash "TWRP ZIP" within Magisk Manager App like a Module: Magisk Manager App -> Menu -> Modules "+". This installs TWRP to both a/b partitions.
    6. Install Magisk via Magisk Manager App again: Magisk Manager App -> hit install after your Magisk version ->hit "install to inactive slot"
    7. Reboot your device
    8. Reinstall your Magisk Modules(maybe a reboot is necessary)
    Your device is now updated via local upgrade and you keep TWRP and Root:highfive:





    If you have any issues, just feel free to ask!
    5
    D
    Deleted member 5408779
    @strongst you should maybe write in your guide that magisk flash is a must! Without phone won't boot if it's stock.
    There are a lot of people who wanna flash TWRP without magisk. I don't know why they do that it makes no sense for me. :D
    4
    @strongst you should maybe write in your guide that magisk flash is a must! Without phone won't boot if it's stock.
    There are a lot of people who wanna flash TWRP without magisk. I don't know why they do that it makes no sense for me. :D
    I made it a little bit more clear, thanks, that's an common issue across several devices and requested often enough :cowboy:
    2
    Followed the steps, ran "Root Checker Basic", got this:
    Root Checker Basic said:
    Congratulations! Root access is properly installed on this device!

    Huge thanks for the guide!
    2
    Hey @strongst wanted to confirm with you the step by step to exit from A10 (10.3.8) to A11 (11.0.4.1) and have TWRP.

    I would start by following the topic information above, upgrading via local upgrade and then installing magisk in the inactive slot.

    For TWRP just do what is said in the thread (fastboot boot twrp.img, go to Advanced > Flash Current TWRP, after that is done, if you were using a custom kernel, reflash it now, if you were using magisk, reflash it now).

    Just want to avoid bootloop, hence insecurity.
    If I understand correctly, you want to update from A10 (10.3.8) to A11 (11.0.4.1) and have TWRP.
    You should be fine following the
    Steps for UPDATE OxygenOS via local upgrade and keep unlocked bootloader, TWRP, Root(Magisk)
    but skipping step 5 cause the TWRP for A11 is an .img and cannot be flashed from Magisk app.

    So you have to flash TWRP like mentioned in the instructions of the TWRP or like the first time and then reinstall magisk again(patch boot image) after flashing TWRP.

    I don't use TWRP anymore cause :)