[RECOVERY] [13] [UNOFFICIAL] TeamWin Recovery Project (8T / 9R) (2022-07-27)

Search This thread

parag0n1986

Senior Member
May 3, 2015
373
100
38
LG V20
OnePlus 7 Pro
You only need to turn airplane mode on for kb2003 (EU).
Yeah, I missed that declaration when reading the instructions lol! Either way, I love having a working TWRP! Still don't think it formats data perfect after flashing a custom ROM, but that's no skin off my back! 😂

EDIT: I saw the EU only part on the 1.4 instructions, but I was on C33 EU OOS 12 firmware at the time for the custom ROM I was running, but restore still worked without airplane mode on before doing the backup. 🤷
 

BillGoss

Senior Member
Sep 2, 2010
5,920
5,244
Sydney
OnePlus 8T
Google Pixel 8 Pro
Yeah, I missed that declaration when reading the instructions lol! Either way, I love having a working TWRP! Still don't think it formats data perfect after flashing a custom ROM, but that's no skin off my back! 😂

EDIT: I saw the EU only part on the 1.4 instructions, but I was on C33 EU OOS 12 firmware at the time for the custom ROM I was running, but restore still worked without airplane mode on before doing the backup. 🤷
Thanks for that. So it's clearly the system partitions of EU that cause the need for AP to be on for a successful restore.
 

mslezak

Senior Member
Dec 12, 2016
456
487
Houston
OnePlus 8T
Samsung Galaxy S23
Be careful on OOS, don't try doing a data backup restore. I tried, then my phone was stuck in a bootloop and I had to EDL it back to life. I tried without a sim card, although I didn't read that you need to remove your login password - maybe it works in that case. Good for flashing other partitions and backing up recovery and boot at least.
 
Last edited:

BillGoss

Senior Member
Sep 2, 2010
5,920
5,244
Sydney
OnePlus 8T
Google Pixel 8 Pro
Be careful on OOS, don't try doing a data backup restore. I tried, then my phone was stuck in a bootloop and I had to EDL it back to life. I tried without a sim card, although I didn't read that you need to remove your login password - maybe it works in that case. Good for flashing other partitions and backing up recovery and boot at least.
Did you read this https://xdaforums.com/t/recovery-12...roject-8t-9r-2022-07-27.4473983/post-87271673 ?
Backup and restore works just fine ... if you do it properly 😊
 
Last edited:

mslezak

Senior Member
Dec 12, 2016
456
487
Houston
OnePlus 8T
Samsung Galaxy S23

BillGoss

Senior Member
Sep 2, 2010
5,920
5,244
Sydney
OnePlus 8T
Google Pixel 8 Pro
I missed this from one of your posts and happened to be on the "not working" build. All okay back in business.

Re:
PSA: restoring a backup on KB2003 C.33 doesn't work. The restore doesn't give any errors but the phone will not boot - it just sits on the OnePlus boot animation.
Did you take the backup with Airplane mode enabled? It's specifically mentioned in the post I linked.
 
  • Like
Reactions: parag0n1986

BillGoss

Senior Member
Sep 2, 2010
5,920
5,244
Sydney
OnePlus 8T
Google Pixel 8 Pro
I've just noticed that the thread's title now says Discontinued and the download link no longer works.
I'm really sorry to see this and hope @Siddhant221 is ok.

I'm attaching the installer zip (installs it to both slots) of the last version (I've renamed it to show the date it was created). If you want the image file, get it by unzipping the installer).
 

Attachments

  • TWRP-3.6.2_12_220827.zip
    34.6 MB · Views: 89

Siddhant221

Member
Mar 31, 2020
13
40
OnePlus 9R
I've just noticed that the thread's title now says Discontinued and the download link no longer works.
I'm really sorry to see this and hope @Siddhant221 is ok.

