yashsingh1/xdaforums huggingface dataset:
[OnePlus 9 Pro] TheSayaMan:
Unfortunately I had to give up on this because every time I flash a custom rom update, my phone bootloops and ultimately I have to factory reset, format data and start all over. Custom recovery works fine with updates. reboot to bootloader, fastboot --set-active=other then reboot to recovery, adb sideload rom, reboot recovery, adb sideload gapps. reboot to system, no issues. I tried all recommendation to install via twrp will all failures. I reboot to twrp, install update rom, it automatically flashes to opposite slot, I reboot twrp, install gapps, phone boots up with all kinds of force closes. I've tried flashing update then not rebooting and then flashing gapps and doesn't boot at all. I give up!! Staying on custom recovery. Too bad because it would be nice to not use my computer for updates.
[OnePlus 9 Pro] der_akinator:
Sorry to hear that. There are some problems with incremental OTA zips but there are also some new commits for the update engine. Which ROM do you use? Maybe I can reproduce this. I have some time over the holidays to tinker a bit.

If everything fails you can extract all partitions from a full update zip and flash all partitions in fastbootd mode. This helped me after I recently messed up microG installation. If it works no data is lost.

You can use this:

1. run "fastboot reboot fastboot"

2. open terminal in folder with partition images

3. run " for part in `ls`; do fastboot flash "${part%.img}" $part; done" (on unix based OS)
[OnePlus 9 Pro] TheSayaMan:
I use crDroid
[OnePlus 9 Pro] TheSayaMan:
I can just use custom recovery for updates with no data loss using my computer without going through all that because even so, still using computer
[OnePlus 9 Pro] der_akinator:
I'm not trying to convince you to use twrp. It's just a way to recover without loosing data, if anything is messed up.
[OnePlus 9 Pro] TheSayaMan:
Oh I got ya, thanks
[OnePlus 9 Pro] Mr.Conkel:
Another easy thing to do is take a full data backup an clean flash things on an update then restore data.

The twrp does decrypt so this is completely possible, and I love doing this myself personally to avoid any issues when updating and clean flash every time
[OnePlus 9 Pro] TheSayaMan:
Ok I'll try this, thanks!
[OnePlus 9 Pro] Mr.Conkel:
Just remember in order to restore a backup on an encrypted device boot it first after flashing everything. Then boot back into twrp and restore your backup

(Also before you wipe the device move the backup to an otg drive or a pc of course, just yank the whole twrp folder and then when you restore place the folder back and twrp should recognize the backup in the restore option)
[OnePlus 9 Pro] TheSayaMan:
Ok I do have a otg. I'll use that. Thanks again.
[OnePlus 9 Pro] Suncatcher16:
tried this guide and failed on step 5 (Run "fastboot boot boot.img" with the TWRP boot image).

it just shows me the fastboot logo and nothing else. The system doesn't boot either, showing dm-verity error.

I reboot the stock vendor_boot.img and then it went fine.

Anobody had such experience?

Am running LE2115_11_f.17 ROM
[OnePlus 9 Pro] TheSayaMan:
You need to also flash the twrp vendor_boot otherwise it won't boot.

first flash twrp vendor_boot

fastboot flash vendor_boot vendor_boot.img

then boot twrp

fastboot boot boot.img

go to advanced and select install current twrp and it will install it permanenly.

If you plan on using stock rom then you need to then flash the stock vendor_boot in order for your phone to boot up.

fastboot flash vendor_boot vendor_boot.img

But if you plan on using a custom rom then you don't need to flash stock vendor_boot. Simply flash rom and it will replace the twrp vendor_boot with the custom rom vendor_boot and you will have no problems.
[OnePlus 9 Pro] Suncatcher16:
Thx for reply.

I did exactly like this from the very beginning, but it didn't work.

