Nexus 6P - adb restore - no confirmation dialog - General Questions and Answers

Nexus 6P, stock ROM, not rooted, locked bootloader
I backed up my easteregg cats by using "adb backup -f cats.ab com.android.egg -system". Worked without a problem, so I assume that drivers (I think I used 15 seconds ADB) and settings (USB debugging, PTP) on both Windows 10 and Android are set up properly.
Now I tried to restore that backup by using "adb restore cats.ab". This results in the following message:
"Now unlock your device and confirm the restore operation."
But nothing happens on my phone. I tried to backup and restore some other packages, same result.
I already tried restarting both devices and that's pretty much all ideas I had.

tacc said:
Nexus 6P, stock ROM, not rooted, locked bootloader
I backed up my easteregg cats by using "adb backup -f cats.ab com.android.egg -system". Worked without a problem, so I assume that drivers (I think I used 15 seconds ADB) and settings (USB debugging, PTP) on both Windows 10 and Android are set up properly.
Now I tried to restore that backup by using "adb restore cats.ab". This results in the following message:
"Now unlock your device and confirm the restore operation."
But nothing happens on my phone. I tried to backup and restore some other packages, same result.
I already tried restarting both devices and that's pretty much all ideas I had.
Click to expand...
Click to collapse
Did you have a resolution to this? I am trying the same thing on a Oneplus 3T and having the same exact results. Restoring on an emulated device work fine.
[UPDATE] Issue for myself was with a conflicting version of ADB on my laptop which was old and not compliant with Android 7.1.1 . For the record, a restore using ADB 1.0.32 on Android 7.1.1 does not work; upgraded to ADB 1.0.39 and everything worked fine.

Related

adb (32bit Linux) -- "Now unlock your device ... " - but no prompt on phone

adb Android Debug Bridge version 1.0.32 Revision eac51f2bb6a8-android (On 32-bit Linux)
Xperia Z5 Compact E5823, Android 6.0.1, 32.2.A.0.224
Installed adb to explore my old (ST15i/Gingerbread) phone. Seems to work ok.
Thought would plug in new Z5 and make backup -
Enabled developer mode, usb debug enabled.
adb_usb.ini is ok
51-android-rules is ok
phone is recognised, adb device shows phone connected, can execute shell command etc.
but when I execute
Code:
adb backup --all
I get the following prompt
Code:
Now unlock your device and confirm the backup operation.
But no prompt appears on phone (or not at least in any obvious place)
have tried restarting adb daemon, rebooted linux, rebooted phone etc to no avail.
Searching via google hasn't thrown up much except two sites, one that says Z5 does not support adb backup while the other says it works perfectly.
Comments and suggestions welcome
Use helium app from play store for backup.
Adil Tariq said:
Use helium app from play store for backup.
Click to expand...
Click to collapse
Ok, but what I'm really looking for is to find out about this specific issue.
thanks

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.

Someone smashed my phone with a rock. (data recovery ?s)

