yashsingh1/xdaforums huggingface dataset:
[OnePlus 9 Pro] mooadeer:
Hi, I have an OP9 stuck in bootloop rooted and bootloader unlocked trying to fastboot boot this TWRP img it boots fine but touch screen doesn't seems to be working someone can help me please, thanks
[OnePlus 9 Pro] der_akinator:
Have you tried to boot both images? Sounds like the issue that occurs when you try to boot OOS 12 firmware image on a device with OOS 13 firmware installed.
[OnePlus 9 Pro] mooadeer:
Yes the same problem with both OOS12 ans OOS13 :'(
[OnePlus 9 Pro] der_akinator:
Have you installed a custom kernel? That can lead to problems, if dtbo is changed. And btw which ROM and firmware are you on?

If the problem is due to a custom kernel you can extract the kernel image from the zip installer, download TWRP ramdisk-recovery.img and run the following command.

fastboot boot --cmdline "twrpfastboot=1" --page-size 4096 --header-version 3 KERNEL_IMAGE ramdisk-recovery.img
[OnePlus 9 Pro] hagar006:
Sounds like you have to wipe your phone to get things working again.. had this a few times, especially if I'm changing rom from one to another..
[OnePlus 9 Pro] mooadeer:
thanks for replying, yes that's the problem I didn't wanna wipe the phone because I want to backup my data but I find a solution to decrypt data and perform a twrp backup using the adb shell and twrp command line

here is how I did :

https://xdaforums.com/t/oneplus-9-and-9-pro-twrp.4295047/post-88438183
[OnePlus 9 Pro] japtain.cack:
Beautiful, great job. Everyone producing quality software like TWRP official/unofficial, ROMS, etc. are heroes.

OnePlus 9 Pro

LineageOS 20 (Android 13)

TWRP 3.7.0-12.1 (this one)

Magisk 26.1

I used option 1. A/B, EFS (including multi-user), reboot persistence, etc. All working perfectly.
[OnePlus 9 Pro] niels_kievits:
It must be me but I can't get TWRP to stick if I I install Magisk.

I'm new to the way oneplus9 does it's "stuff", came from a oneplus 5t which was.. let's say.. easier :).

Am I missing something? I have a rooted (Magisk) lineage 20 and I follow option 1.

Installing and getting TWRP to stick works fine but when I get to the Magisk bit I always end up with a working Magisk but stock LOS recovery.,
[OnePlus 9 Pro] osm0sis:
You sideload the TWRP zip in the stock LOS Recovery, then reboot recovery into TWRP, then flash Magisk .apk in TWRP. You can do those last 2 steps in either order.

Yeah it was honestly so much easier when we had recovery in a separate partition, those were the days! 🥹
[OnePlus 9 Pro] niels_kievits:
Ok, so This helped. I don't know why but it made sense to me reading your comment.

Flashing the APK renamed as ZIP also gave me back the "direct install" method in the Magisk Manager.

What a great day :).

Thanks for the help!!
[OnePlus 9 Pro] osm0sis:
You don't need to rename the .apk to .zip anymore, TWRP recognizes Magisk*.apk for a few major releases now. 🙂

Also, you just have to remember that the TWRP zip replaces the whole ramdisk (i.e. unroots you), and that you're just layering things.

So ROM default boot.img + TWRP replaces whole ramdisk + root that ramdisk with Magisk (+ optionally, replace kernel, modify dtb, ramdisk, etc. with a custom kernel). So that's the general order you want to flash things in. 👍

You can dump/backup boot partition at any of those steps to have an easy way to flash back as well. 🤠
[OnePlus 9 Pro] ikram.senguen:
..or U tick the checkbox "reflash TWRP after Rom flash" option in TWRP settings
[OnePlus 9 Pro] osm0sis:
But also remember to reflash Magisk after! 😛
[OnePlus 9 Pro] ikram.senguen:
True 🥂
[OnePlus 9 Pro] shadabkiani:
OnePlus 9 (and modern phones) don't have a dedicated recovery partition anymore, so recovery now resides inside boot partition with shared kernel. With that being said, I wouldn't recommended to go through the hassle of having TWRP permenently flashed. You can flash ROMs through ADB sideload from LOS' (or other custom ROM's) recovery. Some ROMs don't even support getting flashed through TWRP anymore. If, for whatever reason, you wanna use TWRP, you can just temporariy boot TWRP by fastboot boot <your_recovery.img> and do your stuff. It won't mess up your boot partition.
[OnePlus 9 Pro] Rallyharry:
I wanted to sideload the original OOS13, but ADB sideload doesn't start.

