yashsingh1/xdaforums huggingface dataset:
[Nexus 6 Q&A, Help & Troubleshooting] runekock:
Seems like a problem with encryption. Do you have the latest TWRP, 3.2.1?
[Nexus 6 Q&A, Help & Troubleshooting] warrenscott:
I have the same device and got the same error message. Using another backup fixed it for me as well. Dont know how old this is but just adding my 2 ¢
[Nexus 6 Q&A, Help & Troubleshooting] Industrial_chickens:
Tried most of the above. Didn't have a back up as I'd deleted them all first to make space for the new one when the error occurred.

Simply dirty flashing the ROM sorted the issue for me!
[Nexus 6 Q&A, Help & Troubleshooting] gunther82:
I had the same issue, in my case the error was:

failed to lookup tar policy for '/data/system_ce/999' - 'a4fe4f7759e6a9de'
I:Error adding file '/data/system_ce/999' to '/data/media/0/TWRP/BACKUPS/f20dd4a/2018-01-15--04-43-14/data.ext4.win004'
Error creating backup.

and it was caused by the usage of the parallel Instagram app introduced by Oreo in OnePlus 5.

To solve this I had to:

1) Remove the parallel app activated

2) Check the ID of the new user created by the parallel app with the following adb command launched on the PC connected to the phone:

adb shell pm list users

(in my case was user 999)

3) Remove the other user with the following android emulator command executed directly on the shell of the phone (I used Android terminal emulator):

first getting su privileges with:

su

then remove the user:

pm remove-user USER_ID

where USER_ID is the id obtained at the previous step

4) Manually delete with a file manager the USER_ID folder, in my case it was directly in /sdcard/999

After this you can reboot to recovery and perform a successfull nandroid backup, even with compression.
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
That seems to be common, needing to fix things if using parallel on OP5. But this is an N6 thread [emoji6]

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Nexus 6 Q&A, Help & Troubleshooting] m.mishka:
I had the problem with TWRP backup hanging in the middle of some file usually, always with tar 255 error, then doing the cleanup and exiting. Thisi was not happening for every partition, but only when I tried to backup all at once, including System and System Image in one backup, usually right at the end, at MD5 generation. When I turned off the MD5 in backup options, the error persisted, and if I managed to backup a partition or two, I couldn't adb-pull the backup to a PC; this was giving me I/O error, also after severa files were copied over, and usually in the middle of something big being copied. The interesting thing is, the compression option was set to off, anyway. On one occasion some partition had backed up to internal storage but not to SD, so I reformatted SD (using TWRP), but still the problem persisted.

Looking at the log,I didn't have the said file in the /system folder, and the last entry in my log file was somewhat obscure

I:Reading '/dev/block/mmcblk0p53', writing '/external_sd/TWRP/BACKUPS/ZY322HFKQX/2018-01-29--18-23-59/system_image.emmc.win'

Later in the log file, right before the log file generation step, was this:

I:Error writing destination fd (Operation not permitted)
Backup Failed. Cleaning Backup Folder.

So, I figured it could be either to do with compression, or some weird files in my system partition, or possibly, given the above error, permission or access issue to the TWRP folder. (I don't know - I have no idea what I'm doing most of the time - I just read the whole thread and try to figure things out.) So, what I did was delete all of the TWRP-created data, via TWRP's own File Manager. Then I rebooted into system, and used SD Maid to do an app cleanup, system cleanup, and optimise databases. Then I closed all of the running programs and repeated the SD Maid cleanup.

After that, I booted into recovery and backed up:

Go to Backup

Turn off MD5

Turn on the compression, return to backup, start a backup, cancel it straight away, then go into Backup again, and turn off compression.

Go to the TWRP folder that was created by the above step and delete it, using TWRP File Manager

Back up System, Boot, Recovery, EFS (no idea what it is)

Using TWRP file manager, renamed the backup folder from TWRP to TWRP1.

Back up System Image partition

Using TWRP file manager, renamed the backup folder from TWRP to TWRP2.

Back up Data partition

Using TWRP file manager, renamed the backup folder from TWRP to TWRP3.

Every one of the three backup lots listed above ran without any problems or delays, and the adb pull worked like a charm after that.

It may seem somewhat of an overkill, yes, and I don't know what sorted the problem out - toggling the comression, the SD Maid cleanup, renaming the TWRP folder immediately post-each backup so that a new backup would write to its own, newly-created, fresh folder ... But something worked.

(This was on Moto G5S Plus XT1805, on stock rom, with this TWRP, and rooted with the latest Magisk.)

