yashsingh1/xdaforums huggingface dataset:
[OnePlus 9 Pro] ikram.senguen:
Thanks, true, i lazy as i am, only and always used "reflash after Rom Flash" 😂

But the Setup your having i had too and would realy want have Stock and custom on Slot a and b but since then i cant reproduce that state also lost the memory on how i did it Back then

I you could explain on how i bet many would appricate it as testing and trying reeealy went on my nerves these days
[OnePlus 9 Pro] shadabkiani:
I don't have stock (OxygenOS) and custom ROM simultaneously. We can't do that on OnePlus 9 series (and onwards I think) because /super partition (which contains /system /product /vendor /odm etc.) doesn't have slots. There's only one /super. I think it was OnePlus 8 that had /super_a and /super_b, and you could dual-boot different ROMs there, I suppose (don't know for sure, think I read some users did that).

However, partitons like /boot have slots obviously. So when I flash a ROM, I flash it twice so that ROM's images like boot vendor_boot dtbo etc. are flashed to both slots, and then both slots are bootable (and on the same ROM). I keep one slot (slot_a) untouched and unrooted. I reboot to recovery, switch to slot_b, the proceed with ususal rooting method by patching boot.img with Magisk, temporarily booting it from fastboot, and then choosing Direct Install from Magisk.

P.S. I use payload-dumper-go to extract boot.img from payload.bin from ROM zip
[OnePlus 9 Pro] shadabkiani:
Ah, that makes sense now.
[OnePlus 9 Pro] DavidXanatos:
Seams with OOS14 decryption of data no longer works
[OnePlus 9 Pro] der_akinator:
I know about this, but had to wait for the release of the OOS 14 EU version, which was today, to properly investigate. Lets hope it's a quick fix.
[OnePlus 9 Pro] der_akinator:
The bad news is that the OOS 14 decryption issue is a kernel/dtb issue, which requires more time to hopefully identify and fix.

The good news is that, you can use an unofficial OOS 14 boot image, which is linked below, to fastboot boot and decrypt data properly. I don't think it's compatible with OOS 13 firmware-based custom ROMs, but haven't tested that.

Permanent installation with the official boot image and zip installer still works, but throws a lot of error messages.

24-02-27-OOS-14 - Google Drive

drive.google.com
[OnePlus 9 Pro] Duvel999:
Thank you for this.

I'm unlocked & rooted on latest Android 14.

This asked maybe many times, will installing TWRP recovery wipe my user data?

No :)

It worked perfectly, (I used option 1)

Kind regards,
[OnePlus 9 Pro] cerj:
Is the boot.img in your G drive folder TWRP that I can use in fastboot? Thank you
[OnePlus 9 Pro] brianyz:
Quick question about restoring a TWRP backup. 1st time needing to use it.

I'm been running CRDroid 13 since I got the OP9 (non Pro) phone in May of 2023, and now CRD 14. No issues. Every weekend I make a full backup with TWRP and copy all the files from internal storage so I'm always ready for the bad flash. My flash process is:

Sideload CRD from CRD Recovery, reboot to recovery

Sideload NikGapps core, reboot to fastboot

Fastboot boot twrp, advanced, flash current TWRP, reboot to fastboot

Fastboot boot Magisk-patched boot image, then Direct Install Magisk from the app.

Anyways, had a bad update that bootlooped the phone, couldn't sideload anything (recovery complaining about superblock).... finally figured I would just restore the latest TWRP backup. I always just restore everything. Restore process went as normal until the end when in red letters Failed to Mount System_Root, and three other partitions (I deleted the recovery logs I saved when I went full nuclear wipe later on). Ended up doing full wipe, format data, etc. TWRP backups still failed at the end about failing to mount partitions. Ended up just fresh installing everything, but am having trouble with a few apps and the screen constantly turning back on, so would like to restore the backups if possible.

I'm using the TWRP-23-12-29.img and am encrypted. I have tried some of the newer TWRP img's, but when fastbooting them they never boot (24-02-27).

