yashsingh1/xdaforums huggingface dataset:
[OnePlus 9 Pro] benhidalgo:
I do this quite frequently with TWRP on OP and mi devices:

Coming from OOS firmware on both slots, unlocked bootloader and TWRP flashed.

Wipe everything except your OTG USB storage.

Format storage - yes.

Install your choice of rom, stock or custom.

If you want TWRP again then reflash it.

Reboot to recovery. And flash anything else you want.

If you don't want to use TWRP again after flashing stock, do not reflash TWRP. Simply reboot to stock and then update again via OTA so that the firmware gets flashed on the empty slot and you won't run into any issues later. This will also wipe TWRP from both slots. I only use MSM to downgrade back to OOS 11. Otherwise I use the OOS 13 fastboot ROM to simply go back to stock. Also flash the signed OTA after rebooting to system. I haven't had any persist problems whether I use TWRP or not.

I'm not sure of these claims mentioned as far as uninstalling TWRP from your device. Of course if you don't clean both slots with your current ROM it will affect your device usage. I hope this might clear some of the issues at hand.
[OnePlus 9 Pro] papoose515:
after i try installing twrp, i just keep getting stuck on the oneplus bootscreen, tried via magisk,lineage recovery,adb same issue
[OnePlus 9 Pro] osm0sis:
Sounds like you flashed the full .img instead of booting it then flashing the .zip
[OnePlus 9 Pro] TheGhost1951:
Or 1) wrong version of TWRP or 2) fastboot boot (TWRP image name.img) then tap on advanced and tap flash current TWRP....
[OnePlus 9 Pro] papoose515:
tried it both ways
[OnePlus 9 Pro] der_akinator:
Can you please tell me which ROM, firmware version and device version you are using? So I can try to reproduce it.
[OnePlus 9 Pro] shadabkiani:
If you already "flashed" the given TWRP boot.img, then the "booting" won't work. You have to flash back the actual boot.img of the ROM you are using so that the phone is up and running.

Then you need to "boot" the given TWRP boot.img and do whatever stuff you want next.
[OnePlus 9 Pro] benhidalgo:
Which ROM are you using? Let's start there.
[OnePlus 9 Pro] papoose515:
was on stock oos13
[OnePlus 9 Pro] yassine2217:
Try to restore your data using Twrp after that follow the instruction

For OOS users:

When data is restored, you have to delete "/data/system/users/0/package-restrictions.....oplus.xml" before rebooting to system.
[OnePlus 9 Pro] benhidalgo:
Did you get TWRP?
[OnePlus 9 Pro] olmiks:
Hello! Please help! What TWRP should be put on android13? Phone OnePlus 9 Pro LE 2127
[OnePlus 9 Pro] der_akinator:
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:

Download the twrp-installer zip

Flash it with Magisk manager or some other kernel flash utility

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.

Don't reboot

Rename downloaded Magisk.apk to Magisk.zip

Open Magisk app

Select Modules tab

Click "Install from storage"

Select Magisk.zip

2. Option for users with other custom recoveries but without root:

Download the twrp-installer zip

Reboot to recovery

Flash it with "adb sideload twrp-installer*.zip"

Reboot to recovery

Reflash your custom kernel and Magisk.apk if previously installed

3. Option is universal:

Download boot.img

Reboot to bootloader

Run "fastboot boot boot.img" with the TWRP boot image on your PC

Go to Advanced > Flash Current TWRP

Reflash your custom kernel and Magisk.apk if previously installed
[OnePlus 9 Pro] olmiks:
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?
[OnePlus 9 Pro] der_akinator:
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.
[OnePlus 9 Pro] olmiks:
Got it, thank you! And another question. Is it possible to install a root without installing the TVRP, and if so, then indicate the instructions please!
[OnePlus 9 Pro] der_akinator:
Yes, if you just want root you don't have to use TWRP. Here are the installation instructions for Magisk:

Installation

The Magic Mask for Android

topjohnwu.github.io

PS: What you can also do is to download the Magisk.apk, follow the "

Try without installation

" TWRP instructions and install the Magisk.apk with TWRP's install feature.
[OnePlus 9 Pro] olmiks:
If it is not difficult. Tell me how to create on OnePlus 9 Pro backup boot partition ?
[OnePlus 9 Pro] TheGhost1951:
Msm tool readback mode
[OnePlus 9 Pro] der_akinator:
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.
[OnePlus 9 Pro] xerves78:
still no official twrp version for android 13 ?
[OnePlus 9 Pro] osm0sis:
The 12 branch decrypts 13 just fine.
[OnePlus 9 Pro] der_akinator:
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.
[OnePlus 9 Pro] solar666:
What about A14? Will it still be decrypted with this TWRP version?

