yashsingh1/xdaforums huggingface dataset:
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Nimueh:
If OTG didn't work then you can't say "it worked" lol. And yes, those are 2 file systems and OP changed them for 12 + 13, which is why there are 2 different versions of TWRP.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Vovan2k:
When installing firmware it asking if i want to install modem.img, is there reason not to install it?

Is modem containing IMEL for the phone or why they asking?

Well its same on both versions EXT4 and EROFS i can't read USB.

Another problem can't mount to PC over USB cable.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Nimueh:
You really should actually READ the overview or readme.md on Github. He explains there why it asks about modem.img.

No idea about your USB - I'm on OOS 11 and everything works fine there with the TWRP version for OOS 11 🤷‍♀️
[OnePlus 8 / 8 Pro & 8T Cross Device Development] chancellorr:
Were you ever able to figure this out? I want to store my backups on my NAS.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Vovan2k:
1. Bug installing ROM's from within TWRP.

Tried four different ROM's all fail with error

Package is for product OnePlus8Pro but expected OnePlus8PRO

Installing zip file '/usbstorage/ROM/Android 13.0/LineageOS 20.0/lineage-20.0-20230820-nightly-instantnoodlep-signed.zip'
I:AB zip
Flashing A/B zip to inactive slot: B
Failed to parse build number in post-build-incremental=2e0d5884c1.
Package is for product OnePlus8Pro but expected OnePlus8PRO
To flash additional zips, please reboot recovery to switch to the updated slot.
I:Install took 0 second(s).
Error installing zip file '/usbstorage/ROM/Android 13.0/LineageOS 20.0/lineage-20.0-20230820-nightly-instantnoodlep-signed.zip'

2. Bug with USB OTG

When TWRP started with USB OTG (NTFS filesystem) connected it can't be detected. When plugging in USB OTG after TWRP is started it can be detected and is working properly.

So on every restart back to recovery from within TWRP have to remember to unplug USB OTG

3. Possible bug with restore

Digest verification was fine, however later got error.

libtar: ==> extracting: /data//vendor/hardware/ (mode 40771, directory)

tar_extract_file(): failed to extract /data//vendor/hardware/ !!!

I:Unable to extract tar archive '/usbstorage/TWRP/2023-08-23--02-22-06_TQ3A230805001/data.f2fs.win'

Spoiler content hidden.

4. No connection to computer.

When TWRP is booted with PC USB cable connected and OS installed it shows in computer and i am able to transfer files to and from device.

But after i format Data partition (with typing yes) and reboot to recovery again, phone connects, but no files are shown and can't create new folders or transfer files.

Windows error "The new folder could not be created in this location. The device has either stopped responding or has been disconnected."

This was because i have not created folder /data/media after formatting, once use terminal mkdir /data/media and reboot i can upload files from computer no problem.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] samhhmobil:
Do NOT use TWRP for installing LineageOS.

Use LineageOS(!)-recovery for installing LineageOS(!). Don't install LineageOS-recovery on your phone for this step, but boot it from your PC via "fastboot boot recovery.img".

READ the LineageOS-Documentation carefully(!) for installing LineageOS on OnePlus8. If you follow these steps, it works without any trouble.

Again: Do NOT use TWRP for installing LineageOS 20. !!!

Just my 2¢.

samhhmobil
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Vovan2k:
There's absolutley no reason why i should not install ROM's from TWRP.

I did use OrangeFox recovery for installing LineageOS 20.0 worked good!

Point was this error inside TWRP its not just with LineageOS installation this same error also shows with crDroid, Nameless-AOSP, OxygenOS 13.1 installations from TWRP.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] rmedure:
I never did find an answer to this. If I recall correctly, I was able to copy the backups off the phone by connecting to a computer via USB while in TWRP.

I have since changed to OP10 Plus ... sadly no custom recovery for us yet.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
Hello Vovan,

regarding

you can perhaps mount it manually:

- in TWRP Mount, scroll down a bit, tick 'USB OTG'

- afterwards the USB storage is mounted below /usbstorage

Hope this helps,

Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
Regarding

See my post TWRP restore not working after formatting Data [solved]