Am I doing something wrong? What is the correct process to restore?

Thanks for any help.
[OnePlus 9 Pro] der_akinator:
A possible solution, would be to remove any files matching "/data/system/users/0/package-restrictions*". The packages-restrictions.xml file is excluded by default, but Android 14 added another one.
[OnePlus 9 Pro] brianyz:
Because I had a "fresh" install after wiping the whole phone, I was able to restore a backup (with mount errors). I did the restore, reboot to recovery, then sideloaded the latest ROM over it. After that I was able to get the original install back 100% working.
[OnePlus 9 Pro] TheGhost1951:
Can I use the unofficial boot.img to patch it with Magisk and then root with the patched image? I am on OS14.
[OnePlus 9 Pro] TheGhost1951:
Tried the unofficial boot.img from above. Magisk patches it and then tried to boot phone from that img but phone just rebooted to bootloader. So what I tried failed. I had originally used MSM tool to read back the boot.img, patch it, then boot from it and it booted, but when trying to direct install in Magisk app, it failed... No errors, just as soon as the install process started the phone rebooted.
[OnePlus 9 Pro] der_akinator:
That boot image isn't meant to be patched or directly flashed to a boot partition. You should use it just for temporarily booting twrp with fastboot. Please correct me if I misunderstand you.
[OnePlus 9 Pro] TheGhost1951:
actually, this post was in the wrong thread, my apologies!
[OnePlus 9 Pro] yesca213:
Thank you, this saved me! I was able to switch back to a bootable slot. Now how to fix the broken slot?
[OnePlus 9 Pro] TheGhost1951:
when you tried to direct install the patched img and it immediately rebooted. Mine did the same thing. I again booted from the patched img, and noticed that Magisk stated that root img was present. I was able to use swift Backup as root, restored my missing apps. Then restarted phone, no more root, but had all my missing apps. It is like temp boot root (same as temp boot TWRP) and there you go. Temp root without effecting phone and be able to get OTA updates......:D
[OnePlus 9 Pro] TheGhost1951:
the next update should fix your broken slot.
[OnePlus 9 Pro] hammered58:
Tried this and it worked great, nice hack,, root without the root
[OnePlus 9 Pro] TNSMANI:
Does it mean that every time I want to use a root app, I have to connect the phone to the PC/Laptop and boot that particular image and then start using the app? Looks a little tedious but may have its own uses in particular scenarios.
[OnePlus 9 Pro] shadabkiani:
How about when you flash the ROM initially, flash it twice so that it gets flashed to both slots. Then you root one slot and keep the other slot unrooted. And you can easily change slots from recovery. Simple.

I used to do this with crDroid A13. Now I'm on Matrixx and it has KSU so no need anymore.
[OnePlus 9 Pro] TheGhost1951:
That is true. I have the LE2127 variant with unlocked bootloader. And starting with 11.2.3.3 I upgraded all the way to the first OS14 update. Direct installed root and after that the second security update failed to install with installation problem. Uninstalled the patched image through magical, no help, flashed stock boot.img, no help. Root was the only modification made and it halted all updates. So, back to 11.2.3.3 and updated all the way to current OS version even with an unlocked bootloader. Now, yes may be a little inconvenient to temp boot root but that way you are not modifying anything on the phone that could cause any issues. Would be nice if someone made an app to do it for us!!!!! 😁
[OnePlus 9 Pro] Nimueh:
As great as that sounds, it means you can't use any apps that need root permanently, like Adaway, Terminal, Battery Guru or (what I personally NEED on every device lol) Substratum Lite 🤷‍♀️
[OnePlus 9 Pro] TheGhost1951:
Understand, everyone's needs are different. I would have permanent root too, but when I permanent root, updates fail.
[OnePlus 9 Pro] TheGhost1951:
You could boot temp, not reboot phone. Have root as long as you don't reboot
[OnePlus 9 Pro] Nimueh:
I have to reboot every 3-4 days anyway because free RAM gets too low otherwise, so for ME that's not a solution either.

