Twrp error 255

lekiaM

Senior Member
Jan 4, 2017
1,095
667
123
Amsterdam (Hoorn-NH)
Yup, same here! I always getting it while trying doing an restore via ADB (copy backupped TWRP folder via commands to internal device storage)

I would like a solution to for this frustrating Tarfork 255 error!

This is what i asked and mentioned to one of our Team Members and i tried everyting;

First: *I don't like the idea of "wipe data" clean restoring is to me included "format data*

Secondly: *if i backup my data also along with system and all (exclusive recovery, cache and system image) and move it to my pc via ADB and than wipe and format all in twrp and than move my TWRP back up via ADB back to my Device, than restoring fails...*

Thirdly: *So the only way you can restore is NOT to format Data(internal) while restoring. But that just doesn't make sense. Because the Data is dirty if you flash another ROM and than restore your previous ROM*

So in my opinion when you restoring without the Data formatted, it stays dirty when you restoring. Also i don't want dirty data from other ROMs if you know what i mean..

I like to know an very satisfying solution! And hopefully someone can enlightening us:crying:
 

Hitman478™

Senior Member
Aug 9, 2014
945
449
93
Mother Base
It's very simple.. If you can find through the log the "guilty" app just uninstall it and re-do TWRP backup.. If you can't find that (or those) app you need to wipe data... When you're 100% sure that the problem is in data partition (try to backup it alone) so the solution is the above... :good:

---------- Post added at 20:15 ---------- Previous post was at 20:13 ----------

Yup, same here! I always getting it while trying doing an restore via ADB (copy backupped TWRP folder via commands to internal device storage)

I would like a solution to for this frustrating Tarfork 255 error!

This is what i asked and mentioned to one of our Team Members and i tried everyting;

First: *I don't like the idea of "wipe data" clean restoring is to me included "format data*

Secondly: *if i backup my data also along with system and all (exclusive recovery, cache and system image) and move it to my pc via ADB and than wipe and format all in twrp and than move my TWRP back up via ADB back to my Device, than restoring fails...*

Thirdly: *So the only way you can restore is NOT to format Data(internal) while restoring. But that just doesn't make sense. Because the Data is dirty if you flash another ROM and than restore your previous ROM*

So in my opinion when you restoring without the Data formatted, it stays dirty when you restoring. Also i don't want dirty data from other ROMs if you know what i mean..

I like to know an very satisfying solution! And hopefully someone can enlightening us:crying:
If you format Data you'll decrypt partion and when you go restoring a previous backup done with encryption it won't work.. You can even restore a full backup on a fully working system the recovery will wipe everything for you before continue (with everything i mean those partition that yuo've previously backuped)
 
  • Like
Reactions: lekiaM

lekiaM

Senior Member
Jan 4, 2017
1,095
667
123
Amsterdam (Hoorn-NH)
Aaah i see. This is what i've got;

A backup (stored in my internal and PC) i made this backup on an running "encrypted" device. But in TWRP i had to decrypt it by password so the backup i made in TWRP is automaticly decrypted right? because of the pincode i insert to decrypt my data.

But let's see, if i want to; let say.. switch to another Custom Rom. The only way is to "wipe" all and flash the new Custom Rom? This without Formatting "Data"? (as i suppose) because if i format the "data" i'm not able to restore my backup. This does make completely sense to me. But..... one thing i don't understand is this;

Why is it possible to make an full backup in TWRP, push it via ADB to PC, going back to twrp "wipe" and "format" all, reboot TWRP, pull the backup from PC via ADB again to TWRP and restore. But it won't restore why? why? because i formatted the "data"? so the only way to restore is (with the "dirty" data from previous ROM's than)...

Anyway, i wish it all was easier... Maybe i make it myself to hard to understand, i dunno.... But hey, thanks for your feedback! appreciate :)
 

Hitman478™

Senior Member
Aug 9, 2014
945
449
93
Mother Base
Aaah i see. This is what i've got;

A backup (stored in my internal and PC) i made this backup on an running "encrypted" device. But in TWRP i had to decrypt it by password so the backup i made in TWRP is automaticly decrypted right? because of the pincode i insert to decrypt my data.

But let's see, if i want to; let say.. switch to another Custom Rom. The only way is to "wipe" all and flash the new Custom Rom? This without Formatting "Data"? (as i suppose) because if i format the "data" i'm not able to restore my backup. This does make completely sense to me. But..... one thing i don't understand is this;

Why is it possible to make an full backup in TWRP, push it via ADB to PC, going back to twrp "wipe" and "format" all, reboot TWRP, pull the backup from PC via ADB again to TWRP and restore. But it won't restore why? why? because i formatted the "data"? so the only way to restore is (with the "dirty" data from previous ROM's than)...

Anyway, i wish it all was easier... Maybe i make it myself to hard to understand, i dunno.... But hey, thanks for your feedback! appreciate :)
encrypted backup and a backup of a encrypted device is 2 different things.. When you do a TWRP backup you can choose to encrypt it with a password, it will encrypt that archive backup, but you can also do a TWRP backup of your encrypted device without encrypting the backup, hope this is clear

Second point.. Why you need to format every time? Format here on op5 can cause the data partition to switch from ext4 on f2fs and is not really necessary everytime... Example.. I'm on Resurrection Remix but today i want to change rom but first i want to take a backup, so i reboot in TWRP, do the backup (without encrypt the backup itself, it's not really necessary, indeed it can be risky) then i wipe cache-dalvik/art cache-system-data NO INTERNAL STORAGE then i install my new custom rom

