[RECOVERY][3.4.0-10][U][guacamole]Official/Unofficial TWRP recovery for OnePlus 7 Pro

Search This thread

eracet

Senior Member
Nov 27, 2010
206
29
So then how do you keep root when updating and install stuff like custom kernels?
Not sure about the Kernals, But to keep root to the Magisk img install method
Just make sure you set up magisk A/B retention script before trying ot install the update and make sure that Magisk is fully ready.
 

Limon_Lime

Senior Member
Apr 19, 2017
113
3
Not sure about the Kernals, But to keep root to the Magisk img install method
Just make sure you set up magisk A/B retention script before trying ot install the update and make sure that Magisk is fully ready.
Would this method right here work? And what should I do before starting to make sure I don't get boot loop. Should I uninstall Magisk modules, setup A/B retention script, etc?

I am going straight from 10.3.8 to A11 stable.

 

Limon_Lime

Senior Member
Apr 19, 2017
113
3
Ok guys, answer to your questions is so simple but you all are getting confused may be.

First of you need to know that Stable TWRP is not available for OOS 11 Stable and Beta. To use TWRP and OOS 11/Beta together your device must be decrypted.

NOTE: If you are already in bootloop or something after flashing oos 11 with twrp then check my this post. There you have only two options to get back and then follow below steps if you need

Now here is a perfect drill
It will make 0% chances of any bootloop or anything.
These steps will let your device boot up 100% with exact 0% chances of any bootloop

First download Latest "Disable Dm verity and force encrypt zip" from attachment.
Now things you need:
A PC/Laptop with cable or USB OTG drive with required files in it.
Requered files-
1. Latest Official TWRP Installer zip
2. Latest Magisk zip
3. Latest Disable Dm verity and force encrypt zip
4. And obviously OOS 11 rom zip file

Now follow steps below

Main Steps you need:
1. Backup data (If you have data and need that)
2. Boot in TWRP and factory reset.
3. Format Data and type yes to format it.
4. Install oos 11
5. Install TWRP installer zip
6. Install Magisk zip
7. Install Disable Dm verity and force encrypt zip
8. Reboot Recovery
9. Install Magisk again
10. Install Disable Dm verity and force encrypt zip again
11. Reboot and you are good.

There is 0% chance of any bootloop if you follow this.

Regards
How would I install these files after formatting data? I have them on my computer but obviously they aren't on my internal storage anymore.
 

eracet

Senior Member
Nov 27, 2010
206
29
Would this method right here work? And what should I do before starting to make sure I don't get boot loop. Should I uninstall Magisk modules, setup A/B retention script, etc?

I am going straight from 10.3.8 to A11 stable.

No you use magisk to install update. A/B retention script is part of magisk . That is used to keep root.
TWRP does not work at the moment with android 11. Even the one you posted.
Are you doing the OTA update?
If so you need to do the magisk method,
If you search update with magisk ota, it should explain.
Otherwise.
Download and install A/B retention from Magisk modules. (Do this before any updating). Do NOT download any updates.)
Reboot phone.
Download Android Update. Do NOT reboot phone.
Go to Magisk. Install , Intstall to inactive slot after OTA.
Then it will reboot and should be ok.
But TWRP does not work at the moment. At least with Android 11
 

Limon_Lime

Senior Member
Apr 19, 2017
113
3
No you use magisk to install update. A/B retention script is part of magisk . That is used to keep root.
TWRP does not work at the moment with android 11. Even the one you posted.
Are you doing the OTA update?
If so you need to do the magisk method,
If you search update with magisk ota, it should explain.
Otherwise.
Download and install A/B retention from Magisk modules. (Do this before any updating). Do NOT download any updates.)
Reboot phone.
Download Android Update. Do NOT reboot phone.
Go to Magisk. Install , Intstall to inactive slot after OTA.
Then it will reboot and should be ok.
But TWRP does not work at the moment. At least with Android 11
Ok, I think I will just do this and wait for an official TWRP update. Unfortunately I already formatted my data lol, made backups though.
 

VampireHeart

Senior Member
Jan 13, 2015
1,339
658
Viterbo
OnePlus 7 Pro
If you follow the procedure outlined in the following post, you can get TWRP working with OOS 11:

https://forum.xda-developers.com/t/...overy-for-oneplus-7-pro.3931322/post-84727891

TWRP will work with OOS 11 as long as the device is decrypted, and that post shows how to decrypt the device.

I followed those steps, and I now have TWRP 3.5.2_9-0 working with OOS 11.0.0.2 on my guacamole device.
Yes actually is the only way to have a custom recovery working on OOS 11 but that guide have too many steps not necessary.

This is what i do from Android !0, cause starting from Android 11 you can't boot twrp, made a backup of your data before:

1 - Reboot to TWRP and be sure to have latest 3.5.2_9-0, if not install it
2 - Flash OOS 11 and TWRP 3.5.2_9-0, format data typing yes (data loss)
3 - Reboot to TWRP, flash latest Magisk Canary (for Safety Net Pass) and latest Disable Force Encrypt
4 - Reboot to system
 

HippoMan

Senior Member
May 5, 2009
1,714
546
Hippoland
Yes actually is the only way to have a custom recovery working on OOS 11 but that guide have too many steps not necessary.

This is what i do from Android !0, cause starting from Android 11 you can't boot twrp, made a backup of your data before:

1 - Reboot to TWRP and be sure to have latest 3.5.2_9-0, if not install it
2 - Flash OOS 11 and TWRP 3.5.2_9-0, format data typing yes (data loss)
3 - Reboot to TWRP, flash latest Magisk Canary (for Safety Net Pass) and latest Disable Force Encrypt
4 - Reboot to system
For some reason, the suggested post recommends doubly installing Magisk and Disable Force Encrypt, but based on what you wrote here, I guess that second installation step of these two items is not necessary.

By the way, I previously did this with the latest TWRP 3.4.x, and it also worked.
 

VampireHeart

Senior Member
Jan 13, 2015
1,339
658
Viterbo
OnePlus 7 Pro
For some reason, the suggested post recommends doubly installing Magisk and Disable Force Encrypt, but based on what you wrote here, I guess that second installation step of these two items is not necessary.

By the way, I previously did this with the latest TWRP 3.4.x, and it also worked.
Like you said is not needed double flash o magisk and dfe, never made an all work perfectly.
 
  • Like
Reactions: HippoMan

davidk21770

Senior Member
Aug 28, 2011
370
90
Samsung Galaxy Tab S3
OnePlus 7 Pro
No you use magisk to install update. A/B retention script is part of magisk . That is used to keep root.
TWRP does not work at the moment with android 11. Even the one you posted.
Are you doing the OTA update?
If so you need to do the magisk method,
If you search update with magisk ota, it should explain.
Otherwise.
Download and install A/B retention from Magisk modules. (Do this before any updating). Do NOT download any updates.)
Reboot phone.
Download Android Update. Do NOT reboot phone.
Go to Magisk. Install , Intstall to inactive slot after OTA.
Then it will reboot and should be ok.
But TWRP does not work at the moment. At least with Android 11
Why is A/B retention needed? I've been updateing this way without A/B retention for 9 & 10and it's worked fine?
(Well, I also restored my images from Magisk before the insall (uninstall Magisk, install the ROM, let Magisk patch and reboot to the other partition))
Thanks!
 

khalisz

