ADB Backup on 4.2.2 - Xperia Tablet Z General

So I was able to do a full adb backup when I was on 4.1.2 before I updated to 4.2.2.. I wanted to do another full adb backup again on 4.2.2 before putting a recovery or custom rom on my device so it would be easy to restore back to my completely stock experience (with root) if I choose. But for some reason after letting it run all the way through (I let it run overnight since it takes so long) the backup is nowhere to be found which leads me to believe it failed somewhere along the way, but no errors are reported. Has anybody had this issue or have any advice on what may be going on? I've tried doing:
Adb backup -all
Adb backup -all C:\Users\Wyth\Desktop
Adb backup -all G:\ (external HDD)
Adb backup -all G:\xtzbackup (in case adb backup had some sort of bug saving to the root of the drive)
If anybody has any help or alternative solutions to creating a full system backup I'd appreciate it! Thanks in advance!

If you are going to supply a path and file name, don't forget the -f switch

dph3055 said:
If you are going to supply a path and file name, don't forget the -f switch
Click to expand...
Click to collapse
Thanks, that was absolutely the issue. I guess I did that the first time around but forgot the second. I ended up making the backup and then unlocking the bootloader. Unfortunately I forgot that it would completely wipe the internal storage rather than just a factory reset, so I lost my titanium backups. Tried to do the adb restore, and every time after the first app it would just reboot the device. After trying it many times I ended up using the adb extractor tool to create a tar from the backup. Apparently however the backup was no good because when extracting the tar after getting to a certain part every time it came up with unexpected end of archive. But I at least got most of the titanium backup folder out. Tried copying that to internal storage and it was permission denied. Copied it to external sd, and then on the tablet transferred it to internal storage. Then every time I restored any of the data, when I rebooted the tablet it would go into bootloops. After many ftf flashes and time wasted copying things back and forth all over the place I finally am basically just resigning to starting over. Boot into CWM and made a backup, and find that it makes the clockwork mod backup folder in data/media rather than the proper place in data/media/0 or even data/media/legacy. The option to backup to external sdcard also doesn't work, as it refuses to mount sdcard or external-sdcard. Needless to say the last 24 hours or so has been massive headaches. Is there a newer version of CWM for the tablet than 6.0.3.2? It seems pretty buggy and hard to believe that it is what everyone has been using as the button combination to reboot to recovery doesn't even work.
Btw, I'm trying to do this on the stock sony 4.2.2 firmware for sgp312.
Using kernel and recovery from here:
http://forum.xda-developers.com/showthread.php?t=2433466
with ftf from here:
http://forum.xda-developers.com/showthread.php?t=2424550

Related

extract nandroid backups?

