ADB Backup - General Questions and Answers

I seem unable to use the adb backup command. Whenever I do it says: Now unlock your device and confirm the backup operation. Now my device is unlocked and it show nothing on the screen. And in the command prompt window nothing happens. I think I may have deleted an app on the phone that is required for adb backup. It is a Motorola XT907. If you could tell me what apps are required that would be extremely helpful.

Related

[Q] adb backup

I was looking through the adb options the other day and noticed the "adb backup" option. This seems to grab all the files you need for a full app backup (from the console! yay!). I can use adb shell just fine but adb backup doesn't work. It tells me it can't connect. Anyone know why that is?

Stuck at boot screen, need to authorize PC connection on Command Prompt

My genius self decided to delete the home launcher and replace it with Nova, and then I thought "Hey, why not make Nova a system app?" without giving second thought that maybe.... just maybe..... Nova would break and it would all go to crap. Lol.
My phone in question here is a LG Realm, rooted. I'm on Command Prompt, ready to push Picoo to it as a temp launcher, but I can't seem to do anything. Command Prompt acknowledges the device's existence, but upon giving commands to push the apk, reboot the phone into recovery, or just to reboot at all, it spits back the error message:
error: device unauthorized. Please check the confirmation dialog on your device.
I know of what confirmation dialog it's talking about, but I can't get to it because the phone freezes on the boot screen. How do I work around this? Can I force authorization?
Listen friend you don't need to reboot to recovery..
Just boot into fastboot then push whatever you want..
Hope it will help you...
If yes then click thanks
shyampandey said:
Listen friend you don't need to reboot to recovery..
Just boot into fastboot then push whatever you want..
Hope it will help you...
If yes then click thanks
Click to expand...
Click to collapse
Tried this, followed step by step instructions and it still says error:device unauthorized. Please check confirmation dialog on your device.
I launched minimal ADB and fast boot, typed adb devices (and it shows my device is connected and recognized), then entered the command line:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb install PICOO.apk
zombunny said:
Tried this, followed step by step instructions and it still says error:device unauthorized. Please check confirmation dialog on your device.
I launched minimal ADB and fast boot, typed adb devices (and it shows my device is connected and recognized), then entered the command line:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb install PICOO.apk
Click to expand...
Click to collapse
Bump? Anyone who can help?
Bump
Come on guys, I know someone out there has gotta know something about this. Even if this is a dumb question, don't assume I could just 'find my answer with a Google search'.... I've been searching all over. I would appreciate some help.

[Guide]Using Android-SDK ADB Backup Apps + progress + System with and/or without root