I come from crDroid incl Recovery and installed TWRP with the Installer.

What did I do wrong? Ist IT possible to sideload OOS13 with crDroid Recovery?
[OnePlus 9 Pro] shadabkiani:
I don't know if OOS can be sideloaded, I haven't read/heard of it. Use MSM tool to revert to OOS11 and then OTA update all the way up to OOS13. That's the most reliable way.
[OnePlus 9 Pro] Rallyharry:
The problem is that the phone is not recognized in EDL mode, I have already tried different drivers but without luck.

So my hope to get back via sideload.

What´s the problem that adb sideload can´t start? I have just installed TWRP without any other changes.
[OnePlus 9 Pro] shadabkiani:
How do you get your phone in EDL mode?

Does your PC recognize the devicd when it's in EDL mode, I mean, does Windows make the sound of USB connection?

What does your Windows Device Manager show?

As for the adb sideload, you don't need TWRP. You can use the stock LOS recovery (or whatever other ROM you are on). TWRP isn't very compatible/stable for OnePlus 9 (and other modern phones). I have issues of USB connection in TWRP, so there's that too.
[OnePlus 9 Pro] TheGhost1951:
If you are using a windows PC, make sure you have a watermark in the lower right corner of PC screen. Otherwise drivers were not correctly installed. Make sure to use a USB 2.0 port. It could also be the connecting cable. Don't give up!
[OnePlus 9 Pro] der_akinator:
Can you please submit logs for your sideload issue. So just try to use sideload, got advanced->copy logs and submit logcat.txt and recovery.log.
[OnePlus 9 Pro] der_akinator:
The problem with all full OOS OTAs is that they are marked partial, although they contain all partitions, and partial updates require a version filed set (typically a timestamp), which is not present for each partition. I'm currently working on a patch to skip that check, but there are still some issues.

I also think that problem occurs in all major recoveries, due to the fact that they keep update_engine almost stock AOSP. That's at least for all LOS based recoveries the case.
[OnePlus 9 Pro] Rallyharry:
I will next time when I'm on PC.
[OnePlus 9 Pro] testguest:
Could someone please explain what the ramdisk_recovery is for?
[OnePlus 9 Pro] der_akinator:
It's basically a raw image of all files loaded into ram in order to use twrp, but without a kernel and other stuff that a normal boot image contains. You can use it for example to provide your own kernel.

Read this post for reference:

https://xdaforums.com/t/recovery-3-...-a13-encryption-support.4523857/post-88431953
[OnePlus 9 Pro] Rallyharry:
Sorry for the delay, but attached you find the files. I have today installed twrp again and sideload failed again
[OnePlus 9 Pro] TNSMANI:
There is no attached file. If it happens again, please zip it before attaching.
[OnePlus 9 Pro] Rallyharry:
Xda - Google Drive

drive.google.com

New try
[OnePlus 9 Pro] der_akinator:
Thanks. I will look into it over the weekend.
[OnePlus 9 Pro] filjusz:
Should be official after such amount of time. Brilliant work
[OnePlus 9 Pro] Alberhasky:
That's what I keep telling him!!
[OnePlus 9 Pro] andrew_yousry:
I can'y thank you enough @der_akinator for reviving the TWRP recovery for OnePlus 9 Pro. I'm really happy for it.

Thank you so much, everything works fine, except MTP. I can't see my storage when connected to my PC using USB cable.

if you can fix this it would be great.

Thank you again.
[OnePlus 9 Pro] TheSayaMan:
Works for me
[OnePlus 9 Pro] der_akinator:
I can't reproduce your issues too, and it's the same for the sideloading issues addressed by @Rallyharry. I tested under windows and linux with the latest builds. The only thing I noticed was that I had to switch drivers under windows manually to WinMTP and I couldn't use mtp and adb simultaneously. But the whole windows driver system is a mess anyway.

I pulled some minimal changes from qcom's upstream usb repo and also added a proposed patch series regarding mtp into twrp source. My tests with those changes are fine, and I can upload a new build tomorrow, if you want.
[OnePlus 9 Pro] der_akinator:
Update

unified boot image (tested on los-20221227 (OOS 12) and latest crdroid (OOS 13))

update usb/mtp stuff

exclude "/data/system/users/0/package-restrictions.xml" from backup

Testers for the unified boot image are welcome, especially OP9 users. I think for existing backups "/data/system/users/0/package-restrictions.xml" has to be deleted manually after restore, but I haven't tested it.

23-05-16 - Google Drive

