How to copy TWRP Nandroid backup onto PC? - Xperia Z2 Q&A, Help & Troubleshooting

I made TWRP to make a nandroid backup. In past I copied files to pc, but when I tried to restore it failed. I red that it's not as simple, as permissions etc need to be copied, and you need to use adb. I couldn't get it to work. I rebooted to twrp, connected usb cable and in elevated command prompt
Code:
adb pull /sdcard/TWRP TWRP
but it only copied a .twrps file that's 1kb. How to do this?

you do do not need adb bro.
Just plug in your phone when running android (normat MTP or MSC) and browse SDcard/TWRP then copy. if the backup is on internal memory otherwise if it is on the External SDcard broswse The external SD card directory and you will find the folder TWRP.
you have to copy the TWRP Folder.

Related

[Q] How to Pull entire Folder with ADB

I am using Android SDK Manager Revision 22.2.1 with my Samsung Galaxy S3 GT-I9300 International which is running a leaked copy of the Official Samsung 4.2.2 Stock Jellybean ROM dated 24th June 2013. It is rooted.
I wish to copy my entire TWRP backup folder to my PC and in preparation I read several threads which purport to explain how to do it but I only succeed in copying 16Mb worth of .md5 and .win files out of a backup folder which is 2.56Gb in size.
All folders in the TWRP folder are readable, writable and not hidden.
I have used the commands adb pull/sdcard/TWRP/ D:\111. I also tried adb pull/sdcard/TWRP D:\111.
The best I have got so far is to copy BACKUPS/4df1bd936aae7f4b/Leaked_Samsung_4.2.2_stock-15.10.13 which contains the following files:
boot.emmc.win
boot.emmc.win.md5
cache.ext4.win.md5
data.ext4.win000.md5
data.ext4.win001.md5
recovery.log
recovery.emmc.win
recovery.emmc.win.md5
system.ext4.win.md5
There are four missing files including the following large files.
data.ext4.win000
data.ext4.win001
system.ext4.win
Admittedly I am not a developer and am new to ADB so I am presumably doing something wrong.
Can anyone assist please.
If you are wondering why I wish to do this I have twice tried to flash Cyanogenmod 10.1.3 Stable version to my phone but get errors both times. I thought it may help to format my phone but before doing that I want to copy the backup of my ROM so that I can recver back to stock if CM still causes problems.
Simple method would be to make backup to ext sd card or even int sd card .
Then via USB windows explorer copy and paste .
Although I have selected the "Use External Storage" option in ROM manager, it still does not allow me to choose the backup location and gives only the option to save the backup to the sdcard.
I also have TWRP recovery so I will boot into Recovery and see if that gives me the option to backup to my external sdcard which is my preferred option anyway.
matrixmainframe said:
Although I have selected the "Use External Storage" option in ROM manager, it still does not allow me to choose the backup location and gives only the option to save the backup to the sdcard.
I also have TWRP recovery so I will boot into Recovery and see if that gives me the option to backup to my external sdcard which is my preferred option anyway.
Click to expand...
Click to collapse
Thank you JJEgan! I have found an option in TWRP Recovery to save my ROM backup to my external MicroSDCard which is what I needed.
thanks again.

[Q] How to copy SD files from TWRP or fastboot to desktop