Perhaps this helps (using 'Format data' of the stock recovery).

Restore aborted with the same error message as in your log 'tar_extract_file(): failed to extract //data/vendor/hardware/ !!!'

/Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Vovan2k:
Tried that, USB OTG option is not checking after i click it. Only solution so far is to boot with USB OTG unplugged and then plug and mount.

Technically solution for this that i found was to flash the ROM with TWRP and then restore Data, but i wanted to understand what is causing this error, perhaps i should not use

"format data partition" inside TWRP when you type "yes" (removes "/data/media"), just a regular "factory reset" option (keeps /data/media).
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
USB stuff:

Just tested it. TWRP 3.7.0 on OnePlus 8 Pro, model IN2023, exFAT. I can confirm that the USB stick is not recognized when it is already plugged in when TWRP starts. Already lsusb is not listing it. There are some entries in dmesg, related?

The cause can be anything. Here is a thread: USB device not recognized when plugged in at power up.

Maybe there is a workaround. Starting the driver manually on command line. I had no luck with the modprobe mentioned in the thread. Or with udevadm trigger.

Restore:

I didn't understand either in which state TWRP brings the partition with its 'Format data'. I have read in a post that may be the error comes from restoring the backup of an encrypted partition on an unencrypted partition. I didn't find the post anymore.

In contrast the different wipe options are ok.

Can't get my phone to work right now either: Transfer data, apps and settings from OnePlus 8 Pro to another

With the newer Android versions and encryption there seem to be more often problems when restoring.

Best Regards,

Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] magi44ken:
Which TWRP version you use that works for Oxygen 11?
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Nimueh:
I use twrp-op8-3.6.0_11-infected-b11 (or maybe b10). I've never had to restore my backup, but making it worked without an issue, as does USB-OTG and file transfer to my PC.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] magi44ken:
Thanks. I hope it works. I tried two OrangeFox and TWRP versions but the touchscreen doesn't response when boot to the recovery. This is very frustrating.

I'm on OnePlus 8 using Oxygen 11 that is converted to Global from TMobile.

I might have to update to OxygenOS 13 if I can't get TWRP or Orangefox to work on OxygenOS 11.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Lu Bu:
This doesn’t seem to work? After restoring it just goes to a boot loop.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
There are so many instructions how to restore. All are a bit different. I followed exactly this one:

https://xdaforums.com/t/...-12.4426167/page-3#post-86813731

and also the one that you have linked to:

https://xdaforums.com/t/...-2021-09-04.4302449/post-85292199

Neither what was originally on the phone, nor the copy from an identical phone are booting.

In logcat are many messages like ‘installd: Fixing /data/data/6BPzWCAAAAwPnr ... with unexpected GID 20058 instead of 10058’.

Details here:

https://xdaforums.com/t/...-another-results-in-bootloop.4620061

Does anyone have any idea what is going on?

/Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] rodken:
Twrp-op8-3.6.0_11-infected-b11works perfectly for restoring as long as folks read the disclaimer to remove all security protocols, e,g., PIN, Fingerprints, Password, etc. before initiating a restore.

-- I personally removed all security protocols even before backing up to ensure a smooth restore.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
Has anyone out there ever restored OOS13?

Only doing backups when you can't restore them is pretty useless, right? :)

I would like to restore a phone to the backup state with all apps, settings, etc. Ideally on another identical device, so that I am safe if I lose or break mine.

@rodken: Yes, I did that. Settings, Password & security, all off or not enrolled. During backup as well as during restore. No SIM card during restore.

Yes, I read (first post in this thread) "A13 support is still a WIP". But also "WORKING: ... Backup/Restore".

If restoring is basically possible, then i am doing something wrong. I would like to know what ;)

Cheers!

Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
I was able to narrow down the error a bit.

First, as described in various instructions, I’ve installed the OS (OOS13 IN2023_11_F.13, initial state factory reset - installed it instead of restoring the system partition).

Then I restored the data partition from the TWRP backup except for the three folders misc, misc_ ce and misc_de.

The system starts and many apps, settings, and data like contacts are back.