drive.google.com
[OnePlus 9 Pro] henkka22:
I tried to boot latest boot.img and got crashdump. I'm on latest nameless using oos13fw
[OnePlus 9 Pro] der_akinator:
Just tested latest nameless 20230509 with F21 fw and everything went fine on my end. Are you using op9 or the pro version?
[OnePlus 9 Pro] henkka22:
Regular 9, previous version booted
[OnePlus 9 Pro] shadabkiani:
Same here. I'm on OnePlus 9 running Pixel Extended ROM (build 20230507) with firmware F.21 on both slots. Ended up in crashdump mode. Previous recovery boots fine.
[OnePlus 9 Pro] der_akinator:
I uploaded two new test boot images for regular OP9. It would be great if @shadabkiani , @henkka22 or any other regular OP9 user could test them. Thanks in advance.

lemonade-test - Google Drive

drive.google.com
[OnePlus 9 Pro] MENINBLK:
Wait... How do you flash from Magisk ??
[OnePlus 9 Pro] der_akinator:
Yes, I tested both option with stock crdroid recovery installed. They both work and I have updated the installation instruction accordingly.
[OnePlus 9 Pro] der_akinator:
In the modules tab -> Install from storage. I also never realized that until now.
[OnePlus 9 Pro] TheSayaMan:
I'm getting the same timestamp error on all roms. Can't flash any roms.
[OnePlus 9 Pro] MENINBLK:
Okay, I was rooted with Magisk 25.2.

I flashed the TWRP using Magisk from the 30.11.22 folder.TWRP works but decryption does not.

I can not get to my data from TWRP to flash Magisk back.

HELP !!
[OnePlus 9 Pro] Zeus0fyork:
have you tried to flash your backed up vendor_boot and then reboot?
[OnePlus 9 Pro] der_akinator:
I uploaded a new version with the timestamp script used in op7.

30.11.22 - Google Drive

drive.google.com
[OnePlus 9 Pro] der_akinator:
Which android version are you using? A11 ROMs use a different encryption which is supported by the official builds. You can use the patch boot image option in magisk installer to get it working again.
[OnePlus 9 Pro] MENINBLK:
I am reflashing Magisk now.
[OnePlus 9 Pro] TheSayaMan:
Tested and doesn't work for me. Now it won't even try installing. Screen goes blank for a second and reloads twrp.

Edit: My bad. It works. I had a bad download. Thank you!!!!
[OnePlus 9 Pro] MENINBLK:
I am running OOS F.16 on my OP 9 Pro rooted with Magisk 25.2.

I used Magisk to install the unofficial TWRP image from the 30.11.22 folder you posted.

TWRP worked on the reboot to recovery but I could not see my folders at all.

When in TWRP, I tried to decrypt my data folder, I entered my password and it came back with FAILED.

So I rebooted back to System and Fastboot Boot the Magisk Boot.img and Directly installed Magisk from the Magisk app.

So not both apps are working, the decryption is not working in TWRP for OOS F.16.

Oh, one more thing, TWRP shows 3.7.0_12-0 not 12-1....
[OnePlus 9 Pro] der_akinator:
Glad to hear that. I also tested updating to latest crdroid without problems.
[OnePlus 9 Pro] MENINBLK:
The TWRP install script flashes to both slots.

You will see it do this as it installs.
[OnePlus 9 Pro] der_akinator:
Strange that decryption is not working on OOS13. I just looked into the fstab of OOS F.11 and the encryption they use is the same as in TWRP. But I will note that there are problems with OOS13 in the first post
[OnePlus 9 Pro] MENINBLK:
I downloaded the file again, just in case I had a bad download like @TheSayaMan did.

Installation went through without a hitch. Rebooted into TWRP and could not see my folders again.

I plugged in a USB Drive and reinstalled Magisk from the USB and then rebooted back into OOS13.

Everything except Decrypting is working.

Is there anything you need from my Oneplus 9 Pro that can help you ??

I just looked up the encryption on Android 13 from source.android.com,

it seems that Android 12 and below can use Full Disk/File encryption,

but Android 13 can only use File encryption.

I don't know if this helps or not.
[OnePlus 9 Pro] der_akinator:
It would be helpful to get a logcat output and recovery.log that captures the failure. You can select your usb as storage and copy those files with Advanced -> copy log.
[OnePlus 9 Pro] MENINBLK:
SENT !!
[OnePlus 9 Pro] der_akinator:
Where did you send it?
[OnePlus 9 Pro] MENINBLK:
I attached and uploaded.
[OnePlus 9 Pro] MENINBLK:
Sent #2
[OnePlus 9 Pro] shadabkiani:
I just flashed new ROM Syberia Project (build 20230515) with F.21 firmware. I tried to boot both of your new test images, but none of them worked. Ended up in Qualcomm CrashDump Mode.