Hi guys,
I need your guys' help. Somehow I messed up my installation (Play store crashing, can't see SD card directory in the files browser etc.).
Goal:
All I want to do right now is to copy my SD card files from my N5 to my desktop (Mac) so I have all the settings and backups and then wipe the whole phone and start fresh, subsequently restoring app and settings.
I can see my SD card directory within the TWRP file manager, also my Nandroid backup, which I tried restoring (I don't know if you have to wipe anything before doing so), but after well over an hour turned the device off.
I read somewhere that there is a pull function to copy files from phone to desktop (see here: http://stackoverflow.com/questions/17629889/android-adb-pull-file-on-desktop). So I tried adb pull sdcard/ /Users/myusername/Desktop/android but it says "command not found"
Question:
What am I doing wrong and how do I copy the important stuff over?
Note: I have a N5 with TWRP custom recovery, unlocked bootloader.

Modifications to external SD card made in TWRP disappear

I feel like I'm going crazy. I make a Nandroid backup in TWRP (via "fastboot boot twrp.img" not permanently installed) and the backup finishes, I verify that it is there with the TWRP file manager, and then *poof* at some point it disappears. I don't even have to reboot for it to disappear. If I use the USB mount to try to copy the backup off of the device before rebooting, while still under TWRP, it's gone. I tried to use the shell to copy a folder, and *poof* it also disappears. WHAT IS GOING ON!!?!?!?! It's as though the external sd card is mounted as read only but TWRP is just pretending it can write to it (I checked 'mount' and the external SD is listed rw). But is that what's going on here? And why?

Error while copying TWRP Backup Folder

I am using TWRP Recovery which I found on Xiaomi.eu's Android File Host page at https://www.androidfilehost.com/?w=files&flid=50678 with Xiaomi.eu ROM 7.2.9
I Took backup from TWRP Recovery, of all essential partitions. Now the issue I'm facing is that, when I copy the backup folder to Laptop in MTP mode, I only get empty folders copied in Laptop (I'm able to copy everything else in phone to Laptop easily, issue is only with TWRP Backup folder)
I have tried copying the same in phone to some other location but same issue, few files weren't copied. To know the specific files, I copied all files one by one and noticed that these 4 files are having issues and not letting me copy the backup folder.
efs2.emmc.win
efs1.emmc.win
boot.emmc.win
recovery.emmc.win

Access User Data in Recovery Backup

Hi,
I have a Wiko Lenny 3 phone and need to recover the pictures. The unlock code is lost, the touchscreen doesn't work anymore. My ideas so far:
1. I used the "Backup user data" feature of the stock recovery to a SD card.
Since I cannot upload an image until I have 10 posts, the recovery is like
"
Android Recovery
alps/full_v3702/v3702
6.0/MRA58K/1453981211
user/release-keys
Volume down to move highlight;
enter Volume up key to select.
----------------------------------------
Reboot system now
Reboot to bootloader
Apply update from ADB
Apply update from SD card
Wipe data/factory reset
Wipe cache partition
Backup user data ---> this is what I used
Restore user data
Root integrity check
Mount /system
View recovery logs
Power off
----------------------------------------
SD card free space: 29564MB
User data allocated: 11893MB
backup file: userdata_20190929_172118.backup
Backup user data complete.
"
But how to access the data? Tutorials which I found didn't help (merging the files in Linux, remove 512 Bytes and rename to zip to be able to extract "some" data: it isn't recognized as zip file). Is it possible to restore this user data to a virtual device somehow to access the data?
2. Removing the code: Following a German instruction (I'm not allowed to link it, sorry).
ADB doesn't recognize the device. Probably because USB debugging is turned off and I cannot turn it on without unlocking the device.
I don't do this very often, so my knowledge about ADB and Android is limited.
Does someone have a helping hint? Thank you in advance!
Regards
Martin
Martin_2 said:
Hi,
I have a Wiko Lenny 3 phone and need to recover the pictures. The unlock code is lost, the touchscreen doesn't work anymore. My ideas so far:
1. I used the "Backup user data" feature of the stock recovery to a SD card.
Since I cannot upload an image until I have 10 posts, the recovery is like
"
Android Recovery
alps/full_v3702/v3702
6.0/MRA58K/1453981211
user/release-keys
Volume down to move highlight;
enter Volume up key to select.
----------------------------------------
Reboot system now
Reboot to bootloader
Apply update from ADB
Apply update from SD card
Wipe data/factory reset
Wipe cache partition
Backup user data ---> this is what I used
Restore user data
Root integrity check
Mount /system
View recovery logs
Power off
----------------------------------------
SD card free space: 29564MB
User data allocated: 11893MB
backup file: userdata_20190929_172118.backup
Backup user data complete.
"
But how to access the data? Tutorials which I found didn't help (merging the files in Linux, remove 512 Bytes and rename to zip to be able to extract "some" data: it isn't recognized as zip file). Is it possible to restore this user data to a virtual device somehow to access the data?
2. Removing the code: Following a German instruction (I'm not allowed to link it, sorry).
ADB doesn't recognize the device. Probably because USB debugging is turned off and I cannot turn it on without unlocking the device.
I don't do this very often, so my knowledge about ADB and Android is limited.
Does someone have a helping hint? Thank you in advance!
Regards
Martin
Click to expand...
Click to collapse
Martín only way you could access them pictures is if you had twrp
([emoji3590]09-09-18[emoji3590])
Thanks. Is it possible to flash TWRP without losing data and without access via ADB?
Martin_2 said:
Thanks. Is it possible to flash TWRP without losing data and without access via ADB?
Click to expand...
Click to collapse
If your phone has twrp available and it's a Samsung you can flash it and you won't be able to do a twrp backup without formatting data to have data partition mountable in twrp to flash decrypt zip to do a backup however you don't need to format to be able to mount system partition once system is mounted you can use the twrp file explorer to delete files to delete your screen lock so you can enter the phone
([emoji3590]09-09-18[emoji3590])
PoochyX said:
If your phone has twrp available and it's a Samsung you can flash it and you won't be able to do a twrp backup without formatting data to have data partition mountable in twrp to flash decrypt zip to do a backup however you don't need to format to be able to mount system partition once system is mounted you can use the twrp file explorer to delete files to delete your screen lock so you can enter the phone
([emoji3590]09-09-18[emoji3590])
Click to expand...
Click to collapse
It's a Wiko Lenny 3, no Samsung. Sorry, I don't get it without punctuation.
Do I get it right, that
- If TWRP is available for my phone I can flash it, but I need to format all my data (no option)
- I can flash a "decrypt zip" to do a backup (what is it, where do I get it?)
- I can mount the system partition and can use the TWRP file explorer to delete files (how can I mount it?)
Thanks.
Problem solved, I could access all the data in the backup from the stock recovery!
This is how it worked:
In short: Make a backup of all user files in the stock recovery to a MicroSD card, put it to a Linux desktop, merge the backup files by skipping the first 512 bytes of each file, copy the merged file to Windows, extract it with 7zip.
In long:
1. I put an empty 32GB FAT32 formatted MicroSD card in the MicroSD slot of the Wiko Lenny 3
2. I used "Backup user data" from the Stock Recovery (see my first post). It took a few minutes until ~12GB of user data were written to the card. The stock recovery told me when it was done.
3. I copied all files (6 files, userdata_20190929_172118.backup to userdata_20190929_172118.backup5) to a Linux environment (Linux Mint 19.2)
4. The rest is explained in this video: https://www.youtube.com/watch?v=cY4cKKimEFU. If it is offline, I will explain here.
Do not use something like "cat userdata_yyyymmdd_HHMMSS.backup* > userdata_yyyymmdd_HHMMSS.backup" to merge all files into one because it will add the unnessesary 512 bytes header of all .backup files to the merged file. Instead copy all content except the first 512 bytes to another file and append the content from the other files to it, also by skipping the first 512 bytes.
5. This command will copy the content of the first file "userdata_20190929_172118.backup" to a new file "img.ext4":
Code:
dd if=userdata_20190929_172118.backup skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=img.ext4
6. Repeat using the same command to append the content of all other files to the file "img.ext4" by skipping the first 512 bytes. Be sure to increase the number of the source file extention in the command. Next one therefore is:
Code:
dd if=userdata_20190929_172118.backup1 skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=img.ext4
7. Repeat with all files
8. Copy the file "img.ext4" to a NTFS formatted USB stick or an external hard drive and go on with a Windows environment. The reason is that Linux will prevent opening some important folders
9. Install 7zip
10. Extract the file "img.ext4" with 7zip. If you are searching for pictures, you will find them in the subfolder "\media\0\DCIM\Camera"
Martin_2 said:
Problem solved, I could access all the data in the backup from the stock recovery!
This is how it worked:
In short: Make a backup of all user files in the stock recovery to a MicroSD card, put it to a Linux desktop, merge the backup files by skipping the first 512 bytes of each file, copy the merged file to Windows, extract it with 7zip.
In long:
1. I put an empty 32GB FAT32 formatted MicroSD card in the MicroSD slot of the Wiko Lenny 3
2. I used "Backup user data" from the Stock Recovery (see my first post). It took a few minutes until ~12GB of user data were written to the card. The stock recovery told me when it was done.
3. I copied all files (6 files, userdata_20190929_172118.backup to userdata_20190929_172118.backup5) to a Linux environment (Linux Mint 19.2)
4. The rest is explained in this video:
. If it is offline, I will explain here.
Do not use something like "cat userdata_yyyymmdd_HHMMSS.backup* > userdata_yyyymmdd_HHMMSS.backup" to merge all files into one because it will add the unnessesary 512 bytes header of all .backup files to the merged file. Instead copy all content except the first 512 bytes to another file and append the content from the other files to it, also by skipping the first 512 bytes.
5. This command will copy the content of the first file "userdata_20190929_172118.backup" to a new file "img.ext4":
Code:
dd if=userdata_20190929_172118.backup skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=img.ext4
6. Repeat using the same command to append the content of all other files to the file "img.ext4" by skipping the first 512 bytes. Be sure to increase the number of the source file extention in the command. Next one therefore is:
Code:
dd if=userdata_20190929_172118.backup1 skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=img.ext4
7. Repeat with all files
8. Copy the file "img.ext4" to a NTFS formatted USB stick or an external hard drive and go on with a Windows environment. The reason is that Linux will prevent opening some important folders
9. Install 7zip
10. Extract the file "img.ext4" with 7zip. If you are searching for pictures, you will find them in the subfolder "\media\0\DCIM\Camera"
Click to expand...
Click to collapse
I have the exact same problem with an older 2017 ALCATEL Pixi Unite A466BG. The code is lost and there's some photos we need off of it. I followed these instructions but when I got the img.ext4 file on Windows and tried extracting it with 7zip, I got an error that "ext4" is not an archive file.
I was hoping to see if anyone else had ideas of possibly why 7zip wasn't recognizing it? I had 3 backup files to merge (backup, backup1, backup2).

Categories

Resources