I hope it helps someone. And thanks to everyone who posted helpful suggestions in this thread.
[Nexus 6 Q&A, Help & Troubleshooting] kudos1uk:
I am getting this error, please can someone who knows what they are looking at take a look at the end of my log and see if there is a file I can safely delete to fix this.

Many thanks.

I:addFile '/data/data/com.google.android.googlequicksearchbox/app_si/now_content_store/content_store.db' including root: 1

==> set selinux context: u:object_r:app_data_file:s0

I:addFile '/data/data/com.google.android.googlequicksearchbox/app_si/now_content_store/content_store.db-journal' including root: 1

==> set selinux context: u:object_r:app_data_file:s0

I:addFile '/data/data/com.google.android.googlequicksearchbox/app_si/now_content_store/content_store.db-wal' including root: 1

==> set selinux context: u:object_r:app_data_file:s0

I:Error adding file '/data/data/com.google.android.googlequicksearchbox/app_si/now_content_store/content_store.db-wal' to '/usb-otg/TWRP/BACKUPS/d91b2aef/2018-03-08--09-07-25_LRX22C.I9505XXUHPK2/data.ext4.win000'

Error creating backup.

I:ERROR tarList for thread ID 0

Error creating backup.

I:InfoManager saving '/usb-otg/TWRP/BACKUPS/d91b2aef/2018-03-08--09-07-25_LRX22C.I9505XXUHPK2/'

createTarFork() process ended with ERROR: 255

Backup Failed. Cleaning Backup Folder.

I:Copying file /tmp/recovery.log to /usb-otg/TWRP/BACKUPS/d91b2aef/2018-03-08--09-07-25_LRX22C.I9505XXUHPK2/recovery.log

I:Set page: 'action_complete'

I:operation_end - status=1

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: 'wipe'

Truncating string cache entries.

I:Set page: 'advancedwipe'

I:Set page: 'wipe'

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 /usb-otg/recovery.log
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
The line that starts with I:Error

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Nexus 6 Q&A, Help & Troubleshooting] kudos1uk:
Thanks for that, I deleted the file, turned off phone and tried another backup but same fault:

I:Error adding file '/data/data/com.google.android.googlequicksearchbox/app_si/now_content_store/content_store.db-wal' to '/usb-otg/TWRP/BACKUPS/d91b2aef/2018-03-14--09-23-20_LRX22CI9505XXUHPK2/data.ext4.win000'

Any ideas why this db file is causing this problem?
[Nexus 6 Q&A, Help & Troubleshooting] kudos1uk:
My bad, it did fix it, missed the "wal" on content_store.db-wal and deleted wrong file, all good now :)
[Nexus 6 Q&A, Help & Troubleshooting] prashanth_:
Firstly, my device is mido, but the error code is the same, so i guess it's still relevant.

I tried the adb pull but couldn't find anything useful their. Then I realized this thread is about backup process, while I got the error while during the restore process (my backup process was fine). So I looked at the onscreen twrp log and found restoring the 'firmware' partition was the cause of error. I then unselected firmware and made a fresh restore and it worked. (Initially, I was restoring all the 10 backed up partitions as I wasn't sure what was required to get my old ROM and app data).
[Nexus 6 Q&A, Help & Troubleshooting] Amrut Parmar:
I m getting this error when i m doing nandroid backup
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
Delete the file indicated by the error. Did you read this thread?

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Nexus 6 Q&A, Help & Troubleshooting] Amrut Parmar:
I can help you

1st- remove all parallel apps from your device.

2nd- download terminal emulator app

3rd.In terminal app, first type su to get superuser permission,

then type pm remove-user 999

Then you are good to go
[Nexus 6 Q&A, Help & Troubleshooting] eArmin:
For me the error was related to I/O or file corruption issue. To find what has happened, you should browse to BACKUP_Location (usually ext SD)>TWRP>BACKUPS>backupfolder and find the recovery.log file. open the file and at bottom lines read what folder caused backup failed.

Delete the corrupted folders using TWRP File Manager, delete the old backup folder and try backup again. Consider that this may occur for different folders. so you need to read the recovery file every time.
[Nexus 6 Q&A, Help & Troubleshooting] liott:
My recovery.log :

Oh really ! You mean I should delete CellBroadcastReceiver.apk ?
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
Yes, if you want the rest of the backup to run.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Nexus 6 Q&A, Help & Troubleshooting] dnb1987:
I have this in the recovery.log:

Backup_Folder is: '/data/media/0/TWRP/BACKUPS/2168fb2501057ece/2018-06-23--07-33-01_LightROM'

I:Calculating backup details...

* Total number of partitions to back up: 11

* Total size of all data: 10266MB

* Available space: 50238MB

[BACKUP STARTED]

