adb backup to windows laptop - Android Q&A, Help & Troubleshooting

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.

Related

need help: cannot restore nand backup

please help me I got in my phone custom recovery 1.2.1 but when I go to the backup/restore and select nand restore it asks me : Create Nandroid backup? ... and when i confirm it: it says: Performing backup............... and after some minutes: Error : Run "nandroid-mobile.sh" via adb!. help me! and one more thing when i try to connect my phone to pc via adb shell it cannot "find device"
xperiment914 said:
please help me I got in my phone custom recovery 1.2.1 but when I go to the backup/restore and select nand restore it asks me : Create Nandroid backup? ... and when i confirm it: it says: Performing backup............... and after some minutes: Error : Run "nandroid-mobile.sh" via adb!. help me! and one more thing when i try to connect my phone to pc via adb shell it cannot "find device"
Click to expand...
Click to collapse
the problem lies in the recovery itself 1.2.1 has backup prob so try 1.2 or earlier which works smooth for backup or rather clockwork just chk this thread http://forum.xda-developers.com/showthread.php?t=1038338
all files provided in 1 link easy to find just download and off you go
xperiment914 said:
please help me I got in my phone custom recovery 1.2.1 but when I go to the backup/restore and select nand restore it asks me : Create Nandroid backup? ... and when i confirm it: it says: Performing backup............... and after some minutes: Error : Run "nandroid-mobile.sh" via adb!. help me! and one more thing when i try to connect my phone to pc via adb shell it cannot "find device"
Click to expand...
Click to collapse
hi there.
what's happening is that you probably need to "re-wipe" your phone. that happened to me yesterday. The 'recovery menu' doesn't clean things very well on P500, so usually i don't rely on it and prefer to use ADB
So, connect the phone to the PC and follow the usual procedure to manually clean the /system folder. If you don't know exactly how it's done, search for "adb clean" or something like that.
On (very) short terms:
- get Android SDK (browse for it on google)
- boot your phone into recovery mode
- connect usb
- run 'adb start-server' or 'adb devices' (usually the 2nd does the start server automatically)
- run 'adb shell'
- run the command 'rm -rf /system/*
- run 'exit'
You can also clean your dalvik cache. I would strongly advise you, if you use the EXT4 partition, to clean it up too.
Since I use Linux, i'm not very aware of how it's done in Windows, but mainly, I backup the EXT4 partition into a folder in my computer, then i clean it up - i think you can clean it with adb too, by mounting it with 'mount -a' - it requires some linux basic commands and i guess you will find a better tutorial around.
Thank you clockwork mode Works perfectly
Sent from my LG-P500 using XDA App

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?

Need help with ADB Backup

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.

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.

Question adb backup help or alternatives

I have rooted my a52 5g with Magisk. Now I'm trying to make a backup through "adb backup". adb spits this line: "adbd cannot run as root in production builds".
I then change in "/system/build.props" "ro.debuggable=1"
Now i get from adb:
restarting adbd as root
timeout expired while waiting for device
I then type adb devices, and no devices are listed and the device does not show up under device manager in win10.
Also if i open developer options in android menu, it crashes.
And when i change the "ro.debuggable=1" back to "0" developer options works again.
Any idea what is causing this?
And is there another way of backing up the whole system?
I rly just wanted to back it up before i ran the debloater app.

Categories

Resources