Did not try it yet but want to avoid efforts if it might by clear already upfront that it will not work.
[OnePlus 9 Pro] der_akinator:
A patch was merged last week to address A14 encryption, but I haven't tested it yet. So the latest release probably won't work.
[OnePlus 9 Pro] solar666:
Are there plans to build a new version of your unofficial twrp or will you rather work on getting A13 based TWRP official?
[OnePlus 9 Pro] der_akinator:
I can upload a new build with the A14 patch at the end of this week. A13 based build will probably be skipped and development continues with A14. The last few patches for the next release are currently reviewed, so I hope we get official (A12) build this month.
[OnePlus 9 Pro] TheSayaMan:
That's weird because I'm on crDroid a13 and decrpyt works for me through internal storage and even otg cable works on latest updates. Maybe it's carrier specific. I have the unlocked T-Mobile variant. I wouldn't think so.
[OnePlus 9 Pro] Zeus0fyork:
I just MSMd and am in the process of attempting to get it working again on a fresh install. I'll update if it works. I'm on LE2125 (global unlocked)
[OnePlus 9 Pro] MENINBLK:
I have the LE2127. I converted it to OOS11 EU then to OOS11 Global to OOS13Global.

It now thinks its an LE2125.
[OnePlus 9 Pro] IamTheBRAVE:
Flashed latest version. Decryption worked ( Paranoid Android 13)

Thank you🙏
[OnePlus 9 Pro] erad1:
sure...here's what I got
[OnePlus 9 Pro] der_akinator:
Maybe I have found a fix for OSS users but I can't test it because I'm not running OOS. So please test this build.

oos-fix - Google Drive

drive.google.com
[OnePlus 9 Pro] erad1:
did you get the logs for my issue? I attatched them but I don't see them
[OnePlus 9 Pro] erad1:
trying again...not working I guess
[OnePlus 9 Pro] der_akinator:
No, it seems there are some problem with attachments currently. I uploaded a new build with the op7 timestamp script. crdroid update worked for me with that one. If you have time please test it.
[OnePlus 9 Pro] erad1:
Nekobin.com — Elegant and open-source pastebin service

Paste, save and share the link of your text content using a sleek and intuitive interface!

nekobin.com
[OnePlus 9 Pro] der_akinator:
Is it not working? Unfortunately the link contains only a small part of the log but if https://drive.google.com/drive/u/0/folders/1vOxqxtJMydkt_X6HuY_WAhAaXblNbm1U is working I don't need it anymore.
[OnePlus 9 Pro] erad1:
don't sweat it, just flashed the latest build and my timestamp issue is gone! great job!
[OnePlus 9 Pro] psychemisha:
Thanks working perfect crDroid 13!!

There is a perticuliar steps to take backup?
[OnePlus 9 Pro] DirtryElectroOP3:
im running the latest version right now & somehow my /system folder is showing no other subfolders like /priv-app or /app (except for addon.d & apex and 1-2 others). anybody got the same issue? would love a fix, but im still grateful that i have a working twrp at all🙏🏽
[OnePlus 9 Pro] osm0sis:
You just haven't mounted it yet; you're looking at the ramdisk.
[OnePlus 9 Pro] DirtryElectroOP3:
i thought the same, so i mounted it but there was no change :/
[OnePlus 9 Pro] osm0sis:
Oh wait, you're right, but only sort of! It's mounting to /system_root now, and /system is still the ramdisk. I think that's the new norm from twrp-11 onward? Though I thought it was supposed to use /mnt/system or something at some point. 🤔
[OnePlus 9 Pro] DirtryElectroOP3:
thanks, been out this game for too long:sleep:
[OnePlus 9 Pro] MENINBLK:
SUCCESS !!!!

This is on F.16 OSS13.

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

There is just one little problem, the display says "Failed to mount '/vendor_dlkm' (block device required

I can't read the whole line, it runs off to the right of the screen,

it does not affect anything that I can tell.

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

Do you want the log files again ?
[OnePlus 9 Pro] der_akinator:
So decryption is working on OOS13? Great. Yes I know there isn't an vendor_dlkm partition on OOS but this is needed to load kernel modules for custom roms. Does it affect you in any way or is it just the error message? Can you maybe test backups?

