Development [RECOVERY][3.7.0-12.1][UNOFFICIAL][UNIFIED] TWRP with A12/A13 encryption support

Search This thread

der_akinator

Senior Member
Mar 27, 2015
130
187
Berlin
OnePlus 3T
OnePlus 9 Pro
Thanks, I was just taking advantage of the fact that I wanted to do a full wipe for testing.
Actually for me it is a minor problem, I can update directly from within the OS (although I don't know why in linege+op9 it takes so long, op5 in a few minutes).

What I do worry about is that I can't recover a backup (created with password pattern), I tried to remove the encryption before recovering (not before creating backup) without success.
Should I follow some special order to create/recover it? Maybe reinstall magisk/twrp before booting the system?


Thanks
Can you please provide a logcat and recovery.log output. I will look into it.
 

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,197
34,468
Halifax
GT-i9250
Google Nexus 4
If i am on a custom rom with custom recovery, what's the value to install twrp?
Device decryption in recovery so you can keep and flash all your zips on device. Full device backup and restore. Included nano editor and file manager to be able to edit files and rename/delete/change permission to help recover your device if something in your Magisk modules/scripts goes awry. The list goes on.
 
Last edited:

ThePresence

Senior Member
May 24, 2011
1,073
233
31
Mumbai
OnePlus 9 Pro
Thank you so much for the recovery .

I'm currently running custom rom 12.1, and if I want to upgrade to OOS 13, I can just flash it from the TWRP while keeping all of my data, is that correct? I'd like to know the same thing if I'm switching from 12.1 to any 13 custom roms.
 
Thank you so much for the recovery .

I'm currently running custom rom 12.1, and if I want to upgrade to OOS 13, I can just flash it from the TWRP while keeping all of my data, is that correct? I'd like to know the same thing if I'm switching from 12.1 to any 13 custom roms.
You should be able to flash OOS, but you will need to factory reset. Also, you'll need to check keep twrp after ROM flash, and a factory reset won't wipe your storage
 
  • Like
Reactions: ThePresence

ThePresence

Senior Member
May 24, 2011
1,073
233
31
Mumbai
OnePlus 9 Pro
You should be able to flash OOS, but you will need to factory reset. Also, you'll need to check keep twrp after ROM flash, and a factory reset won't wipe your storage
After wiping data (Excluding internal storage) I've flashed oos13 by downloading from oxygen updater then flashed twrp. but now I'm not able to boot and my internal storage shows nothing. What should I do?

@der_akinator is there anyway I can get my data back?
 
Last edited:

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,197
34,468
Halifax
GT-i9250
Google Nexus 4
After wiping data (Excluding internal storage) I've flashed oos13 by downloading from oxygen updater then flashed twrp. but now I'm not able to boot and my internal storage shows nothing. What should I do?

@der_akinator is there anyway I can get my data back?
You could try switching to the previous slot and hope it all still works.
 

ThePresence

Senior Member
May 24, 2011
1,073
233
31
Mumbai
OnePlus 9 Pro
You should be able to flash OOS, but you will need to factory reset. Also, you'll need to check keep twrp after ROM flash, and a factory reset won't wipe your storage
After wiping data (Excluding internal storage) I've flashed oos13 by downloading from oxygen updater then flashed twrp. but now I'm not able to boot and my internal storage shows nothing. What should I do?
You could try switching to the previous slot and hope it all still works.

I tried that but I'm getting the same issue. When I try to wipe again I'm getting unable to mount storage.
 
  • Sad
Reactions: osm0sis

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,197
34,468
Halifax
GT-i9250
Google Nexus 4
I didn't take any backup. I thought everything is working.
Try reflashing your previous working ROM to both slots.

A full data format is required when switching ROMs due the changing encryption. Everything is working, you just didn't format as instructed.

Edit: ****, just saw you were only told to Factory Reset... That's unfortunate. 🙁
 

JWnSC

Senior Member
Jul 9, 2010
514
281
Virginia Beach
Works great on 9 pro oos13 F17. One issue I've noticed is factory data reset doesn't work until you unmount and mount data. Also "Failed to mount '/vendor_dlkm ' ( Block device required" showed but doesn't seem to cause any issues.
Data restore worked didn't try to restore super.img yet tho.
It does work installing .img from internal storage. Tried super.img and boot.img both successful.
 
Last edited:
  • Like
Reactions: der_akinator

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,197
34,468
Halifax
GT-i9250
Google Nexus 4
I tried to flash lineage recovery but now fastboot is not able to recognize my phone
Sounds like you flashed it incorrectly then... If you're trying to use Lineage Recovery then follow the flashing instructions on their OP9Pro wiki page. Also that's the end of our troubleshooting here since it's not TWRP's fault you didn't format data when switching from custom to stock ROM.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Update
    • add vendor_boot and dtbo to backup targets
    • add CPU temperature output
    • fix vibration (still doesn't work in fastbootd mode)
    I tested this build on LOS 19.1 (OOS 12 firmware) and crdroid 13 (OOS 13 firmware). Also keep in mind that you have to use the boot image according to your installed firmware, if you want to install/test via fastboot.

    6
    Update

    This is mainly for OOS13 users that want to install via fastboot.
    • new OOS13 boot image for installation option 3 (tested on OP9pro with OOS13-F72 and F73)
    • adb works independently of mtp now. So it works before decryption and in fastbootd mode.
    4
    @der_akinator, could you add vendor_boot and dtbo to the list of partitions available on the Backup page? It'll cover everything important for custom kernels and recoveries in a backup/restore that way. 🤞😁
    Yes, I can upload a new build in a couple of hours.
    3
    Hi dear dev,

    I'm just playing a bit around with the loved twrp
    First the pro:
    Backup and restore working like a charm (saved me a few times)

    Cons for me (I know it's in early stage and not meant to work perfect on oos13)
    Formatting data is giving error : unable to check mergestatus ( see screenshot)
    Tried installing a Rom just for fun and a few errors appear (mount system, mount vendor etc. Failed) tried to I stall new nameless A13 rom

    Overall it's fantastic to have a dev who is working actively on making a great device even better
    Device : op9 pro running .F73 OOS13

    View attachment 5810375
    Just saying it's no big deal just wanted to say this if I could help you

    Greetings
    Benji
    There is some works regarding this issue but it isn't production ready yet. Maybe with the next TWRP release.
    3
    On Crdroid v8.12 with C.63 OOS12 firmware going into any menu freezes the build. Touch will work from the start but after that it freezes completely.
    I disabled vibration and replaced the last build. Was it the boot image or the zip installer that led to freezing?

  • 42
    This is an unofficial build of TWRP, based on the Android 12.1 branch, that supports encryption used by Android 12 and 13 ROMs. This build is tested on OP9pro but it was confirmed to work on OP9 with OOS 12 firmware installed. Other configurations have to be tested.

    As always I'm not responsible for any bricked device or data loss resulting from the use of this TWRP builds. You use this at your own risk.

    For ROMs using FBEv1 encryption aka A11 encryption, please use the official builds by
    @Nebrassy from:

    Download:


    Installation:

    You have three option for this depending on your current system.

    1. Option for rooted devices:
    1. Download the twrp-installer zip
    2. Flash it with Magisk manager or some other kernel flash utility
    3. Reflash your custom kernel and Magisk if previously installed
    2. Option for users with other custom recoveries but without root:
    1. Download the twrp-installer zip
    2. Flash it with "adb sideload twrp-installer*.zip"
    3. Reboot to recovery
    4. Reflash your custom kernel and Magisk if previously installed
    3. Option is universal:
    1. OOS13 (firmware) users please download boot-oos13.img. All other users please use boot.img
    2. Reboot to bootloader
    3. Run "fastboot boot boot*.img" with the boot image
    4. Go to Advanced > Flash Current TWRP
    5. Reflash your custom kernel and Magisk if previously installed

    TWRP Updates:
    1. Download and flash the twrp-installer zip
    2. After that reflash your custom kernel and Magisk if previously installed

    ROM Updates:

    Please follow the official update instructions for your ROM!


    If they give an option to update via recovery you have to substitute adb sideload commands with zip installations. And use the "Automatically reflash TWRP after flashing a ROM" option if you are going to install a ROM zip to preserve TWRP.

    In case your ROM does not provide a recovery update instruction you can try to update via recovery but you are on the safe side if you follow the official instructions. They always have a reason for their particular update instructions!

    Instructions that work for me (on LOS based ROMs):
    1. Flash ROM zip with "Automatically reflash TWRP after flashing a ROM" checked
    2. Flash your previously installed zips (custom kernel, Gapps, Magisk, etc)
    3. Reboot to system
    4. If Gapps packages keep crashing:
      1. Reboot to TWRP
      2. Flash Gapps again
      3. Reboot to system
    For OOS updates you can follow these steps (I haven't tested them):

    About backups/restore:

    Restore data only WITHOUT pin/pattern set.


    Backups can be made with or without pin/pattern set. It is always good practice to copy your backups to your PC or an USB drive. Also after you restored your data partition you have to reboot to system and do a second reboot to get a working system.

    In case you restore a backup with pin/pattern set or have some other issues I have a guide that works for me:

    Source Code:
    Bugs:
    • Vibration is not working
    • vendor_dlkm mount error in fastbootd mode
    • In case you notice anything else please let me know.

    Thanks to:
    • @Nebrassy for the original device tree
    • @osm0sis for the zip installer
    • TWRP team
    • LineageOS
    13
    Update
    • /data/fonts/* is excluded from backups (has to be verified by someone with backup errors)
    • screen turns completely off now
    • updated firmware files from LE2125_11.C.63 (maybe this helps with OOS13 problems)
    • initial installation is now possible without flashing vendor_boot (I tested a few combinations of installation methods and initial system configurations. So hopefully nothing is broken this time.)
    Have a happy New Year tomorrow!

    9
    Update
    • add vendor_boot and dtbo to backup targets
    • add CPU temperature output
    • fix vibration (still doesn't work in fastbootd mode)
    I tested this build on LOS 19.1 (OOS 12 firmware) and crdroid 13 (OOS 13 firmware). Also keep in mind that you have to use the boot image according to your installed firmware, if you want to install/test via fastboot.

    7
    Update

    Sorry for the short update cycles but there are some problems with vibration that results in heavy input delays.
    But the new update also includes a zip installer by @osm0sis which you can just flash to update your currently installed version.

    Download:
    7
    Update
    • fix Magisk installation bug
    • fix "failed to mount '/vendor_dlkm (Block device required)" error message on OOS