Second Space creation process crashing resulting in TWRP createTarFork() error 255 when backing up data partition


Akki68

Members
Apr 22, 2016
1
13
Hi folks, at the moment I'm completely lost as I really don't know where to put my issue which I could reproduce meanwhile on two different Xiaomi Mi 9 both with official TWRP cepheus and Xiaomi.eu MIUI11 WEEKLY 20.1.21 v3 (xiaomi.eu_multi_MI9_20.1.21_v11-10.zip). On both Mi 9 the process of turning on second space repeatedly crashes in the middle of somewhere with an error message concerning security core component keeping stopping. After that no second space is available, configurable or removeable but "My device/Storage" is showing "Other Users: Security space xxxMB" whereas my 3rd Mi 9 on which I never tried to turn on second space is not showing anything concerning other users on storage level.
I could live with this but now my TWRP backup of the data partition is repeatedly crashing with createTarFork() error 255 on both Mi 9 with second space issue. This does not happen on the 3rd Mi 9 where I never tried the second space option. The root cause for this seems to be related to new folders in /data/user which have been created based on the starting but always crashing process of turning on second space. Does anyone have an idea how to solve that? I wish I could delete the erroneous second space profiles but as the process crashes there is no option in GUI to delete them. I'd like to know if I could delete the following folders/files without any harm to the system? (folders selected based on the enclosed snapshot of my recovery.log). Not sure if I found all.
/data/media/17
/data/misc/user/17
/data/misc_ce/17
/data/misc_de/17
/data/misc/profiles/cur/17
/data/misc/user/17
/data/system/users/17
/data/system/users/17.xml
/data/system_ce/17
/data/system_de/17
/data/user/17
/data/user_de/17
/data/vendor_ce/17
/data/vendor_de/17

Please find enclosed the relevant lines from my recovery.log:
"....
[BACKUP STARTED]
* Backup Folder: /data/media/0/TWRP/BACKUPS/6460739a/2020-02-13--19-26-16_xiaomieu
Invalid encryption mode 'ice:aes-256-cts'
Backing up Data (excl. storage)...
Backups of Data do not include any files in internal storage such as pictures or downloads.
Invalid encryption mode 'ice:aes-256-cts'
Breaking backup file into multiple archives...
I:Creating backup...
I:Creating tar file '/data/media/0/TWRP/BACKUPS/6460739a/2020-02-13--19-26-16_xiaomieu/data.ext4.win000'
I:Using compression...
I:addFile '/data/dpm' including root: 1
==> set selinux context: u: object_r:dpmd_data_file:s0
found policy '/data/dpm' - '1DK' - '53959980cd2ed139'
I:addFile '/data/user' including root: 1
==> set selinux context: u: object_r:system_data_file:s0
I:addFile '/data/user/17' including root: 1
==> set selinux context: u: object_r:system_data_file:s0
failed to lookup tar policy for '/data/user/17' - 'a4ecf626ccfc35a8'
I:Error adding file '/data/user/17' to '/data/media/0/TWRP/BACKUPS/6460739a/2020-02-13--19-26-16_xiaomieu/data.ext4.win000'
Error creating backup.

I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/6460739a/2020-02-13--19-26-16_xiaomieu/data.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.