[OnePlus 8 Pro Questions & Answers] Zweikeks:
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

OxygenOS / Android 13

I am using TWRP 3.7.0 (twrp_op8_erofs-3.7.0-b3.zip), temporarily running (fastboot boot recovery.img).

Backup of source:

SIM card is in the slot.

During the backup there is no password/pin/unlock pattern set (Settings, Password & security, all off or not enrolled).

Partitions Boot, Data, DTBO, Super and VBMeta backed up.

Internal Shared Storage (/data/media) archived to .tar.gz with parameters -xpvzf.

Restore to target:

No SIM card is in the slot.

I turned off the RAM expansion before restoring (Settings, About device, RAM, disable RAM expansion, reboot phone once again).

Partitions Boot, Data, DTBO, Super and VBMeta restored. (1)

I wiped Data, Cache, Dalvik after restoring. (2)

Internal Shared Storage unpacked to /data/media looks good with permissions intact.

(1) I also tried to flash VBMeta with verification turned off (fastboot --disable-verification flash vbmeta vbmeta.img)

(2) Wiping after restore might be useful since e.g. /data/dalvik-cache is part of the backup, not empty after restoring

The target tries to start, goes into a boot loop. Takes about a minute or two every time until it reboots. Counter is set to 6, I think. After about 6 boot attempts I end up in recovery. After ‘Format data’ in recovery I am able to boot into the OS. However, it is reset to factory settings.

On both, source and target, TWRP always says Current Slot: A. (Also fastboot getvar all reports current-slot:a.)

I have attached the logcats from both, the OnePlus 8 Pro running fine (source) and from the OnePlus 8 Pro with the bootloop (target).

(Don’t be misled by the first line ‘--------- beginning of crash’. This just marks the start of a new logging session of the crash buffer. It is not the beginning of the actual crash resulting in the bootloop.)

The first 6 fatal errors seem to be normal. They occur in both logs.

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

The file/folder names look like encrypted.

The next fatal error (only in the log with the bootloop) is

‘F app_process64: jni_internal.cc:825] JNI FatalError called: (com.oplus.romupdate) frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:1162: Unable to find com.oplus.romupdate:5584 in /data_mirror/data_ce/null/0’.

As far as I can see, the ActivityManager tries to start com.oplus.romupdate (via Zygote), PID 3046:

‘I ActivityManager: Start proc 3046:com.oplus.romupdate/u0a165 for content provider {com.oplus.romupdate/com.oplusos.romupdate.provider.RomUpdateProvider}’

Zygote then reports the fatal error above (’Unable to find ... in /data_mirror/data_ce/null/0’).

Later in the log, a quite noticeable huge fatal errors block), comes the crash of the forked Zygote process 3046.

(Correct me if I’m wrong. I’m not a pro of this Android stuff.)

Of the 102 processes started by the ActivityManager, only 16 are starting ok. Among them are some which are also at home in /data_mirror. The difference to the failing ones is that ActivityManager logs IDs like 1000, 1037, 1001 (start ok) instead of e.g. u0a165 (UID 0 and application ID 165, start fails).

Altogether it looks as if installd is not building the tmpfs /data_mirror/data_ce/null/0 correctly. Encryption? IDs? I am stuck here.

I would be glad if someone has a hint. What am I missing? What can I try? How can I debug this further?

Zweikeks