I flashed my phone to JF 1.5 and in the process some how managed to screw up my sd card and lost all my apps. i did do a nandroid backup of jf 1.41 so i ahve those img files. I tried to restore to that to recover everything but it wont boot past the g1 logo. I tried downgrading firmware to 1.43 (couldnt find 1.41) and using the same restore for nandroid and still wouldnt boot. I also tried jsut applying the user data img to see if i could jsut grab that and it fialed on both firmware revisions 1.5 , 1.43.
In the end im stuck with a backup i cant use, the only thing i need off of it is the apps. I read that you can use the emulator to mount it but i couldnt figure that out. I also looked at yaffs extractor from the google code site but i wasnt quite sure how to compile/run it.
Anyone have a simple solution or a complex one i can follow to getting my apps out?
did you follow this?
http://forum.xda-developers.com/showpost.php?p=3311708&postcount=2
darkrangr said:
I also looked at yaffs extractor from the google code site but i wasnt quite sure how to compile/run it.
Click to expand...
Click to collapse
You go into the source directory, type "gcc -o unyaffs unyaffs.c", then you (create and) go to some directory where you want to extract the contents ("mkdir ~/extract") "cd ~/extract", and finally you extract the image "/path/to/unyaffs /path/to/data.img".
I tried the standard nandroid restore and it failed.
Trying the yaffs thing now and i got an error.
I placed the yaffs files all in a folder on the sdcard and put the img in that folder as well.
I open the terminal on the phone and did cd /sdcard/nan nan being the directory i made
I then tried to run that command "gcc -o unyaffs unyaffs.c" and i get gcc not found. what did i do wrong?
Unless your backup was corrupted, flashing the backup should have been fine.
Code:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash userdata data.img
You said it failed - what error did it give? Did it say it couldn't find the command? Be sure you're running these commands on your PC with your G1 connected via USB, the correct drivers are loaded, and you have the fastboot program.
As for using unyaffs - I don't think you understand what you have to do to use it. You have to compile it on your PC...all you get is the source code. I haven't looked on the google code site, but I would imagine there isn't a version for windows.
EDIT: After reading your original post for a second time, I have to ask: if you screwed up your SD card and lost all of your apps, does that mean you were using Apps2SD? That's a bit of an important detail to leave out, if so. Unless I'm mistaken (and someone correct me if I'm wrong), your apps wouldn't be in the backup anyway, you're wasting your time. If your backup is just restoring the symlinks to the SD card and the SD card is screwed up, then no wonder it's hanging at boot. You'd need to wipe your SD card and start from scratch. I'd recommend doing that either way - would you rather have to redownload a few apps or continue having a bricked phone for days?
it didnt fail on the restore with fastboot, it loaded up everything fine and then when i rebooted it just sat on the boot screens forever and never loaded.
I am feeling nice so darkrangr if you want to PM your image files I will unyaffs it on my ubuntu box for you.
TemporalShadows said:
EDIT: After reading your original post for a second time, I have to ask: if you screwed up your SD card and lost all of your apps, does that mean you were using Apps2SD? That's a bit of an important detail to leave out, if so. Unless I'm mistaken (and someone correct me if I'm wrong), your apps wouldn't be in the backup anyway, you're wasting your time. If your backup is just restoring the symlinks to the SD card and the SD card is screwed up, then no wonder it's hanging at boot. You'd need to wipe your SD card and start from scratch. I'd recommend doing that either way - would you rather have to redownload a few apps or continue having a bricked phone for days?
Click to expand...
Click to collapse
no, my apps were installed normally. I am running curent jf firmwar enow while i try to get my stuff back, but some of the apps i had are no longer available or have converted to pay apps, plus i forgot a lot of apps i had.
http://forum.xda-developers.com/showthread.php?t=497034
In the other tools archive on this post you can find the unyaffs tool fully compiled. Just move your image to the same folder, drag and drop it on the unyaffs.exe and watch the files appear.
How about YOU DIDN'T INSTALL GCC!!!
darkrangr said:
I tried the standard nandroid restore and it failed.
Trying the yaffs thing now and i got an error.
I placed the yaffs files all in a folder on the sdcard and put the img in that folder as well.
I open the terminal on the phone and did cd /sdcard/nan nan being the directory i made
I then tried to run that command "gcc -o unyaffs unyaffs.c" and i get gcc not found. what did i do wrong?
Click to expand...
Click to collapse

Cannot see twrp back up files. Please help.

I recently switched over to team win recovery from cwm. I do like the ui and functionality way better then cwm. The problem I'm having is that I cannot access my back up files from my PC via USB. When I use the file browser that is built into twrp I can see the back up files in the twrp folder. When I plug my tablet into my PC via USB and open the twrp folder it is empty. Also when I open the twrp folder in es file browser it is empty there too. I would like to store the back up on my PC rather then on my tablet. Am I missing something? I was having this same problem with titanium with backed up apps so I upgraded to the paid version and uploaded my back ups to Google drive. After that I looked in the titanium back up folder again on my PC and all the sudden the files were there when before they were not. Its very frustrating. Please help.
Sent from my Nexus 7 using Xparent Green Tapatalk 2
I had this same problem with TWRP when I started using it a couple of days ago. I'm not rooted, just unlocked and using fastboot to load the recovery image temporarily to do backups. And when I went looking for the backup files to move to my computer, I couldn't find them. It turns out to be a permissions issue, with TWRP creating the files/directories owned and visible only to root. Not a problem if backing up to a FAT formatted sdcard, but it is a problem with the Nexus 7 since it honors permissions and ownership of all files on the "sdcard".
Two fixes that I know of, though I have only used one so far:
1) After you do the backup, open up the psuedo terminal in TWRP and manually change the permissions or owner of the files recursively. Just set the starting directory in TWRP to "/sdcard/TWRP" and do "chown -R media_rw.media_rw BACKUPS" to change the owner, or do "chmod -R og+rw BACKUPS" to change the permissions. You really only have to do one of those, and I went with the owner change. I was then able to see the backup when connected to my computer, copy the files off, and then delete them to avoid taking up space on the tablet.
2) Although I haven't tried it yet, supposedly you can backup and restore directly to/from a USB thumb drive connected via OTG cable. This would be the easiest method for me, since I want backup and restore capability but without actually storing anything on the Nexus 7. I'm going to try it with a backup tomorrow, but I read about someone doing just that thing for the same reasons in a comment on reddit.
Hopefully that answers your question and gives you a way around it.
Just wanted to bump and let you know that the permissions issue seems to be properly resolved in the 2.2.1.5 version of TWRP. If you update then you shouldn't have to go through any crap to get at the backups.
Additionally, I tried doing a backup to a USB drive and it worked perfectly, so if you prefer that route it is definitely an option. Just make sure that you have the USB drive connected before you boot into TWRP, otherwise it doesn't notice the drive.
mtrs said:
I had this same problem with TWRP when I started using it a couple of days ago. I'm not rooted, just unlocked and using fastboot to load the recovery image temporarily to do backups. And when I went looking for the backup files to move to my computer, I couldn't find them. It turns out to be a permissions issue, with TWRP creating the files/directories owned and visible only to root. Not a problem if backing up to a FAT formatted sdcard, but it is a problem with the Nexus 7 since it honors permissions and ownership of all files on the "sdcard".
Two fixes that I know of, though I have only used one so far:
1) After you do the backup, open up the psuedo terminal in TWRP and manually change the permissions or owner of the files recursively. Just set the starting directory in TWRP to "/sdcard/TWRP" and do "chown -R media_rw.media_rw BACKUPS" to change the owner, or do "chmod -R og+rw BACKUPS" to change the permissions. You really only have to do one of those, and I went with the owner change. I was then able to see the backup when connected to my computer, copy the files off, and then delete them to avoid taking up space on the tablet.
2) Although I haven't tried it yet, supposedly you can backup and restore directly to/from a USB thumb drive connected via OTG cable. This would be the easiest method for me, since I want backup and restore capability but without actually storing anything on the Nexus 7. I'm going to try it with a backup tomorrow, but I read about someone doing just that thing for the same reasons in a comment on reddit.
Hopefully that answers your question and gives you a way around it.
Click to expand...
Click to collapse
Thank you for the tip. I went everywhere yesterday...
Best buy, radio shack, staples etc looking for an otg cable and had no luck. I'm going to order one online today. I will give the other techniques a try today though. I'm not familiar with pseudo terminal but I'm gonna dig in anyway. That's the best thing about these gadgets for me is hacking in and figuring out. Thanks again for your help!
mtrs said:
Just wanted to bump and let you know that the permissions issue seems to be properly resolved in the 2.2.1.5 version of TWRP. If you update then you shouldn't have to go through any crap to get at the backups.
Additionally, I tried doing a backup to a USB drive and it worked perfectly, so if you prefer that route it is definitely an option. Just make sure that you have the USB drive connected before you boot into TWRP, otherwise it doesn't notice the drive.
Click to expand...
Click to collapse
When I first started out with twrp I flashed 2.2.1.2 via adw. That was before I knew about the goo option in the play store. I've since upgraded to 2.2.1.5 and still having the same issue.
Sent from my Nexus 7 using Xparent Green Tapatalk 2
norcal61 said:
When I first started out with twrp I flashed 2.2.1.2 via adw. That was before I knew about the goo option in the play store. I've since upgraded to 2.2.1.5 and still having the same issue.
Click to expand...
Click to collapse
I think that it only works with newly created files. So your existing backups will still have the wrong permissions, but new ones will be correct.
It's the old permissions on directory structure that will mess you up though. If you delete the "/sdcard/TWRP/BACKUPS" directory through TWRP, you will lose your existing backups, but then the next backup that you do should recreate the full directory path with the correct permissions on all of the files and directories. After that you shouldn't have any trouble accessing the backups. I tested that on mine just to be sure that it worked and it did fine for me.
If you don't want to lose your existing backups then just do the owner/permissions change that I mentioned before and you will have access to the old backups as well as having the new ones created with the correct permissions from the start.
mtrs said:
I think that it only works with newly created files. So your existing backups will still have the wrong permissions, but new ones will be correct.
It's the old permissions on directory structure that will mess you up though. If you delete the "/sdcard/TWRP/BACKUPS" directory through TWRP, you will lose your existing backups, but then the next backup that you do should recreate the full directory path with the correct permissions on all of the files and directories. After that you shouldn't have any trouble accessing the backups. I tested that on mine just to be sure that it worked and it did fine for me.
If you don't want to lose your existing backups then just do the owner/permissions change that I mentioned before and you will have access to the old backups as well as having the new ones created with the correct permissions from the start.
Click to expand...
Click to collapse
Cool, that totally makes sense. Can't believe I didn't try that all ready. I will definitely make a new back up with the latest version of twrp. I'm running the same ROM and kernel as the back up that I currently have stored. Gonna give it a shot right now and let you know how it works.
Sent from my Nexus 7 using Xparent Green Tapatalk 2
mtrs said:
I think that it only works with newly created files. So your existing backups will still have the wrong permissions, but new ones will be correct.
It's the old permissions on directory structure that will mess you up though. If you delete the "/sdcard/TWRP/BACKUPS" directory through TWRP, you will lose your existing backups, but then the next backup that you do should recreate the full directory path with the correct permissions on all of the files and directories. After that you shouldn't have any trouble accessing the backups. I tested that on mine just to be sure that it worked and it did fine for me.
If you don't want to lose your existing backups then just do the owner/permissions change that I mentioned before and you will have access to the old backups as well as having the new ones created with the correct permissions from the start.
Click to expand...
Click to collapse
No luck. That's weird. I deleted the folder SD/twrp/backups containing the back up, did another back up and still not visible on my PC or in es file browser.
norcal61 said:
No luck. That's weird. I deleted the folder SD/twrp/backups containing the back up, did another back up and still not visible on my PC or in es file browser.
Click to expand...
Click to collapse
Hmm, you may have to delete "/sdcard/TWRP" as well, and just let it recreate everything. I might have changed the permissions on it already on mine, which is why it worked for me just deleting BACKUPS. I'll double-check that when I get back home and make sure.
mtrs said:
Hmm, you may have to delete "/sdcard/TWRP" as well, and just let it recreate everything. I might have changed the permissions on it already on mine, which is why it worked for me just deleting BACKUPS. I'll double-check that when I get back home and make sure.
Click to expand...
Click to collapse
It worked! I deleted the twrp folder all together and it worked like a charm. I'm now able to see and move the backups to my PC. Thank you very much for your help. It is greatly appreciated!
Sent from my Nexus 7 using Xparent Green Tapatalk 2
Some path is :
/data/media/TWRP/BACKUPS/
You need copy to /sdcard/TWRP/BACKUPS and connect to pc will see it.
trungdtdev said:
Some path is :
/data/media/TWRP/BACKUPS/
You need copy to /sdcard/TWRP/BACKUPS and connect to pc will see it.
Click to expand...
Click to collapse
I had the same issue and tried searching for "TWRP" to locate every instance of that folder. Turns out that I had previous backups in:
/mnt/shell/emulated/TWRP/BACKUPS/
I am happy to report that I was able to delete several past and hidden backups and recovered over 9gb of space!

