When I try to backup with TWRP I get the message ''TWRP createTarFork() error 255 when backing up data''. After googling this error I found out that I needed to ADB pull the log. I did that and I think that I know what the problem is. But I am not sure how to fix it now. Here's the log: I can't past the log because this is a new account. Send a dirrect message for the log.
Edit 1: I think that this the error is: I:Check_Lifetime_Writes file does not exist '/sys/fs/ext4/system_a/lifetime_write_kbytes'
Mighty_Pig said:
When I try to backup with TWRP I get the message ''TWRP createTarFork() error 255 when backing up data''. After googling this error I found out that I needed to ADB pull the log. I did that and I think that I know what the problem is. But I am not sure how to fix it now. Here's the log: I can't past the log because this is a new account. Send a dirrect message for the log.
Edit 1: I think that this the error is: I:Check_Lifetime_Writes file does not exist '/sys/fs/ext4/system_a/lifetime_write_kbytes'
Click to expand...
Click to collapse
When I had twrp installed and tried to backup I would always get the error 255.
When I boot a twrp img from fastboot, a backup will succeed. (fastboot boot twrp*.img)
Barsky said:
When I had twrp installed and tried to backup I would always get the error 255.
When I boot a twrp img from fastboot, a backup will succeed. (fastboot boot twrp*.img)
Click to expand...
Click to collapse
I tried it but it dind't work
Hi all - tried today to backup my data (before upgrading to PIE) with TWRP from eng.stk but it won't succeed in any way
Errormessage:
Code:
Starting TWRP 3.2.3-0-840f04f7 on Tue Apr 28 20:15:35 1970
failed to lookup tar policy for '/data/misc_ce/999' - '509be37f3fe33969'
I:Error adding file '/data/misc_ce/999' to '/data/media/0/TWRP/BACKUPS/xxxxxx/2018-09-23--17-36-14/data.ext4.win000'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/xxxx/2018-09-23--17-36-14/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/xxxx/2018-09-23--17-36-14/recovery.log
@eng.stk
Any Idea?
I tried it but it dind't work
Click to expand...
Click to collapse
https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
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.
Related
Hey there,
My brother was trying to install a custom ROM on his phone but it was having issues so he went to restore a TWRP backup of an AOSP ROM he had before. Unfortunately, it was a backup of every partition, including the Firmware partition. When it got to restoring Firmware, it formatted the existing firmware partition, but then immediately failed at restoring the old Firmware partition backup with the following showing in the recovery.log:
Code:
I:Extracting uncompressed tar
==> extracting: /firmware//image/ (mode 40550, directory)
tar_extract_file(): failed to set permissions on /firmware//image/ !!!
I:Unable to extract tar archive '/data/media/0/TWRP/BACKUPS/QV7013TG03/Firm/firmware.vfat.win'
Error during restore process.
extractTarFork() process ended with ERROR: 255
After this, any attempts to start the phone result in a bootloop. We can still get into recovery but every time we try to restore the TWRP backup it fails at firmware again. Any ideas on how to get the phone working?
EDIT: Fixed!
I fixed this a while ago but if I recall correctly, we ended up flashing the stock firmware files with Flashtool. Basically go to this thread follow the steps under Part 2 and Part 2.5, then once you've created the firmware, flash it using Flashtool --> Lightning Button --> Flashmode --> Choose the firmware you made --> Wipe Userdata (not sure if we did this or not, try without it, if it doesn't work then wipe userdata) -->Flash. That should fix it.
I have never managed to restore backup on this stupid phone. Always errors with making backup or restoring backup or not detecting storage or some other crap. Sick of it
Hello,
I use an stock android 9 ROM. When 8 try to backup this Rom I get this issue.
```
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1237
```
```
I:Error adding file '/data/vendor_ce/11' to '/data/media/0/TWRP/BACKUPS/FA6AD0307055/2018-08-28--15-30-48_PPR1180610009/data.ext4.win003'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/FA6AD0307055/2018-08-28--15-30-48_PPR1180610009/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/FA6AD0307055/2018-08-28--15-30-48_PPR1180610009/recovery.log
```
I can't make any backup.
What version of TWRP? Have you tried uninstalling and reinstalling Magisk? Have you tried backing up to an external drive, such as through a USB-OTG?
post-mortem said:
What version of TWRP? Have you tried uninstalling and reinstalling Magisk? Have you tried backing up to an external drive, such as through a USB-OTG?
Click to expand...
Click to collapse
I have the latest available version if TWRP installed. Why I must try to uninstall and reinstall Magisk? No external drive is available
Update here:
I flashed the complete firmware again, then installed TWRP and it works.
This is a Flashable Zip for restoring backups created from different recoveries. No more problems with checksums, checksums will be ignored.
- Android system recovery <3e>
- CWM
- TWRP
- ADB Backup
- MIUI Backup
This is a alpha release, in this state you can test it for Android system recovery <3e> only!
I need testers for proof of concept. If you have a Mediatek Phone with encrypted userdata_20160823_100259.backup, please try to restore with bckp2raw.zip from TWRP. Please give feedback if failed or vote :good: if worked.
bckp2raw.zip (v1.0.3) 32-bit
bckp2raw.zip (v1.0.5) universal
(other backup formats following soon, feel free to request)
TUTORIAL - under construction
aIecxs said:
TUTORIAL - under construction
Click to expand...
Click to collapse
Is this solves problem of Android 7 stock recovery backup?
I got second phone stock recovery problem for 7 version
stock recovery do not want to recover his backup. complains - "it is corrupted, please reset your phone"
I install twrp recovery and try to install this .zip
bit it give error 134 (or something like that)
sorry this project is abandoned. in generally, backup can not restored to other device because of the checksum mismatch. Thats where this zip comes in game. If you upload recovery.log right after installing this zip i will try to fix the errors..
aIecxs said:
sorry this project is abandoned. in generally, backup can not restored to other device because of the checksum mismatch. Thats where this zip comes in game. If you upload right after installing this zip i will try to fix the errors..
Click to expand...
Click to collapse
I meant - I got another (second) phone looped reboot, same as in 2018. And try to stock recovery backup (55Gbyte and ) restore.
BTW - first phone is still waiting to restore 11Gbyte stock recovery backup!
last file: userdata_20191106_110350.backup27
Android 7 again same as in topic: https://forum.xda-developers.com/showthread.php?t=2528969&page=7
I copied lines from recovery.log:
I: operation_start: 'Flashing'
Installing zip file '/external_sd/bckp2raw.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
I:Update binary zip
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
Archive: /external_sd/bckp2raw.zip
inflating: bckp2raw.sh
Archive: /external_sd/bckp2raw.zip
inflating: busybox-arm
Archive: /external_sd/bckp2raw.zip
inflating: tar-arm
CANNOT LINK EXECUTABLE "/system/bin/sh": "/system/lib/libc++.so" is 32-bit instead of 64-bit
Aborted
Updater process ended with ERROR: 134
I:Legacy property environment disabled.
I:Install took 0 second(s).
Error installing zip file '/external_sd/bckp2raw.zip'
Dont want to boring and get you, if you would give help - you can save many people with same problem with android-7
ah i see, script does not even start. i don't have a x64 device for testing, i assume twrp is not able to run mksh from /system. i have added paths please try this one instead...
update-binary
Code:
LD_LIBRARY_PATH=/system/lib64:/system/vendor/lib64:/system/lib:/system/vendor/lib
bckp2raw.zip (v1.0.5) universal
for those who want to quickly convert TWRP ADB backup.ab into data.ext4.win
usage for unpacking files (don't do this on windows disk)
Code:
bash twab.sh backup.ab
cd 20*
mkdir data
sudo tar --ignore-command-error --numeric-owner --selinux --xattrs -xpf data.ext4.win -ivC data 2> /dev/null
data partition is encrypted
Hi , I've been trying a lot of methods to get my data back from my .backup files. All with no results. Your bckp2raw script seems to be one of the most successfull , but it ends by a " data partition is encrypted" ... Do you think I can still recover my files ... The original phone is actually working but it has been factory wiped ...
that message just means that your current /data partition is encrypted (message for encrypted backup is different)
- do a backup of metadata partition (just in case)
- do a backup of /sdcard to PC (adb/mtp)
- format userdata partition
- reboot TWRP
- check userdata partition is unencrypted
- restore userdata*.backup from zip
- restore metadata partition from backup
- restore /sdcard backup
the restoring process will deny if userdata is not empty. please note if backup is encrypted it is most likely useless without corresponding backup of metadata partition
aIecxs said:
that message just means that your current /data partition is encrypted (message for encrypted backup is different)
- do a backup of metadata partition (just in case)
- do a backup of /sdcard to PC (adb/mtp)
- format userdata partition
- reboot TWRP
- check userdata partition is unencrypted
- restore userdata*.backup from zip
- restore metadata partition from backup
- restore /sdcard backup
the restoring process will deny if userdata is not empty. please note if backup is encrypted it is most likely useless without corresponding backup of metadata partition
Click to expand...
Click to collapse
Thank you very much for your quick reply. Ok so I tried it , the restoring part worked , but when I rebooted it asked me for my code and said "password is correct but data is corrupted" ....
Do you have any idea for me to get my data back .... at least my pictures ...?
sounds like the backup is encrypted, can you confirm? more important is this the source phone of this backup? or do you try to restore on other device?
aIecxs said:
sounds like the backup is encrypted, can you confirm? more important is this the source phone of this backup? or do you try to restore on other device?
Click to expand...
Click to collapse
I'm pretty sure it is encrypted. Yes the phone is the source phone of the backups
encryption should work in theory, but you need a copy of metadata partition from the day you created backup. you most likely don't have it, therefore your data is lost forever
aIecxs said:
encryption should work in theory, but you need a copy of metadata partition from the day you created backup. you most likely don't have it, therefore your data is lost forever
Click to expand...
Click to collapse
Yes I don't have the metadatas from that day, is there a chance that they have been backup with the android backup ?
Thanks for your help anyways, I'm sad
no, nothing you can do. even a old metadata from the first day when you buyed this device would probably do it. metadata partition is formatted on factory reset.
for some devices the crypto footer is not located at separate partition, but at the end of userdata partition instead. But this is not the case for your device, otherwise this zip would have restored. you can double check, search with hex editor in last -16384 bytes of last file for string aes-cbc-essiv:sha256 (or aes-xts)
aIecxs said:
no, nothing you can do. even a old metadata from the first day when you buyed this device would probably do it. metadata partition is formatted on factory reset.
for some devices the crypto footer is not located at separate partition, but at the end of userdata partition instead. But this is not the case for your device, otherwise this zip would have restored. you can double check, search with hex editor in last -16384 bytes of last file for string aes-cbc-essiv:sha256
Click to expand...
Click to collapse
Cannot find anything like this but i'm not used to HEX reading .... Is there a chance that the metadata is on the SD card i was using for (external) storage on the phone (not the ones for the backups) ?
Hello there and thanks for creating such a productive thread, just what I needed for my current situation. so am trying to retrieve .backup files on cxAir android 7.0 after root through twrp but apparently, when running the script from the zip file you've shared I get the Error: data partition not mounted.
I'm still new in the dev world but am totally excited about it and I may not understand a lot of things but am willing to work my ass off to figure out the most of what I can so please I'd really appreciate it if I could get some help on this one, thanks in advance
mount data partition and try again?
Someone help me please!
custom rom = (Pixel Extended 2.7)
device = Realme X (RMX1901)
1. I backed up all partitions (including system and vendor images)
2. installed Ancient OS rom for testing
3. removed that rom and tried to restore from backup
4. got error that user 10 could not be decrypted
5. from google searches, I tried to modify the copy of backup to remove 10 from user/, user_de/, etc., but had no fully compatible software in linux, so moved to other video
6. watched this "
" video, and deleted some key files in /data, except /data/media and the Android folder
7. flashed rom, rebooted, did not set password, back to TWRP
8. this step was to restore Data from /data/media/0, but all the folder names and files were encrypted
9. I cannot restore from backup of twrp backup because of editing of those files using incompatible software, nor am I able to copy it to the device, there is some libmtp error that doesn't allow that
10. realme x has no sdcard slot
Screenshot attached of the /data/media/0 directory at present
PLEASE HELP!
I've been running ArrowOS - Arrow-v12.0-vayu-OFFICIAL-20211108-VANILLA - and pleased with it's stability, but decided it was time to update to the Arrow-v12.0-vayu-OFFICIAL-20211221-VANILLA version.
Recovery was TWRP-3.5.2-vayu-Nebrassy-2 so I used the TWRP app to update that to the official TWRP-3.6.0.
My phone is encrypted and without a password. TWRP-3.6.0 couldn't mount partitions or view files.
Data partition etc show 0 bytes' and adb sideload failed to connect - may have been an unreliable cable - so I added a 4-digit pin which worked in the system and rebooted to recovery. TWRP didn't ask for a password and showed the same encrypted and invisible partitions. Trying the 'Decrypt Data' option in TWRP 'Mount' menu, I got the errors 'Failed to decrypt data' 'Password failed'.
I tried using adb shell to decrypt:
vayu:/ # twrp decrypt 1234
Attempting to decrypt data partition or user data via command line.
Failed to decrypt data.
Click to expand...
Click to collapse
Then I tried adb sideload from TWRP which failed quickly with:
updater process ended with signal 7
Click to expand...
Click to collapse
And on my Ubuntu laptop:
$ adb sideload Arrow-v12.0-vayu-OFFICIAL-20211221-VANILLA.zip
serving: 'Arrow-v12.0-vayu-OFFICIAL-20211221-VANILLA.zip' (~7%) adb: failed to read command: Success
Click to expand...
Click to collapse
I rebooted into System, and got Fastboot instead. I can reboot into recovery.
Can anyone suggest how to repair the phone, and get TWRP to decrypt the filesystem?
TIA!
Giallograle said:
I've been running ArrowOS - Arrow-v12.0-vayu-OFFICIAL-20211108-VANILLA - and pleased with it's stability, but decided it was time to update to the Arrow-v12.0-vayu-OFFICIAL-20211221-VANILLA version.
Recovery was TWRP-3.5.2-vayu-Nebrassy-2 so I used the TWRP app to update that to the official TWRP-3.6.0.
My phone is encrypted and without a password. TWRP-3.6.0 couldn't mount partitions or view files.
Data partition etc show 0 bytes' and adb sideload failed to connect - may have been an unreliable cable - so I added a 4-digit pin which worked in the system and rebooted to recovery. TWRP didn't ask for a password and showed the same encrypted and invisible partitions. Trying the 'Decrypt Data' option in TWRP 'Mount' menu, I got the errors 'Failed to decrypt data' 'Password failed'.
I tried using adb shell to decrypt:
Then I tried adb sideload from TWRP which failed quickly with:
And on my Ubuntu laptop:
I rebooted into System, and got Fastboot instead. I can reboot into recovery.
Can anyone suggest how to repair the phone, and get TWRP to decrypt the filesystem?
TIA!
Click to expand...
Click to collapse
Any custom recovery at the moment cannot decrypt Android 12.
Try USB OTG or microSD card to flash in custom recovery.
Oic thanks!
Sounds like an easy fix. Before I do that, am I going to lose data, settings etc by flashing the update when the recovery can't access all the filesystem?
Giallograle said:
Oic thanks!
Sounds like an easy fix. Before I do that, am I going to lose data, settings etc by flashing the update when the recovery can't access all the filesystem?
Click to expand...
Click to collapse
Not sure if your previous actions messed up your data partition or not, so not sure if you will loose your data or not.
Recoveries cannot decrypt data partition, but the system file writing ability should be working.
If you still have the zip file of the old version 20211108, you can flash it and see if the system will boot and read your data correctly.
If it boots and your phone is like before update attempt, then you can try flash the update zip.
If it did not boot into the OS, chances are some of your earlier actions messed up data partition. In this case, format data is the way, which will loose your data.
If format data still doesn't help, you might need to go back to MIUI and start again.
That was a good suggestion. I reinstalled the Arrow-v12.0-vayu-OFFICIAL-20211108-VANILLA rom and the phone rebooted.
Only glitch is constant notifications that Google Play Services keeps stopping, and various other apps notifications to 'Get Google Play Services'.
I presume that Play Services may have been rolled back by the reinstallation, and I'm wondering whether to try to find a more recent copy to install and see if that fixes it, or just go directly to the Arrow-v12.0-vayu-OFFICIAL-20211221-VANILLA rom.
Giallograle said:
That was a good suggestion. I reinstalled the Arrow-v12.0-vayu-OFFICIAL-20211108-VANILLA rom and the phone rebooted.
Only glitch is constant notifications that Google Play Services keeps stopping, and various other apps notifications to 'Get Google Play Services'.
I presume that Play Services may have been rolled back by the reinstallation, and I'm wondering whether to try to find a more recent copy to install and see if that fixes it, or just go directly to the Arrow-v12.0-vayu-OFFICIAL-20211221-VANILLA rom.
Click to expand...
Click to collapse
Did you install GApps manually?
If you did not, but your system has Google Play Services, then you probably had installed GApps version of ArrowOS instead of Vanilla version.
Switching between Vanilla and GApps is probably not working well if you did not format data. Maybe from Vanilla to GApps version is possible, but from GApps version to Vanilla may cause some issues.
Make sure which version you had, GApps or Vanilla.
If you are not very sure, then backup all your personal data and apps and do a clean flash with format data.