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

Search This thread

javi2246

Member
Jul 22, 2022
31
6
@MENINBLK had the exact same problem also with google fonts. Maybe he found a solution for that. I will try to replicate for myself and search for a solution.
A few weeks ago I was gossiping on zulip (twrp) and they were talking about this problem. But I don't know if it was in the general, dev or where.
The truth is I have a ****ty memory, so you better ask them directly if you want fix the problem 😅, maybe @osm0sis remember.

I would try to lend a hand, but I have no idea about programming :/

Edit: It doesn't pose any problem to me, you just have to delete those fonts... The OS continues to function well without them.
 
  • Like
Reactions: osm0sis

patkoz16

Member
Jul 2, 2020
22
0
OnePlus 9 Pro
po aktualizacji do Androida 12.1 na powłoce fastboot boot boot.img wyświetlacz utknął w najbliższym fastboot? masz rozwiazanie??

spróbuj fastboot flash boot boot.img?
 
Last edited:

der_akinator

Senior Member
Mar 27, 2015
127
168
Berlin
OnePlus 3T
OnePlus 9 Pro
after update to android 12.1 on shell fastboot boot boot.img display stuck in fastboot mode ? you have solution ??
Please read Option 3 of the installation instruction. If you are not using root or any other custom recovery you have to first flash vendor_boot.img before fastboot boot boot.img. But at first get the vendor_boot.img of your current system.
 

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,192
34,452
Halifax
GT-i9250
Google Nexus 4
A few weeks ago I was gossiping on zulip (twrp) and they were talking about this problem. But I don't know if it was in the general, dev or where.
The truth is I have a ****ty memory, so you better ask them directly if you want fix the problem 😅, maybe @osm0sis remember.

I would try to lend a hand, but I have no idea about programming :/

Edit: It doesn't pose any problem to me, you just have to delete those fonts... The OS continues to function well without them.
I seem to recall @BillGoss reporting that deleting the offending font files had no negative effect, and maybe that the ROM recreates the files after restore and some uptime. Not sure if a general fix was proposed to exclude/fix the issue on the Gerrit or anything, however.
 
  • Like
Reactions: javi2246

patkoz16

Member
Jul 2, 2020
22
0
OnePlus 9 Pro
Przeczytaj opcję 3 instrukcji instalacji. Jeśli nie używasz roota ani żadnego innego niestandardowego odzyskiwania, musisz najpierw sflashować vendor_boot.img przed fastboot boot boot.img. Ale najpierw pobierz vendor_boot.img swojego obecnego systemu.
flash vendor boot to boot or to recovery ? vendor boot.img from my telephone or vendor boot from link this topic ?
 

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,192
34,452
Halifax
GT-i9250
Google Nexus 4
Please read Option 3 of the installation instruction. If you are not using root or any other custom recovery you have to first flash vendor_boot.img before fastboot boot boot.img. But at first get the vendor_boot.img of your current system.
One update you should add to Option 1 is that after flashing the TWRP zip in Magisk you don't need to reboot to recovery, you can immediately reflash Magisk with Direct Install in the app, and then any custom kernel from any kernel flasher app before rebooting. 😁
 
Last edited:

der_akinator

Senior Member
Mar 27, 2015
127
168
Berlin
OnePlus 3T
OnePlus 9 Pro
I noticed a similar error when rebooting into fastbootd. Even on Lineage. Not sure what's up there.

I believe there is no twrp-12 branch in effect, only 12.1, so 3.7.0_12 is correct and matches mainline TWRP. Best to leave it alone.

Would be nice if you could adjust the status header to be below the holepunch when you get the chance! Awesome (and rapid!) work here! 🤘😁

Edit: Oh wait, you just meant the build iteration from -0 to -1! 🤦‍♂️😅
Strange los is using vendor_dlkm but same error on my device too. Any ideas how to pull logs? ADB in fastbootd mode seems to be broken.
 

BillGoss

Senior Member
Sep 2, 2010
5,494
4,855
Sydney
OnePlus 8T
I seem to recall @BillGoss reporting that deleting the offending font files had no negative effect, and maybe that the ROM recreates the files after restore and some uptime. Not sure if a general fix was proposed to exclude/fix the issue on the Gerrit or anything, however.
The backup will fail if there are files (directories are ok) under /data/fonts and /data/nandswap
There was some discussion at the time about excluding them, but it never came to a resolution.