There are still flaws all over. But in principle it works like this. No bootloop anymore.

The question now is what goes wrong during the restore by TWRP? Apparently the folders misc* need a special treatment which TWRP does not consider.

More details here again: https://xdaforums.com/posts/88972689

Cheers!

Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] magi44ken:
Can you confirm the steps below? First time doing a nandroid backup.

1. Boot to TWRP

2. Install the OS.

3. Factory reset.

4. Reboot to recovery (is this needed to switch to the installed OS slot?)

5. Restore the data partition

6. Reboot to system.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Vovan2k:
Please fix this bug, can't install any ROM's from TWRP because of it.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] TechForEver:
Hello have you solved TWRP flashing ROMs now

Or what happened?
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Vovan2k:
I solved by switching to OrangeFox recovery for Android 13, it has no problems installing ROMs.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] TechForEver:
In OrangeFox just sideload working?

cant install from internal storage or otg usb ?

In my OnePlus 8 oxygen 13 1 can't decrypt data in OrangeFox nor can't detect otg usb In OrangeFox.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Vovan2k:
Used OrangeFox from telegram channel (EXT4 version) it supped to work on OOS 13, https://t.me/OrangeFox8/1862

Regarding USB OTG you have to start recovery with USB disconnected and once loaded then plug in OTG and switch storage then it will detect (same in TWRP Beta 3).

I don't particularly like side loading takes too long so i never used that. If you want side load then install recovery from Lineage OS it can side load no problem.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] TechForEver:
Thanks

But unfortunately my bad luck the touch in this OrangeFox (which you told me)not working I can't using it because tou ch not working 😭
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Vovan2k:
My bad i assumed you had OnePlus 8 Pro, you probably have OnePlus 8, then i dont know try asking in that telegram channel i linked.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] TechForEver:
No problem . Thanks for your time and reply 👍
[OnePlus 8 / 8 Pro & 8T Cross Device Development] rodken:
+1

If you find out a remedy, please share your findings.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
Hello magi44ken,

yes these are the steps, further details:

1. / 2. I have installed the OS with the help of Oxygen Updater (APKPure) and an OTA update that I grapped from the internal shared storage some time ago.

4. So I don't know what happens when you use TWRP to install the OS. From what I read, there is some switching slots ongoing. But when I monitored my slots for some time I was always on slot a. TWRP displays the current slot under 'Reboot'.

5. I am still investigating this. I got my phone out of the boot loop when I restored the data partition sort of manually in two steps. More details and the scripts to run on the TWRP command line here:

how-to-program-android-13-data-partition-restore

6. With my approach you have to boot to system twice. The first time it took about 20s. I need to check what is ongoing in this time. Seems like the system is correcting lot's of stuff. SELinux file contexts perhaps?

The next boot with misc in place is fast as usual (5s or so).

7. Copy back your internal shared storage (it's not part of the backup that TWRP is doing).

I had verified boot disabled. But I'm not sure if it's needed.

No SIM in the slot. Turn off RAM expansion. Settings->Password & security all off or not enrolled.

Remove a plugged in USB stick before booting to system.

What is the OS you are using? If it is not Android 13 you may just use TWRP in the usual way in step 5.

What I have done is not really running. I got a lot of permission problems. I already figured that the SELinux file contexts are not correct. And I am currently wondering how TWRP deals with it at all since the tar of TWRP does not support the --selinux and the -xattrs switch. So how are all the SELinux labels restored?

Best Regards,

Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
Hi all,

SELinux file contexts are all wrong. No wonder. They are not restored by TWRP.

File contexts (and lots of other metadata) attached to the files are not archived and not restored by TWRP. After a restore they are broken -> doesn't work.

(Yes, there is a ‘Fix Contexts’ under ‘Advanced’ in the TWRP GUI. It says ‘Note: Fixing contexts is rarely needed.’ So, usually it does work without? How?)

How is the system supposed to bring itself back to a reasonable state?

My experience: During boot (extended) attributes are jerked back into place by various mechanisms. But not the important SELinux file contexts.

How does ‘Fix Contexts’ in TWRP work? Where can I get the (prebuilt_)file_contexts? Can I extract it from /system/etc/selinux and /vendor/etc/selinux? (Seems to be split policy.)

How do I do that and where do I have to put the (prebuilt_)file_contexts then?

Thanks for any hints,

Zweikeks

Update: Contrary to my earlier assumptions, TWRP includes the SELinux file contexts (and other stuff?) in the backup using its special built-in tar.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] rodken:
I'm curious as well - where is @deepongi when we need him?
[OnePlus 8 / 8 Pro & 8T Cross Device Development] deepongi:
I stopped developing for OnePlus 8, I own a OnePlus 9 now, sorry couldn't help.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] rodken:
A bit off-topic and maybe stretching far and wide with this question:

