using bmgr to restart Play store app restore - General Questions and Answers

I was reading about this command and was curious as to the "coding" to use it. The other day I was restoring a phone and had to interrupt the Play store restore of my apps.
Can this command be used to restart the restore of apps from Play store? If so, what would be steps or "coding"?

You should be able to complete (restart) the restore process. You can do it using ADB or Terminal (if you have it installed and your phone is rooted).
I'm assuming you know how to run ADB commands.
Code:
adb shell
bmgr list sets
bmgr restore <tokenID from the previous command>
If there are multiple backup sets listed, you can find out the one that was used to start the restore process on your phone using the following command:
Code:
dumpsys backup | grep Ancestral:

Related

ADB backup AT&T One X stuck

So i was attempting to back up my phone and read a few guides on how to use ADB to do so. I installed ADB using this guide in this thread http://forum.xda-developers.com/showthread.php?t=1684382&highlight=how+to+flash+roms and then used the following text in command line to start the back up.
C:\android-sdk-windows\platform-tools>adb devices
List of devices attached
HT24WW303716 device
C:\android-sdk-windows\platform-tools>adb backup -apk -shared -all -f C:\backup7
142012.ab
Now unlock your device and confirm the backup operation.
Now i understand that this could take "several minutes" as explained by the guide in the same thread http://forum.xda-developers.com/showthread.php?t=1684382&highlight=how+to+flash+roms, however my phone has been stuck on com.android.sharedstoragebackup for over 45 minutes now is this normal or did something go wrong?

What does "adb backup" actually do?

Hey everyone,
I was asking myself what the "adb backup" command will actually perform on the device and more important: is it possible to run those same commands on a device shell directly (from Terminal Emulator for example).
Goddchen
adb help
From the "adb help":
Code:
adb backup [-f <file>] [-apk|-noapk] [-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.)
(-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.)
Intuition would lead me to believe that this backs up your application directories (the installed directory). You can include the application packages, system packages with the system/nosystem flags, and possibly your data in your /sdcard/ directory as well.
hm okay, let me rephrase my question:
Was commands does the adb backup command execute the create the backup and what commands does the adb restore command execute to restore the backup?
Is it possible to execute those commands on a device's shell without the use of adb...
And maybe: Is it possible in any way to make a adb connection to the local device?
I get the impression that you're looking for the inner workings of adb backup to see if you can integrate it into some scripts.
That being said, I came across something that might help you out. I skimmed over it and it seems to give a low level overview of the adb backup process. I hope that helps.
android.stackexchange.com/questions/23357/is-there-a-way-to-look-inside-and-modify-an-adb-backup-created-file
Sent from my Nexus 4 using xda premium
qdev said:
I get the impression that you're looking for the inner workings of adb backup to see if you can integrate it into some scripts.
That being said, I came across something that might help you out. I skimmed over it and it seems to give a low level overview of the adb backup process. I hope that helps.
android.stackexchange.com/questions/23357/is-there-a-way-to-look-inside-and-modify-an-adb-backup-created-file
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
that is some awesome background info
Unfortunately it doesn't take me closer to my goal. I don't think that one can launch a backup from a shell (or app), right? The backup only seems to be able to be triggered by adb (the adb backup command). I don't see any other way of starting a backup
Is there any possible way to create a adb connection to the local device?

ADB backup incomplete

In the aim of disabling encryption on my stock Nexus 5 I had to wipe the device. To not lose my data I researched backups and I came across the ADB method. I did several updates using different commands as I was never sure if the backup completed. The command did return however (i.e. the cursor appeared on CMD).
I ran the following:
Code:
adb backup -apk -shared -all -f C:\backup\backup.ab
Code:
adb backup -apk -shared -all -nosystem -f C:\backup\backup.ab
The end result is me having 4 backup files in the 2.8GB to 2.9GB range.
After trying ADB restore on two of them, most of my applications are not restored. I can live with that, but I would prefer if there is a way to restore my whatsapp data.
To try and diagnose the problem ibought Titanium Backup Pro to use their Extract from ADB backup option. That way I could tell what applications made it through. I unpacked then repacked the .ab file to remove the encryption by following this guide. Once I put the .ab on my phone, Titanium Backup said the backup file isn't supported.
Any thoughts ? I'm working on Windows 10 but I also dual boot with Ubuntu.
Hi
Try using the <packages...> tag
http://forum.xda-developers.com/google-nexus-5/general/guide-backup-data-root-t2824790