I mean I get that it has advantages for some users, it's just not for me and never will be 😇
[OnePlus 9 Pro] Duvel999:
I tried option 1 again after a update, I got root

But when I follow all the correct steps, TWRP recovery won't stick .

What could I be doing wrong?
[OnePlus 9 Pro] der_akinator:
I need more information to give you a good answer.

Which device version are you using, which ROM are you using, which flashing app are you using, and which installer zip did you try to install? The logs of your flashing app would also be useful.

After following all steps of installation method one and rebooting into recovery, you end up in the ROMs recovery?
[OnePlus 9 Pro] Duvel999:
It's a 9 pro ()LE2123 - EU : BA) with Stock Rom android 14 latest version .701 by Oxygen updater.

I use Magisk Canary 27003.

Also for flashing your latest unofficial TWRP in Magisk

Followed all option 1 steps.

But I got TWRP & after a reboot I got stock recovery...
[OnePlus 9 Pro] der_akinator:
I will try to reproduce your issue, but you should first run a test with magisk stable or another kernel/boot flashing app.
[OnePlus 9 Pro] Duvel999:
Okay, I'll try
[OnePlus 9 Pro] MENINBLK:
Everything seems to be working.

The error doesn't bother me.

I have been playing with different application and so far no problems.

Play Store is happy and Device is Certified.

DRM Security Level is L1.

I tried doing a full backup from TWRP.

It got caught on a Google Font and crashed with error 255.

I am going to give Titanium Backup Pro a try.
[OnePlus 9 Pro] IamTheBRAVE:
Instructions say

After flashing in magisk, i rebooted to system but then rebooting to recovery brought me back to my old recovery.

Edit: tried again. After booting twrp, it only lets me flash ramdisk not current twrp, and after flashing magisk i reboot to recovery and it's my old one.

What am i doing wrong?
[OnePlus 9 Pro] der_akinator:
Sorry for that. I build a new version of the boot image that is able to boot without flashing vendor_boot but it broke the zip installer. I uploaded a new tested installer. https://drive.google.com/drive/u/0/folders/16PqxF4ryoiNCYbwPuL5eve7GtNoE7Nna
[OnePlus 9 Pro] patkoz16:
fastboot boot.img -> make ramdisk from boot.img -> flash full update f72 - > flash magisk is ok ?
[OnePlus 9 Pro] IamTheBRAVE:
Tried again with same boot, new installer, didn't stick. Here's what i do:

Flash installer in magisk. Reboot👍

Reboot to TWRP recovery 👍

Install Ramdisk and magisk👍

Reboot Recovery --> Old recovery.

Maybe this is the best way?

Thanks for taking the time to help us🙏
[OnePlus 9 Pro] der_akinator:
Maybe try to use your steps again without "Install Ramdisk". I think I should change the update instruction. What I meant is to use either the install to ramdisk option OR the installer zip.

Edit: Yes, it's definitely the install to ramdisk step that breaks the update.
[OnePlus 9 Pro] der_akinator:
Do you want to install twrp or update twrp or just update your OOS?
[OnePlus 9 Pro] osm0sis:
I noticed a similar error when rebooting into fastbootd. Even on Lineage. Not sure what's up there.

I believe there is no twrp-12 branch in effect, only 12.1, so 3.7.0_12 is correct and matches mainline TWRP. Best to leave it alone.

Would be nice if you could adjust the status header to be below the holepunch when you get the chance! Awesome (and rapid!) work here! 🤘😁

Edit: Oh wait, you just meant the build iteration from -0 to -1! 🤦‍♂️😅
[OnePlus 9 Pro] MENINBLK:
Titanium Backup Pro works great!

I can export Full Backups to my external 2TB SanDisk SSD.