* Backup Folder: /data/media/0/TWRP/BACKUPS/2168fb2501057ece/2018-06-23--07-33-01_LightROM

Invalid encryption mode file /data/unencrypted/mode

Backing up System...

Invalid encryption mode file /data/unencrypted/mode

Error opening: '/system/priv-app/SAirMessageProxy_N' (Not a directory)

I:Error in Generate_TarList!

Error creating backup.

I:InfoManager saving '/data/media/0/TWRP/BACKUPS/2168fb2501057ece/2018-06-23--07-33-01_LightROM/system.info'

createTarFork() process ended with ERROR: 255

When i go to this location using file manager in twrp i cannot remove this corrupted folder, when i select it it goes back to /system/priv-app/

any idea how i can remove this folder ?
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
Your problem is different than what others in this thread are dealing with. It's still a corruption, but affecting a directory, not a file that can be removed. I have no idea why this happened.

Try backing up with the System Image option. If that works I'd guess there is something wrong with your system partition.

If the above does work, try dirty flashing the ROM you're on. Maybe it will fix the directory (that has turned into a folder) and let you do a "normal" nandroid.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Nexus 6 Q&A, Help & Troubleshooting] dnb1987:
thanks for your fast reply ! i had to crash learn a lot in the last 24 hours and got only 4 hours of sleep but my g965F is working again and i want to make a full backup so i can go back if any issue occures.

Just to be sure i am doing the right thing:

Try backing up with the System Image option. could you please elaborate how to do this in twrp ?

just want to be sure that i do not f*kk up my phone again ;)
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
Your using a S9 but posting in an N6 thread? [emoji33]

That's the type of stuff that will crash your device.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Nexus 6 Q&A, Help & Troubleshooting] dnb1987:
whoops didnt even notice that this is a N6 threath :eek:

found is using google and the problem seems the same.

thanks for your help anyway ^^

time to google some more i guess :p
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
Go read the TWRP.me site on how to use twrp. If your recovery is like many, you should find instructions to do a system.img back up. I still think the advice I have given above applies, but YMMV.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Nexus 6 Q&A, Help & Troubleshooting] sigmaservice:
Problem Fixed

Hi all, i solved that: you need to delete a folder generated by TWRP backup, located in main phone memory, named with a series of alphanumerical characters... the name may vary according to the telephone owned. You need to use a file manager like ES file explorer with Root Access and deleting the folder. I hope i was clear... have fun!
[Nexus 6 Q&A, Help & Troubleshooting] jerryspring:
twrp 321 wont flash this. keeps booting back to recovery. i notice it says id n/a in bootloader. what can be wrong?
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
My first thought what is wrong is that your posting in a Nexus 6 forum but your device is something else [emoji6]. There is no ID displayed on the boot loader on an N6.

Rebooting to recovery sounds like no OS installed.

Maybe you mean TWRP 3.2.1. If you really do have a Shamu and not a One X, TWRP3.2.2 is the newest and I believe it's required for Lineage OS.

If you want more than guesses, make a more descriptive post. I have no idea what "this" in your comment, "twrp 321 wont flash this" means.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Nexus 6 Q&A, Help & Troubleshooting] jerryspring:
It's the issue of always booting back to twrp after a reboot. I can only access the flashed rom is if I chose start or factory mode.
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
Sounds like a problem with the boot.img. Again, if this is really for an N6, I would flash the last stock factory image, boot and setup, then reinstall TWRP.

If you are, as I suspect, in the wrong device forum, I strongly suggest you go ask for help in the correct device forum.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Nexus 6 Q&A, Help & Troubleshooting] jerryspring:
I referred to this thread due to it's title of error code
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
This thread is not a general device thread. You can get into trouble if you use support meant for a different device. The Nexus line of devices are next to impossible to brick. If I'm right that you have a One X, I'll bet that is much easier to brick.

Maybe the reason you phone doesn't work is you installed TWRP for the wrong phone. Details and accuracy are key if you don't want a paperweight.

I told you how to fix a Nexus phone with the problem you describe. You can either take that advice or go get advice from people who have the same device as you.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Nexus 6 Q&A, Help & Troubleshooting] jerryspring:
I can use this thread for the relation of the issue. It's not like I disclosed my device
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
Let me try one more time.

My encouraging you to get help from your own device forum is for your benefit. Since this thread/forum is focused on the Nexus 6, any suggestions for a N6 may cause more problems on a different device.

Additionally, should a specific discussion on a device other than a N6 occur within the N6 forum, it can mislead future readers into doing something that won't work, or worse, damage their N6.