I am new to this site and read the posting rules nonetheless, information here is quite overwhelming. I hope that this is the appropriate location for this posting.
I have searched this site and other sites and have not found instructions (perhaps easier ones) on this topic, so I wanted post some basic ones here. Hope it helps.
(To my dismay, I couldn't figure out how to upload images and zip files from computer)
First you will need to install the Android/Windows SDK files
Install and unpack the android-sdk_r24.4.4.1-windows.zip (developer.android.com/studio/index.html#downloads) to your "C:"
I renamed my file by removing the "-windows" to make it easier for the PATH/Variables
After extraction, goto C:\Android-Sdk\SDK Manager.exe
Right click on the SDK Manager, Run as Administrator
Select all files under TOOLS
Check: Updates/New and Installed
Click Install Packages
Accept License
After done reboot
repeat steps, open SDK Manager
this time under TOOLS, uncheck installed Android SDK and check not installed and new version available
Click install packages
Accept License
After done reboot
Now Installing PATH to Windows 10
Click "Windows + E" (or Go to "this PC" folder)
On top, click on "System properties"
On the left, click on "Advanced System Settings"
Click on "Environment Variables"
Under System variables, click on "Path" and click "edit"
Click "New"
Type "C:\android-sdk\tools"
Click OK
Again under System Variables, click on "Path" and click "edit"
Click "New"
Type "C:\android-sdk\platform-tools
Click OK to all the rest
Press windows and type "CMD" and right click on it and select run as administrator
Type ADB
If installed correctly you will see all of the ADB command lines printed on your screen.
Your computer is ready to Communicate with your Android phone.
You will see the corresponding commands for backup and restore.
Backup and Restore Using ADB
ADB Backup
Make sure that your "USB dubbuging option" is on
Connect your phone phone/tablet using USB connection
Open your folder where you want you want to download your backup(s)
for example C:\My Phone Backup
Click the "File" option on top
Select the "Open command prompt as administrator"
Type "ADB Devices"
If an MTP message pops on your phone, click "OK"
Type adb backup -all -apk -f -backup.ab
Check your phone, it will give you to backup with or without the backup
Click either one
Once completed, you should have a quite a large backup.ab file in your destination folder
ADB Restore
Follow all of the steps above
Type adb restore backup.ab
--------------------------------------
For System Backup / Restore
Follow the above steps
Type adb backup -all -system -f -backup.ab
(make sure that the location of the system backup is different then the location of the apk backup)
As I mentioned before, If you Type ADB in CMD (Command Prompt in DOS) it will print the ADB shell command line.
I used to use TitaniumBackup to transfer apps and data from one Android phone to another when both devices are rooted. Recently I got a phone which currently does not have root access, so TitaniumBackup would not be useful. Most apps are not an issue, but I have trouble transferring a few apps and their data.
I was thinking to use adb to backup each app+data separately, and tried using the following command on the old (and rooted) phone:
adb backup -f <appname>.ab -apk <app_package_name>
but I got the following message:
Now unlock your device and confirm the backup operation.
The strange thing is that there is nothing there for me to accept when I unlock the phone or when I keep the phone unlocked.
Also when backing up all apps via "adb backup -apk -shared -all -f all.ab", I still get the same message: Now unlock your device and confirm the backup operation. And this happens on two computers I have tried so far. Very weird.
I just tried another phone, and had no problem with the adb backup command (I did see the confirmation request on the phone). So the problem seems to be with this particular phone (LG G2 with root).
Any suggestions as to how to handle the transfer? Any better alternatives?
Thanks, it worked for me.
atk9010 said:
ADB Backup
Make sure that your "USB dubbuging option" is on
Connect your phone phone/tablet using USB connection
Open your folder where you want you want to download your backup(s)
for example C:\My Phone Backup
Click the "File" option on top
Select the "Open command prompt as administrator"
Type "ADB Devices"
If an MTP message pops on your phone, click "OK"
Type adb backup -all -apk -f -backup.ab
Check your phone, it will give you to backup with or without the backup
Click either one
Once completed, you should have a quite a large backup.ab file in your destination folder
ADB Restore
Follow all of the steps above
Type adb restore backup.ab
--------------------------------------
For System Backup / Restore
Follow the above steps
Type adb backup -all -system -f -backup.ab
(make sure that the location of the system backup is different then the location of the apk backup)
As I mentioned before, If you Type ADB in CMD (Command Prompt in DOS) it will print the ADB shell command line.
Click to expand...
Click to collapse
I had to update the driver for my phone. Once done it worked for me. thanks.
This is perfect if you have a damaged touch screen. It's always good to have different backup methods for any unforeseeable future. However outaded, It's effective.

ADB Backup doesn't work

I'm using GM1917 with Renovate ICE and am unable to perform an ADB backup.
When I run the command on my computer, it prompts me to unlock my phone and confirm the back up, but nothing pops up on my phone. I'm thinking that I may have disabled something that does this in the OP7, but I have no clue what it would be. Any advice?
Have you enabled USB DEBUG?
What command are you running exactly
For anyone running into this, I got it to work by running the command
Code:
adb backup "-apk -shared -all -f backup.adb"
The quotation marks actually make a difference here. Leaving off quotations makes it so the app doesn't open.

Question Write to /data/... folder

I just switched to the Pixel 6a and have botched something with an app I use.
I have the app's files from the old phone, which were in /data/data/com... folder, and want to overwrite files on the new phone, with them.
I did "adb pull ..." on the old phone to get files on the computer and intended to do "adb push ..." to the new,
but I can't get it to connect to adb, in recovery mode.
The old phone had TWRP.
When I rebooted it into recovery and connected with cable to PC, "adb devices" would print:
List of devices attached
<device_ID> recovery
On the new one, when I go into recovery (stock), "adb devices" prints nothing.
When I select the sideload option, "adb devices" prints:
<device_ID> sideload
In this sideload mode, the pull, push, shell... adb commands don't work.
How can I get the Pixel 6a to connect to the computer so that "adb devices" prints:
<device_ID> recovery
?
Stock recovery isn't TWRP! You have no access to anything in your file system.
Svrmirac said:
How can I get the Pixel 6a to connect to the computer so that "adb devices" prints:
<device_ID> recovery
?
Click to expand...
Click to collapse
Use TWRP. Stock recovery has no adbd, only a minimal adbd with no features except a sideload option for signed update.zips
Thank you for the suggestion, @WoKoschekk, but I don't think I can do that.
If I understand correctly, I have to unlock the bootloader to load TWRP.
With an unlocked bootloader, my banking app stops working, which is unacceptable,
and re-locking it apparently wipes all data, which I just jumped through hoops overwriting.
I seem to be at an impasse, with the stock ROM/recovery.
Svrmirac said:
If I understand correctly, I have to unlock the bootloader to load TWRP.
With an unlocked bootloader, my banking app stops working, which is unacceptable,
and re-locking it apparently wipes all data, which I just jumped through hoops overwriting.
Click to expand...
Click to collapse
Yes, (un-)locking wipes all data. But that is exactly the reason why /data is inaccessible from recovery. To keep your data safe.
I don't even think TWRP is a thing for modern pixels
ctfrommn said:
I don't even think TWRP is a thing for modern pixels
Click to expand...
Click to collapse
No it isn't the closing thing you'll find to TWRP on Pixel 6A is the Lineage Recovery.
I would suggest using a tool like Titanium Backup. That allows the saving and reinstating of apps.
Booting a custom recovery requires unlocking the bootlader, which I don't want to do now.
Titanium backup requires rooting as well...
Thank you for the suggestions but I'm counting this one as lost.
You won't be able to directly write to the /data/data/com.your.packagename folder without root. The only options I can think of are
1. Using adb backup... backup your app data from your old phone and restore it to the new phone
Bash:
To backup
# adb backup -noapk com.your.packagename -f backup.adb
To restore
# adb restore backup.adb
2. If the app in question is debuggable, you can assume the application permission and access the folder
Bash:
# adb shell
bluejay:/ $ run-as com.your.packagename
bluejay:/ $ cp -r /storage/emulated/0/Download/backup/* /data/data/com.your.packagename

Categories

Resources