Thank you for all your quick responses and hard work!!
[OnePlus 9 Pro] patkoz16:
after instal twrp instaler in old twrp i my touch screen no responde . recovery reload but i cant unlock . i do this in old oos a11 is important ?
[OnePlus 9 Pro] filjusz:
This recovery is for android 12/12.1/13, not 11. For eleven use official one
[OnePlus 9 Pro] IamTheBRAVE:
@der_akinator i was wondering... The installer installs to both slots, so switching slots would let us boot to twrp?

Edit: I know what i was doing wrong. I was flashing a magisk-patched-boot.img (with old recovery)
[OnePlus 9 Pro] osm0sis:
It flashes to both slots so that hopefully if your current slot breaks and Rescue Party switches slots you'll still have recovery access.
[OnePlus 9 Pro] javi2246:
I confirm that it works on a oneplus 9 (lemonade) with 19.1 lineageos. Installed using magisk.

The only problem I had is error 255 when making the backup, I had to delete the folders/files from /data/fonts

So far I have not tried a restoration.

Thanks to the developers!!
[OnePlus 9 Pro] filjusz:
tar fork 255 error?
[OnePlus 9 Pro] javi2246:
Yes. Copy/paste the lines of recovery.log
[OnePlus 9 Pro] der_akinator:
@MENINBLK had the exact same problem also with google fonts. Maybe he found a solution for that. I will try to replicate for myself and search for a solution.
[OnePlus 9 Pro] der_akinator:
Was your problem also related to google fonts or to some other files?
[OnePlus 9 Pro] MENINBLK:
I had a problem with the same exact font file.

GoogleSans-Regular.ttf

I used Titanium Backup Pro and successfully backed up to an external 2TB SanDisk SSD.
[OnePlus 9 Pro] javi2246:
A few weeks ago I was gossiping on zulip (twrp) and they were talking about this problem. But I don't know if it was in the general, dev or where.

The truth is I have a ****ty memory, so you better ask them directly if you want fix the problem 😅, maybe @osm0sis remember.

I would try to lend a hand, but I have no idea about programming :/

Edit: It doesn't pose any problem to me, you just have to delete those fonts... The OS continues to function well without them.
[OnePlus 9 Pro] patkoz16:
po aktualizacji do Androida 12.1 na powłoce fastboot boot boot.img wyświetlacz utknął w najbliższym fastboot? masz rozwiazanie??

spróbuj fastboot flash boot boot.img?
[OnePlus 9 Pro] der_akinator:
Please read Option 3 of the installation instruction. If you are not using root or any other custom recovery you have to first flash vendor_boot.img before fastboot boot boot.img. But at first get the vendor_boot.img of your current system.
[OnePlus 9 Pro] osm0sis:
I seem to recall @BillGoss reporting that deleting the offending font files had no negative effect, and maybe that the ROM recreates the files after restore and some uptime. Not sure if a general fix was proposed to exclude/fix the issue on the Gerrit or anything, however.
[OnePlus 9 Pro] patkoz16:
flash vendor boot to boot or to recovery ? vendor boot.img from my telephone or vendor boot from link this topic ?
[OnePlus 9 Pro] osm0sis:
One update you should add to Option 1 is that after flashing the TWRP zip in Magisk you don't need to reboot to recovery, you can immediately reflash Magisk with Direct Install in the app, and then any custom kernel from any kernel flasher app before rebooting. 😁
[OnePlus 9 Pro] der_akinator:
Strange los is using vendor_dlkm but same error on my device too. Any ideas how to pull logs? ADB in fastbootd mode seems to be broken.
[OnePlus 9 Pro] BillGoss:
The backup will fail if there are files (directories are ok) under /data/fonts and /data/nandswap

There was some discussion at the time about excluding them, but it never came to a resolution.

I've never had issues after deleting the files, though they sometimes come back and I've never worked what causes them to reappear.

The problem also affects Orange Fox as it's based on TWRP.
[OnePlus 9 Pro] der_akinator:
Use "fastboot flash vendor_boot vendor_boot.img" with TWRP vendor_boot. Get a copy of your ROM vendor_boot.img. At the last step use "fastboot flash vendor_boot vendor_boot.img" with your ROM vendor_boot.img.
[OnePlus 9 Pro] osm0sis:
I believe adb is tied to MTP Enabled for some reason with the current USB config on this device, but of course there's no data decryption or MTP in fastbootd mode, so no adb.

