Need help with ADB Backup - Android Q&A, Help & Troubleshooting

So, I was trying to get an ADB Backup for a friend. He has a non rooted Galaxy Note 9, and does not plan on rooting it. He wanted to know of any way of backing up all his apps+data. After some research I found out about adb backup. Now, we downloaded the universal adb drivers from clockworkmod, ran adb devices, detected the phone with adb authorized, and ran the following command:
adb backup "-apk -shared -all"
(Need double quotes on windows. Also, if I don't set -f and put file location, it creates a .ab file on its own in the current directory.)
The backup started on my phone, and it keeps getting stuck at "Shared Storage" I tried for individual apps too and even for them it gets stuck at shared storage.
Then I removed the -shared flag, and took a backup of VLC as a test, it was successful but there was no file created on the computer. I even tried setting a file location to see if that changes anything, but nothing happened. Please help!!
Also, if this method is dead, I would like to know of any better backup tools for non rooted users which backs up data as well.

kishore1998 said:
So, I was trying to get an ADB Backup for a friend. He has a non rooted Galaxy Note 9, and does not plan on rooting it. He wanted to know of any way of backing up all his apps+data. After some research I found out about adb backup. Now, we downloaded the universal adb drivers from clockworkmod, ran adb devices, detected the phone with adb authorized, and ran the following command:
adb backup "-apk -shared -all"
(Need double quotes on windows. Also, if I don't set -f and put file location, it creates a .ab file on its own in the current directory.)
The backup started on my phone, and it keeps getting stuck at "Shared Storage" I tried for individual apps too and even for them it gets stuck at shared storage.
Then I removed the -shared flag, and took a backup of VLC as a test, it was successful but there was no file created on the computer. I even tried setting a file location to see if that changes anything, but nothing happened. Please help!!
Also, if this method is dead, I would like to know of any better backup tools for non rooted users which backs up data as well.
Click to expand...
Click to collapse
I don't want any root solutions like titanium backup. I just want to know why it doesn't fully backup. Is it possible that google disabled this feature from android oreo onwards? Or is it because the drivers I installed was not correct? Please help.

Related

[RESOLVED] Screen Broken - Data Recovery?

I've got a droid razr; rooted, stock rom
I broke the screen accidentally and now the screen isn't showing anything and touch isn't working.
I'd like to recover all the data off my device, but since it's locked, it won't budge. Drives won't mount when I plug it into my PC.
I've got a previous backup which is a little older, but i'm interested in backing up the actual databases (texts, call logs, etc) and system data too, along with my images and personal data.
Is there any way I can perform a whole backup while the system is locked like this?
I've already searched the forum for previous threads with similar issues, but I couldn't find one with a viable solution.
Any help is appreciated, thanks in advance.
Partial Update
Hey all-
I've partially solved my problem.
I was able to get ADB working miraculously. I downloaded the Motorola Device Manager and installed it, also downloaded the Android SDK/Java SDK;
Using the sdk manager i installed the google usb drivers (im not sure it helped any way, but just in case)
after that I ran through the process of adb
Code:
adb kill-server
adb start-server
**plug in device**
adb wait-for-device
adb get-serialno
From there I was able to use "adb shell" and navigate around the file system; used su, went to /data/system/ and did "mv gesture.key gesture.key.bak"
I then restarted my phone and did a repeat of wait-for-device, and get-serialno just to verify the phone was connecting properly.
I then browsed to my computer and amazingly, the drives mounted, my sdcard, and sdcard-ext as removable drives and I was able to view the contents.
-------
So now, I'm stuck here with a device that's NOT locked, I can view my files, and I can navigate the file system.
My end goal is to be able to copy everything from /data/ to /etc/ /system/ /root/ /sdcard*/ /vendor/ /xbin/ and any other system file that's not available through the mounted drives.
I'll keep this thread updated, and if anybody has any help or clue on how I'd do this, it'd be greatly appreciated.
So far I've tried variations on "adb pull" using / as a root dir; trying to find a way to use the shell to invoke scp, ssh, or some other file transfer, but I get no network connection. While in the adb shell and doing any file operations, I get an error stating that it's a read-only file system as well.
Fixed
I just wanted to let you all know that I've resolved my problem.
Let me state the issue again.
- Screen and touch broke.
- Device locked with pattern
- Rooted
- ICS - Stock Verizon ROM
- USB Mode was UMC, not PTP/MTP
- USB Debugging enabled
I used ADB to delete /data/system/gesture.key and rebooted, effectively removing the device lock, and allowing drives & data on my SD cards to show up in explorer after a reboot of the phone.
After futzing around for a bit, I realized the phone was tied to my Google account, and I remotely installed "Droid VNC Server" (app name org.onaips.vnc)
From there I found a way to activate the VNC server through the ADB command line
Source: android.stackexchange.com/a/31957
Code:
Application located in
/data/data/org.onaips.vnc/files
With a root shell, run this
chmod 766 /data/data/org.onaips.vnc/files/androidvncserver
Then you can execute the vnc server from the command line
/data/data/org.onaips.vnc/files/androidvncserver
Run this to forward the port
adb.exe forward tcp:5901 tcp:5901
On your VNC client, connect to localhost:5901
From there I was able to get access to my home screen and pulled the notification drop down and changed from USB Mass Storage to Camera/Media Mode
Rebooted the phone, started the vnc server again, connected to it and moved some files around to my SD Card
In another adb shell as root, I was able to copy files from /data/data/ (or anywhere else I wanted) and write them to anywhere on /sdcard-ext/
From there in another command shell, I ran adb pull /sdcard-ext/datafolderfile
=========================================================================
I believe this to be the overall gist of things, though I ran into hiccups along the way, while I was messing around, I changed some permissions which caused my su executable to break and only be allowed to run shortly after booting the phone; and also because of the broken screen, something would cause the phone to reboot every so often, breaking my connections, backups, file transfers, and etc
There's also a cool option in adb
Run
"adb backup" and it'll give you all the switches, you'll have to confirm the backup on your phone, so be sure to be running VNC and confirm it, but adb backup should be able to grab everything you need. Like I said it didn't work for me because my phone would reboot;
I hope everybody that sees this can benefit from it
Annafunny said:
So did you extract your data from your Razr with adb finally?
Click to expand...
Click to collapse
This thread is really old (4 years)... and the answer was provided.
To avoid further issues, closed.

ADB Restore Help.

Hi there! I am here needing some help with restoring my phone (after using ADB backup on Windows). Let me explain, I first needed to back up my original phone due to the fact that I needed to get it repaired via the Motorola Repair and Exchange program. And so, made an ADB backup of the original phone using this command "adb backup -apk -shared -all -f backup-file.adb". However, once I received the replacement and initiated the restore, the phone did not back up anything, even though the adb backup file was well over 7 GB. Is there any way you can help me?

Pictures lost during transfer to SD Card

Hello everyone. I know other members have asked if it is possible to retrieve accidentally deleted pictures but I'm not sure if it will still be possible with my circumstances. I was running out of space on my phone so I decided to try to move a large amount of pictures from my internal memory to my sd card on my phone using my computer. Unfortunately like a dope I tried to cut and paste instead of copying the files. Needles to say I cut the files and then during the paste something went wrong and it was unsuccessful. Now the pics are not showing up on my internal storage any longer. Since I was using my computer to do the transfer will it still be possible to recover the pictures?
Ive already tried using fonepaw, diskdigger, digdeep, and jihosoft without any success. Most programs try to root the phone and are unsuccessful. One click root told me they could root the phone but they recommended I not do that because it will wipe data off the phone. They tried backing up the data first with a program called sunshine but that was unsuccessful.
So my main question is, am I just wasting my time or is there a good chance I can still recover the pictures? Thanks in advance.
I
cc1284 said:
Hello everyone. I know other members have asked if it is possible to retrieve accidentally deleted pictures but I'm not sure if it will still be possible with my circumstances. I was running out of space on my phone so I decided to try to move a large amount of pictures from my internal memory to my sd card on my phone using my computer. Unfortunately like a dope I tried to cut and paste instead of copying the files. Needles to say I cut the files and then during the paste something went wrong and it was unsuccessful. Now the pics are not showing up on my internal storage any longer. Since I was using my computer to do the transfer will it still be possible to recover the pictures?
Ive already tried using fonepaw, diskdigger, digdeep, and jihosoft without any success. Most programs try to root the phone and are unsuccessful. One click root told me they could root the phone but they recommended I not do that because it will wipe data off the phone. They tried backing up the data first with a program called sunshine but that was unsuccessful.
So my main question is, am I just wasting my time or is there a good chance I can still recover the pictures? Thanks in advance.
Click to expand...
Click to collapse
Use adb to backup your data, you may then root your phone.
FOR TAKING BACKUP:
Install Kaush universal adb driver and adb setup on your pc.
You can get adb command line tools from android.com and the driver from kaushikdatta.com
Install the driver first, once completed, begin adb installation.
Press n when adb setup asks you to install drivers.
Once adb installation completes, open command prompt as administrator.
Open file explorer and navigate to C:\adb
Enable USB debugging on your phone and connect it to pc using USB cable.
Press Shift+right click and select "Open command window here".
Type " adb devices " and press enter.
If it shows some device to be connected, only then proceed further.
Type "adb backup -apk -shared -all -f backup.ab" and press enter.
Your phone will ask for your approval.
Wait until the process completes.
FOR RESTORATION OF BACKUP:
Open the adb command window as stated above and type "adb restore backup.ab"

adb backup to windows laptop

The phone is an unrooted Moto G7 running android 9 (pie).
I'm trying to get an adb backup to my windows 10 laptop. I've done that successfully in the past but now when I enter
'adb backup -all'
In an administrator command prompt I get
'Now unlock your device and confirm thr backup operation '.
I recall seeing a screen asking me to allow the backup to proceed but this timr it is nowhere to be found. What to do?
I tried going to android settings but as you can see in the screenshot, I cannot watch control or the options are grayed out.
What am I doing wrong? Thank you.
maybeme2 said:
The phone is an unrooted Moto G7 running android 9 (pie).
I'm trying to get an adb backup to my windows 10 laptop. I've done that successfully in the past but now when I enter
'adb backup -all'
In an administrator command prompt I get
'Now unlock your device and confirm thr backup operation '.
I recall seeing a screen asking me to allow the backup to proceed but this timr it is nowhere to be found. What to do?
I tried going to android settings but as you can see in the screenshot, I cannot watch control or the options are grayed out.
What am I doing wrong? Thank you.
Click to expand...
Click to collapse
Nobody offered to help. So in case someone else is frustrated like me here is what worked for me. Quotations and -f.
Example:
adb backup "-apk -shared -all -f"
works. Note the 2 " and the -f
This also works
adb backup "-apk -shared -all -f E:\path\backup.ab"
I hope this helps someone else.

Unable to connect with adb

Hi
Just got my A3. I'm unable to connect with adb to restore my backup. I enabled Dev options and USB debugging and when plugged into USB I get P notification icon and USB debugging connected message in notification. However
adb devices
shows nothing is connected. I notice there is no pop up asking if I want to authorize this computer which is iirc normally what happens.
adb can see my blu g6 phone so that's working. When I connect the A3 as a storage device, with no USB debugging, I can transfer files ok, so USB is working. I have a fresh Android studio install which should have the right sdk. I tried
adb connect <ipaddress>
and got "no connection could be made because target machine actively refused it" I did not refuse, because nothing popped up.
Have rebooted both phone and PC (windows 7)
Any idea what's going on? Thanks
Sent from my G6 using Tapatalk
Follow up: okay I figured out I need to install adb driver because A3 shows up in yellow in device manager. But I can't find a driver that works. I googled xiaomi A3 adb driver and downloaded like five of them from different sites and none worked. When I point windows to the folder where I extracted the driver it says could not find driver for your device.
I'm going nuts. Can someone point to a working driver for Windows 7?
Sent from my G6 using Tapatalk
These always worked for me. If they are not automatically installed for the device, follow the instructions in the video.
https://forum.xda-developers.com/showthread.php?t=2588979
Thanks. I figured out where I went wrong.
Instead of using the "browser file on my computer" and point it to where the driver is, I have to choose "let me select from a list" then "all devices", then select the Android composite adb driver. At least this works on Windows 7.
---
So I restored my back up, I got the pop up to confirm restore my data, and it seemed to run through the restore and took a while, but nothing changed. None of my app data was restored. All apps are still in newly installed state.
It did restore the data in SD storage, so my download folder etc got restored, which I could've done just copying to and from my PC.
What I really want is all the app data restored so I don't have to log back into all the different services and do all the settings again.
I did the back up with
adb backup -all -apk -shared -f allbackup.ab
Shouldn't that have worked?
Sent from my G6 using Tapatalk
From what I remember adb restore does not install *.apk back. It only writes back system and data files. So if you wanna all the app data restored - reinstall all apps manually before and then do adb restore.
On Windows you can sort of semi-automate that process in command prompt:
for %f in (C:\<your pak folder location>\*.apk) do adb install "%f"
Make sure though apk don't have spaces in their names or adb will complain.
qwertysmerty said:
From what I remember adb restore does not install *.apk back. It only writes back system and data files. So if you wanna all the app data restored - reinstall all apps manually before and then do adb restore.
On Windows you can sort of semi-automate that process in command prompt:
for %f in (C:\<your pak folder location>\*.apk) do adb install "%f"
Make sure though apk don't have spaces in their names or adb will complain.
Click to expand...
Click to collapse
I looked at adb logcat and there were a bunch of errors. Looks like it did try to restore app data but failed. Google back up already installed the apks back (except for the ones I side loaded) so that wasn't the problem. It's the app data (settings, etc) that I was hoping to get back
Oh well I just spent an hour setting my apps up again. I hear Google has already deprecated adb backup. Android needs a good non root desktop back up solution, not the cloud backup where you're at the mercy of Google and the individual apps to decide what get backed up.

Categories

Resources