Greetings et al,
Backstory: I climb large granite walls and my phone was left part way up and a party following found my phone and decided to smash the crap out of the screen. They left it on prominently displayed along a trail on a rock and someone else I knew found it and returned it to me.
Device: Google Pixel 3
Status: Screen smashed to bits, but I can power it on and see it in "adb devices" etc...
So it was this past Sunday that the scalawags smashed my phone. Saturday I had taken my daughter and son-in-law on their first ever large/multi-pitch rock climb, 600ft. plus. Unfortunately I had no downloaded the pictures of that event nor the videos.
* I don't know how to get this device in MTP mode so I can transfer the data w/o a screen
* I tried to shell to it and I get "error: insufficient permissions for devices"
* Does anybody have any suggestions on what path I should head down to attempt to pull the files off this thing?
-Thanks in bunches for any and all replies...
nemanator said:
Greetings et al,
Backstory: I climb large granite walls and my phone was left part way up and a party following found my phone and decided to smash the crap out of the screen. They left it on prominently displayed along a trail on a rock and someone else I knew found it and returned it to me.
Device: Google Pixel 3
Status: Screen smashed to bits, but I can power it on and see it in "adb devices" etc...
So it was this past Sunday that the scalawags smashed my phone. Saturday I had taken my daughter and son-in-law on their first ever large/multi-pitch rock climb, 600ft. plus. Unfortunately I had no downloaded the pictures of that event nor the videos.
* I don't know how to get this device in MTP mode so I can transfer the data w/o a screen
* I tried to shell to it and I get "error: insufficient permissions for devices"
* Does anybody have any suggestions on what path I should head down to attempt to pull the files off this thing?
-Thanks in bunches for any and all replies...
Click to expand...
Click to collapse
Since you don't have USB debugging enabled and can't swipe the screen to unlock the lockscreen, there aren't really any options for you other than replacing the screen or sending the device to a professional shop to see if they can retrieve the data from the hardware by pulling it directly from the chip.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
Since you don't have USB debugging enabled and can't swipe the screen to unlock the lockscreen, there aren't really any options for you other than replacing the screen or sending the device to a professional shop to see if they can retrieve the data from the hardware by pulling it directly from the chip.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
I do have USB debugging enabled.
nemanator said:
I do have USB debugging enabled.
Click to expand...
Click to collapse
Ok then, you might have an option. If there is a TWRP custom recovery for your specific model number, TWRP natively supports adb so it should work. You don't have to root but you can try flashing TWRP recovery on your device and then boot into TWRP then connect to PC and use adb with the "adb backup" command to backup all user data then extract the data that you want from the backup.
To find instructions for adb backup, do a google search for:
"ADB backup/restore"
Find the command to backup user data.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
Ok then, you might have an option. If there is a TWRP custom recovery for your specific model number, TWRP natively supports adb so it should work. You don't have to root but you can try flashing TWRP recovery on your device and then boot into TWRP then connect to PC and use adb with the "adb backup" command to backup all user data then extract the data that you want from the backup.
To find instructions for adb backup, do a google search for:
"ADB backup/restore"
Find the command to backup user data.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
I'm getting device unauthorized at this point so now adb doesn't work. I'm not sure what changed to cause that. It was working. I had/have twrp installed. I tried a "flashboot boot twrp.img". I had to temp boot like this when I was rooting this thing. The fastboot flash w/ twrp.img bricked the phone. Anyway, after a flashboot boot twrp.img. adb devices lists nothing. So either it's not booting twrp.img successfully or I'm missing something.
nemanator said:
I'm getting device unauthorized at this point so now adb doesn't work. I'm not sure what changed to cause that. It was working. I had/have twrp installed. I tried a "flashboot boot twrp.img". I had to temp boot like this when I was rooting this thing. The fastboot flash w/ twrp.img bricked the phone. Anyway, after a flashboot boot twrp.img. adb devices lists nothing. So either it's not booting twrp.img successfully or I'm missing something.
Click to expand...
Click to collapse
Ah, your bootloader is locked, that is probably why you previously had to boot a TWRP .img instead of flashing it. Now, I'm not sure it will boot anything. Try flashing a copy of stock recovery, then try the fastboot boot TWRP again.
Other than that, I think you might be at the end of your rope.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
Ah, your bootloader is locked, that is probably why you previously had to boot a TWRP .img instead of flashing it. Now, I'm not sure it will boot anything. Try flashing a copy of stock recovery, then try the fastboot boot TWRP again.
Other than that, I think you might be at the end of your rope.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
The device unauthorized was from the windows machine. I'm back on the linux box and adb can see the device again. I've tried oodles of ways of getting mtp enabled.
When in adb shell and trying to find my photos/videos, I'm getting funky filenames.
sargo:/storage/emulated/0 # ls
+dn0VjXCwXIGBTRlAAdSqA NKZ4osL+U6zJbQICkOBoOB VqEBnQxs1hu4ncv3woVfCB kmOAbyd,bVAJDnQSbomLyA wXQ6rmjvahUKbZQtHof35D
7CdpRTZ8PchPMx4DOUvlLD OuATvxF3HNScfmEIoaabiB Ya0QbX5aki6BstVDxMXi5LRPcRD nZETC6WByAa5h7jO2tDyqC
I didn't have much success with mtp when my phone was screen was operational but at least I could see and navigate to the DCIM folder. I'm not sure why adb shell is rendering the files as such.
nemanator said:
The device unauthorized was from the windows machine. I'm back on the linux box and adb can see the device again. I've tried oodles of ways of getting mtp enabled.
When in adb shell and trying to find my photos/videos, I'm getting funky filenames.
sargo:/storage/emulated/0 # ls
+dn0VjXCwXIGBTRlAAdSqA NKZ4osL+U6zJbQICkOBoOB VqEBnQxs1hu4ncv3woVfCB kmOAbyd,bVAJDnQSbomLyA wXQ6rmjvahUKbZQtHof35D
7CdpRTZ8PchPMx4DOUvlLD OuATvxF3HNScfmEIoaabiB Ya0QbX5aki6BstVDxMXi5LRPcRD nZETC6WByAa5h7jO2tDyqC
I didn't have much success with mtp when my phone was screen was operational but at least I could see and navigate to the DCIM folder. I'm not sure why adb shell is rendering the files as such.
Click to expand...
Click to collapse
If adb is working, try this:
https://stackoverflow.com/questions/54959259/enable-mtp-using-adb
Or this:
https://forum.xda-developers.com/showthread.php?t=2786395
Sent from my SM-S767VL using Tapatalk
Droidriven said:
If adb is working, try this:
https://stackoverflow.com/questions/54959259/enable-mtp-using-adb
Or this:
https://forum.xda-developers.com/showthread.php?t=2786395
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
Well I believe I mucked it up worse. I used the command line to do a set persistent mode to mtp and forgot to add adb e.g. "mtp,adb"
I forget the specific syntax but it worked. I'm in MTP mode persistently but I'm not able to mount the device from windows or linux and both operating systems see the device.
I have no idea how I'm going to get back to adb mode.
Anybody have a clue as to why I cannot see the proper file names in /storage/... ?
Does MTP mode do some magic and decrypt the files or something?
They file names looked to be encrypted when I was able to get at the file system with adb.