I'm not sure if @Nebrassy ever figured out how to fix it, but you might want to pick his or other maintainers' brains about it on Zulip.
[OnePlus 9 Pro] _MartyMan_:
Working perfectly on OnePlus 9 with latest Nameless ROM. Thank you guys!
[OnePlus 9 Pro] patkoz16:
możesz krok po kroku? dla laika nie jestes

i download f72 with oxygen updater how to extract vendor_boot ?
[OnePlus 9 Pro] der_akinator:
You can use payload-dumper-go to extract vendor_boot from the payload.bin inside your OOS zip.

Here is the link to it:

GitHub - ssut/payload-dumper-go: an android OTA payload dumper written in Go

an android OTA payload dumper written in Go. Contribute to ssut/payload-dumper-go development by creating an account on GitHub.

github.com
[OnePlus 9 Pro] patkoz16:
Dziękuję. Następny krok . jak korzystać z tego programu? Nie mogę znaleźć pliku exe
[OnePlus 9 Pro] der_akinator:
So you are using it on OP9 not pro? Maybe I should update the thread and mark it as unified.
[OnePlus 9 Pro] der_akinator:
I send you a PM. I think it's better to write there. You find it at the envelope icon on the top right of the page.
[OnePlus 9 Pro] _MartyMan_:
Yes, i'm using the 9 not the 9 Pro
[OnePlus 9 Pro] TheSayaMan:
Do not flash it through twrp, you will end up with a crash dump. I made that mistake. Reboot to bootloader and fastboot flash vendor_boot vendor_boot.img
[OnePlus 9 Pro] Steve0007:
@der_akinator

FYI

Currently on latest OOS 13

Flashing twrp thru Magisk, and directly Flasing back magisk works fine

But trying to backup data dont work (error 255).

Also asked for user 10 (company profil) decryption code... Which we don't have.
[OnePlus 9 Pro] der_akinator:
Is the user 10 profile specific to you or is this a default profile setup by OOS? I might install OOS13 myself and see whats going on there. Multi user system seem to be a common problem in TWRP. I will try to look into the backup code but it will probably take a bit longer to find a workaround for that. If I can find a solution at all for this...
[OnePlus 9 Pro] TheSayaMan:
Anyone know the proper way to update a ROM? I am rebooting to TWRP recovery, I install updated ROM, install TWRP zip, then install gapps. When I reboot to system, I get a ton of crashes, play store, play services, messages app, etc. If I do a clean install this same way it works fine with no issues. I would rather not have to do a clean install everytime I update crDroid. I would appreciate any assistance. Thank you!!
[OnePlus 9 Pro] der_akinator:
After update you have to reboot to recovery again to mount partitions with the slot you have installed the update to and install gapps to them. But sometimes it helps for me to flash gapps a second time if the crashes still occur.
[OnePlus 9 Pro] TheSayaMan:
That was my mistake. I'll do that with the next update. Thank you!!!
[OnePlus 9 Pro] mettis88@gmail.com:
1. Install ROM

2. Install TWRP

3. Reboot to recovery

4. Install gapps

5. Install magisk

Correct instructions for updating ROM with gapps?
[OnePlus 9 Pro] der_akinator:
Yes, works for me in crdroid 13. If you still get crashes after booting to system just reinstall gapps a second time
[OnePlus 9 Pro] bubobih:
Hello all, does this work on oxygen a 13 official rom? If works does this make factory data? If not what is the best way to install it? Regards
[OnePlus 9 Pro] patkoz16:
one week and done :d fast work :D
[OnePlus 9 Pro] Flecto:
See my post above. It works for me with OOS 13 (F.17), but I ran into the issue with the fonts during backup. Which I overcame by deleting /data/fonts/files.
[OnePlus 9 Pro] der_akinator:
First of all thanks for your extensive test and documentation.