Unable to restore my phone

Hi
I did a backup with nexus 4 toolkit before rooting but now when I try to restore my backup it starts backing up but just 1 app and then reeboots without adding any of the other apps. Anyone know an alternate method or whats wrong?
c2h5oh2 said:
Hi
I did a backup with nexus 4 toolkit before rooting but now when I try to restore my backup it starts backing up but just 1 app and then reeboots without adding any of the other apps. Anyone know an alternate method or whats wrong?
Click to expand...
Click to collapse
thats reason # 84261 why you should never use a toolkit.
Well, whats done is done. It seems like it tries to recover some system file that causes a reebot. I will try to restore from recovery mode if the bootloader can restore .ab-files.
Failed to restore .ab file in bootloader. Does anyone have any idea how I can restore the .ab file?
Why would you want to go back to stock? You want to get back the apps you had?
I guess you will have to re-download them... This is what I did : I made a Titanium backup save for my apps, before rooting, and restored it, after rooting.
To restore .ab files install adb and open a command window (or a terminal on linux). Then navigate to the folder where the .ab file is or open the command window there. Connect your phone now powered on to your PC and be sure unknown sources and usb debugging are enabled
Now type
Code:
adb restore nameofyourbackup.ab
Unlock your device, confirm the restore and wait until it has finished
Sent from my Nexus 4 running Android 4.2.2
I shouldn't have used a toolkit :S
I'm having the same issue, I used the toolkit, created a backup from all apps (including system and data) in a .BAK, unlocked, rooted, and now I try to restore with the toolkit, the process triggers my phone's backup but then it restarts and nothing has been restored! I tried HOLO Backup as well, and I'm trying with the SDK method right now.
Is .BAK compatible with full backup? Is there any other way (other than ADB) to restore my info?
Thanks
Edit: Trying with SDK as command prompt didn't recognize adb as a valid command.
Edit: SDK did not work, I guess I just did the same in 3 different ways... any ideas?
Got it!
Titanium tools pro version has an ADB backup extraction. Move the .BAK file to your SD card folder, and then restore the extracted info

