• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[RECOVERY] [11] [ALPHA] TeamWin Recovery Project (8T / Kebab) (2021-09-04)

Search This thread

iooxda

Senior Member
Dec 1, 2019
67
33
Appreciate the replies.

What about this one:

I am interested in going directly to Lineage from stock, is it possible to root this phone by flashing the Magisk.zip in TWRP?

If this isn't possible, what is the currently recommended way to root this device with Magisk? I have seen a few different discussions and methods. Flashing the Magisk zip from TWRP would be ideal if it is possible.
 

BillGoss

Senior Member
Sep 2, 2010
4,722
4,140
Sydney
OnePlus 3T
OnePlus 8T
Appreciate the replies.

What about this one:

I am interested in going directly to Lineage from stock, is it possible to root this phone by flashing the Magisk.zip in TWRP?

If this isn't possible, what is the currently recommended way to root this device with Magisk? I have seen a few different discussions and methods. Flashing the Magisk zip from TWRP would be ideal if it is possible.
The answer is yes, but see the instructions in post #2.
And see also my comments here: https://forum.xda-developers.com/t/...-recovery-project-8t-9r.4302449/post-85323105
 

iooxda

Senior Member
Dec 1, 2019
67
33
The answer is yes, but see the instructions in post #2.
And see also my comments here: https://forum.xda-developers.com/t/...-recovery-project-8t-9r.4302449/post-85323105
Thank you. Could you validate my understanding of the information?

In this case I will be migrating from stock to Lineage as soon as I get kebab. So I will be following the "Ideal way to flash" in post 2:

For OOS to Custom ROM - Format /data, switch slot, flash ROM + installer, reboot to TWRP, flash Magisk/Gapps. Reboot to system.

Preliminary:
Unlock Bootloader

1. Install TWRP
2. In TWPR, format /data
3. Switch slot, <this step is unclear, is this an operation inside TWRP? Is there more info on how to do this?>
4. Flash ROM, <can I flash the Lineage.zip from USB OTG in this step?>
4. + installer <Does this mean the TWRP installer here: https://www.androidfilehost.com/?fid=14943124697586362328? So I would flash the zip, from inside TWRP?>
5. Reboot again to TWRP
6. Flash Magisk.zip

From your comment:
The better way is to only do the format after flashing and rebooting to TWRP. I've asked the developer to amend the instructions.

Does this mean, I should only format /data after flashing the ROM?

So the final order, applying your comment would be:

1. Install TWRP
2. Switch slot
3. Flash ROM + installer
4. Reboot again to TWRP
5. In TWPR, format /data
6. Flash Magisk.zip

Final question, if I install Lineage from TWRP using this method, do I still need to run the copy-partitions-20210323_1922.zip package as detailed here: https://wiki.lineageos.org/devices/kebab/install.

Should this be taken care of via adb sideload in the preliminary steps or can I integrate this step into the TWRP procedure. I.e. can I flash this zip from TWRP as well. Is it related to step #2 "switch slot?
 

BillGoss

Senior Member
Sep 2, 2010
4,722
4,140
Sydney
OnePlus 3T
OnePlus 8T
The 8T is a brave new world as it has A/B partitions as well as virtual A/B (VAB) partitions which makes life a fair bit more complex.
And there's lots of ways you can accomplish the same outcome.
For example, if you use the copy partition zip to synchronise the A/B partitions (not the VAB) then you don't need to change slots. And if you're using a USB drive then you can format at the start as you will still have access to all your zips.
The reason for flashing the TWRP installer after flashing the rom is to keep TWRP (the rom had its own recovery).
So, is you have your files on USB then you could:
- flash copy partitions
- format
- flash Los
- flash TWRP
- reboot TWRP
- flash Magisk and Gapps
- reboot system

The one thing you don't want to do is format after flashing Los and before rebooting TWRP
 

iooxda

Senior Member
Dec 1, 2019
67
33
The 8T is a brave new world as it has A/B partitions as well as virtual A/B (VAB) partitions which makes life a fair bit more complex.
And there's lots of ways you can accomplish the same outcome.
For example, if you use the copy partition zip to synchronise the A/B partitions (not the VAB) then you don't need to change slots. And if you're using a USB drive then you can format at the start as you will still have access to all your zips.
The reason for flashing the TWRP installer after flashing the rom is to keep TWRP (the rom had its own recovery).
So, is you have your files on USB then you could:
- flash copy partitions
- format
- flash Los
- flash TWRP
- reboot TWRP
- flash Magisk and Gapps
- reboot system