Do you know of a version that functions on OP8 running a A12.1 Custom ROM that's based on A11?
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Vovan2k:
Could you please make one last fix its literally one line of code you have to update to add crytical functionality to TWRP that is missing now.

When trying to flash any ROM - TWRP gives error, log reads:

Package is for product OnePlus8Pro but expected OnePlus8PRO

Please change in your code OnePlus8PRO to OnePlus8Pro and TWRP will be able to install ROM's, right now it can't, which is like major functionality of any TWRP.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
@deepongi, @rodken

Hey you two,

Where should I ask general questions about TWRP concepts? b) and c) below.

I understand that you are focusing on other things now. I can't expect that someone solves my problems and invests his time for me.

But I think it would be nice, also for you, if the whole thing, which you have built up with a lot of love and work would be in a state in which others can continue the development.

a)

I even tried to compile the sources.

GitHub - infectedmushi/twrp_device_oneplus_instantnoodle

As always with this over-complicated stuff it bails out at the first occasion:

build/make/core/product_config.mk:160: error: Can not locate config makefile for product "twrp_lemonades".

In principle I could make the change Vovan2K requests...

But from this statement on the README.md I derive that the sources are not complete:

"You might need to pick few patches from gerrit.twrp.me to get some stuff working."

If this degenerates into an endless fumbling, and it's not even clear how originally the published binary came about, I'm unable to cope with it.

Also here, a more general question to compiling: Can this work at all if I follow the instructions in the README.md of the GitHub link above?

b)

My first questions are of general nature, not device specific.

Has anyone ever being able to make a backup from a current Android versions and actually restore it? Or is that simply not provided, does not work (anymore)?

What is the general concept? TWRP has moved away from creating complete partition images to storing individual files. How is this supposed to work at all if essential information contained is not backed up and restored?

According to the many reports here in the forum, this seems to have stopped working for the system partition a long time ago.

(I know that it is of course due to all this development/architecture madness from Google. It's hard to keep up with that.)

Should I ask these general questions in the OnePlus 9 thread instead?

c)

Regarding the SELinux contexts, I found /file_contexts, actually in the root directory (TWRP, Advanced, Terminal, ls /file_contexts).

However, the root is cluttered with a lot of individual files. Among them are also 11 other contexts files. A file_contexts.bin... This again raises more questions...

And again, this is general, not device specific.

I think I'm better off writing my own scripts to backup and restore XATTR, rather than delving into the complex, undocumented mechanisms that others have come up with.

Cheers!

Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] rodken:
You need to give credit where credit is due and reach out to the others involved in this project by visiting the OP, scroll down to where you see credits and forward your previous post.

Maybe, someone will chime in if not too busy with life in general.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
Hey all,

finally, I was able to restore my backup on another identical phone with all apps, settings, etc. intact, so that I am safe if I lose or break my currently used phone.

It turns out that the file package-restrictions.xml must not be replaced by the one in the backup. This prevents the bootloop.

You can find a detailed description how to backup and restore here:

Transfer data, apps and settings from OnePlus 8 Pro with Android 13 to another results in bootloop [solved]

Hi all, I would like to restore all my data, apps and settings from one phone on another. Using TWRP, my attempts result in a boot loop on the target. Source: OnePlus 8 Pro IN2023, 128GB, rooted Target: OnePlus 8 Pro IN2023, 256GB, rooted...

xdaforums.com

