Adb backup not backing up (Nougat) - HTC 10 Questions & Answers

I'm trying to back up my phone with adb because rooting will have to involve wiping. I've tried backing up with
Code:
adb backup -apk -shared -all -f backup.ab
and similar commands (noapk, noshared...), but whatever I do I can't get a backup bigger than about 1.5GB. This is a problem as my whole 32GB internal memory is almost full, and it's not just files, one of my apps alone shows up as using 2.5GB storage. How do I backup the whole phone?
I'm using adb.exe from platform tools from developer.android.com, my phone is Android 7.0, software 2.41.401.41
Edit: I've managed to open up the ab file and it's almost all just system stuff (com.htc.china.location.service, why the hell would I want to back that up??), and about a dozen of my apps (only 40MB of them), and for at least one the storage is missing.

Related

[Q] adb backup sizes?

Hi,
I'm just trying to backup my HOX to do a post-JB factory reset. I'm a bit concerned about the size of backup files I'm getting from adb - they seem very small!
adb backup -apk -all -nosystem -f backup.ab
for example, gives a backup.ab file of 253Mb. Can that be right? I understood those flags would include all non-system apps (not on the phone storage), not just their settings, and I'd have expected a lot more than that. Storage in Settings tells me I'm using 6.xxGb of "app storage" and about 4Gb of the 25Gb phone storage.
I know actual figures depend on personal usage, I just wanted to know whether people thought those seemed like correct ballpark figures.
adb would seem to be my only option real option since I don't want to root until I'm out of warranty.
Thanks,
Allan
That's only the system partition and it sounds about right.
To fully backup your phone you would want system, data, boot, and sdcard (not usually done as it's not erased for most things).
(Easiest way I know is to a backup like that using CWM or TWRP recoveries)
Thanks, that's reassuring that it doesn't seem anything's wrong with the backup.
I'd really rather not root to use any of the more powerful backup solutions but I recognise that means I'm more limited with what I can do.
I think I'll rebackup with adv to cover the last few days and then just go for it.
Thanks again!

[Q] adb restore doesn't restore everything

Hey,
I've created a backup with this command:
Code:
./adb backup -f fullbackup_2013-03-28.ab -apk -shared -all -system
The resulting file was 11 GB which was expected. After this I unlocked my bootloader. Restoring the backup hung two times. FIrst at com.android.chrome then at com.google.android.googlequicksearchbox. These two were also mentioned in Android issue report #34311 (sorry can't post link, I'm under 10 posts). Both times I rebooted my phone and restarted the restore. The third restore went through.
Now my problem is I'm missing a lot of data. My storage is only at 6 GB, that's at least 5 GB missing. My music folder for example was only partially restored. How can this be? Is there anything I can do?
I'm running 4.2.2 stock. My adb version is 1.0.31.
Update: I've now extracted the backup and I can say for sure that there are files in there that don't get restored.
Has nobody else experienced such a behavior?
AW: [Q] adb restore doesn't restore everything
yes i have done that with my nexus 7.. it seemed to restored my file structure but when i tried to open files nothing would happen... u really cant rely on that thing
Sent from my Galaxy Nexus using xda app-developers app
It's safer to use adb pull and adb push to backup and restore the sdcard, and only use adb backup for user apps and data. Also, it's not generally a good idea to backup and restore system apps and data. So -noshared and -nosystem for adb backup, and pull and push for the sdcard might work better. As for the data you already backed up, maybe Titanium Backup would help. I understand it can access adb .ab files, though I haven't used it for that myself.

internal storage on pc issue

Ok. I have a dilemma. My phones charging port is going bad, so I tried to fix it myself but screwed up the lcd. Now phone wont show anything on screen except green lines and touchscreen is not responsive. Most repair stores say they can't fix HTC phones OR they are too expensive to even be worth it to fix. I'm going to by a new one.
I need to backup my internal storage but I'm on Marshmallow Sense, which means I have to set the phone to file storage or transfer in the notification tray because it is defaulted to charge only when plugged into PC (thanks Google for adding that feature), I liked it when it showed my files on PC right when I plugged it in..
Since I can't see anything on my screen and it's unresponsive, I can't change it file transfer.
Is there any other way to set it to file transfer? Maybe ADB or any other way to back up internal storage?
MsEvyLynch said:
Ok. I have a dilemma. My phones charging port is going bad, so I tried to fix it myself but screwed up the lcd. Now phone wont show anything on screen except green lines and touchscreen is not responsive. Most repair stores say they can't fix HTC phones OR they are too expensive to even be worth it to fix. I'm going to by a new one.
I need to backup my internal storage but I'm on Marshmallow Sense, which means I have to set the phone to file storage or transfer in the notification tray because it is defaulted to charge only when plugged into PC (thanks Google for adding that feature), I liked it when it showed my files on PC right when I plugged it in..
Since I can't see anything on my screen and it's unresponsive, I can't change it file transfer.
Is there any other way to set it to file transfer? Maybe ADB or any other way to back up internal storage?
Click to expand...
Click to collapse
Yes, you can use ADB.
To backup, use the command adb backup -apk -shared -all -f C:\Users\NAME\backup.ab to backup. Replace "NAME" with your Windows username.
To restore, use the command adb restore C:\Users\NAME\backup.ab replacing "NAME" again, of course.
This will backup and restore all of your app data.
xunholyx said:
Yes, you can use ADB.
To backup, use the command adb backup -apk -shared -all -f C:\Users\NAME\backup.ab to backup. Replace "NAME" with your Windows username.
To restore, use the command adb restore C:\Users\NAME\backup.ab replacing "NAME" again, of course.
This will backup and restore all of your app data.
Click to expand...
Click to collapse
The command you typed, what is it backing up? Is it individual files or can I back up the whole internal sd as one.
You have TWRP ? Try this
Adb reboot recovery
It shows as default all memory when booted in there. At least here it does
MsEvyLynch said:
The command you typed, what is it backing up? Is it individual files or can I back up the whole internal sd as one.
Click to expand...
Click to collapse
It will backup all of your apps and app data.

Full Backup / Restore for Pixel?

All,
When I got my Verizon Pixel XL I did the sync with my Samsung S6 it was replacing and was surprised on how quickly it pulled almost everything over. The only parts that were missing were phone history and text messages which I then pulled over using the SMS Backup & Restore App.
I got everything setup and of course now realize I can root my Pixel using pixel8 but I have to unlock the bootloader which will wipe the device.
I have never had the best luck actually doing a full backup/restore without root on other devices like the S6 I had and the S5 before that. I usually loose something in the process.
I tried to do an ADB full backup with all data, system files and shared data: adb backup -f backups\backup-all-system-apk-shared-201611081225.ab -all -system -apk -shared it only came out to be 2.7GB. When I did the backup without shared data or system: adb backup -f backups\backup-all-nosystem-apk-noshared-201611081223.ab
-all -nosystem -apk -noshared it only came out to be about 720MB.
According to my storage, I have 35.15 GB used of 119GB. So even the full 2.7GB seems Quite low.
Does anyone have a method of Getting ALL Data from a non-rooted device, in my case all 35GB so I can restore the entire device and not loose anything once I unlock the bootloader?
I got it working after passing the -obb option too. Also, that size looks right; mine was 3.7GB. Most of your used storage is your read-only redundant OSes, recoveries, boot paraphernalia, etc., so most of that doesn't need to be backed up.
hth

Way to backup and restore from PC (no root)?

At the moment I dont' want to unlock,root the phone and install TWRP because I'm fine with stock Rom, but there's a way to backup to pc and restore from pc as we can with TWRP recovery?
Thanks
failax said:
At the moment I dont' want to unlock,root the phone and install TWRP because I'm fine with stock Rom, but there's a way to backup to pc and restore from pc as we can with TWRP recovery?
Thanks
Click to expand...
Click to collapse
ADB Backup
https://9to5google.com/2017/11/04/how-to-backup-restore-android-device-data-android-basics/
Google search link with 1.590.000 hits
My command line is:
Code:
adb backup -apk -shared -all -system -f C:/user/Pixel2XL/adb_backup/mmddyy.ab
This backs up all user apps and data, all system apps and data, and shared storage (internal SD card)
Pkt_Lnt said:
ADB Backup
https://9to5google.com/2017/11/04/how-to-backup-restore-android-device-data-android-basics/
Google search link with 1.590.000 hits
My command line is:
Code:
adb backup -apk -shared -all -system -f C:/user/Pixel2XL/adb_backup/mmddyy.ab
This backs up all user apps and data, all system apps and data, and shared storage (internal SD card)
Click to expand...
Click to collapse
Actually, you might want to include
Code:
-obb -keyvalue
*if you want to backup your games and any "apps that perform key/value backups"
What a great idea @Pkt_Lnt! I wish I realized this when I was planning to root and wanted to backup as best I could...
I'm purely just wondering, why include "-apk -shared" & "-system" when you have an option of "-all"? And isn't including "-f" meant to backup a specific file?
P.S. nevermind (on the -all & -system), after reading the help on the command, -all doesn't cover system apps...
Also, in terms of restoring.... would this method depend on root access for full restoration? does this method even backup settings and "personalizations" without root access (at least when backing up)?
simplepinoi177 said:
Actually, you might want to include
Code:
-obb -keyvalue
*if you want to backup your games and any "apps that perform key/value backups"
What a great idea @Pkt_Lnt! I wish I realized this when I was planning to root and wanted to backup as best I could...
I'm purely just wondering, why include "-apk -shared" & "-system" when you have an option of "-all"? And isn't including "-f" meant to backup a specific file?
P.S. nevermind (on the -all & -system), after reading the help on the command, -all doesn't cover system apps...
Also, in terms of restoring.... would this method depend on root access for full restoration? does this method even backup settings and "personalizations" without root access (at least when backing up)?
Click to expand...
Click to collapse
1 - I was trying to teach the poster above to fish, not trying to do the fishing for him. That said, I'm not a gamer, that "-obb" is not relevant to me.
2 - backup -f file Write an archive of the device's data to file.
This Reference
I do not see your "-keyvalue" in that ADB Command Reference doc, you might want to verify that before using it.
This is my actual command line from today. I'm on Linux, so I tried to make this easier for the Win crowd, knowing the tilde_backslash_path would throw 99% of those who might read this for a loop!
Code:
[email protected] ~ $ adb backup -apk -shared -all -system -f ~/Pixel2XL_adb_backup/backup05172018.ab
3 - ADB commands to not require root. Restore has always worked for me, and as you might guess, I have many "adb grant permissions" in use. :good:
For the rest of your questions, sorry I don't have time to do that research for you. All I use is the This Reference above, if that does not provide what you are asking, try this.
Pkt_Lnt said:
1 - I was trying to teach the poster above to fish, not trying to do the fishing for him. That said, I'm not a gamer, that "-obb" is not relevant to me.
2 - backup -f file Write an archive of the device's data to file.
This Reference
I do not see your "-keyvalue" in that ADB Command Reference doc, you might want to verify that before using it.
This is my actual command line from today. I'm on Linux, so I tried to make this easier for the Win crowd, knowing the tilde_backslash_path would throw 99% of those who might read this for a loop!
Code:
[email protected] ~ $ adb backup -apk -shared -all -system -f ~/Pixel2XL_adb_backup/backup05172018.ab
3 - ADB commands to not require root. Restore has always worked for me, and as you might guess, I have many "adb grant permissions" in use. :good:
For the rest of your questions, sorry I don't have time to do that research for you. All I use is the This Reference above, if that does not provide what you are asking, try this.
Click to expand...
Click to collapse
Cool...thanks for answering what you could...I was merely curious; I didn't mean/intend/imply that you do the research for me or anything. Yea, I know absolutely nothing about Linux and it's environment; so I/we appreciate you converting it to the "windows crowd" as well as "spelling it out" for me in the format you wrote it all out in your post. I, myself, have root and use TWRP for the backups...I was just trying to expand the knowledge...
Thanks again!

Categories

Resources