About vendor_dlkm:

The current solution isn't very nice, but I have to specify vendor_dlkm in fstab to mount it on device with LOS based ROMs because that's the partition containing necessary kernel modules for USB OTG, battery status etc. Unfortunately OOS isn't using a separate partition for that and stores modules directly on the vendor partition. Luckily this only throws an error but doesn't crash. To fix this I would have to build two versions with and without the vendor_dlkm entry in recovery.fstab.

About failing backups:

I have read a bit about fscrypt which is used for android's encryption. The "fscrypt policy" lines in recovery.log only give information about which policy and key is used to encrypt a directory and all subdirectories or single files. Whats interesting is the 32 character string at the end of each line that is an ID of the key used for encryption. "2DK" just means FBEv2 encryption method is used. I think /data/fonts/* is encrypted with a different key than the one derived by your initial password/pattern input. You can check that by comparing the ID of /data/fonts/* with an ID of any other directory under /data.

Reading directories that can't be decrypted by TWRP doesn't seem to be problematic but accessing one of those files is. A possible fix for this could be to store key IDs that TWRP has access to and compare them with the key ID of the currently accessed directory. If it's a match continue else backoff and try next node.

I will try to apply this idea to TWRP's tar wrapper next week.
[OnePlus 9 Pro] Flecto:
I don't know what the code looks like, but if there is a way to catch the error, that might be easier than trying to figure out if the key is available. For each file, just catch if it wasn't able to be added and if so, print a warning and move on. But again, I don't know the code, so maybe that's not feasible...
[OnePlus 9 Pro] der_akinator:
Yes, thought about that too. It seems to be a bit more inefficient but makes it also easier to implement for non encrypted devices. I also have to investigate further to find a point I can apply it.
[OnePlus 9 Pro] TheSayaMan:
Didn't work for me. I got stuck factory resetting and starting over. Frustrating.
[OnePlus 9 Pro] der_akinator:
Yes you are right direct reboot to recovery and installing gapps doesn't work for me on crdroid either. But as I said if you get crashes after rebooting to system. Just reboot again to recovery and flash gapps a second time. I had the same problem with crashing gapps and official crdroid recovery too.
[OnePlus 9 Pro] TheSayaMan:
I tried that. I tried flashing gapps several times then gave up. Was still crashing.
[OnePlus 9 Pro] Evon88:
im on nameless

if i installed this twrp with magisk, then installes oos A13 with twrp, it will work?

and steps pls
[OnePlus 9 Pro] Smedslund:
Look at post 128. I guess you need msm back to OOS A11 and follow the steps @Flecto did.
[OnePlus 9 Pro] IamTheBRAVE:
Crdroid dev stated he uses his own blend of nikgapps-core so it might interfere with the brand of gapps you're flashing.

Edit: @der_akinator since Crdroid already has gapps, you wouldn't need to flash it.
[OnePlus 9 Pro] javi2246:
It doesn't work for me in Lineageos. I've tried installing gapps before and after reboot, even reinstalling back via fastboot vendor_boot original rom, etc.

Installing via sideload doesn't seem to work either:

- enter twrp, advanced, adb sideload and push with cmd. reboot in new slot recovery mode (I get twrp, not lineage recovery), install gapps and reboot into system. And the system stays "loading", after a while it restarts automatically and loads the old slot with the old OS version.
[OnePlus 9 Pro] filjusz:
Why cant you just flash gapps in lineage recovery? It works just fine
[OnePlus 9 Pro] TheSayaMan:
Actually gapps are not included in crDroid, they need to be flashed separately and I am using core gapps.
[OnePlus 9 Pro] der_akinator:
I can't realy give support for ROM updates because I can't test them all. You probably should follow the official update instructions by LOS. It doesn''t seems like they offiially support updates via recovery.

The instructions I gave where just the one from the crdroid thread plus an additional step for something that seems to be a crdroid problem and works for me personally.