[OnePlus 5 Questions & Answers] Theqie:
System permissions corrupt? Backup: "createTarFork() process ended with ERROR: 255"

Hi,

OxygenOS 5.1.7

Rooted

TWRP 322-x blu_spark 8.81

Recently I did a backup (let's call this #1) -> factory reset -> backup (#2) -> restored backup #1 -> restored backup #2.

Doing this, it seems like some permissions somewhere now is broken since I have several random problems.

These problem include the following:

Error trying to backup with blu_spark

Can't upgrade to new oxygen OS

Can't apply ad blocking with AdAway

Some apps, mostly Messenger, randomly crashes

Backup problem with blu_spark:

Getting error "createTarFork() process ended with ERROR: 255". I've read a lot about it on different forums and seems to be related to some parallel apps and user 999. I did have a user called "999" and have deleted it, but problem still occurs. I've also verified there are no folders as below:

data/system/999

data/system_ce/999

data/misc/999

data/misc_ce/999

data/user/999

data/user_ce/999

I've also deleted all apps that has "parallel apps" support.

Code snippet below:

Starting TWRP 3.2.2-x | blu_spark v8.81-bfb65573 on Tue Jul 20 08:10:34 1971
(pid 567)

...(deleted a lot of text)...

I:Unmounting main partitions...
tw_get_context got selinux context: u:object_r:media_rw_data_file:s0
I:Got default contexts and file mode for storage files.
I:Decrypt adopted storage starting
I:PageManager::LoadFileToBuffer loading filename: '/data/system/storage.xml' directly
I:No /data/system/storage.xml for adopted storage
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:operation_end - status=0
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Switching packages (TWRP)
I:Attempt to load settings from settings file...
I:InfoManager loading from '/data/media/0/TWRP/.twrps'.
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/4f495385'
I:Copying file /etc/recovery.fstab to /cache/recovery/recovery.fstab
I:Version number saved to '/cache/recovery/.version'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
__bionic_open_tzdata: couldn't find any tzdata when looking for CET-1CEST,M3.5.0,M10.5.0!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:PageManager::LoadFileToBuffer loading filename: '/twres/languages/en.xml' directly
parsing languageFile
parsing languageFile done
I:Translating partition display names
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/4f495385'
I:TWFunc::Fixup_Time: Pre-fix date and time: 1971-07-20--10-11-05
I:TWFunc::Fixup_Time: Setting time offset from file /sys/class/rtc/rtc0/since_epoch
I:TWFunc::Fixup_Time: will attempt to use the ats files now.
I:TWFunc::Fixup_Time: Setting time offset from file /data/time/ats_2, offset 1498643804722
I:TWFunc::Fixup_Time: Date and time corrected: 2019-01-14--19-07-49
I:Starting MTP
I:Cannot find file /sys/class/android_usb/android0/idVendor
I:Cannot find file /sys/class/android_usb/android0/idProduct
I:sending message to add 65537 '/data/media/0' 'Internal Storage'
I:[MTP] Starting MTP
I:Message sent, add storage ID: 65537 '/data/media/0'
MTP Enabled
I:Check_Lifetime_Writes result: '7356'
I:Switching packages (TWRP)
I:Starting Adb Backup FIFO
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:[MTP] created new mtpserver object
I:[MTP] MtpServer::run fd: 20
I:[MTP] mtppipe add storage 65537 '/data/media/0'
I:[MTP] MtpStorage id: 65537 path: /data/media/0
I:Set page: 'backup'
I:Set page: 'backup_run'
I:operation_start: 'Nandroid'
Updating partition details...
I:Data backup size is 9614MB, free: 31257MB.
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
...done
I:Backup Name is: '2019-01-14--19-08-03'
I:Backup_Folder is: '/data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03'
I:Calculating backup details...
* Total number of partitions to back up: 7
* Total size of all data: 13888MB
* Available space: 31257MB
[BACKUP STARTED]
* Backup Folder: /data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03
Backing up Boot...
I:Reading '/dev/block/sde19', writing '/data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/boot.emmc.win'
I:Restored default metadata for /data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/boot.emmc.win
* Generating digest...
I:SHA2 Digest: c7b789bb0103f1e4d0fec64f50d160a9a98f5398aee157a10ec762392a93d9b1 boot.emmc.win
I:digest_filename: /data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/boot.emmc.win.sha2
* Digest Created.
I:Partition Backup time: 0
Invalid encryption mode 'ice:aes-256-cts'
Backing up System...
Invalid encryption mode 'ice:aes-256-cts'
Error opening: '/system/app/Account/oat/arm64' (Not a directory)
I:Error in Generate_TarList!
Error creating backup.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/system.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
I:Copying file /tmp/recovery.log to /data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/recovery.log
I:Set page: 'action_complete'
I:operation_end - status=1
I:Set overlay: 'slideout'
I:Set overlay: ''
I:Set page: 'clear_vars'
I:Set page: 'backup'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'copylog'
I:Set page: 'action_page'
I:operation_start: 'Copy Log'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log

Can't upgrade to new oxygen OS:

Trying to update with Oxygen Updater gives me the below error. Backup before install = turned off. This is from auto install, manual also fails.

Starting TWRP 3.2.2-x | blu_spark v8.81-bfb65573 on Wed Jul 21 09:53:16 1971
(pid 562)

...(deleted a lot of text)...

I:Copying file /cache/recovery/log to /cache/recovery/last_log
tw_get_context got selinux context: u:object_r:media_rw_data_file:s0
I:Got default contexts and file mode for storage files.
I:Attempt to load settings from settings file...
I:InfoManager loading from '/data/media/0/TWRP/.twrps'.
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/4f495385'
I:Copying file /etc/recovery.fstab to /cache/recovery/recovery.fstab
I:Version number saved to '/cache/recovery/.version'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
__bionic_open_tzdata: couldn't find any tzdata when looking for CET-1CEST,M3.5.0,M10.5.0!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:PageManager::LoadFileToBuffer loading filename: '/twres/languages/en.xml' directly
parsing languageFile
parsing languageFile done
I:Translating partition display names
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/4f495385'
I:TWFunc::Fixup_Time: Pre-fix date and time: 1971-07-21--11-53-27
I:TWFunc::Fixup_Time: Setting time offset from file /sys/class/rtc/rtc0/since_epoch
I:TWFunc::Fixup_Time: will attempt to use the ats files now.
I:TWFunc::Fixup_Time: Setting time offset from file /data/time/ats_2, offset 1498643804161
I:TWFunc::Fixup_Time: Date and time corrected: 2019-01-15--20-50-10
I:Switching packages (TWRP)
I:Set page: 'action_page'
I:operation_start: 'OpenRecoveryScript'
I:Script file found: '/cache/recovery/openrecoveryscript'
I:Copying file /cache/recovery/openrecoveryscript to /tmp/openrecoveryscript
Running OpenRecoveryScript
I:command is: 'cmd'
I:value is: 'echo " -------------------------"'
-------------------------
I:echo " -------------------------" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo "| (↑) OXYGEN UPDATER |"'
| (↑) OXYGEN UPDATER |
I:echo "| (↑) OXYGEN UPDATER |" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo "| Update Installer** |"'
| Update Installer** |
I:echo "| Update Installer** |" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo " -------------------------"'
-------------------------
I:echo " -------------------------" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo '

I:echo process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo "Thank you for using Oxygen Updater. If you like this app, please rate it 5 stars at Google Play :)"'
Thank you for using Oxygen Updater. If you like this app, please rate it 5 stars at Google Play :)
I:echo "Thank you for using Oxygen Updater. If you like this app, please rate it 5 stars at Google Play :)" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo '

I:echo process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo "Installing the update…"'
Installing the update…
I:echo "Installing the update…" process ended with RC=0
I:command is: 'install'
I:value is: '/storage/emulated/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
I:Trying to find zip '/storage/emulated/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip' on '/data/media/0'...
I:Looking for zip at '/emulated/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/data/media/0/emulated/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/data/media/0/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/data/media/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
Installing zip file '/data/media/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
Installing zip file '/data/media/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
I:Update binary zip
Verifying package compatibility...
Failed to verify package compatibility (result 1): Device manifest and framework compatibility matrix are incompatible: HALs incompatible. android.hardware.drm
E:String resource 'zip_compatible_err' not found. Using default value.
Zip Treble compatibility error!
Invalid zip file format!
Error installing zip file '/data/media/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
Done processing script file
I:Set page: 'action_complete'
I:operation_end - status=1
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Starting MTP
I:Cannot find file /sys/class/android_usb/android0/idVendor
I:Cannot find file /sys/class/android_usb/android0/idProduct
I:sending message to add 65537 '/data/media/0' 'Internal Storage'
I:[MTP] Starting MTP
I:Message sent, add storage ID: 65537 '/data/media/0'
MTP Enabled
I:Check_Lifetime_Writes result: '9128'
I:Switching packages (TWRP)
I:Starting Adb Backup FIFO
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:[MTP] created new mtpserver object
I:[MTP] MtpServer::run fd: 20
I:[MTP] mtppipe add storage 65537 '/data/media/0'
I:[MTP] MtpStorage id: 65537 path: /data/media/0
I:Set page: 'advanced'
I:Set overlay: 'slideout'
I:Set overlay: ''
I:Set page: 'copylog'
I:Set page: 'action_page'
I:operation_start: 'Copy Log'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log

Can't apply ad blocking with AdAway:

Getting error: "Applying failed. Try changing the target hosts file in preferences to data/data/hosts". It's currently set to system/etc/hosts, but data/data gives the same error.

Some apps, mostly Messenger, randomly crashes:

Can't give so much details about this, but several apps crashes all the time. Messenger (facebook chat) is most common and can't use it anymore, however "Lite" works well.

I've tried factory reset, but the problem still is exactly the same.

Any ideas to what could be causing this? I would guess there is some permission error to data/system folder, but at least data folder should be fixed when doing a factory reset I thought?

Any ideas would be much appreciated. Thanks.