It's really easier as you were thinking but maybe you've done some confusion with format/wipe and encrypted/decrypted

Your problem of restoring the backup is due to this ---> Probably, when you do the TWRP backup you're encrypted then you move it to the PC and here there's nothing wrong, but after this you format data and this will decrypt your device, so like i said above, your restoring isnt working because you want to restore an encrypted backup on a decrypted device

Avoid format and instead use the wipe function :good:
 
Last edited:
  • Like
Reactions: lekiaM

chlap

Senior Member
Oct 12, 2010
634
40
28
from recovery log

Enyone can help with this, still ending with error 255


I:addFile '/data/system_ce/0/shortcut_service/shortcuts.xml' including root: 1
==> set selinux context: u:eek:bject_r:system_data_file:s0
I:addFile '/data/system_ce/0/recent_images' including root: 1
==> set selinux context: u:eek:bject_r:system_data_file:s0
found policy '/data/system_ce/0/recent_images' - '1CE0' - '031a968edf614759'
I:addFile '/data/system_ce/0/recent_images/9416_task_thumbnail.png' including root: 1
==> set selinux context: u:eek:bject_r:system_data_file:s0
I:addFile '/data/system_ce/10' including root: 1
==> set selinux context: u:eek:bject_r:system_data_file:s0
failed to lookup tar policy for '/data/system_ce/10' - 'cddc5aeae0e4e778'
I:Error adding file '/data/system_ce/10' to '/data/media/0/TWRP/BACKUPS/d3d80913/2017-10-14--14-19-57/data.ext4.win010'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/d3d80913/2017-10-14--14-19-57/data.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
I:Copying file /tmp/recovery.log to /data/media/0/TWRP/BACKUPS/d3d80913/2017-10-14--14-19-57/recovery.log
I:Set page: 'action_complete'
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:eek:peration_end - status=1
I:Set overlay: ''
I:Set page: 'clear_vars'
I:Set page: 'backup'
Truncating string cache entries.
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:eek:peration_start: 'Copy Log'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log
 

chlap

Senior Member
Oct 12, 2010
634
40
28
Hitman478[emoji769 said:
;74161048]Have you tried to backup Data only partition?

As I said above the 255 error is due to damaged file/s
Tried backup Data. Same error.

Odoslané z ONEPLUS A5000 pomocou Tapatalku
 

lekiaM

Senior Member
Jan 4, 2017
1,095
667
123
Amsterdam (Hoorn-NH)
If you are getting the same error again and qgain, i know its frustrating! And i also know to find the culprit for the error, is very hard. So i suggest start from scratch? I mean wipe all and format data, reboot to recovery, flash the latest "stable" and "improved" blu spark TWRP as recovery. Reboot recovery again, transfer the ROM, Gapps package and root method from PC to Internal and flash, reboot.

I know it's not an solution you'll be waiting for, but i ended up the same way too (as you can see earlier posts) . But since Hitman478 explained all to me, i have no issues anymore! which I'm truly great full for.

Have a nice Sunday (after all) :highfive:
 
Last edited:
  • Like
Reactions: Hitman478™

Hitman478™

Senior Member
Aug 9, 2014
945
449
93
Mother Base
Tried backup Data. Same error.

Odoslané z ONEPLUS A5000 pomocou Tapatalku
There's a corrupted file.. if you can't find it out and delete/uninstall that app, you never will be able to backup.. your solution is to clean install again your room (but first look at log and watch where TWRP gives you the error)
 
  • Like
Reactions: chlap

larpoux

Senior Member
Mar 17, 2014
125
50
0
Paris
I could resolve my nandroid /data backup error on my EMUI 8.0 Mediapad M5 device with those following steps:

1 - Use a correct TWRP implementation
TWRP need to access the uncyphered partition /data.
There no possibility to backup it, if TWRP does not implement deciphering user data partition.

2 - Remove all users except user 0 (the administrator)
You can verify that there is no unwanted users, looking at directory /data/user : the only subdirectory should be "0".
To remove the others users :
  • Remove the PrivateSpace if you have one (Settings > Security & Privacy > PrivateSpace, and tap on the garbage can).
  • Remove all the secondary users (Settings > Users & accounts > users, and tap on each users to delete them). Keep just the main administrator user.
  • On EMUI, remove all twins applications (Settings > Apps & Notifications > App Twin, and disable all twin apps).
  • On OxygenOS, remove all parallel apps (Settings > Apps > Parallel Apps, and disable all parallel apps).
  • On MIUI, remove all dual apps (Settings > Dual Apps, and disable all dual apps)
  • On others devices ... you must find all parameters that create those unwanted users.
  • If you are not able to get the correct settings to suppress those users, in last resort you can try this command : "pm remove-user user-no. (For example "pm remove-user 999").

3 - Do not forget to protect your backups by a password
This would be stupid to cipher your /data partition and keep backups of this partition unprotected.

These steps fixed the nandroid backup problem for /data partition on my Huawei Mediapad M5 device.
I post on this forum because I hope that this will be helpful for others devices owners.
 
  • Like
Reactions: Regina Rainbow

Regina Rainbow

Senior Member
Nov 1, 2015
58
70
0
2 - Remove all users except user 0 (the administrator)
You can verify that there is no unwanted users, looking at directory /data/user : the only subdirectory should be "0".
To remove the others users
Thanks! That was the clue I needed! I had installed the app Shelter lately which created a work profile (= second user). Uninstalling Shelter and deleting the work profile solved the problem.