The one thing you don't want to do is format after flashing Los and before rebooting TWRP
Thank you for the detailed answer. Your explanation on why the above steps are necessary provides a much clearer picture of post #2 and the overall process.

I would actually consider not having to use a USB to flash an advantage. So in this case, I would have the zips I want to flash on some path in /data/*.zip which will remain accessible until I format /data near the end?

Then if I follow your modified steps I would flash the ROM, then flash the TWRP installer again which will overwrite the ROM recovery and restore TWRP then reboot into TWRP and format /data. Is this correct?

So regarding the AB and VAB issue. Aside from flashing the copy-partitions.zip how else can can I "switch slots" as theincognito originally mentioned in post #2? Is this an operation inside TWRP or the VAB operation done elsewhere?

So assuming the user is not using USB, would this be the ideal order:

- Unlock Bootloader
- Install TWRP to recovery partition
- Switch slot
- Flash ROM + TWPR installer
- From TWRP, reboot again into TWRP
- In TWPR, format /data
- Flash Magisk.zip
 

BillGoss

Senior Member
Sep 2, 2010
4,722
4,140
Sydney
OnePlus 3T
OnePlus 8T
Thank you for the detailed answer. Your explanation on why the above steps are necessary provides a much clearer picture of post #2 and the overall process.

I would actually consider not having to use a USB to flash an advantage. So in this case, I would have the zips I want to flash on some path in /data/*.zip which will remain accessible until I format /data near the end?

Then if I follow your modified steps I would flash the ROM, then flash the TWRP installer again which will overwrite the ROM recovery and restore TWRP then reboot into TWRP and format /data. Is this correct?

So regarding the AB and VAB issue. Aside from flashing the copy-partitions.zip how else can can I "switch slots" as theincognito originally mentioned in post #2? Is this an operation inside TWRP or the VAB operation done elsewhere?

So assuming the user is not using USB, would this be the ideal order:

- Unlock Bootloader
- Install TWRP to recovery partition
- Switch slot
- Flash ROM + TWPR installer
- From TWRP, reboot again into TWRP
- In TWPR, format /data
- Flash Magisk.zip
Changing slots: the Restart menu has this (see attached screenshot).

"Ideal order": it depends on user install preferences (do you sideload, use USB, or on-device) and process preference ("just follow these steps" or "this is how it works").
I'm an on-device, "how does this work" sort of person. And I'm not at all fond of "just do this".

And, yes, your order will work, though not quite as you've written it (because I'm picky with details) - but you'll find out when you go through it. No, it's nothing serious, but you'll learn something about details as you go through the steps. And I don't want to prevent you having the learning experience 😊.
 

Attachments

  • Screenshot_2021-07-26-05-39-59.png
    Screenshot_2021-07-26-05-39-59.png
    73 KB · Views: 71
  • Like
Reactions: FakeGemstone

iooxda

Senior Member
Dec 1, 2019
67
33
Changing slots: the Restart menu has this (see attached screenshot).

"Ideal order": it depends on user install preferences (do you sideload, use USB, or on-device) and process preference ("just follow these steps" or "this is how it works").
I'm an on-device, "how does this work" sort of person. And I'm not at all fond of "just do this".

And, yes, your order will work, though not quite as you've written it (because I'm picky with details) - but you'll find out when you go through it. No, it's nothing serious, but you'll learn something about details as you go through the steps. And I don't want to prevent you having the learning experience 😊.
Thanks for the info. Again the screenshot is very helpful. I would definitely prefer to have a comprehensive overview of the tech rather than list following. Until I get the device, hashing out the order of operations does helps to expose any gaps in understanding from from working with past devices.

So in this context "switch slot" means if Slot A is the current slot the first time I boot into TWRP, I "switch slots" by selecting the other slot in the reboot menu. Two questions:
  1. Since this slot operation is in the reboot menu, do I then need to proceed to reboot immediately to make the switch active or is simple pressing the button from the reboot menu sufficient to switch?
  2. You mentioned earlier 8T has Virtual A/B. Is switching slots in this way working on the VAB or the regular AB partition.
Here is the original instruction:
For OOS to Custom ROM - Format /data, switch slot, flash ROM + installer, reboot to TWRP, flash Magisk/Gapps. Reboot to system.
Modified with your recommended to move formatting after ROM, switching slots is now the first operation after booting into TWRP:
For OOS to Custom ROM - switch slot (accessed from the reboot menu, *maybe reboot*), flash ROM + installer, reboot to TWRP, Format /data, flash Magisk/Gapps. Reboot to system.
I'm curious about the detail you mentioned. Re-reading your modification:
The better way is to only do the format after flashing and rebooting to TWRP.
Re-reading my list I just realized that if I am flashing zips from /data I need to ensure I have flashed everything before formatting. So maybe switch the last two operations?

- Unlock Bootloader
- Install TWRP to recovery partition
- Switch slot
- Flash ROM + TWPR installer
- From TWRP, reboot again into TWRP
- Flash Magisk.zip
- In TWPR, format /data

- Reboot into System

But Magisk writes to /data/adb/*. So this probably won't work either. Perhaps rebooting into the system will recreate /data then root afterwards?

- Unlock Bootloader
- Install TWRP to recovery partition
- Switch slot
- Flash ROM + TWPR installer
- From TWRP, reboot again into TWRP
- In TWPR, format /data
- Reboot into System to re-create /data partition
- Flash Magisk.zip
 

BillGoss

Senior Member
Sep 2, 2010
4,722
4,140
Sydney
OnePlus 3T
OnePlus 8T
Thanks for the info. Again the screenshot is very helpful. I would definitely prefer to have a comprehensive overview of the tech rather than list following. Until I get the device, hashing out the order of operations does helps to expose any gaps in understanding from from working with past devices.

So in this context "switch slot" means if Slot A is the current slot the first time I boot into TWRP, I "switch slots" by selecting the other slot in the reboot menu. Two questions:
  1. Since this slot operation is in the reboot menu, do I then need to proceed to reboot immediately to make the switch active or is simple pressing the button from the reboot menu sufficient to switch?
  2. You mentioned earlier 8T has Virtual A/B. Is switching slots in this way working on the VAB or the regular AB partition.
Here is the original instruction:

Modified with your recommended to move formatting after ROM, switching slots is now the first operation after booting into TWRP:

I'm curious about the detail you mentioned. Re-reading your modification:

Re-reading my list I just realized that if I am flashing zips from /data I need to ensure I have flashed everything before formatting. So maybe switch the last two operations?

- Unlock Bootloader
- Install TWRP to recovery partition
- Switch slot
- Flash ROM + TWPR installer
- From TWRP, reboot again into TWRP
- Flash Magisk.zip
- In TWPR, format /data

- Reboot into System

But Magisk writes to /data/adb/*. So this probably won't work either. Perhaps rebooting into the system will recreate /data then root afterwards?

- Unlock Bootloader
- Install TWRP to recovery partition
- Switch slot
- Flash ROM + TWPR installer
- From TWRP, reboot again into TWRP
- In TWPR, format /data
- Reboot into System to re-create /data partition
- Flash Magisk.zip
👍

Some reading if you're interested:
 

iooxda

Senior Member
Dec 1, 2019
67
33
Thank you. I will read all of them.

Under known bugs, theincognito says:
Don't format /data, after a flashing a ROM, before the first reboot.
and later you say:
The better way is to only do the format after flashing and rebooting to TWRP.
So are these two instructions directly conflicting? theincognito doesn't say why a user should not format /data after flashing a ROM or why this is a known bug.

I understand why following your method will prevent the issue that vnayrp experienced.

Do you know what the rational is for this original advice and what risk there is if I follow the original method or your modification?
 
  • Like
Reactions: FakeGemstone

BillGoss

Senior Member
Sep 2, 2010
4,722
4,140
Sydney
OnePlus 3T
OnePlus 8T
Thank you. I will read all of them.

Under known bugs, theincognito says:

and later you say:

So are these two instructions directly conflicting? theincognito doesn't say why a user should not format /data after flashing a ROM or why this is a known bug.

I understand why following your method will prevent the issue that vnayrp experienced.

Do you know what the rational is for this original advice and what risk there is if I follow the original method or your modification?
Ah, the difficulties with trying to write unambiguous directions!
You must not format between flashing the rom and then rebooting TWRP. Once you've rebooted TWRP after flashing, then you can format.
 
  • Like
Reactions: FakeGemstone

jitnyc

Member
Jul 4, 2010
15
7
I am considering buying kebab now that preliminary TWRP support is available. In other TWRP development threads I have seen a list of features working and not working. How "alpha" is this TWRP implementation, meaning which features work and which do not work?

- Does USB OTG work?
- Can I open the TWRP Terminal and execute shell scripts and commands?
- Can I mount the /data partition and decrypt the files?

I am interested in going directly to Lineage from stock, is it possible to root this phone by flashing the Magisk.zip in TWRP?

Also I see a lot of users mention "fkm" I have searched but can't find the meaning of this acronym. What does it mean?

Finally, what was the difficulty in getting TWRP to work on 8T as opposed to other devices, is OnePlus using a non-standard encryption or partition scheme for kebab? Are there any major technical show stoppers that would prevent an official TWRP release sometime in the future?

Thank you to the developers for this work.
I installed TWRP a month or so ago when it was avail via the first thread with no comments allowed. From someone who was waiting for it a while, it was like old times. Install was a breeze and everything works just as it always did.

- OTG def works
- Yes, you can install Magisk via zip
- Yes, you can run scripts
- and yes you can mount the data partition but im not sure about decrypting the files... would this be like having access to the data folder via on your pc? I was unable to do that but I also didnt think that was possible. Would be great if it is.

Otherwise TWRP works great... the only blip i came across is that sometimes after installing a rom, it would say there is NO OS installed but I think that might be a known issue and it was said just to ignore and continue as normal. For me, all backup and restore functions work very well. Hope that helps
 

iooxda

Senior Member
Dec 1, 2019
67
33
Can anyone explain a bit further on decrypting the files? Im not a noob by any means but does this mean you can mount the system on ur pc and get access to system files?
From my part, when I said "Can I mount the /data partition and decrypt the files?" I was referring to TWRP's ability to ask for a password and then use that password decrypt /data/data/*, /data/media/* etc. I would assume from the answers that this is possible.

I asked it because I thought I had read in another thread somewhere that Oneplus used a non-standard encryption scheme for 8T and there were other users speculating that because of this, there would never be a TWRP for this device. I think theincognito or the other devs and senior members would have to comment further. Regarding mounting Android system partitions, I think you can access these files in adb shell with su, I'm not sure if MTP exposes anything outside of Internal Storage although I doubt it.

You mentioned that "it would say there is NO OS installed". Do you see this message just when using TWRP or when the phone is booting?

Also, does this phone display a orange warning message when booting about how the device can't be checked for corruption due to the unlocked bootloader?

Thank you for taking the time to share your experience, this is welcome news. Having a full featured recovery option like TWRP really is a hig asset for a device.
 

iooxda

Senior Member
Dec 1, 2019
67
33
Ah, the difficulties with trying to write unambiguous directions!
You must not format between flashing the rom and then rebooting TWRP. Once you've rebooted TWRP after flashing, then you can format.
Okay very good. So actually the key here is to reboot back into TWRP after flashing a ROM before formatting. I reread the whole thread and saw you did mention that earlier as well.

I am curious to know what the reason for this is? I understand that if I am on stock then flash a ROM, the data partition will no longer be valid and needs to be formatted. I am assuming that after I flash a ROM like Lineage and format the old /data partition, the new data partition is recreated during the first boot into the system during the booting process. Is this correct? Or perhaps when I use TWRP to format /data, does this TWRP operation actually delete the old data partition and then recreate a new empty one in it's place, then the first system boot populates it with data?

Either way, why is it critical to reboot back into TWRP between installing a new ROM and formatting the /data partion?
 

tyler19820201

Senior Member
Jun 19, 2011
360
55
London
Okay very good. So actually the key here is to reboot back into TWRP after flashing a ROM before formatting. I reread the whole thread and saw you did mention that earlier as well.

I am curious to know what the reason for this is? I understand that if I am on stock then flash a ROM, the data partition will no longer be valid and needs to be formatted. I am assuming that after I flash a ROM like Lineage and format the old /data partition, the new data partition is recreated during the first boot into the system during the booting process. Is this correct? Or perhaps when I use TWRP to format /data, does this TWRP operation actually delete the old data partition and then recreate a new empty one in it's place, then the first system boot populates it with data?

Either way, why is it critical to reboot back into TWRP between installing a new ROM and formatting the /data partion?
Because of the nature of Android's dynamic partition system introduced for new devices.
 

BillGoss

Senior Member
Sep 2, 2010
4,722
4,140
Sydney
OnePlus 3T
OnePlus 8T
Okay very good. So actually the key here is to reboot back into TWRP after flashing a ROM before formatting. I reread the whole thread and saw you did mention that earlier as well.

I am curious to know what the reason for this is? I understand that if I am on stock then flash a ROM, the data partition will no longer be valid and needs to be formatted. I am assuming that after I flash a ROM like Lineage and format the old /data partition, the new data partition is recreated during the first boot into the system during the booting process. Is this correct? Or perhaps when I use TWRP to format /data, does this TWRP operation actually delete the old data partition and then recreate a new empty one in it's place, then the first system boot populates it with data?

Either way, why is it critical to reboot back into TWRP between installing a new ROM and formatting the /data partion?
I can't answer in detail, but when a rom is flashed some data is written (I don't know exactly what is written or where) in /data that needs to be processed when the phone boots (in this case booting back to TWRP) after flashing. If /data is formatted before the reboot the data is lost and the rom isn't installed fully, resulting in an unbootable system.
 
  • Like
Reactions: FakeGemstone

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    New build released - 20210904

    Changelog:
    1. Removed repack tools
    2. Allowed OpenAES encrypted backups (to conform with the TWRP source change)
    3. Added logical flag for relevant partitions (to conform with the TWRP source change)
    4. Latest upstream changes
    Download links:

    IMG: twrp-3.5.2_11-0-kebab-20210904-alpha
    Installer: twrp-installer-3.5.2_11-0-kebab-20210904-alpha


    NOTE for 9R users: This build SHOULD work with 9R - you SHOULD be able to do everything except flashing OOS. This is experimental. Use it at your own risk.

    As always, links are updated in the OP too.
    6
    Magisk flashes to /system/
    but my priv-app is in /system_root/system/priv-app
    In return, it breaks my system when I flash using magisk. Not sure why, hence I'm manually pushing aurorastore to /system_root/
    Sorry, I should have been clearer. When you use Magisk to do systemless installs, eg systemless hosts, it doesn't physically write to the system directories but uses overlays that make it seem that it's been written to system directories.
    Typically you do this using a Magisk module.
    How to do this is not something that belongs in the TWRP thread. If you don't know how to do what I'm suggesting then you need to read up on Magisk and its modules and look through the Magisk forum.
    5
    Speaking of which, I recently was forced to test backup & restore.
    My OP8T (KB05AA international/US) failed to boot and was going straight into recovery. Looking at the op2 logs, all it was saying with a very long stack trace was that Android couldn't find PermissionManager. That definitely was strange since I hadn't been mucking with the system.
    The only thing I could do to get back the 8T to boot was to do a factory reset from the (stock) recovery. That worked, but I lost everything.

    I had a two day old TWRP backup performed with twrp-3.5.2_11-0-kebab-20210726-alpha on an encrypted device. I didn't bother with removing the PIN as it also removes fingerprints, disables VPNs, etc.
    I let the device do its first boot after the factory reset. I copied that back the TWRP backup to the device and booted TWRP with fastboot (I never install TWRP on the device, always boot it with cable and fastboot). At that point the device was encrypted but without a password. And then I started a lengthy restore.

    After the restore completed successfully:
    On the first reboot, everything was messed up, I got a black screen, the power menu was the only thing that was responsive, and it was a nonstandard/simple power menu.
    Upon the second reboot, I was back in business, but I had lost:
    • The LSP SELinux policies. Xposed was not functional. The LSP app detected that, and a quick LSP reflash with Magisk took care of the problem.
    • Most of my system settings were gone, but not all (WiFi access point list, Bluetooth connecions were all there for example). It looks like the settings storage settings.db was lost.
    • My widgets on the home screen were blank and needed to be reconfigured.
    • All apps using the system keystore had lost their data stored there. That was expected.

    So overall a positive experience, but some glitches. Better then reinstalling from apk backups, but not perfect.
    3
    Thank you for bringing TWRP to op8t. As far as installing recovery, magisk and rooting, is there a device specific version of magisk or is it one size fits all? I noticed in one of the rooting guides they recommended using the canary magisk but the guide was released before the first official release of TWRP.
    I use the last stable Magisk version (23.0) and I've never had a problem with it. Google Pay also works perfectly without making any changes other than enabling MagiskHide.
    2
    I use latest Canary and it's all good.
  • 73



    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.

    Source Code:

    GitHub - https://github.com/TeamWin/android_bootable_recovery

    Gerrit Instance - http://gerrit.twrp.me

    If you have made your own TWRP build for an unsupported device, please let us know. We might add your build to the list of unofficial builds. Bear in mind that we are working hard to add more devices and we may add your device to our official build list later.


    Hello, this is TWRP, for Oneplus 8T

    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


    FAQ/Know Bugs are given in post #2

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


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

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

    Special mention to a friend @apophis9283 :)

    Trees:
    Device: https://github.com/theincognito-inc/android_device_oneplus_kebab
    Kernel: https://github.com/AOSPA/android_kernel_oneplus_sm8250

    Download:
    2021-09-04

    IMG: https://www.androidfilehost.com/?fid=7161016148664800911
    Installer: https://www.androidfilehost.com/?fid=7161016148664801008
    26
    FAQ and Known bugs of TWRP:

    • OOS/H2OS flashing is broken.
    • If you are planning to switch to a custom ROM, and are currently on OOS/H2OS, format /data, switch slot, reboot to TWRP and then sideload/flash the ROM + installer.
    • It's better to flash ROM + TWRP installer, if you want to keep your TWRP after flashing a ROM.
    • Don't format /data, after a flashing a ROM, before the first reboot.
    • It takes around 50s to actually boot into TWRP.

    Ideal way to flash:
    • For OOS to Custom ROM - Format /data, switch slot, reboot to TWRP, sideload/flash ROM + installer, reboot to TWRP, flash Magisk/Gapps. Reboot to system.
    • For Custom to Custom ROM - Format /data. Flash ROM + installer, reboot to TWRP, flash Magisk/Gapps. Reboot to system.
    • For updating a custom ROM - Flash ROM + installer, reboot to TWRP, flash Magisk/Gapps. Reboot to system

    PS: After formatting /data, until the first time the device is booted to system, the files you send to phone via MTP (USB) will be at /data/media, not at /sdcard

    PS2: If, for some reason, you cannot send files to phone after formatting /data and rebooting to TWRP, press vol +, vol - and power button simultaneously.

    PS3: Factory reset WILL NOT wipe internal storage.
    24
    New build released - 20210726 (Kebab only)

    Changelog:

    1. Removed 9R support
    2. Fixed the TWRP screen overlapping with the notch
    3. Various mount errors while flashing ROMs should be gone now (atleast my testers think so)
    4. Latest upstream changes
    5. Removed AOSPA kernel, and updated to latest LOS kernel
    Download links:

    IMG: twrp-3.5.2_11-0-kebab-20210726-alpha
    Installer: twrp-installer-3.5.2_11-0-kebab-20210726-alpha

    As always, links are updated in the OP too.
    16
    New build released - 20210904

    Changelog:
    1. Removed repack tools
    2. Allowed OpenAES encrypted backups (to conform with the TWRP source change)
    3. Added logical flag for relevant partitions (to conform with the TWRP source change)
    4. Latest upstream changes
    Download links:

    IMG: twrp-3.5.2_11-0-kebab-20210904-alpha
    Installer: twrp-installer-3.5.2_11-0-kebab-20210904-alpha


    NOTE for 9R users: This build SHOULD work with 9R - you SHOULD be able to do everything except flashing OOS. This is experimental. Use it at your own risk.

    As always, links are updated in the OP too.
    14
    Steps for backing up and restoring data in TWRP (Huge thanks to @BillGoss )

    Remove any password/pin/pattern before doing this

    Backup

    In TWRP
    1. Backup: Select only the Data partition.
    2. Reboot System

    Restore
    In TWRP
    If you skip this step you will not be able to successfully start the system after restoring data
    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. Reboot system

      Note:
      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 or a toast message saying "com.android.phone keeps stopping."
        Tap "Close app", hold the Power button down to be presented with the option to (Lockdown), Power off, or Restart. Select Restart
      3. It may take a couple of restarts

    If you want to backup and restore fingerprints too, follow the guide in the attached file