[Q] step by step guide from backup to flashing ROM?

I'm a complete beginner when it comes to rooting, flashing and so on. I've been using my Nexus 4 since the day it came out, and have always had it completely stock, never even rooted it or anything. I'm normally not too bad at stuff like this, but I've been googling how to do all of this and been reading some guides on here, and I'm just getting more and more confused.
My goal is to go from Stock Android 5.1.1 to the newest Cyanogenmod nightly, and to keep all my data. Now, how do i go about this?
I'm already stuck at the first step (or at least I think, that's the first step): Creating a backup of my current Stock phone. Apparently I need to create a NANDROID backup first, but I can't do it with a locked bootloader? And if i unlock the bootloader, my data will be wiped? This alone seems completely illogical to me, because how am I going to backup my device then? Is there no simple step by step guide for Nexus devices, that includes EVERYTHING, from backup to the final flashing of the ROM?
This is a good guide http://forum.xda-developers.com/showthread.php?t=2018179
I've seen it and it doesn't answer my question. How do I unlock the bootloader to create a backup, without wiping my device?
jb91 said:
I've seen it and it doesn't answer my question. How do I unlock the bootloader to create a backup, without wiping my device?
Click to expand...
Click to collapse
You can't unlock the bootloader without wiping the device. The only backup you will be able to make without an unlocked bootloader is copying your sdcard to your pc and use an app like helium to backup your apps and data. Just remember to copy that backup to your pc as well, otherwise it will be wiped.
theminikiller said:
You can't unlock the bootloader without wiping the device. The only backup you will be able to make without an unlocked bootloader is copying your sdcard to your pc and use an app like helium to backup your apps and data. Just remember to copy that backup to your pc as well, otherwise it will be wiped.
Click to expand...
Click to collapse
Thanks. Do you know this "Nexus Root Toolkit" program? I was able to create a backup file containing all apps with it, as well as extract a file with my contacts data from my Nexus 4. I'm guessing this should also include my SMS / WhatsApp messages and so on?
jb91 said:
Thanks. Do you know this "Nexus Root Toolkit" program? I was able to create a backup file containing all apps with it, as well as extract a file with my contacts data from my Nexus 4. I'm guessing this should also include my SMS / WhatsApp messages and so on?
Click to expand...
Click to collapse
Unfortunately I don't know much about that. You could skim through some of the thread or search to find out if someone else has asked that question and if not ask it there. That would probably be the easiest way to find out.
This is extremely confusing, I have no idea how people can say it is simple to put a custom ROM on a Nexus device. I am absolutely lost trying to back up everything. Is a NANDROID backup just a full backup of the phone? Am I not completely screwed if I can't create this? I have some random app files, extracted from a Root Toolkit, and a contacts file. I don't think that's enough to save my device in case anything goes wrong during flashing?
One of the sticky threads here mentions this right at the beginning:
Before you do anything EVER, you'll always have to backup your stuff, even if you don't feel like it, or your dog died (in which case I'm truly sorry), but, no matter what you're about to do, always have a recent backup sitting around.
There are many ways and things you can and will probably have to backup.
1. Backup your entire phone, by creating a Nandroid Backup.
As you saw in the 'Custom Recovery" picture above, you have a "Backup and Restore" option.
Click to expand...
Click to collapse
But it doesn't make any sense. "Before I do anything", I can't even create the NANDROID backup to begin with, because the bootloader is not unlocked by default, and unlocking it will wipe everything on the device. So I don't get how the first step to put a ROM on a phone is to create a NANDROID backup, because from my understanding, it is not possible to do. Also, my Nexus 4 did not come with a "custom recovery" installed and I have no idea how to put this on there (do i do this before or after the NANDROID backup?). I'm really starting to wonder how anyone actually understands these guides.
jb91 said:
This is extremely confusing, I have no idea how people can say it is simple to put a custom ROM on a Nexus device. I am absolutely lost trying to back up everything. Is a NANDROID backup just a full backup of the phone? Am I not completely screwed if I can't create this? I have some random app files, extracted from a Root Toolkit, and a contacts file. I don't think that's enough to save my device in case anything goes wrong during flashing?
One of the sticky threads here mentions this right at the beginning:
But it doesn't make any sense. "Before I do anything", I can't even create the NANDROID backup to begin with, because the bootloader is not unlocked by default, and unlocking it will wipe everything on the device. So I don't get how the first step to put a ROM on a phone is to create a NANDROID backup, because from my understanding, it is not possible to do. Also, my Nexus 4 did not come with a "custom recovery" installed and I have no idea how to put this on there (do i do this before or after the NANDROID backup?). I'm really starting to wonder how anyone actually understands these guides.
Click to expand...
Click to collapse
Following the link to the guide, I see this:
*****
Unlocking the Bootloader:
***NOTE***
This will perform a factory reset on your device. You will lose all applications. Even the data on your SD Card! I'd recommend making a Backup to your computer BEFORE performing this. There is a method for backing your data up, detailed HERE.
For the time being, there is a method available that will allow you to unlock your device (and root it) without losing your data.
For instructions, click HERE. Please note: this is a hack and isn't the "conventional" and "accepted" way of unlocking your bootloader on a nexus device. The wipe requirement is there for your safety, really, and I'm certain this will be patched in the upcoming releases.
*****
But you can always use adb directly from your pc to backup your entire device. How? adb --help
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default
is noobb.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
greg17477 said:
But you can always use adb directly from your pc to backup your entire device. How? adb --help
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default
is noobb.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
Click to expand...
Click to collapse
Is ADB this "Android Studio" that I had to install in the first step of this guide (Android SDK)? If so, I opened it but I have no clue how to get anywhere where i could enter code like this. This is what it looks like: http://i.imgur.com/zhujSKR.png
jb91 said:
Is ADB this "Android Studio" that I had to install in the first step of this guide (Android SDK)? If so, I opened it but I have no clue how to get anywhere where i could enter code like this. This is what it looks like: http://i.imgur.com/zhujSKR.png
Click to expand...
Click to collapse
Sorry, i can not help you , if you do not know the basic of basics Lots to read up for you.
cheers
Well ok, lets try it another way: i don't understand how to create a full backup, but i did backup some single apps to my PC using Nexus Root Toolkit (they're .ab files), for which i want to keep my data. I also manually backed up my mp3s and pictures / videos. Would i be fine just starting with the actual process (unlocking bootloader, install custom recovery and so on)?
After all, i should have the possibility to revert anything back for these apps at least, and the official Nexus 4 Stock Android files are available at Google. So, there's no real risk, even without a FULL backup of everything, correct?