I've never had issues after deleting the files, though they sometimes come back and I've never worked what causes them to reappear.

The problem also affects Orange Fox as it's based on TWRP.
 

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
15,192
34,452
Halifax
GT-i9250
Google Nexus 4
Strange los is using vendor_dlkm but same error on my device too. Any ideas how to pull logs? ADB in fastbootd mode seems to be broken.
I believe adb is tied to MTP Enabled for some reason with the current USB config on this device, but of course there's no data decryption or MTP in fastbootd mode, so no adb.

I'm not sure if @Nebrassy ever figured out how to fix it, but you might want to pick his or other maintainers' brains about it on Zulip.
 
Last edited:

der_akinator

Senior Member
Mar 27, 2015
127
168
Berlin
OnePlus 3T
OnePlus 9 Pro
  • Like
Reactions: osm0sis

patkoz16

Member
Jul 2, 2020
22
0
OnePlus 9 Pro
Last edited:

Steve0007

Inactive Recognized Developer / Retired Forum Mod
May 10, 2009
5,643
8,920
Paris
OnePlus 8T
OnePlus 9 Pro
@der_akinator
FYI
Currently on latest OOS 13
Flashing twrp thru Magisk, and directly Flasing back magisk works fine
But trying to backup data dont work (error 255).
Also asked for user 10 (company profil) decryption code... Which we don't have.
 
  • Like
Reactions: Smedslund

der_akinator

Senior Member
Mar 27, 2015
127
168
Berlin
OnePlus 3T
OnePlus 9 Pro
@der_akinator
FYI
Currently on latest OOS 13
Flashing twrp thru Magisk, and directly Flasing back magisk works fine
But trying to backup data dont work (error 255).
Also asked for user 10 (company profil) decryption code... Which we don't have.
Is the user 10 profile specific to you or is this a default profile setup by OOS? I might install OOS13 myself and see whats going on there. Multi user system seem to be a common problem in TWRP. I will try to look into the backup code but it will probably take a bit longer to find a workaround for that. If I can find a solution at all for this...
 
  • Like
Reactions: osm0sis

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Update
    • fix Magisk installation bug
    • fix "failed to mount '/vendor_dlkm (Block device required)" error message on OOS
    5
    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
    First of all, edit your old post instead of making a new one each time you try...

    Second, maybe if xda's having trouble with attachments for you then you should stop trying to upload to xda? Try Google Drive or something instead...

    5 posts in a row like "did it work?" is a bit ridiculous.
    3
    😍

    What was breaking losetup?!

    I was about to try it with my busybox builds today to see if it worked any better.

    Official TWRP status wen? 🙌
    I disabled internal TWRP APEX handling. I think TWRP might have blocked the loop devices but I'm not sure why magisk installer couldn't create a new loop device. Maybe loop-control was constantly blocked by TWRP.

    I will do a bit of code cleanup and ask in zulip to make it official.
    3
    OP9 not Pro version.
    Stock rom full updated to the last version. ( I can't remember what version was)

    Finally I got a brick and I unbricked with MSM and with stock rom.


    At this point I'm on Oxygen OS 11.2.10.10 LE25AA on OP9 model LE2113.
    with fastboot boot twrp.img was not working.
    I installed official "twrp-3.7.0_11-0-lemonadep.img" and then install with adb sideload twrp-installer-3.7.0-12.1-2-lemonadep.zip


    Recovery is loaded correctly but i'm not able to use (touch isn't working) also I tryed OTB mouse & keyboard but not working.
    I might have found a fix but for testing I depend on you because I haven't an OP9. If you want to stay on OOS11 you should probably use the official TWRP 3.7.0-11.0 version due to differences in encryption.

  • 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 installer zip
    • 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!

    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
    5
    Now it's working fine. I'm trying to find a way to flash twrp again.

    Edit flashed vendor.boot image and boot.img and now my phone is dead I gues it's not responding at all.

    Phone is booted to bootloader now.
    If you flashed boot then that's the problem. You don't flash boot. You boot it first.
    fastboot boot boot.img
    Follow the instructions and you won't have any problems.