Is the TWRP from this thread works only for Oneplus 9 Pro, or for Oneplus 9 as well? I have regular OP9 and I am on a stock OOS13 for LE2115.
[OnePlus 9 Pro] TheSayaMan:
Someone on page 6 of this thread confirmed having the op9 and it works. I have the op9 pro so I don't know.
[OnePlus 9 Pro] der_akinator:
I don't know which OOS version the person who runs this on OP9 is using but OOS 13 was also confirmed to be working at least on OP9pro. I can't help with OP9 issues because I don't own that model. The dm-verity error should be fixed by flashing the original vendor_boot image.
[OnePlus 9 Pro] Suncatcher16:
thanks, I already fixed the problem just like that. Just curios that no working TWRP exists for the OOS13.

The TWRP from this thread is the unreleased unofficial beta as I got it
[OnePlus 9 Pro] TheSayaMan:
This works for a12 and a13 and I tried telling you before that if your on stock you need to flash back stock vendor boot or it won't boot up
[OnePlus 9 Pro] Andsie:
Hi everyone,

for testing:

Is it possible to boot into this recovery temporarily by using the command "fastboot boot recovery twrp.img"?

Regards

Andsie
[OnePlus 9 Pro] TheSayaMan:
Not without the twrp vendor_boot

Reboot to bootloader

fastboot flash vendor_boot vendor_boot.img

Then fastboot boot boot.img
[OnePlus 9 Pro] Lukas Paukstys:
@TheSayaMan

I did exactly the same to no success. It gets stuck on the Fastboot Mode Logo.

Tried with Magisk without luck either. The time I did get it (I believe through Magisk Flash), the prompt to type in the passcode for encrypted storage showed, but the touch screen was unusable.

Trying the official 11 version, fails to recognize the internal storage. I found another guide talking about ram disk install- this didn’t work for me either. Any boot into twrp either outright fails [universal method 3], does not detect internal storage [v11 of twrp], or does not resolve with the touchscreen [so it’s all pointless at that try - even gave otg usb a go, but it wont detect - if someone can solve this, at least I could full backup my phone]

Im running a OnePlus 9 Pro (TMO converted to Global], the rom is Nameless, build is v12 android 20220307-0946

Can someone help me out?
[OnePlus 9 Pro] Suncatcher16:
I'm running the same, TMO converted to Global, but OP9, not Pro.

And I have exactly the same error.
[OnePlus 9 Pro] TheSayaMan:
download boot.img and vendor_boot.img

reboot to bootloader

fastboot flash vendor_boot vendor_boot.img

fastboot boot boot.img

That will boot you into twrp. You can then go to advanced and select install current twrp and it will install twrp permanently. You then need your stock vendor_boot with Global. Reboot back into bootloader and flash your stock vendor_boot

fastboot flash vendor_boot vendor_boot.img

That last step is important because if you don't flash your stock vendor_boot then the phone will NOT BOOT!!!

However if you decide to flash a custom ROM instead, you will not need to flash the custom rom vendor_boot because the twrp vendor_boot would automatically be overwritten with the custom roms vendor_boot.
[OnePlus 9 Pro] Lukas Paukstys:
@TheSayaMan Think there might be a misunderstanding-

I just went through the process laid out and the situation is the same.

Upon running the fourth line mentioned "fastboot boot boot.img", the phone stays stuck on the Fastboot Mode logo, and never boots to TWRP.

Any hunches? Other's able to reproduce?
[OnePlus 9 Pro] TheSayaMan:
Did you flash vendor_boot first?
[OnePlus 9 Pro] Lukas Paukstys:
Yes
[OnePlus 9 Pro] der_akinator:
It would be helpful to get a logact output for the touche screen issues. You can get it by running "adb logcat". If adb doesn't recognize your device it could help to reattach the usb cable at your phone and wait a few seconds. Do you know which firmware you're running?
[OnePlus 9 Pro] TheSayaMan:
Ok reading the OP, it states that this works for the OP9 on OOS 12 so your device is unsupported. Downgrade stock to OOS 12 is the only way from what I read.
[OnePlus 9 Pro] der_akinator:
Update