The version 14-03-23 is working fine though (MTP not working as usual but rest is good).
[OnePlus 9 Pro] chadillac.q.roberts:
Coming here from this thread: https://xdaforums.com/t/oneplus-9-pro-tmo-le2127-converted-to-global-le2125-oos-13-ob2.4512829/. My phone is originally a TMO model that has been converted to Global running OOS13.

I installed TWRP via the option 3. method with no problems, and was able to reboot the phone successfully. To test the Restore function, I performed a backup of just my data partition and immediately restored it. There is no pin set.

I did try to reboot without first deleting /data/system/users/0/package-restrictions.xml, but it was taking too long so I checked the guide and saw that line. I interrupted the boot and booted back into TWRP to delete the file, which was successful. Still now I am just bootlooping. Any guidance, or should I just start from scratch with MSM?

Update: I tried restoring the same backup again but this time deleted the file. No change.
[OnePlus 9 Pro] der_akinator:
I would suggest to restore the backup again. Or did you already tried it without success? In worst case you have to format data. I also haven't encountered this case yet.

I would also suggest to use the 23-05-16 build to make backups, since it excludes this file during backup.
[OnePlus 9 Pro] chadillac.q.roberts:
This worked perfectly. Now for some reason my backups are showing in the file manager in TWRP at data/media/0/TWRP/Backups, but when using the default Files app the TWRP folder is empty. I am wanting to transfer my backups to my windows 10 pc, and when I access the TWRP folder from the PC I see an empty folder.

Are these folders the same folders or am I looking in the wrong place?
[OnePlus 9 Pro] der_akinator:
Please read the whole backup/restore section. Depending on the build you made the backup with you have to flash an additional zip to fix this. This bug was fixed with 23-03-14, but fix-zip has to be applied.
[OnePlus 9 Pro] andrew_yousry:
Thank you so much @der_akinator for your reply.

I tried installing the new TWRP zip in Magisk and restarted to recovery, but still MTP not working in TWRP.

The windows drivers shows the device as "Android Composite ADB Interface". I don't know how to switch it manually like what you mentioned. can you provide link for the driver? is it the Generic Google driver?
[OnePlus 9 Pro] TheGhost1951:
uninstall and re-install the OnePlus USB drivers. Make sure driver signature in windows is disabled. I had this issue before.... make sure to reboot PC between each procedure.
[OnePlus 9 Pro] der_akinator:
Yes, official google drivers are fine. TWRP uses google pixel usb IDs.

Example steps for MTP (not the exact wording):

connect phone with MTP enabled

right click device in device manager

select "update driver"

select 2. option "browse my computer"

select "pick from available drivers"

select WinUSB

For adb, WinUSB seems to be fine too on windows 11. For fastboot, you have to select google drivers (Android Bootloader interface).
[OnePlus 9 Pro] TheGhost1951:
need the TWRP A13 IMG file. Not the zip. Need it to flash Magisk because I don't want to install TWRP.
[OnePlus 9 Pro] der_akinator:
Added a non-pro folder inside the one of latest build. Since you are a non-pro user, could you please test the boot-test.img too, if you get some time. I would really appreciate that.

boot-non-pro - Google Drive

drive.google.com
[OnePlus 9 Pro] TheGhost1951:
I am OP9P user.......
[OnePlus 9 Pro] der_akinator:
Ok. Then just use the normal boot image. It's unified for 12 and 13 firmware on the pro version now.
[OnePlus 9 Pro] shadabkiani:
@der_akinator I have OnePlus 9 running the latest OOS13.1 firmware. I tested your new images in boot-non-pro folder. Unfortunately none of them booted.

boot-test.img ends up in Qualcomm CrashDump Mode.

boot-oos13-firmware.img gets stuck at Fastboot Mode screen.

The most recent build working on OnePlus 9 is 23-03-14 one.
[OnePlus 9 Pro] der_akinator:
Sorry, I forgot to include the script for display driver loading, since it's not necessary for unified pro build. Updated those image and also tested the 13 fw version this time.
[OnePlus 9 Pro] shadabkiani:
Thanks. Now boot-oos13-firmware.img can boot successfully.

