Development [RECOVERY] [11] [OFFICIAL] TeamWin Recovery Project

Search This thread

IamTheBRAVE

Senior Member
Not officially. You need to flash a few things that will fully decrypt your device and allow full r/w on device in order to use twrp on 12.1+
Can you be a bit more specific and share how you did it with the rest of us?
Because so far, r/w (and maybe data decryption ) is only possible in A11 (and possibly A12, but not confirmed) with a script and by extracting your super.img partitions to modify their fs type.
 
Can you be a bit more specific and share how you did it with the rest of us?
Because so far, r/w (and maybe data decryption ) is only possible in A11 (and possibly A12, but not confirmed) with a script and by extracting your super.img partitions to modify their fs type.
 

IamTheBRAVE

Senior Member
I asked the dev earlier, and he said his script is to decrypt data not to get r/w. But if you do decrypt, does everything work in TWRP? Some people seem to think not. Can you give us screenshots of backup, restore, zip flash, etc? Also of file manager making r/w changes to /system partition? Thank you.
 
I asked the dev earlier, and he said his script is to decrypt data not to get r/w. But if you do decrypt, does everything work in TWRP? Some people seem to think not. Can you give us screenshots of backup, restore, zip flash, etc? Also of file manager making r/w changes to /system partition? Thank you.
This was discussed in crdroid telegram
 
  • Like
Reactions: IamTheBRAVE

der_akinator

Senior Member
Mar 27, 2015
75
87
Berlin
OnePlus 3T
OnePlus 9 Pro
Hi everyone,
I have got TWRP 3.7 based on android 12.1 working, but data decryption still does not work. Any ideas how to get the logs? They are by default written to data which does not work. Is there a way to get them over adb or so?

In the case someone is interested here are the links to the device tree:
 
Hi everyone,
I have got TWRP 3.7 based on android 12.1 working, but data decryption still does not work. Any ideas how to get the logs? They are by default written to data which does not work. Is there a way to get them over adb or so?

In the case someone is interested here are the links to the device tree:
Have you tried flashing the dfe zip a few posts up?
 

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,120
34,310
Halifax
GT-i9250
Google Nexus 4
Hi everyone,
I have got TWRP 3.7 based on android 12.1 working, but data decryption still does not work. Any ideas how to get the logs? They are by default written to data which does not work. Is there a way to get them over adb or so?

In the case someone is interested here are the links to the device tree:
You should ask in the TWRP Zulip (linked on the website), the devs should be able to point you in the right direction to troubleshoot decryption.
 
  • Like
Reactions: galaxys

der_akinator

Senior Member
Mar 27, 2015
75
87
Berlin
OnePlus 3T
OnePlus 9 Pro
Decryption is working now. But the caveat is that you have to flash a vendor_boot image to boot twrp. I'm looking to find a way around this either by avoiding it at all, which might not be possible, or by merging the rom and twrp vendor_boot into one. If someone has some experience or ideas please let me know.

If you want to test it, the best way is to download or extract a copy of your rom's vendor_boot. After that you flash the twrp vendor boot and boot the boot.img the same way as the old twrp. In order to boot into your normal OS, the rom's vendor_boot image has to be reflashed.

Edit: Permanent installation seems to work. So after installation as described by Nebrassy reboot to bootloader and reflash rom's vendor_boot. After that you should be able to boot into your normal OS and TWRP. I tested it with crdroid 13.

Here is a link to the two images you need:

 
Last edited:

TheSayaMan

Senior Member
Sep 12, 2016
610
268
OnePlus 9 Pro
Decryption is working now. But the caveat is that you have to flash a vendor_boot image to boot twrp. I'm looking to find a way around this either by avoiding it at all, which might not be possible, or by merging the rom and twrp vendor_boot into one. If someone has some experience or ideas please let me know.

If you want to test it, the best way is to download or extract a copy of your rom vendor_boot. After that you flash the twrp vendor boot and boot the boot.img the same way as the old twrp. In order to boot into your normal OS, the rom vendor_boot image has to be reflashed.

Here is a link to the two images you need:

I'm not exactly sure how to do this but I'm on 13 now so I can't test it.
 

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,120
34,310
Halifax
GT-i9250
Google Nexus 4
Decryption is working now. But the caveat is that you have to flash a vendor_boot image to boot twrp. I'm looking to find a way around this either by avoiding it at all, which might not be possible, or by merging the rom and twrp vendor_boot into one. If someone has some experience or ideas please let me know.

If you want to test it, the best way is to download or extract a copy of your rom vendor_boot. After that you flash the twrp vendor boot and boot the boot.img the same way as the old twrp. In order to boot into your normal OS, the rom vendor_boot image has to be reflashed.

