Wrong owners and permissions after TWRP restore


msssm

Members
Sep 18, 2021
57
20
Hi,

my Mi 11 Ultra (256GB) was returned for a service and I got a new device (512GB) as replacement. I installed the same xiaomi.eu 12.5.12, restored the data by TWRP, then updated to xiaomi.eu_multi_MI11Pro_MI11Ultra_V13.0.13.0.SKACNXM_618da7ffab_v13-12.zip.

Now some things like the Camera are not working. /sdcard/DCIM is there, but Camera directory is missing. I can't create that directory because of missing permissions. I noticed I can create new directories on /sdcard but viewed from adb shell they have different UIDs and permission:
Created a new dir on /sdcard:
Code:
drwxrws--- 2 u0_a220 media_rw 3452 2022-08-30 08:36 ttttttt
However the existing looks like:
Code:
drwx------ 2 u0_a226  u0_a226        3452 2021-08-04 20:27 DCIM
And the numeric format:
Code:
drwx------ 2 10226 10226 3452 2021-08-04 20:27 DCIM/
drwxrws--- 2 10220 1023  3452 2022-08-30 08:36 ttttttt/
What happened? Should I just adjust all the owner UIDs on /sdcard recursively? How should it look like?