How do you backup data in a rooted phone using adb twrp?

I have a Galaxy Note 5 and I have important data in it. The screen is broken so I can't do anything, but I see recovery listed with a bunch of characters when I do
Code:
adb devices
. I can run some adb commands, adb root tells me I have root, I can do "id" inside of adb shell. Though, whenever I try running any twrp commands inside adb shell, it says "TWRP does not appear to be running. Waiting for TWRP to start."
What can I do here? I also see SAMSUNG Android under devices on this linux distro I'm running but I am getting an mtp error whenever I try connecting to it.
Sorry to hear that. If your Samsung Galaxy Note 5 can be detected by the computer via USB cable connecting, and the USB debugging on it is enabled, try Coolmuster Android Backup Manager. Its free backup function can help transfer data to the computer for backup directly. It's easy and safe. Good luck to you.
nazhai said:
Sorry to hear that. If your Samsung Galaxy Note 5 can be detected by the computer via USB cable connecting, and the USB debugging on it is enabled, try Coolmuster Android Backup Manager. Its free backup function can help transfer data to the computer for backup directly. It's easy and safe. Good luck to you.
Click to expand...
Click to collapse
It doesn't seem to be working, well at least not when the phone's in recovery. I'm not sure if I can boot it up normally.
tesiz22 said:
I have a Galaxy Note 5 and I have important data in it. The screen is broken so I can't do anything, but I see recovery listed with a bunch of characters when I do
Code:
adb devices
.
Click to expand...
Click to collapse
Indicates your phone boots into Recovery mode and not into Normal ( ADB ) mode.
To get rid off of booting into Recovery mode you run
Code:
adb devices
adb reboot
Once your phone boots into Normal mode you can pull out the data of interest: take note that adb pull has a size limit, hence probably
Code:
adb pull /sdcard C:\PULLED-DATA
doesn't work as expected if amount of data to pull is >= 2GB in total ( e.g. a stored movie file may have up to 8GB ). That means, to be on safe side, you have to pull the files of interest one-by-one.

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