Here is a link to the two images you need:

2 ideas.

Is there a way to repackage the vendor_boot ramdisk on-the-fly with what it needs and could still work with the ROM? This device is vendor_boot v3 so we could still use magiskboot for it.

I seem to recall the issue is that Lineage moved the recovery resources (images, etc.) to the vendor_boot ramdisk, but I was wondering if some hacks could be made to the TWRP init to force using the boot ramdisk recovery resources again instead.
 
Last edited:

der_akinator

Senior Member
Mar 27, 2015
75
87
Berlin
OnePlus 3T
OnePlus 9 Pro
2 ideas.

Is there a way to repackage the vendor_boot ramdisk on-the-fly with what it needs? This device is vendor_boot v3 so we could still use magiskboot for it.

I seem to recall the issue is that Lineage moved the recovery resources (images, etc.) to the vendor_boot ramdisk, but I was wondering if some hacks could be made to the TWRP init to force using the boot ramdisk recovery resources again instead.
I have just noticed, after unpacking it, that I build vendor_boot v4, which still boots. Due to the modular design of v4 it might be possible to use twrp's ramdisk as the RECOVERY fragment and repack it with everything besides the recovery part of the rom vendor_boot. Here is a link for those who are interested https://source.android.com/docs/core/architecture/bootloader/partitions/vendor-boot-partitions.

On the other hand does the twrp vendor_boot just contain one kernel module which is also present in the boot image. I also tried to use vendor_boot v2 that moved the dto* files to the boot image, but I was not able to boot that way. Maybe I have to adjust some init stuff for the v2 approach.
 

TheSayaMan

Senior Member
Sep 12, 2016
610
268
OnePlus 9 Pro
Decryption is working now. But the caveat is that you have to flash a vendor_boot image to boot twrp. I'm looking to find a way around this either by avoiding it at all, which might not be possible, or by merging the rom and twrp vendor_boot into one. If someone has some experience or ideas please let me know.

If you want to test it, the best way is to download or extract a copy of your rom vendor_boot. After that you flash the twrp vendor boot and boot the boot.img the same way as the old twrp. In order to boot into your normal OS, the rom vendor_boot image has to be reflashed.

Here is a link to the two images you need:

I can confirm this works. I'm on CrDroid a13 and after booting twrp and using my pattern, it decrypts. Thank you!!!
 
  • Like
Reactions: tathagatab

Vladd