I'm attaching the installer zip (installs it to both slots) of the last version (I've renamed it to show the date it was created). If you want the image file, get it by unzipping the installer).
Yeah i am ok thanks for asking I made it alive again considering i will further continue the development and i had to focus on studies too so development will be slow af
 

xHasKx

Member
May 27, 2018
26
4
Hi all,

I have a OnePlus 8T (kebab) with LineageOS 18.1 signed with my own key and a locked bootloader.
To have a way to backup the whole data I built a TWRP, signed it with my key, and installed it into the recovery_b partition (with proper vbmeta_b partition too).

For now, everything works well except that when I boot into TWRP - it asks for a PIN code to decrypt data and has a Cancel button available allowing anyone without knowing a PIN code to enter into TWRP and to read/write all partitions.
Despite userdata being encrypted, it's a big known hole in the security of my setup.

Thus I'm searching for a way to disable/remove the Cancel button on the data decryption screen with the PIN code prompt.

Maybe I can change the TWRP XML theme somehow to disable/remove/shift the Cancel button out of the screen to avoid accessing TWRP without a PIN?
Or is there any other way to achieve that?

I would appreciate any help/suggestions.
 

Wishmasterflo

Senior Member
Nov 21, 2018
1,788
1,435
Stockholm
OnePlus 8T
Google Pixel 7a
Hi all,

I have a OnePlus 8T (kebab) with LineageOS 18.1 signed with my own key and a locked bootloader.
To have a way to backup the whole data I built a TWRP, signed it with my key, and installed it into the recovery_b partition (with proper vbmeta_b partition too).

For now, everything works well except that when I boot into TWRP - it asks for a PIN code to decrypt data and has a Cancel button available allowing anyone without knowing a PIN code to enter into TWRP and to read/write all partitions.
Despite userdata being encrypted, it's a big known hole in the security of my setup.

Thus I'm searching for a way to disable/remove the Cancel button on the data decryption screen with the PIN code prompt.

Maybe I can change the TWRP XML theme somehow to disable/remove/shift the Cancel button out of the screen to avoid accessing TWRP without a PIN?
Or is there any other way to achieve that?

I would appreciate any help/suggestions.
I dont think there is any other way than editing the XML file to achieve that.
 

tyler19820201

Senior Member
Jun 19, 2011
463
101
London
I did a mistake yesterday and accidentally i was wiping metadata. I have twrp full backup ( around 38GB) on my laptop but twrp does not see sdcard content anymore. therefore i am not able to adb push backup on my phone as i have not enough space on my device as other backup is taking the space. But i can not delete it as twrp ( and adb shell also) could not see....
Any workaround for this??
 

xHasKx

Member
May 27, 2018
26
4
I did a mistake yesterday and accidentally i was wiping metadata. I have twrp full backup ( around 38GB) on my laptop but twrp does not see sdcard content anymore. therefore i am not able to adb push backup on my phone as i have not enough space on my device as other backup is taking the space. But i can not delete it as twrp ( and adb shell also) could not see....
Any workaround for this??
You can copy your TWRP backup to the USB Flash Drive and connect it to your phone with the USB OTG adapter. Then TWRP can use it as a backup source.
 
  • Like
Reactions: tyler19820201

xHasKx

Member
May 27, 2018
26
4
I think you can copy only metadata backup files from your backup folder and place it in a proper way in the empty /sdcard location (which is tmpfs AFAIK). So actually backup will be copied into memory but TWRP will be able to see it and restore
 

tyler19820201

Senior Member
Jun 19, 2011
463
101
London
exactly. this is only 3 files metadata.ext4.win metadata.ext4.win.sha2 metadata.info
but i am not sure about the "proper way"....
 

parag0n1986