What about unified recovery for all firmwares? Is it not gonna work for OnePlus 9?
[OnePlus 9 Pro] der_akinator:
I have no way to debug this issue on regular OP9, because I only own the pro. All the test builds were just blind trial and error. But I will continue to upload 12 and 13 fw versions for those users. Maybe you guys get lucky and someone, who can properly debug that phone, finds a solution.
[OnePlus 9 Pro] andrew_yousry:
Dear @der_akinator,

Is it possible to make a working TWRP for OnePlus 11?

I really wish if you can, I saw some chinese app that installs TWRP but it can't decrypt the internal memory
[OnePlus 9 Pro] TheGhost1951:
Check your device at www.twrp.me it is there, both in .img and .zip form
[OnePlus 9 Pro] andrew_yousry:
There is nothing for OnePlus 11, even those for OnePlus 9 Pro don't work with new firmwares
[OnePlus 9 Pro] TheGhost1951:
Sorry, you meant model 11, not oos11!
[OnePlus 9 Pro] ffejy462:
I'm using this twrp with oos 13.1 on 9pro...
[OnePlus 9 Pro] andrew_yousry:
I hope you can read what I'm replying to so you can understand.

I'm referring to the original twrp.me website not about der_akinator version of TWRP which works perfectly
[OnePlus 9 Pro] ffejy462:
Me reed gud. 🙂

Just clarifying
[OnePlus 9 Pro] TheGhost1951:
link for the twrp you are using?
[OnePlus 9 Pro] ffejy462:
The most recent from the op of this thread...
[OnePlus 9 Pro] orifori:
Hello, I installed an Android 13 custom rom on a Samsung device with twrp-3.7.0_9-0 but unfortunately there is no encryption. Does encryption depend on the rom or on TWRP and will this TWRP version work on a Samsung phone? And is there some trick to enforce encryption when flashing custom rom with TWRP?
[OnePlus 9 Pro] Nimueh:
This version is NOT for Samsung phones - go check the XDA forums for your device to find a correct version.
[OnePlus 9 Pro] shadabkiani:
First of all, this is a thread for OnePlus 9/Pro; not Samsung. Please refer to your phone's forum for better support.

Secondly, you should have written your phone model and ROM specifically in your message, rather than just "Android 13 custom rom on a Samsung device".

Thirdly, encryption depends on the ROM you are using. Most latest phones/ROMs automatically encrypt data upon first boot. And if they don't, you can manually enable encryption from Settings > Security (requires charger plugged in). Just go to Settings > Security to see if it's already encrypted or not. There is no trick to enforce encryption at the time of flashing ROM in TWRP; not to my knowledge at least. It's a ROM-dependent feature (and "almost" all ROMs support it).

Lastly, looking at the TWRP version, I assume your phone is from 2017-18, and most probably TWRP would be official for your phone, and it would support decryption. If your phone/ROM is encrypted, it would ask for decryption when TWRP boots.
[OnePlus 9 Pro] orifori:
Thank you, guys for your help! I have posted this question exactly on Noble rom’s thread but no one is answering or even giving a clue.

The phone is Samsung Galaxy s9+ and I have successfully used full disk encryption on Android 8, 9 and 10 on both stock and custom roms. Now I decided to migrate to this custom Android 13 rom but face this encryption problem.

In Android 13 I go to Settings > Security and privacy > Other security settings - there is an option “Encrypt or decrypt SD card” but no option and absolutely nothing about encryption/decryption of phone (internal memory)!

Any help will be highly appreciated.
[OnePlus 9 Pro] TNSMANI:
Please post in your device thread or in the Android Q&A or General Q&A threads. Please do not derail and pollute a thread which has nothing to do with your device, ROM, TWRP etc. You have been on XDA sufficiently long to understand this and have also been told to post elsewhere. Further posts on this topic of yours in this thread may be deleted.
[OnePlus 9 Pro] der_akinator:
Android 13 made it mandatory to use file based encryption (FBE), which is probably version 1 for your phone. So the twrp device tree has to be adapted to use it too. I think an android 9 based build is still sufficient for FBEv1, but you have to test it yourself.
[OnePlus 9 Pro] TheGhost1951:
TWRP for A12 would not load the contents of the SD card (internal storage) for A13. Tried it several times to no avail.
[OnePlus 9 Pro] der_akinator:
Do you talk about OP9 or the samsung guy? Please provide a logcat and recovery log output, if you have problems with this build.
[OnePlus 9 Pro] TheGhost1951:
I'm on the OP9P..
[OnePlus 9 Pro] der_akinator:
Of course, I'm talking about his existing device tree. But enough with Samsung.