/data/fonts/* is excluded from backups (has to be verified by someone with backup errors)

screen turns completely off now

updated firmware files from LE2125_11.C.63 (maybe this helps with OOS13 problems)

initial installation is now possible without flashing vendor_boot (I tested a few combinations of installation methods and initial system configurations. So hopefully nothing is broken this time.)

Have a happy New Year tomorrow!

22-12-30 - Google Drive

drive.google.com
[OnePlus 9 Pro] CtrlValCanc:
Happy New Year!

It works, I'm amazed!

I just have a question: it gives me this error in red while I boot it "failed to mount vendor dlkm (block device required)". Is it something I should be worried about or not?
[OnePlus 9 Pro] der_akinator:
It doesn't affect any functionality and is more or less cosmetic. But it can't be avoided if I want to support OOS and custom roms at the same time. It is already in the list of known bugs.
[OnePlus 9 Pro] CtrlValCanc:
Oh! I'm sorry, I must have jumped the line when I read it.

Thank you very much for taking your time to answer my already-answered question.

Once again, amazing work!! Thank you very much! Never thought I would have an A13 decrypt recovery!!
[OnePlus 9 Pro] Andsie:
Hi,

in case of trouble:

How to revert without loosing data or non-booting device?

Regards Andsie
[OnePlus 9 Pro] der_akinator:
If you don't have a PC at hand just reflash your current ROM zip and uncheck "Automatically reflash TWRP after flashing a ROM". Or get your current ROMs boot image and run "fastboot flash boot_a boot.img" and "fastboot flash boot_b boot.img".

PS: The first method just overrides the boot partition of your unused slot but you can't boot TWRP after this. So it isn't fully gone until you do a ROM update after this.
[OnePlus 9 Pro] Andsie:
...and when I have a PC at hand?
[OnePlus 9 Pro] der_akinator:
Flash boot directly with fastboot.
[OnePlus 9 Pro] Andsie:
The magisk patched boot.img to retain root?
[OnePlus 9 Pro] der_akinator:
Yes, you have to flash the patched magisk boot image if you want to keep root.
[OnePlus 9 Pro] TheSayaMan:
No you don't. Just install magisk in twrp, much easier.
[OnePlus 9 Pro] Andsie:
Did I understood right:

fastboot boot twrp.img temporarily boots the new twrp without a hassle?
[OnePlus 9 Pro] der_akinator:
Yes, but I want to wait with updating the first post until I get some feedback. Last time it broke the zip installer but this time it looks good to me.
[OnePlus 9 Pro] jamescable:
So, I did this on crdroid 8(12.1) and works fine
[OnePlus 9 Pro] Andsie:
i gave it a try on Stock ROM A13 f.72:

fastboot boot twrp.img did not work

installing zip under magisk worked fine - kept root by installing magisk rightaway after flashing twrp.zip

first backup worked fine, too

one problem: not every usb external drive is recognized

error "failed to mount '/vendor_dlkm (Block device required)" is still present
[OnePlus 9 Pro] der_akinator:
At least the zip installer works now. Could you provide a logcat output and recovery.log that captures the usb drive issue. You find this option at Advanced -> copy log -> Include logcat.
[OnePlus 9 Pro] Steve0007:
I have just tried on Stock ROM A13 F72:

Installing zip under magisk worked fine

Kept root by installing magisk.apk rightaway after flashing twrp.zip

Data backup worked fine

Just need to reinitialize the phone and see if data restore would work?

Also got the error message "failed to mount '/vendor_dlkm (Block device required)" but as you said it is just comestic.

Thanks for your work !!
[OnePlus 9 Pro] Andsie:
I would have sent this to you - but I don't find it after processing on my phone - do I do something wrong?
[OnePlus 9 Pro] der_akinator:
Restoring data works fine for me but I had to reboot two times for everything to work.
[OnePlus 9 Pro] der_akinator:
By default it's written to /sdcard but you have to unlock data. If you select an other storage location like an USB drive, it is written to the root of that drive. You can also use your PC and run "adb logcat", which prints everything to your terminal screen.
[OnePlus 9 Pro] Andsie:
Here the requested files

Another usb to ssd adapter works properly
[OnePlus 9 Pro] Andsie:
not a single upload works...
[OnePlus 9 Pro] Andsie:
Not in app

Not at pc
[OnePlus 9 Pro] Andsie:
Now?
[OnePlus 9 Pro] osm0sis:
First of all, edit your old post instead of making a new one each time you try...

Second, maybe if xda's having trouble with attachments for you then you should stop trying to upload to xda? Try Google Drive or something instead...

5 posts in a row like "did it work?" is a bit ridiculous.
[OnePlus 9 Pro] Andsie:
A little bit rude - dear osmosis

BTW - editing a post is not the solution, either
[OnePlus 9 Pro] filjusz:
No, no! He should try more, because why not?
[OnePlus 9 Pro] ffejy462:
Fyi. If updating oos incrementally, after uninstalling magisk, updater will fail at 34%.

Flash current boot img, then update oos. After reboot, confirm update took, then reinstall TWRP.

ie

Updating oos incrementally if TWRP is installed:

Download incremental update

Uninstall magisk (restore images)

Flash boot img (exkm or similar) of current, not new, oos rom

Update oos with updater app

Install magisk to inactive slot (after ota)

Reboot

Confirm oos update

Flash TWRP per og instructions
[OnePlus 9 Pro] der_akinator:
Did it work with the steps you mentioned or are they the steps which lead to failure? Do you mean with incremental flashing a full OOS zip on top of OOS or a partial OTA zip? There are some problems with partial OTAs and they are not recommended to be installed via TWRP.
[OnePlus 9 Pro] ffejy462:
The steps I listed are the steps needed to incrementally update oos if TWRP is installed. Oos updater will fail at 34% if current boot img isn't flashed before updating.

My post was intended to help those with oos and TWRP trying to update incrementally. The update failure isn't an issue with TWRP, but rather (a feature of) the updater.

I did, however, kinda expected magisk restoring images functionality negating the need to flash boot img, but I guess I was mistaken.

Thank you for getting us a working TWRP on a12/13 btw.
[OnePlus 9 Pro] ThePresence:
I've OOS13 F17. How do I update to F18? Any recommended steps or I should just flash ota via updater and reflash magisk and in done. What's the correct way to update.
[OnePlus 9 Pro] der_akinator:
I can't give you an advice because I don't run OOS but just do it as described by @ffejy462 three post above. Keep in mind that partial OTAs can cause problems.
[OnePlus 9 Pro] der_akinator:
Update

fix Magisk installation bug

fix "failed to mount '/vendor_dlkm (Block device required)" error message on OOS

23-01-05 - Google Drive

drive.google.com
[OnePlus 9 Pro] Andsie:
Success - error gone...

Many thanks for the helpful work!
[OnePlus 9 Pro] osm0sis:
😍

What was breaking losetup?!

I was about to try it with my busybox builds today to see if it worked any better.

Official TWRP status wen? 🙌
[OnePlus 9 Pro] der_akinator:
I disabled internal TWRP APEX handling. I think TWRP might have blocked the loop devices but I'm not sure why magisk installer couldn't create a new loop device. Maybe loop-control was constantly blocked by TWRP.

I will do a bit of code cleanup and ask in zulip to make it official.
[OnePlus 9 Pro] osm0sis:
A bit of further digging today, just for my own curiosity:

It's both loop0 and loop1 which are blocked, any losetup action on them from busybox or toybox (TWRP's ramdisk losetup is toybox) will cause a hang. All loops higher than 1 behave normally.

`busybox losetup /dev/block/loop0` just silently hangs.

`toybox losetup /dev/block/loop0` displays "losetup: /dev/block/loop0: Value too large for defined data type" then hangs.

Interestingly AK3 was unaffected, though I'm not entirely sure why yet, since it still falls back to using losetup.

TWRP's never blocked the loop devices previously; not sure if it's something specific to lemonadep, lineage-20 or twrp-12.

I believe Lineage switched to .capex with lineage-20. Could it just be that TWRP's internal apex handling just doesn't know how to support .capex yet? 🤔

Edit: Aha! AK3 unmounts all existing /apex first, so it basically reset loop0 and loop1, so no hang with AK3. Well there's one part of the mystery solved anyway. :cool:
[OnePlus 9 Pro] Weliton:
where can i get the vendor boot??
[OnePlus 9 Pro] gsser:
Inside full rom zip payload or pullback from msm tool
[OnePlus 9 Pro] gsser:
The black magic kind i like hehe
[OnePlus 9 Pro] der_akinator:
Installation is now possible without flashing vendor_boot but I haven't updated the install instructions yet.
[OnePlus 9 Pro] der_akinator:
I also noticed that TWRP keeps /dev/loop-control open as RW for its whole lifetime but that doesn't seem to be a problem because magisk installation still hangs after I patched this. Only loop0 and 1 are a problem because TWRP only loads two apex files in its current configuration.

Maybe we should create a PR for magisk to include the unmount/losetup parts from AK3. This might be helpful for devices that have apex included in TWRP. For now I just keep building it without apex support.
[OnePlus 9 Pro] osm0sis:
Nah, it's definitely more an issue on TWRP's side, since it didn't used to hold the loops the way it currently is which causes the hangs. My guess is still that TWRP is lacking .capex support.

Magisk not unmounting them is technically better than what I currently do in AK3 since after install everything goes back to how it was, since the installer mounts a tmpfs over /apex to not touch anything there from TWRP.
[OnePlus 9 Pro] javi2246:
Restore doesn't work on LOS 19.1. Force checked twice...

I made the backup without pattern/pin, now when it comes to restoring I try to do a factory reset first, I restart I enter the OS, I go back to TWRP and I do the restore, I restart and the lineageos logo stays loading, it restarts only a couple of times, I enter TWRP to get the logs (it doesn't ask for a pin) but I'm going to mount the files and it's empty, it seems that everything has been deleted, in the "mount" option there is a button that says decrypt data, but it asks for a password (text)....
[OnePlus 9 Pro] der_akinator:
I could reproduce your issue when restoring backup with pattern set. It looks like super and data shouldn't be restored at the same time.

May solution:

1. Factory reset but NOT format data in TWRP

2. Flash previously installed OTA zip.

3. Reboot to system

4. Don't set any pin/password

5. Reboot to TWRP

6. Backup should show up again and restore only data

7. Reboot to system

8. If that doesn't help reboot to TWRP and restore only super

Edit: It doesn't matter if backup is made with or without pin/pattern. It is important that pin/pattern is not present when restoring it.
[OnePlus 9 Pro] javi2246:
super? I'm talking from memory (I've updated to LO20 and haven't installed TWRP yet), but I didn't seem to see any partition named super, just data, efs, modem and internal storage (SD).

The rest of the steps coincide with yours, I tried several combinations without success.
[OnePlus 9 Pro] rav3ns:
Hello @der_akinator ,

I'm trying to install following the universal option, but I have a screen with artifacts, similar to:

In the computer I can see the device and navigate under folders, but I can't do anything obviusly.

0a4155c4cc8d0d9e99e13420241a7eb7 md5sum of boot.img , maybe is incorrect?

Also I try with the boot.img of folder 30/12 and this only returns to the fastboot mode.

Any sugestion?
[OnePlus 9 Pro] der_akinator:
Super is the partition that contains more logical partitions like system, vendor, etc. It's basically like an OTA zip.
[OnePlus 9 Pro] der_akinator:
Do you use OP9 or pro and what OS are you running? Was your screen changed at one point? I think is has something to do with the arguments of the msm_drm kernel module which is responsible for the screen. I give it some standard arguments that work at least on the pro with custom roms.

Edit: If you have root you can send me the contents of /sys/module/msm_drm/parameters/dsi_display0 and I can include this in the next build to support other screens too.
[OnePlus 9 Pro] rav3ns:
OP9 not Pro version.

Stock rom full updated to the last version. ( I can't remember what version was)

Finally I got a brick and I unbricked with MSM and with stock rom.

At this point I'm on Oxygen OS 11.2.10.10 LE25AA on OP9 model LE2113.

with fastboot boot twrp.img was not working.

I installed official "twrp-3.7.0_11-0-lemonadep.img" and then install with adb sideload twrp-installer-3.7.0-12.1-2-lemonadep.zip

Recovery is loaded correctly but i'm not able to use (touch isn't working) also I tryed OTB mouse & keyboard but not working.
[OnePlus 9 Pro] rav3ns:
Attached the file /sys/module/msm_drm/parameters/dsi_display0 extracted with terminal in twrp.

Thank you a lot.
[OnePlus 9 Pro] der_akinator:
I might have found a fix but for testing I depend on you because I haven't an OP9. If you want to stay on OOS11 you should probably use the official TWRP 3.7.0-11.0 version due to differences in encryption.

op9-test - Google Drive

drive.google.com
[OnePlus 9 Pro] rav3ns:
I want to flash a rom with Android 12 / 13.

I go to test this recovery, thanks!

EDIT: installed with adb sideload and now is working! Thanks a lot!
[OnePlus 9 Pro] arsalturtle891:
When I boot into twrp using any of the boot.img provided, my touchscreen becomes unresponsive. What's the fix for this?
[OnePlus 9 Pro] rav3ns:
are u using OP9 not pro version?
[OnePlus 9 Pro] arsalturtle891:
Yup. I'm using the oneplus 9
[OnePlus 9 Pro] der_akinator:
Which boot image did you use? Maybe the image from op9-test dir helps.
[OnePlus 9 Pro] der_akinator:
@rav3ns did you test booting the test-op boot.img or did you just use the installer?
[OnePlus 9 Pro] arsalturtle891:
I tried all of them
[OnePlus 9 Pro] TheSayaMan:
I had a problem booting TWRP on stock 13 but not on custom roms so that could be the problem but not sure.
[OnePlus 9 Pro] arsalturtle891:
I also plugged in an external mouse and it didn't show up. I noticed that the time changed so the phone was not frozen. Just not responding to touch
[OnePlus 9 Pro] arsalturtle891:
Interesting. I considered evolution x but for now I want to stick to oos. BTW I am running on LE2115_11.f.18
[OnePlus 9 Pro] der_akinator:
I added a 4. installation option. This is what worked for OP9 users before. I added a new vendor_boot to op9-test dir.
[OnePlus 9 Pro] rav3ns:
both options, and for me is working fine.
[OnePlus 9 Pro] arsalturtle891:
For step 4, I won't be able to extract the vendor_boot.img from the payload.bin file because the full rom fir LE_211511.f.18 isn't out yet. Can I use the vendor_boot.img from LE_211511.f.17 instead?
[OnePlus 9 Pro] der_akinator:
I don't know if that works. If you have root you can run (on your device) "dd if=/dev/block/by-name/vendor_boot_a of=/sdcard/vendor_boot_a.img" and "dd if=/dev/block/by-name/vendor_boot_b of=/sdcard/vendor_boot_b.img". This creates two copies of vendor_boot in your sdcard folder. You can copy them to your PC and depending on your currently active slot you have to flash one of them later.

Edit: You could maybe check if the partial F18 zip contains any changes to vendor_boot and if not flashing it from F17 might be fine.
[OnePlus 9 Pro] arsalturtle891:
Unfortunately, I don't have root. I am trying to get twrp so I can root. Further, because the full rom for LE2115_11.F.18 isn't out yet, I can't patch the boot image and root the device that way
[OnePlus 9 Pro] der_akinator:
Edit: Sorry, I checked with payload-dumper-go, but it seems like it doesn't support partial OTAs properly.
[OnePlus 9 Pro] Aballamis:
im using the latest 01-05-23 and using fastboot boot boot.img from OOS f.18 A13 with no PIN code, and the recovery boots, but touchscreen doesnt work at all. when i use official 3.7.0_11-0-lemonadep using fastboot boot twrpxxxxxxx, touchscreen works but will not mount data. i assume this is because im on A13.

advice???
[OnePlus 9 Pro] der_akinator:
You could try to boot the official version and from there flash the unofficial installer zip. You should probably make a backup of your boot partition if something goes wrong. You can do that from TWRP-11 if you have an USB-OTG drive. I have to investigate the OOS13 issues further. BTW are you using OP9 or pro?