Temporary root without losing data for full backup using Swift Backup?

Hello.
I transitioned from my S7 to a newer one.
I want to do a full backup of apps but now possible without root. My newer one is rooted, my S7 not.
I tried very shady methods like Kingroot and Kingoroot, no success. I know they aren't recommended at all ,spyware and tons of crap.
I want to root my S7 without losing data. Is it possible?
After that, I will reflash and fix a bit my venerable S7 for nostalgic and secondary reasons. It's showing it's age but I like it.
You can backup your data without root with ADB. Download ADB tools and use these commands:
1. This will backup all your app data at the destination folder, i.e. the folder you're using to execute adb commands. adb backup -f all -all -apk -nosystem
2. This will backup all your apps at the destination folder,
Bash:
for APP in $(adb shell pm list packages -3 -f)do
adb pull $( echo ${APP} | sed "s/^package://" | sed "s/base.apk=/base.apk /").apk
done
To restore the backup open CMD in the backup folder and use these commands:
1. To install backed up apk, adb install application.apk
2. To install backed up data, adb restore application.backup
Thanks a lot!

Countless "Unfortunately com.android.XXX Has Stopped"

Hello. Please forgive my bad English. My Asus ZE500KL phone with Android 6, almost died. I have collected various things in it, phones, notes, passwords... and I had the stupidity of not having any backup. Sometimes it starts, but it throws up countless signs like "Unfortunately com.android.XXX Has Stopped". To do anything with the phone I have to be able to close them and I have very little time, it can be used and restarted in seconds. It behaves similarly in safe mode. Otherwise, it enters fastboot mode and adb, but I don't know how it got stuck there. Any ideas what I can do? A week ago I installed "SWAP no root", could it be from that?
Do a LOGCAT to get the very reason why you get this notification.
logcat is first thing you should do. you can redirect > into file and upload here
Code:
adb logcat '*:W' -b all > logcat.txt
try to uninstall some recent apps from adb maybe it stabilizes. the -k flag preserves app data
Code:
adb shell 'pm list packages -e'
adb shell 'pm uninstall --user 0 -k <pkgname>'
if you don't close any of that pop-up is phone rebooting anyway? if stable enough you can do backup and pull files (confirm blank no password)
Code:
adb pull -a /sdcard
adb backup -apk -shared -all
jwoegerbauer said:
Do a LOGCAT to get the very reason why you get this notification.
Click to expand...
Click to collapse
E:\platform-tools>adb devices
List of devices attached
G6AZCY00W177EUE recovery
E:\platform-tools>adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
E:\platform-tools>adb logcat
adb server version (32) doesn't match this client (41); killing...
* daemon started successfully
- waiting for device -
* daemon still not running
error: cannot connect to daemon at tcp:5037: cannot connect to 127.0.0.1:5037: N
o connection could be made because the target machine actively refused it. (1006
1)
aIecxs said:
logcat is first thing you should do. you can redirect > into file and upload here
Code:
adb logcat '*:W' -b all > logcat.txt
try to uninstall some recent apps from adb maybe it stabilizes. the -k flag preserves app data
Code:
adb shell 'pm list packages -e'
adb shell 'pm uninstall --user 0 -k <pkgname>'
if you don't close any of that pop-up is phone rebooting anyway? if stable enough you can do backup and pull files (confirm blank no password)
Code:
adb pull -a /sdcard
adb backup -apk -shared -all
Click to expand...
Click to collapse
logcat.txt is empty
do this in android, not recovery
aIecxs said:
do this in android, not recovery
Click to expand...
Click to collapse
If I to load Android, the phone works for 20-30 seconds maximum and when I plug in the USB cable, it restarts immediately.
let usb plugged and adb logcat waiting while phone boots

Categories

Resources