Senior Member
May 3, 2015
373
100
38
LG V20
OnePlus 7 Pro
I did a mistake yesterday and accidentally i was wiping metadata. I have twrp full backup ( around 38GB) on my laptop but twrp does not see sdcard content anymore. therefore i am not able to adb push backup on my phone as i have not enough space on my device as other backup is taking the space. But i can not delete it as twrp ( and adb shell also) could not see....
Any workaround for this??
Have you tried flashing the ROM you want but a clean flash, then flash TWRP so you can see SDcard again and then adb push the backup to restore?
 
  • Like
Reactions: tyler19820201

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    photo_2022-07-29_12-00-36.jpg
    photo_2022-07-29_11-59-52.jpg
    photo_2022-07-29_12-00-09.jpg


    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.

    Extra Fixes :-
    Switched To 60 fps from 30 fps
    Variant Script Fixed
    Boot Control Revision from 1.1 to 1.2
    Added Fix for Transferring File Above 4GB
    Added Recovery Recovery Variant Of Fastboot Client

    Working :-
    Decryption
    Fixed TWRP Boot up time
    Backup/Restore Fixed :)
    ADB/MTP
    Flashing Rom
    stock rom flashing is now supported
    fixed fastbootd and adb sideload
    Both Ext4 & Erofs is supported

    BUGS :-
    Other Bugs You tell me that !!!


    Source Code:

    GitHub - https://github.com/TeamWin/android_bootable_recovery
    Gerrit Instance - http://gerrit.twrp.me

    Hello, this is TWRP, for Oneplus 8T/9R

    Installation:
    # To temporarily boot it
    fastboot boot <twrp_file_name>.img

    # Since 8T/9R has a separate recovery partition, you can flash the recovery with
    fastboot flash recovery <twrp_file_name>.img

    Updating to a newer build:
    Simply flash the latest TWRP installer zip from TWRP

    OR

    Flash the img from TWRP/fastboot

    Send me a beer, if you think I deserve it: PayPal


    Huge thanks to:
    @bigbiff (For everything :D 🥰 )
    @Lossyx
    @osm0sis
    @Nebrassy
    @Qnorsten
    @TheIncognito

    for helping in making this recovery. Without these people, TWRP for this device would not have been possible. :D

    Trees:
    Device: https://github.com/ApexLegend007/twrp_device_oneplus_lemonades
    Kernel: https://github.com/OnePlusOSS/android_kernel_oneplus_sm8250/tree/oneplus/sm8250_s_12.1

    Download:
    https://github.com/ApexLegend007/twrp_device_oneplus_lemonades/releases



    Steps for backing up and restoring data in TWRP (Huge thanks to @BillGoss )

    Flashing Rom :-

    Make Sure That you have OOS 13 firmware On both slots before flashing rom based on OOS 13 firmware
    Copy Rom.zip in your internal Storage Take Backup if you want to take backup Data Backup instruction are given below👇
    After Flashing rom format data and reboot
    (!!!!! Warning After flashing custom rom zip The recovery will get changed to AOSP recovery in the inactive slot in which rom got flashed if you want to flash twrp in that same recovery you can do it in bootloader mode!!!!!)


    TWRP for data backup on custom ROMs:


    1. Backup /data (copy the backup folder to PC if you will format /data).
    2. Flash the ROM and boot it once to system.
    3. Restore /data (copy the backup folder back from PC if you formatted in step 1) and boot into system.
    4. If you find any issues like missing navigation bar or blank screen or something, just do a normal reboot again to system.
    System Backup and Restore
    The "system" partitions on the OnePlus 8T/9R are:
    • Boot
    • DTBO
    • Super which contains the logical system, system_ext, odm, product, and vendor partitions
    • VBMETA
    • VBMETA_SYSTEM
    Just backup and restore these partitions.
    Do NOT backup/restore any of the logical partitions individually.

    Data Backup
    1. Make sure USB debugging is enabled
    2. You do NOT need to remove your password
    In TWRP
    1. Backup: Select only the Data partition.
    2. Reboot System
    Restore
    Remove the current password before starting the restore process by Settings>Security & Lock Screen>Screen lock: Select Swipe (if prompted tap on "Yes, remove")
    If you don't do this, the system will not reboot properly after restoring.

    This will also remove your fingerprint data and your lockscreen (encryption) password (you won't be prompted for a password in TWRP or when you restart the system)

    In TWRP
    1. Wipe>Factory Reset
    2. Reboot System (this will rebuild the data partition)
    Back in TWRP
    1. Restore: Select the backup you want to restore
    2. Remove the SIM card. If you don't do this the system won't boot properly.
    3. Reboot system, making sure the phone is not connected to a PC
    Notes:
    1. At this point the phone will take longer than usual to boot - that's normal
    2. You will be presented with a blank screen
      • Connect the phone to a PC. You should be able to see the phone using adb devices
      • Disconnect the phone from the PC
    3. Hold the Power button down and select Restart
    In System
    1. Settings>Security & Lock Screen>Screen lock: set your password
    2. Insert the SIM card
    Note: Your fingerprints will have been restored because the backup was taken with the password set.
    13
    Updated 220821 after testing V1_4 (see OP for download)
    TWRP 12 is now fully functional from my perspective
    ** On OOS 12 C21 or later ONLY ** - It will not boot on earlier versions of OOS

    Note: I have NOT tested, nor intend to test, TWRP 12 with any custom roms.

    What works:
    • Backup and restore of data (tested on KB2003 and KB2005)
    • Flashing OTA zips - both full and incremental. Note: incremental OTAs need stock boot and recovery installed so make sure you flash these before starting the install, otherwise it will fail.
    • Rooting by flashing Magisk-*.apk
    • Sideloading
    • Fastbootd
    • OTG
    Known problems:
    • Backups will fail if there are *.ttf files in /data/fonts/files/*/ or if /data/nandswap is present.
      I delete /data/nandswap and all the directories in /data/fonts/files (using my file manager - Solid Explorer) before booting recovery because I've had issues with deleting the directories in TWRP.
    Things to be aware of:
    • EU only: You MUST have Airplane mode turned ON before you take a data backup in TWRP to ensure that the system starts properly after restoring the data backup.
      Update 230511: turning on Airplane mode is no longer necessary as of KB2003_11_F.63.
    • You do not need to remove the lock screen password before taking a backup
    • You MUST remove the lock screen password before restoring a backup (TWRP warns you to do this) otherwise the phone will boot up in an unusable state. And you'll have to format /data to get out of this.
    • After a restore you will have to reboot the phone 2 (usual) or more (I've had to do 4) times before you can properly enter the system. Note that if your backup was taken with a password then your fingerprints will also restored.
    • You do not need to remove the SIM card when rebooting after restoring a data backup (as was necessary with TWRP 11).
    • You may need to clear the storage from some of your apps before they'll work properly after a restore.
    Download: I've attached a flashable zip that installs it to both slots. It can be flashed in TWRP or Magisk (in Modules). Md5sum: 67fc2359908fbce21c23d79f651538bb
    5
    Amazing, I know it was tough for the developers to get TWRP working for A12 and didn't think it would be done anytime soon. This is great as so many custom A12 Roms are being released with bug fixes. Many thank you's to all involved.
    5
    Will backup and restore work (theoretically) if you make a backup on one custom rom, then attempt to restore on a different Rom? Or does it have to stay within the Rom it was backed up in?
    To be more precise, the question is about backing up and restoring the data partition.
    It helps to think that there's two types of data in there: user apps and then a lot of system related stuff.
    Restoring the user apps is not a problem, but it gets messy with the system stuff.
    Roms store data that is specific to them and which won't work on a different rom.
    This is why you should always do a factory reset after flashing a different rom. And it was often the case that an upgrade to a rom might also require a factory reset before booting.

    So the general rule is that you can't restore a data backup on a different rom.

    But you might get lucky if the two roms share a lot of the system stuff in common.