Development [RECOVERY][3.7.1_12-0][OFFICIAL][UNIFIED] TWRP with A12-A14 encryption support

Search This thread

TheSayaMan

Senior Member
Sep 12, 2016
1,916
1,091
OnePlus 9 Pro
OnePlus 11
I downloaded the file again, just in case I had a bad download like @TheSayaMan did.
Installation went through without a hitch. Rebooted into TWRP and could not see my folders again.
I plugged in a USB Drive and reinstalled Magisk from the USB and then rebooted back into OOS13.
Everything except Decrypting is working.
Is there anything you need from my Oneplus 9 Pro that can help you ??

I just looked up the encryption on Android 13 from source.android.com,
it seems that Android 12 and below can use Full Disk/File encryption,
but Android 13 can only use File encryption.
I don't know if this helps or not.
That's weird because I'm on crDroid a13 and decrpyt works for me through internal storage and even otg cable works on latest updates. Maybe it's carrier specific. I have the unlocked T-Mobile variant. I wouldn't think so.
 

Zeus0fyork

Senior Member
Nov 30, 2020
190
60
OnePlus 12
That's weird because I'm on crDroid a13 and decrpyt works for me through internal storage and even otg cable works on latest updates. Maybe it's carrier specific. I have the unlocked T-Mobile variant. I wouldn't think so.
I just MSMd and am in the process of attempting to get it working again on a fresh install. I'll update if it works. I'm on LE2125 (global unlocked)
 

der_akinator

Senior Member
Mar 27, 2015
253
454
Berlin
OnePlus 3T
OnePlus 9 Pro

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,451
Halifax
GT-i9250
Google Nexus 4
im running the latest version right now & somehow my /system folder is showing no other subfolders like /priv-app or /app (except for addon.d & apex and 1-2 others). anybody got the same issue? would love a fix, but im still grateful that i have a working twrp at all🙏🏽
You just haven't mounted it yet; you're looking at the ramdisk.
 

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,451
Halifax
GT-i9250
Google Nexus 4
i thought the same, so i mounted it but there was no change :/
Oh wait, you're right, but only sort of! It's mounting to /system_root now, and /system is still the ramdisk. I think that's the new norm from twrp-11 onward? Though I thought it was supposed to use /mnt/system or something at some point. 🤔
 
Last edited:

MENINBLK

Senior Member
Maybe I have found a fix for OSS users but I can't test it because I'm not running OOS. So please test this build.

SUCCESS !!!!

This is on F.16 OSS13.
F.17 incremental just was released but my bootloader is unlocked and I can only flash Full Updates.

There is just one little problem, the display says "Failed to mount '/vendor_dlkm' (block device required
I can't read the whole line, it runs off to the right of the screen,
it does not affect anything that I can tell.

TWRP display still says 3.7.0_12-0 not 12-1.

Do you want the log files again ?
 

der_akinator

Senior Member
Mar 27, 2015
253
454
Berlin
OnePlus 3T
OnePlus 9 Pro
SUCCESS !!!!

This is on F.16 OSS13.
F.17 incremental just was released but my bootloader is unlocked and I can only flash Full Updates.

There is just one little problem, the display says "Failed to mount '/vendor_dlkm' (block device required
I can't read the whole line, it runs off to the right of the screen,
it does not affect anything that I can tell.

TWRP display still says 3.7.0_12-0 not 12-1.