I'm will look how to overwrite the 3.7.0_12-0 but it's just cosmetic.
[OnePlus 9 Pro] felpelt:
Hello,

are you ready with the A14 patch yet? I would be delighted.

Thank you
[OnePlus 9 Pro] der_akinator:
Sorry, I had a busy week. I'm currently testing A14 compatibility and if everything is fine, you will have a new build in a couple of hours.
[OnePlus 9 Pro] der_akinator:
Update

add Android 14 encryption support

sync all other changes

I've done some quick tests with crdroid 9 (A13) and crdroid 10 (A14).

23-11-19 - Google Drive

drive.google.com
[OnePlus 9 Pro] der_akinator:
I just noticed one quirk with backup and restore of A14 ROMs. In order to successfully restore, the file "/data/system/users/0/package-restrictions.xml.reservecopy" has to be removed before boot. This should be used as a workaround until that file is excluded from backups in a future update.
[OnePlus 9 Pro] Evon88:
thank yoooououououououououououououoououououououououououououououoououououououououououououououououououou
[OnePlus 9 Pro] felpelt:
Thanks, backup and restore worked perfectly with your hint to delete the file. Super
[OnePlus 9 Pro] yassine2217:
Its Already mention bro

View attachment 6035662
[OnePlus 9 Pro] der_akinator:
It's a different file with the "reservecopy" ending, introduced in a14. But I'm working on a solution to rather patch it than excluding it, to preserve the set app permissions.
[OnePlus 9 Pro] yassine2217:
It's the same even in OS or coloros you will found the same file but just the end of the name changed in my coloros sometime i found package-restrictions.xml sometime i foud package-restrictions._oplus.xml
[OnePlus 9 Pro] der_akinator:
Thanks for pointing that out. I haven't noticed it before and will do some tests with OOS
[OnePlus 9 Pro] thznutz87:
Can we just wipe data instead of a full format yet when switching between roms? Ya know like in the a10 days with TWRP?
[OnePlus 9 Pro] Smedslund:
I guess you can but i would not recommend you doing that.
[OnePlus 9 Pro] thznutz87:
Why is that?
[OnePlus 9 Pro] BillGoss:
If the roms don't use the same encryption key then you must format data.
[OnePlus 9 Pro] thznutz87:
Yeah, that's what effed it up originally I've been hoping it could get back to the good ol days eventually. Wish there was a way to wipe the encryption key without wiping the entire storage.
[OnePlus 9 Pro] BillGoss:
But the encryption key is used to encrypt the whole storage. That's why you cannot read anything if you've lost the key. I've seen what things look like when that happens. The whole storage is just random characters.

Of course, this only applies with FBE (file based encryption) but not with the old FDE method. Which is why all systems now use FBE and why you have to reformat the partition if you've lost the key.
[OnePlus 9 Pro] Netmatrix:
Installed but im observing a terrible lag, what could it be? Op9 pro stock oos 13.1
[OnePlus 9 Pro] der_akinator:
Are the lags in TWRP or system? If they are in TWRP, please provide logcat.txt and recovery.log output.
[OnePlus 9 Pro] der_akinator:
The bug is fixed. It somehow only happened with OOS and permanent installation.

23-11-28 - Google Drive

drive.google.com
[OnePlus 9 Pro] Netmatrix:
Ir was on TWRP, thanks its working well how, what was the bug? Of curiosity 🙂
[OnePlus 9 Pro] Mohammed saliq:
does it decrypt oos 14?

edit: it worked
[OnePlus 9 Pro] der_akinator:
The last update introduced a patch to load kernel modules earlier during startup, which also triggered the earlier start of the vibration service. The problem is that during the startup of the vibration service, ROMs vendor partition could be mounted for other setup purposes. This led to an issue where incompatible libs were loaded from ROMs vendor partition, which resulted in a non-successful, blocking call to the vibration service and to a "deadlock", where vendor couldn't be umounted. I submitted a patch for threaded vibration service discovery and introduced an artificial delay between kernel module load and vibration service start.

Somehow vendor was mounted longer with OSS installed, which can only be explained by the different fs (erofs) or larger files to parse for setup.
[OnePlus 9 Pro] IamTheBRAVE:
Only 1% of us understood 99% of what you just said, but thank you for you hard work. Much appreciated 👍