Member
Oct 2, 2005
9
1
First, I'd like to thank the developers, and then to put a couple of questions, just to clarify some details :)
I have a stock OP9 11.2.3.3 LE25BA rooted with Magisk-patched boot.img and Magisk 22.0 installed.
The first question is: as far as I understood, after booting into TWRP and permanently installing the TWRP through Advanced tab, I should reboot into Recovery, i.e. that just installed TWRP, and from there flash Magisk (I guess the same version installed on the phone, i.e. 22.0), but with extension changed to zip instead of apk, so it could be flashed? Thus the TWRP is installed and the root preserved?
The second question is: Does the current TWRP build, 3.7.0, have the full and reasonably reliable backup/restore functionality, and if not, what solution for that part, i.e. full backup of the phone and potential restore would you recommend (to clarify, only the local backup solutions, I don't want to have anything to do with any cloud, either BBK or, especially, Google :) )? Thank you very much.
 
Last edited:

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,120
34,310
Halifax
GT-i9250
Google Nexus 4
I have just noticed, after unpacking it, that I build vendor_boot v4, which still boots. Due to the modular design of v4 it might be possible to use twrp's ramdisk as the RECOVERY fragment and repack it with everything besides the recovery part of the rom vendor_boot. Here is a link for those who are interested https://source.android.com/docs/core/architecture/bootloader/partitions/vendor-boot-partitions.

On the other hand does the twrp vendor_boot just contain one kernel module which is also present in the boot image. I also tried to use vendor_boot v2 that moved the dto* files to the boot image, but I was not able to boot that way. Maybe I have to adjust some init stuff for the v2 approach.
v4 boots but this is a v3 device, and all the ROMs use v3 so TWRP should stick with that too for compatibility.

As for where the recovery resources are, OOS keeps them in boot partition ramdisk (i.e. boot-as-recovery/RECOVERY_AS_BOOT), but then Lineage moved them to the vendor_boot v3 ramdisk instead.

So yeah, one of my 2 ideas above could work.
 
Last edited:

der_akinator

Senior Member
Mar 27, 2015
75
87
Berlin
OnePlus 3T
OnePlus 9 Pro
First, I'd like to thank the developers, and then to put a couple of questions, just to clarify some details :)
I have a stock OP9 11.2.3.3 LE25BA rooted with Magisk-patched boot.img and Magisk 22.0 installed.
The first question is: as far as I understood, after booting into TWRP and permanently installing the TWRP through Advanced tab, I should reboot into Recovery, i.e. that just installed TWRP, and from there flash Magisk (I guess the same version installed on the phone, i.e. 22.0), but with extension changed to zip instead of apk, so it could be flashed? Thus the TWRP is installed and the root preserved?
The second question is: Does the current TWRP build, 3.7.0, have the full and reasonably reliable backup/restore functionality, and if not, what solution for that part, i.e. full backup of the phone and potential restore would you recommend (to clarify, only the local backup solutions, I don't want to have anything to do with any cloud, either BBK or, especially, Google :) )? Thank you very much.
I have not tested backup and restore for 3.7.0-12.1 but it should work as good as 3.7.0-11.0. You should not try to install the unofficial 3.7.0-12.1 build, it doesn't work. This is just for testing while temporarily booted.

For the official build I would do the installation as described by Nebrassy but I have not tested it and don't run OOS11.
 
Last edited:

Vladd

Member
Oct 2, 2005
9
1
I have not tested backup and restore for 3.7.0-12.1 but it should work as good as 3.7.0-11.0. You should not try to install the unofficial 3.7.0-12.1 build, it doesn't work. This is just for testing while temporarily booted.

For the official build I would do the installation as described by Nebrassy but I have not tested it and don't run OOS11.
Thank you for the warning, I went for 3.7.-11.0 in any case. In the meantime, I decided to try the installation and see what happens, had to install the recovery ramdisc, then flashed the Magisk 22.0 with a zip extension via Install, i.e. normally, rebooted into recovery just to see if all's OK, and then into System, and everything seems to be OK, the root is preserved etc.
 

Ionic_

Member
Jan 24, 2009
8
2
The Magisk APK is actually a hybrid: it can be used to install the manager on a running system and is also a flashable ZIP file.

You can just flash it without having to worry about the filename extension.
 
  • Like
Reactions: Aqq123

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Would it be possible to fix mounting a usb drive in this version, I really like being able to have twrp again however I'm still forced to boot the old img in order for my otg drive to mount. It'd be extremely nice if it were fixed in this version!
    I uploaded a new build that fixes OTG and a couple of other things.

    Here is the link to its thread:
    4
    Decryption is working now. But the caveat is that you have to flash a vendor_boot image to boot twrp. I'm looking to find a way around this either by avoiding it at all, which might not be possible, or by merging the rom and twrp vendor_boot into one. If someone has some experience or ideas please let me know.

    If you want to test it, the best way is to download or extract a copy of your rom's vendor_boot. After that you flash the twrp vendor boot and boot the boot.img the same way as the old twrp. In order to boot into your normal OS, the rom's vendor_boot image has to be reflashed.

    Edit: Permanent installation seems to work. So after installation as described by Nebrassy reboot to bootloader and reflash rom's vendor_boot. After that you should be able to boot into your normal OS and TWRP. I tested it with crdroid 13.

    Here is a link to the two images you need:

    3
    can you please explain again how to test it?
    and steps to flash because I didn't understand.
    what are the files needed
    thank you
    1. Get your rom's vendor_boot image. For most roms this can usually be downloaded. For OOS based roms you can get it for example by extracting it from the official payload.bin with payload-dumper-go. A third universal option, if you have root, is to use the command "dd if=/dev/block/by-name/vendor_boot_SLOT of=/sdcard/vendor_boot.img" on your device. This writes the vendor_boot image to your sdcard folder, but you have to substitute SLOT with either a or b, depending on your currently active slot.
    2. Reboot to bootloader.
    3. Run "fastboot flash vendor_boot vendor_boot.img" with the TWRP vendor_boot image.
    4. Run "fastboot boot boot.img" with the TWRP boot image.
    5. Optional permanently install TWRP as described by Nebrassy in the first post.
    6. Reboot to bootloader.
    7. Run "fastboot flash vendor_boot vendor_boot.img" with the rom vendor_boot image from step one.

    Permanent installation works fine for me with crdroid 13 and magisk installed. I have not tested any other roms or custom kernels. After permanent installation you can at any time reboot to recovery without reflashing vendor_boot.

    Here is the link for the two images:

    2
    Hi everyone,
    I have got TWRP 3.7 based on android 12.1 working, but data decryption still does not work. Any ideas how to get the logs? They are by default written to data which does not work. Is there a way to get them over adb or so?

    In the case someone is interested here are the links to the device tree:
    1
    I asked the dev earlier, and he said his script is to decrypt data not to get r/w. But if you do decrypt, does everything work in TWRP? Some people seem to think not. Can you give us screenshots of backup, restore, zip flash, etc? Also of file manager making r/w changes to /system partition? Thank you.
    This was discussed in crdroid telegram
  • 64



    Introduction:

    Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added a lot of our own features. It's 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.

    Key Features:

    Touchscreen driven with real buttons and drag-to-scroll
    XML-based GUI that allows full customization of the layout true theming!
    Settings are saved to the sdcard and persist through reboots
    Ability to choose which partitions to back up and which to restore
    Ability to choose to compress backups now with pigz (multi-core processor support for faster compression times)
    Onscreen keyboard
    Easy selection of internal/external storage

    In addition to the above new features, TWRP features a scripting engine that allows an app to send commands to the recovery for the recovery to perform during startup. We call this scripting engine OpenRecoveryScript. This engine will be put to use immediately in the GooManager app. GooManager will be able to install recoveries automatically for most supported devices. The app will also let you choose to install multiple zips from within Android, wipe, and run a backup.

    We are looking for other talented developers, themers, and device maintainers if they are interested in helping with a free, open source project.

    Source Code:

    GitHub - https://github.com/TeamWin/android_bootable_recovery

    Gerrit Instance - http://gerrit.twrp.me

    If you have made your own TWRP build for an unsupported device, please let us know. We might add your build to the list of unofficial builds. Bear in mind that we are working hard to add more devices and we may add your device to our official build list later.


    Hello, this is TWRP, for Oneplus 9/Pro

    Installation:
    1. fastboot boot twrp.img
    2. go to Advanced > Flash Current TWRP
    3. after that is done, if you were using a custom kernel, reflash it now
    4. if you were using magisk, reflash it now

    Updating to a newer build:
    1. download new build to internal storage
    2. go to Advanced > Install Recovery Ramdisk
    4. select the new image
    5. after that is done, if you were using a custom kernel, reflash it now
    6. if you were using magisk, reflash it now

    Send me a beer: Crypto(Preferred) | PayPal

    huge thanks to @osm0sis for help in making and testing this recovery

    Trees:
    https://github.com/TeamWin/android_device_oneplus_lemonadep
    https://github.com/TeamWin/android_device_oneplus_sm8350-common

    Telegram group: https://t.me/NSSFB

    Download: https://twrp.me/oneplus/oneplus9pro.html
    19
    new build is up

    fixed decryption on newer roms
    further fixes for flashing
    data can be formatted directly after flashing a rom
    added an option to auto flash TWRP after flashing a rom
    fixed the problem where you needed to refresh sizes before being able to flash TWRP
    17
    Official builds have started

    10
    While TWRP development's ongoing here, I figured I'd also upload an OP9x Series version of my stock recovery adb insecure patching AK3 zip, which can be handy if, for example, after an OTA TWRP doesn't work anymore due to some change in OOS. So if something then goes wrong at least we've got decrypted data and adb shell dmesg access for our various devices via stock recovery. Attached below. Simply flash via FKM or EXKM once you're already rooted, before you flash TWRP, and then you may dump that patched stock recovery boot.img for later use.

    Supporting OnePlus9/lemonade, OnePlus9TMO/lemonadet, OnePlus9VZW/lemonadev, OnePlus9Pro/lemonadep and OnePlus9ProTMO/lemonadept.

    For OnePlus9R/lemonades see my OP8x+9R Series zip (since 9R is closer to 8T than 9): https://forum.xda-developers.com/t/...-unified-stable.4101313/page-57#post-84204575

    For more instructions see my original OP7T Series zip post: https://forum.xda-developers.com/t/...-adb-in-recovery.4002843/page-3#post-82376013
    9
    Hmm, or not: https://jenkins.twrp.me/view/TWRP Release Android-12.1/ ☹️

    We need a new maintainer to bring-up the device tree to android-12.1, since @Nebrassy has confirmed he is stepping down.
    I **might** be interested in helping out. I want to get TWRP running on A12 on my OnePlus 9 Pro, too. I am a software engineer, so I'm familiar with dealing with code, git, and whatnot. But I've never done anything with Android, so I would need some pointers in what exactly is involved with maintaining a device tree. What is the purpose of the code in the device tree? I'm assuming it has to do with configuring TWRP for a specific device? What is the process for figuring out what the configuration is? How do I get started?