Senior Member
  • I've tried your method with my OP 7 Pro (GM1910) but stuck in bootloop. Fortunately i am able to flash back the original boot.img. Do you have any suggestions ?
    PS: i've extracted myself the boot.img from my A11 OTA.zip and also the magisk boot.img with the canary version.

    - Bootloader unlocked ?
    - Install Android Platforme tools to your PC.
    - First install magisk manager APK (only, not magisk)
    - Reboot to fastboot mode
    - Plug your phone to your PC.
    - open cmd with admin rights from Android Platforme tools folder.
    - Flash the patched boot.img Oxygen OS 11.0.0.2 (Global rom)
    - Reboot and you're rooted.
     

    khalisz

    Senior Member
  • Hi friend , i Flash the patched boot on my oneplus7p , firstly the magisk working fine. but when restart my phone the root is not working. Need to flash AGAIN.

    - Bootloader unlocked ?
    - Install Android Platforme tools to your PC.
    - First install magisk manager APK (only, not magisk)
    - Reboot to fastboot mode
    - Plug your phone to your PC.
    - open cmd with admin rights from Android Platforme tools folder.
    - Flash the patched boot.img Oxygen OS 11.0.0.2 (Global rom)
    - Reboot and you're rooted.
     

    alessio89g

    Senior Member
  • Mar 22, 2014
    464
    100
    @mauronofrio
    Do you know why this zip doesn't work with your Recovery?
    It works fine on my 5T (DerpFest 11) with codeworkx's TWRP.
    The console doesn't show any error, but when I boot to system (also here DerpFest 11), I'm unable to find the sounds flashed with the zip.
     

    Attachments

    • SoundsReplacer.zip
      5.7 MB · Views: 6

    Top Liked Posts

    • 1
      This thread should get locked to prevent spam and repeated posts. As there is a new thread that allows twrp on OOS 11.
    • 6
      Also take a look at this thread, new custom TWRP recovery working with OxygenOS 11 with encrypted phone 😉
      5
      I'm in the same boat. When using TWRP for backup under OOS 10, I usually back up the /boot, /system, /data, and /vendor partitions. If I have messed up my device for some reason, I can always go to TWRP and do a restore, and my device will be back in the exact state that it was in at the time of the backup.

      I'm looking for a way to accomplish the same thing without TWRP under OOS 11 when encrypted -- or under any encrypted Android 11 ROM, for that matter. Until I find something suitable, I also am remaining with OOS 10.

      Perhaps could something like this done by using the "dd" command?
      Last summer, I wrote a script that will copy all of my "B" partitions to their corresponding "A" partitions using the "dd" utility. I'm thinking that maybe I can write a variation of this which copies all of my partition data ("A" and "B") to a directory which I can then save onto my desktop computer via "adb pull". Then, I think I could write something which copies in the other direction and restores this partition data. I'm guessing that this could provide similar functionality to nandroid backup and restore.

      I'm going to work on this in my spare time and see if I can come up with a way to run this under Android 11 without TWRP.

      This is the discussion of the script that I wrote last summer:

      https://forum.xda-developers.com/t/...ices-platforms.2239421/page-142#post-83389563
      4
      I just stay decrypted and all is fine.

      Until your lose your phone..
      4
      Same here, just need it for Backup and Restore.

      Don't understand why Phone Developers not have been able to Support such an eays and important function.

      Does someone know it this would bring sometthing to ask for it by OnePlus?!
      TWRP is a community project, OnePlus won't help. They only thing they really have to do is release the kernel source code for their devices, which they've always been pretty good at.

      Developers work on these things in their spare time - keep in mind, they do have their own lives they lead. That's why a lot of these projects are open source - so that anybody with the time and knowledge can contribute, not just the main dev.

      Also, 10 to 11 is a big jump for Android, just like every release - Google always switches up the way things function under the hood, which means the community devs have to figure out how everything work, so they can update accordingly.

      TL,DR: It's a process, just be patient :)
      3
      Hi friends,

      I found something interesting and helpful thing
      I don't know if it's new or old, but this may help many.

      When your device is powered off-
      Long press power button and when device vibrates, OnePlus Logo comes- release power button and long press volume down button immediately. Hold it till device boot - This will boot in safeboot mode.
      Now reboot device - In this stage your device may boot to system.
      And also this will disable all magisk modules.

      -This can help those who are stuck in bootloop after any magisk module and don't have TWRP
      -This can help those who are stuck in bootloop after updating to OOS11 with TWRP and in bootloop even after fastbooting stock or patched stock boot.img
      -And don't know if this can help to those who have not fastbooted patched/stock boot.img but just in bootloop after OOS 11 with TWRP

      If this goes right, this will be life saver

      Regards
      Mohitash
    • 149
      Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

      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.
      *
      */

      Features:
      - Seems is working all
      - Android Q Support
      - Android 11 Decryption

      Install guide (Reccomended):
      1. Install fastboot tools from google's sdk on your PC
      2. Enter fastboot mode
      3. Unlock your bootloader
      4. Run "fastboot boot recoveryimgfilename.img" in command line (if you want to have it permanently you should flash the installer)
      5. If you will flash the installer and you are stock you need also to flash magisk or your phone will not boot again
      6. Enjoy it:)

      Other Install guide (More articulated but fully functional):
      1. Install fastboot tools from google's sdk on your PC
      2. Enter fastboot mode
      3. Unlock your bootloader
      4. Run "fastboot boot recoveryimgfilename.img" in command line
      5. Copy the recoveryimgfilename.img in the phone memory
      6. Go in advanced menu
      7. Click on "Install Recovery Ramdisk"
      Screenshot-2019-04-04-17-25-43.png

      8. Choose the recoveryimgfilename.img
      9. Swipe to install


      OLD Install guide (Much more articulated but perfectly functional):
      1. Follow this guide to root your device: https://forum.xda-developers.com/oneplus-7-pro/how-to/guide-root-oneplus-7-pro-patched-boot-t3931205
      2. Flash the TWRP installer like a magisk module
      3. Flashing the TWRP installer you will lose the root, so you will need to flash magisk again from magisk manager before reboot the device or you can reboot the device and flash magisk in twrp


      HOW TO UPDATE a ROM and KEEP TWRP and ROOT:
      Before all Disable all magisk modules for boths methods

      - Put rom.zip, twrp installer.zip and magisk.zip on your internal storage;
      - Flash Rom;
      - Flash TWRP Installer;
      - Flash magisk;
      - Reboot.

      If you want you can also update a stock rom from phone settings with local upgrade:
      - Update the Rom WITHOUT REBOOT;
      - Open Magisk Manager;
      - Menu/modules/+ button/select the twrp installer.zip and flash it;
      - Always in Magisk Manager, click on Install/Install/Direct Install;
      - Again in Magisk Manager, click on Install/Install/Inactive Slot;
      - Reboot.


      BugReport:
      Please all, when you got a problem, bootloop, error in twrp, unable to do something, please be sure you have followed the guides properly and when you write here you have problem just follow this guidelines for the bugreport:
      - Write what rom and version you have actually;
      - Write which device you have, gm1910, gm1913, gm1917, gm1915, gm1920, gm1911.
      - Write which twrp you are using (Unofficial, Officia and the version);
      - If you got an error in the twrp flashing a zip, after got the error make a log using this command : "cat /tmp/recovery.log" or if you are using adb with "adb shell cat /tmp/recovery.log". Copy the output in a text file and send me it.
      - Write what are you trying to do;
      - Write how you flash the twrp and magisk, just write what you do.

      If you don't give me this infos i can't help you.
      If something doesn't work, don't just complain, but try to get the problem resolved by giving all the information you have.

      Tips:
      If android Q TWRP .img doens't work, reboot in fastboot again and try the Pie TWRP
      If you alread have a twrp flashed you can only flash the new installer zip or the new installation method to update your TWRP (remember to flash again magisk or your system will not boot).
      If you have some problems with backup, like 255 error or something similar please check this guide: https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
      For the Bacups use always "system_image" and "vendor_image" instead of "system" and "vendor".

      Download:
      India Fake Partition Deleter by mauronofrio
      Official Builds

      TWRP 3.4.0-10 Unified Unofficial Q by mauronofrio
      TWRP 3.4.0-10 Unified Unofficial Installer by mauronofrio

      TWRP 3.4.0-0 Unified Unofficial Q by mauronofrio
      TWRP 3.4.0-0 Unified Unofficial Installer by mauronofrio


      Official Builds
      OnePlus 7 Pro 9.5.3 stock boot.img

      Reccomended ADB and Fastboot binaries:

      Adb and Fastboot Installer

      Source code:
      https://github.com/omnirom/android_bootable_recovery
      https://github.com/mauronofrio/android_device_oneplus_guacamole_TWRP
      https://github.com/mauronofrio/android_device_oneplus_guacamole_unified_TWRP
      Android Pie IMG: https://gitlab.com/HolyAngel/op7
      Android Q IMG: Precompiled stock one

      My Telegram TWRP Support Group:
      https://t.me/twrp_Mauronofrio

      Donations:



      Credits:
      Thanks to @Titokhan for the tests
      Thanks to all Telegram Test Group
      Thanks to @HolyAngel for the kernel
      Thanks to @rsyhan for the help with the reserve script
      Thanks to @arter97 for the help with the Android Q Kernel

      Created 2019-05-18
      76
      Let's do it again:

      New TWRP 3.3.1-70 guacamole unified (OnePlus 7, OnePlus 7 Pro, OnePlus 7 Pro 5G):
      - Fixed fastboot boot command also for Android Q.

      Actually i will publish an .img for android Q, one for android Pie and an Installer that will works on both.

      TWRP 3.3.1-70 Unified Unofficial Q by mauronofrio
      TWRP 3.3.1-70 Unified Unofficial Pie by mauronofrio
      TWRP 3.3.1-70 Unified Unofficial Installer by mauronofrio

      I want to say a big thanks to @arter97 that help me to make this new TWRP.

      I hope this community will support me also in the next OnePlus generation.
      51
      TWRP 3.3.1-74 OnePlus 7/ 7 Pro/ 7 Pro 5G (guacamole unified) by mauronofrio:
      FInally fixed all problems with rom flashing;
      Added a new script to support this new india.img fake partitions (now you can flash Open Beta 6).

      TWRP 3.3.1-74 Unified Unofficial Q by mauronofrio
      TWRP 3.3.1-74 Unified Unofficial Pie by mauronofrio
      TWRP 3.3.1-74 Unified Unofficial Installer by mauronofrio
      49
      For the reserve partition problem, I thought I had already solved the problem, apparently it wasn't like that. I want to explain why this problem happens:
      The main problem is that reserve partition doesn't exist, the reserve.img should be copied directly in a data folder (precisely /data/reserve/reserve.img ), unfortunately this is not easy, because on the devices with A/B slots to flash a rom using a TWRP we need to use the update_engine_sideload, an executable that will automatically flash the partitions present in the payload.bin in the respective partitions of the inactive slot.
      So a reserve.img file should be flashed (from the update_engine_sideload) in the /dev/block/bootdevice/by-name/reserve_a ( if a slot is the inactive one), but /dev/block/bootdevice/by-name/reserve_a doesn't exist.
      So i managed to make a new service-script that will automatically create the /data/reserve/reserve.img file and /dev/block/bootdevice/by-name/reserve_a and /dev/block/bootdevice/by-name/reserve_b symlinks.

      Another problem came at beginning with some other partitions that are not 2 but only one, but that wasn't a big problem.

      Now i can say that the reserve problem should be fixed at all.

      Now, there some problems with Android Q, i worked for few days to see if possible to make the TWRP boots from fastboot, but actually i'm unable to make a TWRP that boots from fastboot in Android Q., i don't know if it is a bootloader problem, a kernel problem or a twrp problem. (I actually think it is a bootloader problem in all cases)

      If you need to flash the TWRP on android Q i reccomend to flash it with magisk manager ( so to do this you need to flash a patched_boot.img to have root), this guide is already explained in the first post under thread "Old Flashing Guide".

      I did also a new feature to keep twrp and root after you update your rom (or you flash a boot.img), this new feature is called inject TWRP and you can enable (or disable) it after you selected a zip in the install option. Remember to disable it when you don't need of it or it will create some problems. I will reccomend to don't use it if you are flashing a new kernel or magisk.zip.
      Image Explanation:
      Screenshot-2019-09-03-09-22-36.png


      Update TWRP 3.3.1-65 guacamole unified (OnePlus 7, OnePlus 7 Pro, OnePlus 7 Pro 5G) by mauronofrio:
      - Fixed reserve partition error during ROM flashing;
      - Updated kernel (Reduced .img size from 56MB to 33MB);
      - Added new Inject TWRP feature.

      TWRP 3.3.1-65 Unified Unofficial by mauronofrio
      TWRP 3.3.1-65 Unified Unofficial Installer by mauronofrio
      45
      TWRP 3.3.1-75 OnePlus 7 / 7 Pro / 7 Pro 5g (guacamole unified) by mauronofrio:
      - Fixed error 255 during backup caused by /data/per_boot folder.

      TWRP 3.3.1-75 Unified Unofficial Q by mauronofrio
      TWRP 3.3.1-75 Unified Unofficial Pie by mauronofrio
      TWRP 3.3.1-75 Unified Unofficial Installer by mauronofrio
    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