(I'm waiting for my fav rom to move to A14 to start flashing to use TWRP, can't wait! )
[OnePlus 9 Pro] benhidalgo:
How did you flash it?
[OnePlus 9 Pro] Netmatrix:
Thanks for the detailed explanation 👍
[OnePlus 9 Pro] Netmatrix:
Flashboot boot recovery and flash zip from there...
[OnePlus 9 Pro] nicelydone:
Help needed restoring a TWRP backup on OP 9

I am using Lineage for microG, latest version, on my OP 9 LE2115, no root.

I have read this entire thread, all 41 pages.

I have used the TWRP file provided at the very beginning of this thread to successfully (I think) backup the current os; one a complete backup and another only the data.

I have not installed TWRP, only used it temporarily, as per instructions provided.

MY QUESTION FOR YOU:

Is it possible to restore these backups over the same ROM/version using TWRP temporarily, not installed?

If it is, CAN SOMEONE PLEASE DETAIL THE PROCEDURES TO DO SO?

Many Thanks for your assistance.
[OnePlus 9 Pro] der_akinator:
Yes, restoring a backup is possible during a temporary boot. It is also a good idea to copy your backups to a PC or a flash drive. Backups are located in /sdcard/TWRP.

You are guided through the restore process by TWRP. One thing is that you might have to remove "/data/system/users/0/package-restrictions*". The default one is excluded, but as I have learned, there could be more package-restrictions files.
[OnePlus 9 Pro] nicelydone:
Thank you for the response. I had tried to restore, as per my experience with an older, pre A/B phone. It ended up with the phone just booting to fastboot rather than the system. Not knowing how to handle it, I just reinstalled the os. At what point should I remove the above mentioned file, and are there any A/B actions I'd need to take? What should I wipe? From a full backup, what should I restore?

Perhaps I should have asked this in my first post. I appreciate the work you've done and continue to do with this project.
[OnePlus 9 Pro] der_akinator:
If you are restoring the same ROM, you don't have to wipe anything. You may have to change the active slot after restoring. In this case, you also have to restore a second time to get matching boot, vendor_boot and dtbo partitions. Switching slots can be done in the reboot submenu or in bootloader mode with "fastboot set_active a" or "fastboot set_active b".

I think this always happens when a backup made from the first install of a ROM is restored to the other slot it was originally made from. But I can't explain why this happens because super should always adapt automatically.
[OnePlus 9 Pro] Zeus0fyork:
I have the same issue when I boot to it occasionally. Just reboot to recovery again and it should be fine
[OnePlus 9 Pro] moosefist:
I have a oneplus 9 pro on Nameless 13.3 (ex01 fw) and was hoping to install the latest matrixx a14 rom.

I created a full nandroid to a USB stick, then I wiped Cache, Metadata, and Data before trying to install a new rom. Now I am stuck in a boot loop with access to recovery and fastboot. I tried restroring my backup, reflashing nameless, and flashing the new matrixx rom to both slots.

I cannot mount my data partition or access my internal storage. I think my data may still encrypted because I did not remove my pin code.

**I am really trying to preserve the files on my internal storage if at all possible.**

I've dumped the nameless rom's payload.bin, but not sure if I am on the right track or if I am SOL. I feel like I need to get nameless back on the phone, remove the pin, and hopefully restore the nandroid somehow.

Any suggestions?
[OnePlus 9 Pro] der_akinator:
Unfortunately, you have to format data after wiping metadata because it contains one of the keys used to decrypt it. For most ROM changes, you just have to do a factory reset. For others, like LOS->OOS or the other way around, data must always be formatted. This has to do with another set of keys.
[OnePlus 9 Pro] Gersp52366:
Data decryption does not work on oneplus 9

View attachment 6054787

View attachment 6054786
[OnePlus 9 Pro] ikram.senguen:
Either wrong Slot, or Not factory resettet, which is mandatory coming from other roms, so there is that..
[OnePlus 9 Pro] Gersp52366:
I switched from global firmware to Indian. Maybe that's why it doesn't work?
[OnePlus 9 Pro] der_akinator:
Which ROM and version and TWRP version do you use? Also please provide some logs, if possible.
[OnePlus 9 Pro] Gersp52366:
here is my ROM and recovery logs
[OnePlus 9 Pro] der_akinator:
Thanks for the logs. I will try to install the indian OOS 14 ROM and see whats going wrong. If it fails you have to wait until the OOS 14 EU ROM will be released.
[OnePlus 9 Pro] mathorv:
wrong place
[OnePlus 9 Pro] osm0sis:
Congrats to @der_akinator on going official with the new TWRP 3.7.1 release! 🎉

OnePlus 9 Pro (lemonadep)