Do you want the log files again ?
So decryption is working on OOS13? Great. Yes I know there isn't an vendor_dlkm partition on OOS but this is needed to load kernel modules for custom roms. Does it affect you in any way or is it just the error message? Can you maybe test backups?
I'm will look how to overwrite the 3.7.0_12-0 but it's just cosmetic.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    The bad news is that the OOS 14 decryption issue is a kernel/dtb issue, which requires more time to hopefully identify and fix.

    The good news is that, you can use an unofficial OOS 14 boot image, which is linked below, to fastboot boot and decrypt data properly. I don't think it's compatible with OOS 13 firmware-based custom ROMs, but haven't tested that.
    Permanent installation with the official boot image and zip installer still works, but throws a lot of error messages.

    Is the boot.img in your G drive folder TWRP that I can use in fastboot? Thank you
  • 56
    This is an unofficial build of TWRP, based on the Android 12.1 branch, that supports encryption used by Android 12-14 ROMs. This build is tested on OP9 pro, but it was confirmed to work on regular OP9 too.

    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 Android 11 encryption, please use the official Android 11 based builds by
    @Nebrassy from:

    Download:

    Unofficial OOS 14 images:

    New official images:

    Old unofficial images:

    Installation:

    Permanent installation is not possible with TMO 12 stock ROM installed. With TMO 13 stock it's possible, but it was reported that uninstalling causes issues. OOS 14 is currently not supported.

    OOS users should make a backup of boot before installation. Otherwise incremental updates can't be applied.

    Installation overwrites all boot partition changes done previously (e.g. by Magisk or custom kernel). So you have to reflash all zips that change the boot partition after TWRP is installed.

    For permanent installation, you have three options 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.apk if previously installed (see example of how to install with Magisk manager below). Or alternatively flash zips in TWRP.
      1. Don't reboot
      2. Rename downloaded Magisk.apk to Magisk.zip
      3. Open Magisk app
      4. Select Modules tab
      5. Click "Install from storage"
      6. Select Magisk.zip
    2. Option for users with other custom recoveries but without root:
    1. Download the twrp-installer zip
    2. Reboot to recovery
    3. Flash it with "adb sideload twrp-installer*.zip"
    4. Reboot to recovery
    5. Reflash your custom kernel and Magisk.apk if previously installed
    3. Option is universal:
    1. Download boot.img
    2. Reboot to bootloader
    3. Run "fastboot boot boot.img" with the TWRP boot image on your PC
    4. Go to Advanced > Flash Current TWRP
    5. Reflash your custom kernel and Magisk.apk if previously installed

    Try without installation:
    1. Download boot.img
    2. Reboot to bootloader
    3. Run "fastboot boot boot.img" with the TWRP boot image on your PC

    Uninstall:

    Just flash the boot partition with your current ROMs boot image with the following steps.
    Replace "YOUR ROM BOOTIMAGE" with the filename of the extracted boot image of your current ROM.
    1. Reboot to bootloader
    2. Run "fastboot flash boot_a YOUR ROM BOOTIMAGE"
    3. Run "fastboot flash boot_b YOUR ROM BOOTIMAGE"
    Alternatively you can flash your currently installed OTA zip, which overwrites boot on the unused slot, but not on the currently used one.

    Collection of OOS boot images:

    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. Also use the "Automatically reflash TWRP after flashing a ROM" option, if you are going to install a ROM zip to preserve TWRP installation.

    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
    OOS full OTA updates should work out of the box.
    For incremental OOS updates, you have to flash the original boot image. Your can follow this short guide and use the boot image from link in the uninstall section.

    About backups/restore:

    Restore data only WITHOUT pin/pattern set.

    If you restore a backup made from another ROM, then the currently installed, you may have to format data. So please manually copy all contents from /sdcard to a PC or flash drive.

    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.
    To make first boot faster and eliminate the need to reboot again, additionally use the step mandatory for OOS users.

    If you want to copy your backup to PC, but it doesn't show up, flash change_backup_selinux_context.zip, which is available in download folder.

    For OOS users:
    When data is restored, you have to delete "/data/system/users/0/package-restrictions.xml" before rebooting to system.

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

    How to use MTP, adb and fastbootD:

    Windows:
    Install official Google USB drivers and select the right USB drivers. For MTP and adb, the WinUSB driver is sufficient on Windows 11. For fastbootD, Google drivers (Android Bootloader interface) has to be chosen.
    You may have to select WinMTP for MTP and Google USB drivers for adb, if you run Windows 10.

    To use adb on Windows, MTP has to be disabled with "Mount->Disable MTP" in TWRP.

    Steps for choosing a specific driver (no the exact wording):
    1. Connect phone in specific mode
    2. Open device manager
    3. Right click on phone either under "Android device" or "USB device", depending on mode
    4. Select "update driver"
    5. Select 2. option "browse my computer"
    6. Select "pick from available drivers"
    7. Pick driver according to above description
    Linux:
    1. Intall the fastboot and adb packages for your distribution
    2. Set udev rules. There might be a package for your distro or use this gh repo: https://github.com/M0Rf30/android-udev-rules
    3. Add user to the group used in udev rules. Most common are "plugdev" and "adbusers"

    Source Code:

    Bugs:
    • Permanent installation alongside TMO stock isn't possible
    • Error message regarding vendor_dlkm in fastbootD for OOS users (just cosmetic and not problematic)
    • In case you notice anything else please let me know.
    If you encounter any bug, please give me description with logcat.txt and recovery.log output attached. You can copy those to your data folder in TWRP, if you go to Advanced->Copy Logs.

    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!

    12
    Update
    • add Android 14 encryption support
    • sync all other changes
    I've done some quick tests with crdroid 9 (A13) and crdroid 10 (A14).

    11
    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.

    10
    Update
    • improve vibration support
    • fix kernel modules loading in fastbootd mode for custom roms (might result in an error message regarding vendor_dlkm for OOS users, but it's just cosmetic)
    Tested on LOS 19.1 (OOS 12 firmware) and crdroid 13 (OOS 13 firmware).