There is structure on XDA and it's not to make me happy, it's to make it possible for people to find specific device support.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Nexus 6 Q&A, Help & Troubleshooting] biebie29:
What is in data folder i cant bacup data what will happen if i clear it or whipe t
[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
Which data folder? There are many.

If you mean the top level (/data), then that is the mount location for the data partition which holds all user install apps and app data plus settings.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Nexus 6 Q&A, Help & Troubleshooting] duckredbeard:
Looks like my issue us related to "system/vendor/lib/mediadrm"

Am I reading this correctly? Is that what I should delete?
[Nexus 6 Q&A, Help & Troubleshooting] duckredbeard:
Here are the details of that file…
[Nexus 6 Q&A, Help & Troubleshooting] duckredbeard:
Previous post didn't seem to include attachment
[Nexus 6 Q&A, Help & Troubleshooting] swamp2:
I know this is Nexus 6, but I had the same problem on my OnePlus 6. The file presenting the problem was

failed to lookup tar policy for '/data/user/10' - 'c95561b74757ff2c'

I had inadvertently added a test user or other account in Android settings. Simply removing this account leaving the main account and Guest account fixed the issue and I was able to backup. This could be helpful across devices, so I decided to include here.
[Nexus 6 Q&A, Help & Troubleshooting] Yes I Did It:
In my case it was the sandboxing app Island, as it creates a new user (u10) and sets your phone as a "work administrated device".

This is very likely a bug with TWRP failproof checks, as there's nothing wrong in backing up another user's data if you're root. Hope an update comes soon.
[Nexus 6 Q&A, Help & Troubleshooting] larpoux:
I could resolve my nandroid /data backup error on my EMUI 8.0 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 device.

I post on this forum because I hope that this will be helpful for others devices owners.
[Nexus 6 Q&A, Help & Troubleshooting] larpoux:
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.
[Nexus 6 Q&A, Help & Troubleshooting] YogySK:
Hello, i had almost the same problem but with code 0 or 9. Based on log, i saw many lines about my app called PingTools. It had tens of thousands of files in it´s directory. I uninstaled it(wich took a long time) and it solved the problem. :)
[Nexus 6 Q&A, Help & Troubleshooting] Sergeisss:
Try to restore only "System" partition from the previous backup and without reboot TWRP make the new backup. It had worked for me!
[Nexus 6 Q&A, Help & Troubleshooting] pol-der:
Thank you for this. I had this issue with addon.d and worked with this way but i want to ask something. Is that addon.d file important file or not? What will be after deleting that?
[Nexus 6 Q&A, Help & Troubleshooting] yugotprblms:
I honestly have no idea, it does not seem to be though. I had no ill effects after deleting it.
[Nexus 6 Q&A, Help & Troubleshooting] pol-der:
I see.
[Nexus 6 Q&A, Help & Troubleshooting] runekock:
addon.d is for flash survival.

Gapps and some other extra flashes register themselves in addon.d. Then roms with addon.d support will automatically reflash those addons, when a new version of the rom is flashed.

Without addon.d, you'll have to manually flash gapps (and any other addon) every time. But that can be an advantage too: you get rid of any old addon that you no longer use, and that can even be incompatible with the new rom. The usual way to force that is to wipe System before flashing.

[MENTION=3179860]yugotprblms[/MENTION]
[Nexus 6 Q&A, Help & Troubleshooting] pol-der:
Thank you for this explanation but i couldn't understand completely.

> you'll have to manually flash gapps (and any other addon) every time.

I am using LineageOS and i didn't install Gapps and i don't use any Google services. I am using microG, FakeGapps and FakeStore for apps. In this scenario is addon.d important for me?
[Nexus 6 Q&A, Help & Troubleshooting] runekock:
Well, microG is an add-on too. I don't know whether it supports addon.d - not all addons do.

If it does, and if you don't delete addon.d, you should be able to flash an updated rom, and keep microG without having to flash that again.

But otherwise, you need to flash microG again after flashing an updated rom. Now, I tend to do that anyway, and if you do the same, you need not care either way.
[Nexus 6 Q&A, Help & Troubleshooting] temporarium:
FYI, for me the cause of this error (although on an Essential Phone PH-1), is an empty /data/per_boot directory. Once deleted, the backup completes successfully. For some reason, it's always recreated, so I have to delete it prior to every backup.
[Nexus 6 Q&A, Help & Troubleshooting] Fzarpo:
However, there seems to be a snag (I'm on Nexus 6P) when trying to restore from that backup: extractTarFork() process ended with ERROR : 255

Were you able to fix this?
[Nexus 6 Q&A, Help & Troubleshooting] runekock:
Try looking at the log, like described by [MENTION=9167048]Yoinx[/MENTION] on the first page.