Soft-bricked Z5 when trying to restore a TWRP backup - Xperia Z5 Q&A, Help & Troubleshooting

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

Related

[Q] FUBAR'd (Status 7)

i seem to have fubar'ed my nexus s (uk version) i updated to ics, didnt like it so tried to restore to a backup i made earlier today...
at the moment when i turn on my phone it shows
fastboot mode- No Boot or Recovery img
lock state - unlocked
I can enter recovery. but cannot restore.
tried wiping cache,dalvik etc.
When hitting restore it returns with:
... system.img not found. skipping restore of /system/
also does the same with
data.img
cache.img
sd-ext.img
i have no idea what to do... if you could help it would be greatly appreciated.
Try flashing a rom. U can mount SD card within recovery.
Sent from my Nexus S 4G using xda premium
yeah tried flashing ...
gets stuck on google screen
Do you have a One Click return to stock available for your model? It wouldn't hurt to start fresh. I did that on my NS4G last week. Does your PC recognize the phone?
Sent from my SPH-D710 using Tapatalk
looking into the unbrickable mod atm... my phone seems to have no .img files.
tried restoring to stock and still the same issue... it says it cant find .img so skips them then when i try to re boot it sticks on the google screen
After trying to apply from zip (cm7, that i have used numerous times before)
i get this ---
Installing update...
assert failed: getprop("ro.product.device") =="crespo" ll getprop("ro.build.Product") == "crespo" ll getprop("ro.product.board") == "crespo"
E:Error in /sdcard/update-cm-7.0.3-NS-signed.zip
(Status 7)
Installation aborted.
i havent the faintest idea what to do...
Tried re-flashing CWM recovery?
yup tried re flash,
i think i need to replace the .img files... i just dont know how
it says that
system.img not found
data.img not found
cache.img not found
sd-ext.img not found.
it skips the restore of these say restore complete. yet there is obviously nothing to restore.
there must be a way of fixing this???
Do you have the latest version of CWM flashed? (5.0.2.0)
yeah re installed/reflashed (5.0.2.0)
it seems to be working
*~~~~~~*
Facepalm
*~~~~~~*
Such a noob
I have had a similar problem before, and even advised on that exact thing.
lesson learned.
KEEP RECOVERY.IMG UP TO DATE
Thank you for pointing out the obvious.
I'm such a ****
No problem flex59, best way to learn is the long and hard way . I had a similar status 7 problem on my move up to ICS. Figured the latest recovery will save me wasted hours down the track eventually, and hopefully someone elses.
To downgrade from ICS, you need to flash the full GB 2.3.6 ROM first...
I downgraded from OTA ICS 4.0.3 due to battery, Wifi & lag issues as well. A NANDroid backup does NOT contain the bootloader and radio AFAIK. Here's what I did.
Find the appropriate FULL ROM here and download and copy to your SD card.
Download this flashable Superuser here and copy to your SD card.
Make sure you are familiar with and set up for fastboot and have the latest CWM recovery img file. You will have to reinstall CWM. These instructions are assuming that CWM recovery is already installed on your device.
1. Make sure the full ROM and SU zip are on the root your SD card.
2. I did a full wipe of data, cache, dalvik.
3. Go into CWM recovery and flash the full ROM. Now flash the SU zip.
4. At this point, the full ROM flashed GB2.3.6, stock recovery, bootloader and radio back. But you should be rooted due to step 3.
5. Boot into Android. I installed ES File Explorer from the market. In ES File Explorer settings, select both root settings “Root Explorer” and “Mount File System” to navigate and modify root files. Allow permissions in SuperUser.
6. Navigate to /system/etc and rename (tap&hold on file) install-recovery.sh to install-recovery.sh.bak (this file reinstalls the stock recovery at every boot)
7. Using fastboot on your computer, flash CWM recovery again.
8. NOW using CWM, restore your GB 2.3.6 NANDroid backup.
Like nothing ever changed.

Not able to flash Stock image with custom Recovery (TWRP 3.1.1.1.)

