• We are moving to xdaforums.com!

    Posts made between now and when the migration is complete will not be carried over.
    You will be automatically redirected once the migration is complete.

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

Search This thread

immortalwon

Senior Member
Mar 11, 2017
258
120
I redownloaded LE2115_F17.zip and installed but still failed with the same error...
You are not being specific. How are you trying to flash the zip? Boot into TWRP, move the zip using a simple name like ota.zip in platform tools folder and go to twrp sideload.
In an admin command prompt from the same directory as the platform tools and ota, use this without quotes:
adb sideload ota.zip
make sure it's the right firmware.
 
  • Like
Reactions: TheGhost1951

Nhatlienhoan

Senior Member
Jun 17, 2020
71
11
OnePlus 5T
OnePlus 9
You are not being specific. How are you trying to flash the zip? Boot into TWRP, move the zip using a simple name like ota.zip in platform tools folder and go to twrp sideload.
In an admin command prompt from the same directory as the platform tools and ota, use this without quotes:
adb sideload ota.zip
make sure it's the right firmware.
I tried using TWRP flash and failed. Tried TWRP adb sideload and failed too. I think I have A12 firmware in slot A (I'm currently in slot B with lastest firmware 13.1) so I want to flash 13.0 F17 to slot A, but neither methods worked. Is it impossible to upgrade android version via TWRP?
 

TheGhost1951

Senior Member
Feb 11, 2009
2,066
537
Garfield
OnePlus 9 Pro
I tried using TWRP flash and failed. Tried TWRP adb sideload and failed too. I think I have A12 firmware in slot A (I'm currently in slot B with lastest firmware 13.1) so I want to flash 13.0 F17 to slot A, but neither methods worked. Is it impossible to upgrade android version via TWRP?
In TWRP switch to slot A, try to sideload again, if it fails, switch back to slot B and reboot back to system. From what I am seeing you are on A13.1 and wanting to downgrade back to A13.0.....there could be an issue there in that procedure with downgrading!
 

der_akinator

Senior Member
Mar 27, 2015
231
395
Berlin
OnePlus 3T
OnePlus 9 Pro
I tried using TWRP flash and failed. Tried TWRP adb sideload and failed too. I think I have A12 firmware in slot A (I'm currently in slot B with lastest firmware 13.1) so I want to flash 13.0 F17 to slot A, but neither methods worked. Is it impossible to upgrade android version via TWRP?
Unfortunately, you can't flash OOS OTAs with TWRP. At least not if you have a custom ROM installed. I never tried to do this with OOS already installed, but it might work. This is because all OOS full OTAs are marked as partial updates, which only updates a subset of partitions that have a time stamp older than the OTA. The problem is that custom ROMs, most of the time, don't have this time stamp set or are too recent.

You can either use MSM tool or extract the OOS OTA and flash partitions with fastboot.
Here is a project/script that uses the fastboot approach:
 

lg-optimus

Senior Member
Mar 5, 2012
256
17
3. Option is universal:
  1. Download 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.apk if previously installed

Sorry, I am a little bit confusted what to do exactly, because there are 3 files in the download.

There are 3 files in twrp-installer-3.7.0-12.1-8-lemonadep.zip
boot.img
ramdisk-recovery.img
twrp-installer-3.7.0-12.1-8-lemonadep.zip

I have a misflashed phone, which starts only in fastboot-mode, there is no recovery.

I have been told to install oneplus_9_pro_13.1.0.500ex01_firmware_flasher.zip too.

Please tell me which steps I have to do first.

The attached file, is the only screen where I can do something. Selecting recovery brings me back to this screen.
 

Attachments

  • fastboot-screen.jpg
    fastboot-screen.jpg
    46 KB · Views: 29

shadabkiani

Senior Member
Mar 2, 2018
488
192
Pakistan
HTC 10
OnePlus 9
Sorry, I am a little bit confusted what to do exactly, because there are 3 files in the download.

There are 3 files in twrp-installer-3.7.0-12.1-8-lemonadep.zip
boot.img
ramdisk-recovery.img
twrp-installer-3.7.0-12.1-8-lemonadep.zip

I have a misflashed phone, which starts only in fastboot-mode, there is no recovery.

I have been told to install oneplus_9_pro_13.1.0.500ex01_firmware_flasher.zip too.

Please tell me which steps I have to do first.

The attached file, is the only screen where I can do something. Selecting recovery brings me back to this screen.
Use the MSM Tool to revert your phone back to initial factory settings. This will revert back to OOS11. Download the correct version of MSM Tool for your phone variant from this link. Turn off your phone and set it aside, DO NOT connect to PC yet. Once your download MSM Tool zip, extract it. Then run the exe file. Once it loads, click Start. It will now wait for device. Now come back to your phone, hold vol+ and vol- buttons (without power button) and connect the data cable. Your phone will enter EDL mode, but the screen will still be off. Your PC will recognize the device, and flashing will start. In about 4-5 mins, it will be done. Once your phone reboots, upgrade your phone through System Update OTA.
 

der_akinator

Senior Member
Mar 27, 2015
231
395
Berlin
OnePlus 3T
OnePlus 9 Pro
Sorry, I am a little bit confusted what to do exactly, because there are 3 files in the download.

There are 3 files in twrp-installer-3.7.0-12.1-8-lemonadep.zip
boot.img
ramdisk-recovery.img
twrp-installer-3.7.0-12.1-8-lemonadep.zip

I have a misflashed phone, which starts only in fastboot-mode, there is no recovery.

I have been told to install oneplus_9_pro_13.1.0.500ex01_firmware_flasher.zip too.

Please tell me which steps I have to do first.

The attached file, is the only screen where I can do something. Selecting recovery brings me back to this screen.
You only need boot.img and you can probably skip permant Installation (steps 4 and 5) in your case. If you cant boot you habe to flash vendor_boot and dtbo images of any known a12 vor a13 rom.
I don't know what oneplus_9_pro_13.1.0.500ex01_firmware_flasher.zip does and what your exact issue is so you have to rely on the recommendations you got
 

lg-optimus

Senior Member
Mar 5, 2012
256
17
Thank you both. I have to say, that I want to install crdroid on the Lemonadep.

Use the MSM Tool to revert your phone back to initial factory settings.

I don't use Windows, but Linux-Ubuntu or Debian. I can organize a Win-Notebook if necessary. Is the Stock-ROM mandatory for going on?

You only need boot.img and you can probably skip permant Installation

So in which cases is ramdisk-recovery.img needed and when twrp-installer-3.7.0-12.1-8-lemonadep.zip

At the end I wand to have https://crdroid.net/apollon/9 installed, using the newest file from https://sourceforge.net/projects/crdroid/files/apollon/9.x/ Looks like newer files disappeared today, which yesterday existed.

For crdroid the following files exist: https://sourceforge.net/projects/crdroid/files/lemonadep/9.x/firmware/ I assume this is a fw-file? should be installed too with crdroid, but when.

As I undestand it, I should start with

Code:
fastboot boot boot.img

And then, there is the download link in the top of this thread, which is a zip file. Do I need to unpack this zip file?

Please tell me the steps exactly which I have to do.
 

der_akinator

Senior Member
Mar 27, 2015
231
395
Berlin
OnePlus 3T
OnePlus 9 Pro
Thank you both. I have to say, that I want to install crdroid on the Lemonadep.



I don't use Windows, but Linux-Ubuntu or Debian. I can organize a Win-Notebook if necessary. Is the Stock-ROM mandatory for going on?



So in which cases is ramdisk-recovery.img needed and when twrp-installer-3.7.0-12.1-8-lemonadep.zip

At the end I wand to have https://crdroid.net/apollon/9 installed, using the newest file from https://sourceforge.net/projects/crdroid/files/apollon/9.x/ Looks like newer files disappeared today, which yesterday existed.

For crdroid the following files exist: https://sourceforge.net/projects/crdroid/files/lemonadep/9.x/firmware/ I assume this is a fw-file? should be installed too with crdroid, but when.

As I undestand it, I should start with

Code:
fastboot boot boot.img

And then, there is the download link in the top of this thread, which is a zip file. Do I need to unpack this zip file?

Please tell me the steps exactly which I have to do.
If you just want to install crdroid it's best to follow the instructions from this thread:

BTW your crdroid links are for another device and you should only download from this page:

Running "fastboot boot boot.img" just loads TWRP into ram, without any modifications to your device. From there you can do all the TWRP things and also permanently install it. twrp-installer-3.7.0-12.1-8-lemonadep.zip is only needed if you want to install TWRP from any other recovery or from a userspace app (see installation options 1 and 2).

For more information about ramdisk-recovery.img read this post:

Edit:
If you have problems with fastboot, you have to add your user to the "plugdev" group on debian systems. You can read more about this in section "How to use MTP, adb and fastbootD" of first post.
 
Last edited:

shadabkiani

Senior Member
Mar 2, 2018
488
192
Pakistan
HTC 10
OnePlus 9
Thank you both. I have to say, that I want to install crdroid on the Lemonadep.



I don't use Windows, but Linux-Ubuntu or Debian. I can organize a Win-Notebook if necessary. Is the Stock-ROM mandatory for going on?



So in which cases is ramdisk-recovery.img needed and when twrp-installer-3.7.0-12.1-8-lemonadep.zip

At the end I wand to have https://crdroid.net/apollon/9 installed, using the newest file from https://sourceforge.net/projects/crdroid/files/apollon/9.x/ Looks like newer files disappeared today, which yesterday existed.

For crdroid the following files exist: https://sourceforge.net/projects/crdroid/files/lemonadep/9.x/firmware/ I assume this is a fw-file? should be installed too with crdroid, but when.

As I undestand it, I should start with

Code:
fastboot boot boot.img

And then, there is the download link in the top of this thread, which is a zip file. Do I need to unpack this zip file?

Please tell me the steps exactly which I have to do.
If you wannna flash crDroid, you don't need TWRP. Read the instructions on crDroid thread and you will see that you have to flash through adb sideload from the recovery image provided by crDroid. I must point out the fact that in OnePlus 9 (and all modern phones now) there is no dedicated recovery partition. Instead, recovery now resides inside boot.img. So thats why crDroid (and other ROM) instructions ask you to flash boot.img (along with dtbo.img and vendor_boot.img).
 
  • Like
Reactions: lg-optimus

lg-optimus

Senior Member
Mar 5, 2012
256
17
If you just want to install crdroid it's best to follow the instructions from this thread:

There I started and now I am in this discussion. But maybe you see, what I did wrong:

Code:
fastboot --version
fastboot version 34.0.3-10161052

So the platform-tools were the newest about 1 week before.


Code:
fastboot oem unlock
OKAY [  0.035s]
Finished. Total time: 0.035s

then:


Code:
fastboot flash dtbo dtbo.img
Sending 'dtbo' (24576 KB)                          OKAY [  0.600s]
Writing 'dtbo'                                     OKAY [  0.054s]
Finished. Total time: 0.683s

Code:
fastboot flash vendor_boot vendor_boot.img
Sending 'vendor_boot' (196608 KB)                  OKAY [  4.753s]
Writing 'vendor_boot'                              OKAY [  0.467s]
Finished. Total time: 5.268s

I see no problems.

Then I downloaded from https://twrp.me/oneplus/oneplus9pro.html the file twrp-3.7.0_11-0-lemonadep.img and renamed it.
Code:
fastboot boot twrp.img
Sending 'boot.img' (196608 KB)                     OKAY [  4.644s]
Booting                                            OKAY [  0.443s]
Finished. Total time: 6.956s

Looks still good, doesn't it?

Note, I flashed the official version and not the xda-twrp. Maybe this was the problem.

Preferred Installation Method: Once booted, navigate to the Advanced > Flash Current TWRP option. This will install the TWRP image you just booted permanently to the device.

Errors, but it says twrp flash complete.

twrp_flash_complete.jpg


NOTE: You also need to use the “Fix Recovery Bootloop” option present in the same Advanced Tab. Use that option after you have installed the recovery ramdisk successfully to avoid boot loops happening from installing TWRP Permanently.

Then I didn't find the Option “Fix Recovery Bootloop”. Maybe TWRP from XDA is needed.

bootloop1.jpg


bootloop2.jpg


Then I shut down TWRP and started the phone again with the buttons and i ended, that there is only fastboot mode.

If you have problems with fastboot, you have to add your user to the "plugdev" group on debian systems

I never noticed problems. "fastboot devices" always worked. I have flashed more than 10 Xiaomi phones without problems, the newest is MI 10T Pro Apollo. Looks like the partitioning is different to OP 9Pro. The Apollo belongs to devices with a dedicated recovery partition (non-A/B), so there is no need to flash twrp into RAM first with Apollo.

From there you can do all the TWRP things and also permanently install it. twrp-installer-3.7.0-12.1-8-lemonadep.zip is only needed if you want to install TWRP from any other recovery or from a userspace app (see installation options 1 and 2).

Not sure, if I understand this correctly.

Can I do

Code:
fastboot boot boot.img

Then

Code:
fastboot reboot recovery

If that doesn't work, which buttons should I try?

Assuming, I started TWRP in RAM now, should I flash then:
twrp-installer-3.7.0-12.1-8-lemonadep.zip

You write it is only needed, when... But is it wrong to do it?

Do I have to restart recovery then?

Is the next step to install the custom rom?

BTW your crdroid links are for another device

There was something strange, when I wrote the post above, but didn't find out what was wrong. Locally I have crdroidandroid-13.0-20230612-lemonadep-v9.5.zip I hope this is a correct file.

. Read the instructions on crDroid thread and you will see that you have to flash through adb sideload from the recovery image provided by crDroid.

Thanks, but I have no adb-access anymore, there is only fastboot. See the screenshot above
 

shadabkiani

Senior Member
Mar 2, 2018
488
192
Pakistan
HTC 10
OnePlus 9
There I started and now I am in this discussion. But maybe you see, what I did wrong:

Code:
fastboot --version
fastboot version 34.0.3-10161052

So the platform-tools were the newest about 1 week before.


Code:
fastboot oem unlock
OKAY [  0.035s]
Finished. Total time: 0.035s

then:


Code:
fastboot flash dtbo dtbo.img
Sending 'dtbo' (24576 KB)                          OKAY [  0.600s]
Writing 'dtbo'                                     OKAY [  0.054s]
Finished. Total time: 0.683s

Code:
fastboot flash vendor_boot vendor_boot.img
Sending 'vendor_boot' (196608 KB)                  OKAY [  4.753s]
Writing 'vendor_boot'                              OKAY [  0.467s]
Finished. Total time: 5.268s

I see no problems.

Then I downloaded from https://twrp.me/oneplus/oneplus9pro.html the file twrp-3.7.0_11-0-lemonadep.img and renamed it.
Code:
fastboot boot twrp.img
Sending 'boot.img' (196608 KB)                     OKAY [  4.644s]
Booting                                            OKAY [  0.443s]
Finished. Total time: 6.956s

Looks still good, doesn't it?

Note, I flashed the official version and not the xda-twrp. Maybe this was the problem.



Errors, but it says twrp flash complete.

View attachment 5932203



Then I didn't find the Option “Fix Recovery Bootloop”. Maybe TWRP from XDA is needed.

View attachment 5932205

View attachment 5932207

Then I shut down TWRP and started the phone again with the buttons and i ended, that there is only fastboot mode.



I never noticed problems. "fastboot devices" always worked. I have flashed more than 10 Xiaomi phones without problems, the newest is MI 10T Pro Apollo. Looks like the partitioning is different to OP 9Pro. The Apollo belongs to devices with a dedicated recovery partition (non-A/B), so there is no need to flash twrp into RAM first with Apollo.



Not sure, if I understand this correctly.

Can I do

Code:
fastboot boot boot.img

Then

Code:
fastboot reboot recovery

If that doesn't work, which buttons should I try?

Assuming, I started TWRP in RAM now, should I flash then:
twrp-installer-3.7.0-12.1-8-lemonadep.zip

You write it is only needed, when... But is it wrong to do it?

Do I have to restart recovery then?

Is the next step to install the custom rom?



There was something strange, when I wrote the post above, but didn't find out what was wrong. Locally I have crdroidandroid-13.0-20230612-lemonadep-v9.5.zip I hope this is a correct file.



Thanks, but I have no adb-access anymore, there is only fastboot. See the screenshot above
It seems you don't read properly what we are telling you, do you? You DO NOT need TWRP to flash crDroid...... Follow crDroid thread, read the instructions properly, then you will understand.... Forget about TWRP if your only purpose is to flash a ROM....
 

shadabkiani

Senior Member
Mar 2, 2018
488
192
Pakistan
HTC 10
OnePlus 9
@der_akinator I see that in the latest folder 23-05-16, you have removed the OnePlus 9's unified recovery. Was there a problem? I remember it worked fine on my device, which is OP9. I still have it downloaded, but I just wanna know if there was an issue since you removed it.

Secondly, I would like to make a humble suggestion on the thread title. It currently says 3.7.0-12.1 but the recovery has been updated to 3.7.0_12-8. Also notice the _ and -. It would be better if written correctly, in my humble opinion.

P.S. I just downloaded boot.img from 23-05-16, and it worked too. Previously, it wouldn't work so you compiled and uploaded a separate version for OP9 for testing. So have you now fixed the main boot.img, and that's why you removed the test one?
 

der_akinator

Senior Member
Mar 27, 2015
231
395
Berlin
OnePlus 3T
OnePlus 9 Pro
@der_akinator I see that in the latest folder 23-05-16, you have removed the OnePlus 9's unified recovery. Was there a problem? I remember it worked fine on my device, which is OP9. I still have it downloaded, but I just wanna know if there was an issue since you removed it.

Secondly, I would like to make a humble suggestion on the thread title. It currently says 3.7.0-12.1 but the recovery has been updated to 3.7.0_12-8. Also notice the _ and -. It would be better if written correctly, in my humble opinion.

P.S. I just downloaded boot.img from 23-05-16, and it worked too. Previously, it wouldn't work so you compiled and uploaded a separate version for OP9 for testing. So have you now fixed the main boot.img, and that's why you removed the test one?
Sorry for the confusion. After I got conformation that the boot images in lemonade-test work, I moved it to 23-05-16. That boot image now works for OOS 12 and 13 firmware and also on pro and non pro. There are no changes to twrp, just the kernel that is used to temporarily boot
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    still no official twrp version for android 13 ?
    A couple of other devs and I are working on a TWRP build based on A13 sources. But progress is slow, mainly due to the fact that it will not bring much benefit compared to A12.

    Some updates about the state of official OP9 (A12) builds:
    The latest device-specific changes have been uploaded and are mostly reviewed. A new point release is planned for the near future, so official builds will be available soon. I don't see much benefit in having official nightly builds, because this is what you can get here, or builds from 3.7.0 sources that are missing some bug fixes.
    5
    Hello! Please help! What TWRP should be put on android13? Phone OnePlus 9 Pro LE 2127
    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
    4
    Thank you! But which version of TWRP needs to be installed? On android 12 I installed 3.7.0_11-0-emonadep.zip. Is this version suitable for android 13 or not?
    3.7.0_12 is fine for A12 and A13.The old 3.7.0_11version has issues with encryption
    For LE 2127, you have to make a backup of your boot partition. Otherwise you can get problems when you try to update.
    3
    If it is not difficult. Tell me how to create on OnePlus 9 Pro backup boot partition ?
    the backup is only important, if you are using OOS (stock ROM). For that you can also follow "Try without installation" and use the backup feature. You can either make a full backup or just select "boot" an make a backup.
    3
    still no official twrp version for android 13 ?
    The 12 branch decrypts 13 just fine.
  • 55
    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 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 A11 encryption, please use the official builds by
    @Nebrassy from:

    Download:


    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 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!

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

    10
    Good new for OOS users. One of the TWRP devs found a workaround for data restore on OOS. Just delete "/data/system/users/0/package-restrictions.xml", after data is restored. I will exclude this file by default in a future build, but for existing backups, the file must always be removed manually.

    Edit:
    This is also useful for custom ROMs, because it makes first boot faster and eliminates the need to reboot again.