I'm trying to perform an ADB Backup so I can unlock my bootloader and load 5.1. Currently I'm on the US 5.0.2 soak with a XT1053 device. A backup using the -shared parameter will work, but only backs up the shared SD data. Trying to perform a backup with -noshared won't even start. Any help on this?
Related
I have a very decent working ROM at the moment (4.4.4 rooted xposed gravitybox etc.) and I'm not sure I can live with Lollipop without al those tweaks. So before upgrading to Lollipop (whenever that may be), I want to make a decent backup of my current ROM.
Normally I would do this with TWRP, but the backup doesn't seem to work at the moment. And there doesn't seem to be a properly working version of TWRP.
So how do I make a proper backup of my ROM?
Adb?
A confirmed working version of TWRP?
CWM?
Another?
Jeltel said:
I have a very decent working ROM at the moment (4.4.4 rooted xposed gravitybox etc.) and I'm not sure I can live with Lollipop without al those tweaks. So before upgrading to Lollipop (whenever that may be), I want to make a decent backup of my current ROM.
Normally I would do this with TWRP, but the backup doesn't seem to work at the moment. And there doesn't seem to be a properly working version of TWRP.
So how do I make a proper backup of my ROM?
Adb?
A confirmed working version of TWRP?
CWM?
Another?
Click to expand...
Click to collapse
You can use standard tools installed on the phone to dump your partitions. See here for a rundown. I'd recommend backing up /boot, /recovery, /system, /pds, /modem and /fsg.
Ah yes, that's what I was looking for. Thanks
When I restore the mentioned items, will I get back my old installation? Or should I backup more? i.e. userdata for example?
And how to restore all these items? (I know to flash the boot, recovery and system.img via adb).
Yeah, you'd need to backup the data partition too, if you want to keep settings and user data. Remember, dd produces a 1:1 copy of the partition... I prefer to backup personal data selectively. The quick way to do it is by using a backup app: Most use Titanium Backup, but I find Chainfire's Helium does the job well, too. The other way is to use the built-in 'backup' command directly to select a range of files to save (i.e. 'adb backup')...
The partition images can be restored from adb using the reverse version of the command you used to make to the backup, i.e. use dd but with the 'if' and 'of' parameters switched:
Code:
dd if=/path/to/source.img of=/path/to/block/device
Be careful though; if you write the wrong image to the wrong partition, you can damage -- or even hose -- your software environment.
In the case of most partitions, restoring images should be done whilst booted into recovery for safety reasons, rather than overwriting a filesystem whilst it is mounted and in use. If you have the stock recovery installed, you can temporarily boot into TWRP or CWM recovery from a recovery image stored on your computer (i.e. 'adb boot /path/to/recovery.img') and then enable adb from within the custom recovery environment. Then you just use 'adb shell', followed by the 'su' command to switch to the root user account.
For the same reason, you should write the recovery partition backup back to disk from adb within the normal android environment. Again, you must do this after switching to the root user account by issuing the 'su' comand.
Alternatively, you should be able to write all the images from fastboot mode (i.e. 'adb reboot lootloader'). For example:
Code:
adb fastboot flash recovery recovery.img
AFAIK, fastboot will accept standard images created with dd, but I have never tried it on a Moto G, so YMMV... Maybe someone else would care to comment on this?
TL;DR: Tried updating OS using flashable zip thru TWRP, didn't work so used fastboot method, got it working on stock but can't restore nandroid backup (not even /data partition), have app data that I need, what can I do?
Background
I picked up the Nexus 6 not too long ago and I soon decided to unlock the bootloader, install a custom recovery, and root it. Thanks to the info here on XDA, that was painless. A few weeks ago, I got a notification for an OTA update. Having read that OTA updates no longer work for modified /system partitions, I knew that I wouldn't be able to update it.
I ignored the update for a while until I finally decided to look into how I could make the update yesterday. I really didn't want to deal with setting up the device the way I like it again so I was hoping to find a method that didn't nuke the /data or /data/media partitions. I found what looked to be the easiest method which entailed flashing a zip from TWRP.
What I Did
I ran a nandroid backup before doing anything and naively figured that would be enough. Afterwards, I wiped the system and caches for what I thought would be "good measure", flashed the zip, and was surprised to see that TWRP was reporting no OS was installed. I was under the impression that the system partition was going to be overwritten.
To make it short, I tried restoring from the nandroid backup but it would fail at the system part with TWRP reporting something along the lines of 'Cannot restore System -- mounted read only'. I hopped on fastboot, flashed the images provided by Google, and was back on stock. I tried restoring the backup once again but to no avail. I even tried restoring just the data partition but that didn't go well either.
Much Regret Section
Now, I know I should have backed up the apps separately with something like Titanium Backup but I had a lapse in judgement and assumed I could just revert back if anything went wrong. Unfortunately, I have applications with data that I can't easily get back. I tried using Nandroid Manager to restore applications from the backup but, as with past experience with the app, not all data is recovered.
Is there anything that I could try to either revert back to that backup or at least get the applications in data back the way they were prior to updating?
Wow, I feel like a doofus. After quite some digging on Google and XDA, I found the remedial solution to my problem in this post. For simplicity's sake, here's a quote:
Nevermind, I finally figured it out. In TWRP under MOUNT you have to uncheck "make system partition read only". Now my restore is working.
Click to expand...
Click to collapse
If that isn't clear enough, he's referring to the first page/menu of TWRP which has the 'Mount' button that leads you to a page with a checkbox at the bottom that is ticked and makes the system partition read only.
EDIT: As it turns out, this was only my first problem. After trying to restore the backup, I receive the same error message that I got when I attempted to only recover /data. I get the following error: 'extractTarFork() process ended with ERROR: 255'. From what I gathered online, it looks like some file may have been modified? The only thing that I did to the backup was move it from the phone over to my computer before flashing the image. Other than that, Nandroid Manager I believe decompressed it. However, now I'm stumped and I'm not sure how to proceed here.
EDIT 2: This was likely due to Nandroid Manager decompressing the backup. Luckily, I still had the uncompressed copy on my computer. I restored the backup but the phone would get stuck loading. I tried flashing the older images that I had before updating and then restoring the backup but that didn't make a difference. Finally, I gave up and salvaged what I could from the backup using Titanium Backup.
Hi everyone,
I wanted to unlock the bootloader on my OP3T but I don't want to lose all the data. So I wondering if I could back my phone with the command,
adb backup -all -apk
and then unlock the bootloader and then restore the backup that I made. Are there any disadvantages to this? Will I lose out on updates? Will I lose any data? Anything else I should know?
I think you will in the end need root via adb to accomplish this. Imagine this, if without unlocking phone you can use adb to make a backup then anyone can do that(who have enough knowledge) and this can be a major security concern.
Soo I think it is not possible.
It is possible. As stated on Titanium Backup's webpage:
1. How to make your first backup WITHOUT root:
Before beginning, you need to setup your ADB and have your device detected. You must also running Android version 4.0 and above. Also, make sure you have a file manager installed. Our favorite is the ES File Explorer.
Connect your device and make sure its listed with the following command:
Code:
adb devices
Run a FULL backup with the following command:
Code:
adb backup -f FullBackup.ab -apk -all
This will create a “package” called “FullBackup.ab” on the current location in your command prompt. This is your backup package.
Now you can root your phone.
Once finished rooting, insert the “FullBackup.ab” package on your sdcard
Hit the menu button and look for “Extract from ADB backup” option. This will prompt you to search for the file. Use the file manager that you installed earlier and navigate to the directory and select the FullBackup.ab file.
Now restore like as if the backup was made with Titanium Backup. Don’t forget to make a fresh copy of the backup using Titanium Backup. You’re Done!
Click to expand...
Click to collapse
I made an ADB backup via TWRP of each partition (boot, system, data, cache) individually direct to my PC prior to flashing a new ROM. After flashing the new ROM, I realized I forgot to backup texts and wifi netwroks via Titanium Backup. I tried to restore each partition so I could go back and copy the texts and wifi networks but it didn't work. TWRP reported no OS installed and it didn't boot either. I did update the bootloader after I created the backup and am not sure if that's why it's failing.
Is there a way to extract the texts and wifi networks from the backed up file(s)? Do I need to flash a previous bootloader to get the backup to work?
Thanks
pongolo said:
I made an ADB backup via TWRP of each partition (boot, system, data, cache) individually direct to my PC prior to flashing a new ROM. After flashing the new ROM, I realized I forgot to backup texts and wifi netwroks via Titanium Backup. I tried to restore each partition so I could go back and copy the texts and wifi networks but it didn't work. TWRP reported no OS installed and it didn't boot either. I did update the bootloader after I created the backup and am not sure if that's why it's failing.
Is there a way to extract the texts and wifi networks from the backed up file(s)? Do I need to flash a previous bootloader to get the backup to work?
Thanks
Click to expand...
Click to collapse
I would say no but I'm drunk at the moment:laugh:. WiFi and text should be a part of data part of the backup. I see that you backup data so it should be there but I don't think you can do it the way you tried. Let's see what smarter people have to say.
pongolo said:
I made an ADB backup via TWRP of each partition (boot, system, data, cache) individually direct to my PC prior to flashing a new ROM. After flashing the new ROM, I realized I forgot to backup texts and wifi netwroks via Titanium Backup. I tried to restore each partition so I could go back and copy the texts and wifi networks but it didn't work. TWRP reported no OS installed and it didn't boot either. I did update the bootloader after I created the backup and am not sure if that's why it's failing.
Is there a way to extract the texts and wifi networks from the backed up file(s)? Do I need to flash a previous bootloader to get the backup to work?
Thanks
Click to expand...
Click to collapse
Nope, I've never heard of a way to extract anything from a TWRP backup file without restoring it. I've never had to flash a different bootloader to get a TWRP restore to work, even after the bootloader was upgraded by the new ROM I installed. I assume that the bootloader is restored when restoring the TWRP backup. How did you restore the backup? Did you restore the entire backup (all of the partitions) at the same time or try to do them one at a time? I've only had luck with restoring the entire backup at the same time.
alryder said:
Nope, I've never heard of a way to extract anything from a TWRP backup file without restoring it. I've never had to flash a different bootloader to get a TWRP restore to work, even after the bootloader was upgraded by the new ROM I installed. I assume that the bootloader is restored when restoring the TWRP backup. How did you restore the backup? Did you restore the entire backup (all of the partitions) at the same time or try to do them one at a time? I've only had luck with restoring the entire backup at the same time.
Click to expand...
Click to collapse
The first backup I made which had all the partitions in one file didn't seem to work properly as it did not copy the file locally to the PC. I tried it again but created a separate file for each partition which seemed to work so I have 4 files in total. I restored the files in this order: boot, system, data, cache. When it finished I got a message when exiting TWRP that there was no OS installed. I rebooted anyway and it failed.
Is there any way of restoring it to an emulator running on the PC?
pongolo said:
The first backup I made which had all the partitions in one file didn't seem to work properly as it did not copy the file locally to the PC. I tried it again but created a separate file for each partition which seemed to work so I have 4 files in total. I restored the files in this order: boot, system, data, cache. When it finished I got a message when exiting TWRP that there was no OS installed. I rebooted anyway and it failed.
Is there any way of restoring it to an emulator running on the PC?
Click to expand...
Click to collapse
It's likely too late for this now but I've backed up to and restored from a single file on my PC by following this guide quite a few times in the past without any issue. My thoughts are if the files won't restore to your phone they probably won't restore to an emulator either but I honestly have no experience with emulators.
Hi, I recently made an adb backup through twrp and now want to open the file with droid explorer. It asks for a password, when entering the one I had on the phone it doesn't open, I even tried restoring it through twrp -> didn't work, with booted phone it asked too for a password -> also didn't work. Do you guys know if twrp has a password which it sets automatically?
alryder said:
It's likely too late for this now but I've backed up to and restored from a single file on my PC by following this guide quite a few times in the past without any issue. My thoughts are if the files won't restore to your phone they probably won't restore to an emulator either but I honestly have no experience with emulators.
Click to expand...
Click to collapse
In the recovery terminal with the restored backup, delete "/data/system/locksettings.db". That should allow you to boot to system without a password. There is a benefit to removing PIN/pattern locks before making backups.
As there is no decryptable TWRP, it isn't as easy as before to bakcup the EFS partition. But doing it via Terminal isn't too difficult. I didn't find a good tutorial that isn't burried somewhere on the internet. And none for the 7T Pro (though the commands and partitions are the same on older OnePlus devices.
If you already know how to boot TWRP or you already have it, go to the second instructions list and skip the first one.
I am not responsible if anything goes wrong. You do this at your own risk!
Requirements:
- An unlocked bootloader
- Working adb and fastboot (e.g. Google's Platform Tools)
- Download a bootable TWRP
Instructions to boot TWRP:
- Connect your device via USB
- Go to Settings > Developer Settings > Enable Advanced Reboot Menu
- Hold down the power button and select "Bootloader"
- In the bootloader use (It won't modify anything, you simply boot into TWRP once and after a reboot it's "gone".)
Code:
fastboot boot NameOfTWRPImage.img
Instructions to backup EFS:
If TWRP has booted, type the following into your computers' terminal one after the other:
Code:
adb shell
dd if=/dev/block/sdf2 of=/tmp/modemst1.bin bs=2048
dd if=/dev/block/sdf3 of=/tmp/modemst2.bin bs=2048
exit
adb pull /tmp/modemst1.bin modemst1.bin
adb pull /tmp/modemst2.bin modemst2.bin
This will copy modemst files to the temporary folder on the phone (which can be accessed though the data is lost after a reboot) and "adb pull" copies them from the device to the user's profile folder on Windows or Mac. You have successfully backed up the EFS partition!
Please note that this could be performed with root permissions on a booted device. Though I always prefer backing up files with a non-booted system. Also this guide will work if you're not rooted.
Is it possible to backup all system and data so we dont have to setup everything in the device after a factory reset? I mean, that backup we all were used to in TWRP.
Best regards
lucfig said:
Is it possible to backup all system and data so we dont have to setup everything in the device after a factory reset? I mean, that backup we all were used to in TWRP.
Best regards
Click to expand...
Click to collapse
Unfortunately not. Backing up EFS doesn't require decryption as it's not stored on /data. Everything on /data can't be backed up afaik.
Also /vendor and /system can't be mounted as of now making a Nandroid backup impossible.
Macusercom said:
Unfortunately not. Backing up EFS doesn't require decryption as it's not stored on /data. Everything on /data can't be backed up afaik.
Also /vendor and /system can't be mounted as of now making a Nandroid backup impossible.
Click to expand...
Click to collapse
Thanks.
That is a shame. At least titanium backup still working great.
Enviado de meu HD1903 usando o Tapatalk
Macusercom, thank you for the guide!
Now how do we restore them? With the opposite dd command?
Or we can just flash them directly via fastboot?
Also, what is the full list of partitions which contain data unique to this specific device?
I mean all these EFS, persist, IMEI, screen/touch calibration data, all sensors factory calibration data, fingerprints, etc.
Is it only EFS + persist or there are more of them?