How to do full system backup to PC?

Before I handing in my OnePlus 6T for repair, I want to create a full system backup and reset the phone to factory defaults. Afterwards, I want to restore the original state. My phone is rooted with Magisk.
How do I do a full system backup?
What I tried:
adb backup -apk -obb -shared -all -system: This finishes, but at 5.5GB, even if compressed, the backup file is suspiciously small. According to the settings app, my phone uses 55GB of storage, so ten times that!
OK, so I thought adb root needs to be run before. However, that doesn't work: adbd cannot run as root in production builds
So I installed the adb_root module. But now when I run the above backup command, then it simply quits. No backup is created.
feklee said:
Before I handing in my OnePlus 6T for repair, I want to create a full system backup and reset the phone to factory defaults. Afterwards, I want to restore the original state. My phone is rooted with Magisk.
How do I do a full system backup?
What I tried:
adb backup -apk -obb -shared -all -system: This finishes, but at 5.5GB, even if compressed, the backup file is suspiciously small. According to the settings app, my phone uses 55GB of storage, so ten times that!
OK, so I thought adb root needs to be run before. However, that doesn't work: adbd cannot run as root in production builds
So I installed the adb_root module. But now when I run the above backup command, then it simply quits. No backup is created.
Click to expand...
Click to collapse
Do you have TWRP on your device? If so, just backup everything with it and copy the TWRP backup folder elsewhere.
ALSO (with the help of PC) copy the /sdcard (emulated sdcard; media storage). TWRP itself does not do that.
Done.
The reinstall TWRP in your device and restore everything. And copy back /sdcard
By the way, this is not Magisk related. For more information, better ask in your device specific section.
wilsonhlacerda said:
Do you have TWRP on your device? If so, just backup everything with it and copy the TWRP backup folder elsewhere.
Click to expand...
Click to collapse
Thanks for pointing me in the right direction! Here's how I proceeded in the end:
Downloaded TWRP for my device.
Rebooted the phone into fastboot mode by pressing volume down plus the power button and following the menu displayed on the phone. Note the process of entering fastboot mode varies from phone to phone.
Connected the phone to the PC, then booted TWRP from the Windows command line (cmd.exe):
Code:
fastboot boot twrp-3.4.0-0-fajita.img
I installed fastboot as part of the Chocolatey package adb.
In TWRP, I entered my password, then selected Backup.
Backed up all partitions to internal storage. See also the TWRP FAQ: What should I back up in TWRP?
Note that not all partitions need to be backed up, and in fact, according to the TWRP FAQ, it may be a bad idea to restore certain partitions. Still, it doesn’t hurt to have the backup of all of them.
Not included is /data/media (internal storage). This needs to be backed up separately. See the TWRP FAQ: What is EXCLUDED from a TWRP backup?
With TWRP running, I connected the phone via USB to my PC. Then I moved the following folder to my PC, which contains the TWRP backup of the phone:
Code:
This PC\OnePlus A6013\Internal Storage\TWRP
This step is not strictly necessary as in the following step I did back up the entire internal storage. However, it makes the next step execute faster as less data needs to be copied. The next step does not give feedback about progress.
For backing up internal storage I decided on the method found in Tadej Janež’s article Backing up Android's /data/media (i.e. internal storage) using adb and TWRP. From the Windows command line I ran:
Code:
adb exec-out "tar --create data/media/0 2>/backup-errors.txt | gzip" >internal_storage.tar.gz
After completion, to check for errors, I ran (no errors):
Code:
adb shell cat /backup-errors.txt
To leave TWRP, I rebooted the phone. Note that it is not necessary to install TWRP.
Restoration still needs to be tested.
By the way, this is not Magisk related. For more information, better ask in your device specific section.
Click to expand...
Click to collapse
I thought there was a Magisk way of doing a full system backup, making use of root privileges. Now I know better.
you can also try Migrator of vr25.
{Mod Edit: TG link removed}
https://github.com/VR-25/migrator
Just use Migrate
End of story.....
datsoy said:
you can also try Migrator of vr25.
{Mod Edit: TG link removed}
https://github.com/VR-25/migrator
Click to expand...
Click to collapse
Thanks! This looks nice, but I already backed up with TWRP. The idea was to get a 1:1 binary backup, and the backup did work. However, I am running into issues during restore of the Data partition: Error 255 when trying to restore Data

Categories

Resources