Hello guys,
Today I wanted to update my Honor 8 (FDR-L09) because it was showing me, that there is a new update ready to install (FRD-L09C432B405) and I was on a very old firmware (something from mid 2017). So it was time for me to update.
I downloaded the latest update (FRD-L09C432B405) and tried to wipe the cache, dalvik, and Data, but for some reason it "couldn't mount /data" and the wipe failed.
After an advanced wipe it worked and I tried to flash the stock image (the update which was shown to me (FRD-L09C432B405) with TWRP (3.1.1.1.)).
Now my hassle starts:
1. The Rom couldn't get flashed because of "Error: 7" --> I fixed it with the common "Error 7 fix --> editing the update-script and removing the assert line. (And yes, I'm 100% sure that it was the right ROM.
2. Now TWRP seemingly starts to flash the rom but inbetween the lines there is "mountencrypt: failed to mount /data: no such file or directory and it ends with "unknown command [[]" and it takes just two seconds, so the flash obviously isn't succsessfull.
I tried the "failed to mount /data" fix, where I change the data system to ext3 and then back to f2fs and change it back, but it won't work.
In my frustration I did another pretty bad thing and made another advanced wipe and wiped the system too, so now I don't have an OS on my system.
Maybe it's also important to note that there was a window showing up for a very short amount of time, with something like "encryption/encrypted" showed up.
What should I do now? Is there a way to fix the "/data couldn't be mounted" problem? Or am I missing a vital step in flashing the stock rom?
Thanks for your kind help!
You can not flash an update with twrp unless you use hurupdater. You essentially bricked your phone. Look for hurupdater here on xda and follow the instructions and you'll be fine

[RECOVERY] [TWRP] Android system recovery <3e> universal checksum disabler

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?

Easy steps for restoring original partition table?

To put it simple, I would need some guidance for restoring the very factory / unmodified partition layout for my Nexus 5 (32GB) model. It is not bricked. I can flash Android 10 ROMs with newest gapps and they all work. Earlier I installed crDroid: https://forum.xda-developers.com/google-nexus-5/development/rom-crdroid-v5-4-t3931587
To make it work, I modified partitions beforehand: https://forum.xda-developers.com/go...ment/repartition-nexus-5-repartition-t3844395
But I decided to flash the original software on it. It can be successfully flashed, but it is in bootloop. I guess because of the non standard partition layout.
Thanks for the help.
@HUN_Gyuszi,
U can restore original partition table with the same script u used to modify them. Here are the steps:
1. Boot into UA TWRP
2. Flash the hh_clamor_repartition.zip from the thread you have mentioned
3. Open Terminal in TWRP (TWRP -> Advanced - Terminal)
4. Type stock and wait until your phone reboots.
5. Install original TWRP 3.3.1-0 from https://dl.twrp.me/hammerhead/ via fastboot
6. Boot into original TWRP
7. Wipe all partitions and format data
8. Reboot from TWRP to TWRP
9. Make a factory reset. The process described here https://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
I highly suggest u to make a backup of persist partition before doing these steps. You can read how to do it here https://forum.xda-developers.com/showpost.php?p=77661978&postcount=2
PS: After reverting back to original partition table all your data will be lost! So backup everything u need before reverting to stock partition table.
Much respect and thanks for the prompt reply, all worked.
z3DD3r said:
@HUN_Gyuszi,
U can restore original partition table with the same script u used to modify them. Here are the steps:
1. Boot into UA TWRP
2. Flash the hh_clamor_repartition.zip from the thread you have mentioned
3. Open Terminal in TWRP (TWRP -> Advanced - Terminal)
4. Type stock and wait until your phone reboots.
5. Install original TWRP 3.3.1-0 from https://dl.twrp.me/hammerhead/ via fastboot
6. Boot into original TWRP
7. Wipe all partitions and format data
8. Reboot from TWRP to TWRP
9. Make a factory reset. The process described here https://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
I highly suggest u to make a backup of persist partition before doing these steps. You can read how to do it here https://forum.xda-developers.com/showpost.php?p=77661978&postcount=2
PS: After reverting back to original partition table all your data will be lost! So backup everything u need before reverting to stock partition table.
Click to expand...
Click to collapse

a51 recover data

Hello.
I have a problem: after downgrading my device from Magisk 24.1 back to Magisk 23 I can't unlock my device.
I can only see my wallpaper, but it doesn't respond to touch actions and may reboot.
When I reflash patched boot magisk file it is all the same thing.
Reflashing original boot makes only bootloop or message that data is incompatible.
It is Android 10, AP data file: 'AP_A515FXXU3BTF4_CL18770262_QB31913704_REV00_user_low_ship_meta_OS10'
The question is: how can I pull my /data and /sdcard from my phone?
The recovery is stock version, I've tried to flash TWRP, but TWRP sees only gibberish encrypted file names.
I made a copy of /data/unencrypted folder seems to be containing decryption keys. and entire sda32 containing data partition.
Please help me with ways to restore the system without data wipe or ways how to backup data before reinstalling firmware.
You could try to recover you data with Samsung Smart Switch, when IT doesn't work, there is a way top recover Data from a Phone with ADB tools and a PC.

Categories

Resources