All the best,

Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] rodken:
What steps were mitigated, which version of Android, did you remove any security protocols before backing up/restoring and on which device?
[OnePlus 8 / 8 Pro & 8T Cross Device Development] newuxtreme:
Stuck on fastboot mode after trying to boot into TWRP recovery.

So I got both version of Twrp shown in the OP, and this one :https://github.com/ApexLegend007/twrp_device_oneplus_lemonades/releases

and tried to use the command :

fastboot boot X.img

Where X was either of those 3 TWRP.

I have an Android Ver 12 on my One plus 8 pro.

I'm not quite understanding where I might be getting stuck here.

Should I just update to Android Ver 13 and try again?

Where might I be going wrong?
[OnePlus 8 / 8 Pro & 8T Cross Device Development] rodken:
Most folks would flash Lineage OS recovery to be able to boot.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
A very detailed description with all the information is given in my other thread. Just follow the link.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zweikeks:
@newuxtreme:

I had no issues when downgrading to Android 12 and starting TWRP:

OnePlus 8 Pro IN2023, 128GB, IN2023_11.C.88

twrp_op8_erofs-3.7.0-b3.zip from the OP

Turn off the phone, turn it on in fastboot mode (press and hold the 2 volume buttons. then the power button, hold the 3 buttons until it starts into fastboot mode).

'fastboot devices' should answer with the serial number of the phone.

'fastboot boot recovery.img' boots TWRP (says something like 'sending recovery.img' etc. What is your output? Where does it get stuck?

The other OS versions I have used successfully are IN2023_11_C.35, IN2023_11_F.13, IN2023_11_F.62 and IN2023_13.1.0.582(EX01).

/Zweikeks
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Anonymous Pharaoh:
after i issue the command adb reboot recovery the device run into recovery twrp mode and stuck any help?
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Atifbaig786:
Bricked my device by booting the recovery, at first it was a simple stuck on fastboot logo but after flashing it again in that state I couldnt boot at all. I tried flashing it to recovery but that only added fuel to the fire as I was unable to boot to recovery or boot.

One more thing I noticed that my phone stopped giving me the orange state warning after starting from scratch.

Also on the Oneplus fastboot mode logo stuck part, if you boot something and your device is still visible in fastboot mode you're better off rebooting than reflashing as it would mess up your phone.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] tnchng:
Can you update the TWRP for newly custom Android 13 ROMs, the b3 have many issues now. Thx advance.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] TechForEver:
You can use OrangeFox recovery for OnePlus 8 series for A13 and A14 oos and aosp
[OnePlus 8 / 8 Pro & 8T Cross Device Development] tnchng:
I tried OrangeFox, failed to decrypt data for crDroid.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] TechForEver:
What are you want from decrypt data ?

You can (sideload) ROMs or kernels or magisk

Sideload files via recovery from your PC no need to decrypt data in phone internet storage
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zakaria11Yo:
As I boot the image my phone gets stuck in Fastboot Mode. Any help? I have OnePlus 12R

Edit: I tried many other Twrp too but still dont work.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] deepongi:
Why you wanna boot a instantnoodle boot image on a 12R? It's incompatible
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zakaria11Yo:
I mean is it possible to root 12R?
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Nimueh:
You should ask that in the forums for your device, us OP 8P users don't know that.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Zakaria11Yo:
Its not possible for 12r! I couldn't install twrp and now it says "The current image boot/recovery have been destroyed and can not boot". Now i really need to get out of this loop and wouldnt root anymore
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Nimueh:
Again, wrong place to ask! OP 8 series has MSM and is easy to restore ... no idea what to do with your 12R besides take it to your service center. You REALLY need to ask in your own device forum, where users know what do.
[OnePlus 8 / 8 Pro & 8T Cross Device Development] aygul12345:
Looking for Android 13 TWRP oneplus 8 pro. Where can I get the latest builD?
[OnePlus 8 / 8 Pro & 8T Cross Device Development] Nimueh:
Judging by this post there hasn't been any update to work on OOS/A 13. You might be better off getting the official one from TWRP.me but that also looks to be for A12 only 🤷‍♀️