Disclaimer:Team Win strives to provide a quality product. However, it is your decision to install our software on your device. Team Win takes no ...

twrp.me
[OnePlus 9 Pro] ikram.senguen:
wowowo CAUTION!

installing the "Official" recovery gave me bootloops and could not Decrypt Data in recovery

i had to adb sideload the unofficial recovery from here to get phone back working

just so you know, dont do this while your outside and have no pc nearby xD

Blissrom v17/a14
[OnePlus 9 Pro] der_akinator:
Oh, gold to know I didn't had a chance to test the new builds
[OnePlus 9 Pro] osm0sis:
Might want to pull them until you get biff to run another with whatever's missing. 👍
[OnePlus 9 Pro] der_akinator:
That's a good idea. I asked for that. What I can tell for now is that it's probably a A14 only problem. Latest crdroid A13 is fine.
[OnePlus 9 Pro] der_akinator:
I clean installed the latest bliss ROM and 13.1.0.592(EX01) NA firmware, but can't reproduce the bootloop. Neither with fastboot boot installation method or sideloading the zip installer in twrp. Can you please tell me your installation method, phone model and firmware version.
[OnePlus 9 Pro] ikram.senguen:
Sure i downloaded twrp zip from official twrp and installed it in the Recovery of the unofficial twrp, Installation went fine but Phone rebooted to bootloader and twrp could not decrypt Data

I have the "reflash Recovery after rom Update" option ticked on maybe thats why

Same, im on latest firmware with latest blissrom and have bluespark kernel installed along with magisk in zygisk
[OnePlus 9 Pro] ikram.senguen:
I just risked it again and it worked with the mentioned option disabled this time!

View attachment 6071734
[OnePlus 9 Pro] der_akinator:
Thanks for testing and risking it again. So if the "reflash after flashing a rom" is the culprit, I will put a disclaimer on the first post and inform the other devs.
[OnePlus 9 Pro] ikram.senguen:
Apparently yes, as my guess is that it tried flashing old recovery instantly after the Just installed one confusing/corrupting boot and or recovery partition

so i would say that having that option ON all the time is actualy my own fault..
[OnePlus 9 Pro] osm0sis:
Working fine here on last Lineage 20 as well! 👍
[OnePlus 9 Pro] der_akinator:
I tested a couple of different update steps and starting twrp versions with that option enabled, but still can't reproduce it. If it's somehow caused by that that option, it has to be fixed in twrp and is by no means the users fault. For now I can't do much until I can reproduce it. Maybe the write to the boot partitions wasn't fully synced before reboot or it was a hardware fault.
[OnePlus 9 Pro] ikram.senguen:
Having magisk, twrp and custom roms where all parts do their own backup restore strategies after any installation fckd my boot partition up not once but many times occasionaly and some i couldnt reproduce either If u remember in the past these a/b partition issues where u flash twrp, but loose magisk then Flash magisk but loose twrp so in and so on u get my point, for now dont dig too much into this rabbithole

This twrp Recovery works precisely as it should and i bet my my ass that my Installations have one or two backups of Boot partition that wants to be restored sometimes which caused this issue while that option was ticked on

Edit:

Also, is having two different kernel normal or even possible?! I still think of my setup being screwed with its boot partition after trying so many stuff..
[OnePlus 9 Pro] xerves78:
working on lineage21 too ?
[OnePlus 9 Pro] ikram.senguen:
It does
[OnePlus 9 Pro] shadabkiani:
I have OnePlus 9 currently running MatrixX ROM (Android 13) with firmware 13.1.0.591(EX01).

I can confirm that latest official TWRP build is working great.

I temporarily booted it, and then I tested all 3 methods of installing TWRP permanently one by one. Every method works great. I restored my original boot.img every time after checking a particular installation method.

One thing to note is that every method of flashing TWRP flashes it to both slots. I didn't know that. I wish it would only flash to current slot, or maybe an option to choose. The reason being I like to keep one slot (slot_a) completely unrooted and untouched, while on the other slot (slot_b) I keep root and modules. Nevertheless, it's not a huge deal because I can simply flash back my unrooted stock boot.img to slot_a.

Also, @ikram.senguen , you need to flash Magisk and custom kernel (if using) again after flashing TWRP and you won't run into issues I hope.
[OnePlus 9 Pro] osm0sis:
The idea there is that if an update fails or something bad happens and it automatically forces you to the other slot then you still have a working recovery already installed. When I'm on stock I always make sure my previous slot remains rooted as well.