[Q] Problem backing up internal storage to PC through adb

Search This thread

fredcorp6

Senior Member
Apr 22, 2011
384
64
I smashed my screen and am now trying to backup my media data from my phone to my PC. I'm having to use adb due to the fact my screen is completely dead.

I have android toolkit working fine, and it is showing my device in the connected devices section.

However, when I select the option to backup my internal storage it comes up with the message "waiting for USB debugging to be activated" and does not move any further.

How can I fix this issue? Bear in mind I have no way of getting into the phone due to my screen being completely broken.

Thanks a lot!
 

fredcorp6

Senior Member
Apr 22, 2011
384
64
You're not unlocked? If that's the case, you're screwed. You need to have the bootloader unlocked. Sorry man

Sent from my Nexus 5 using XDA Free mobile app

That's not what it means, when you do that command with a lock screen you need to unlock the screen first as a security measure.

I have got an unlocked bootloader and cwm recovery installed.
 

jd1639

Inactive Recognized Contributor
Sep 21, 2012
16,833
5,404
Minnesota
That's not what it means, when you do that command with a lock screen you need to unlock the screen first as a security measure.

I have got an unlocked bootloader and cwm recovery installed.

You don't have to unlock the screen in recovery. Out should work for you

Use adb backup -apk -shared -all

Start with adb devices. Your device should be shown. What do you get when you do that?

Sent from my Nexus 5 using XDA Free mobile app
 
Last edited:

fredcorp6

Senior Member
Apr 22, 2011
384
64
You don't have to unlock the screen in recovery. Out should work for you

Use adb backup -apk -shared -all

Start with adb devices. Your device should be shown. What do you get when you do that?

Sent from my Nexus 5 using XDA Free mobile app

My device shows up as connected in adb, but when I enter that command I get "now unlock your device and confirm the backup operation".

This is what it looks like:

C:\Program Files (x86)\WugFresh Development\data>adb devices
List of devices attached
0073b690d60fb5cf recovery


C:\Program Files (x86)\WugFresh Development\data>adb backup -apk -shared -all
Now unlock your device and confirm the backup operation.

C:\Program Files (x86)\WugFresh Development\data>
 

jd1639

Inactive Recognized Contributor
Sep 21, 2012
16,833
5,404
Minnesota
My device shows up as connected in adb, but when I enter that command I get "now unlock your device and confirm the backup operation".

This is what it looks like:

C:\Program Files (x86)\WugFresh Development\data>adb devices
List of devices attached
0073b690d60fb5cf recovery


C:\Program Files (x86)\WugFresh Development\data>adb backup -apk -shared -all
Now unlock your device and confirm the backup operation.

C:\Program Files (x86)\WugFresh Development\data>

Adb can be a pita. Why don't you try this http://xdaforums.com/showthread.php?p=36499906

I haven't tried it but if it works well let me know

Sent from my Nexus 5 using XDA Free mobile app
 

jd1639

Inactive Recognized Contributor
Sep 21, 2012
16,833
5,404
Minnesota
Get the same message in that as well, doing my head in. It must be due to having a screen lock password... there must be a way round it.

Thanks for trying to help btw.

Ok, here's the problem. The now unlock your device.... is telling you the backup is done, not that you have to use a screen password. I got the same thing trying to do it in recovery and a 0 byte backup file. I could backup when normally booted. But that's not going to help you with the non-functional screen. Let me play around with it a little more and see if I can figure it out.

Edit, let's backup a little bit. Do you have a custom recovery or are you on stock? If it's custom which one?

Edit, sorry man, the best I can do is use adb pull. But that requires you to know specifically where and what the file name is. And you have to do that for every file you want. Seems adb backup only works if you're booted normally and not in recovery.

Sent from my Nexus 5 using XDA Free mobile app
 
Last edited:

fredcorp6

Senior Member
Apr 22, 2011
384
64
Ok, here's the problem. The now unlock your device.... is telling you the backup is done, not that you have to use a screen password. I got the same thing trying to do it in recovery and a 0 byte backup file. I could backup when normally booted. But that's not going to help you with the non-functional screen. Let me play around with it a little more and see if I can figure it out.

Edit, let's backup a little bit. Do you have a custom recovery or are you on stock? If it's custom which one?

Edit, sorry man, the best I can do is use adb pull. But that requires you to know specifically where and what the file name is. And you have to do that for every file you want. Seems adb backup only works if you're booted normally and not in recovery.

Sent from my Nexus 5 using XDA Free mobile app

Thanks for trying to help man!

I'm on cwm recovery.

I tried adb pull to copy all the stuff on my phone using the command "adb pull /" but the files copied did not include my pics or any personal media etc.

What would be the exact location of my pics inside the phone?? Also maybe it's not working because the sdcard is not mounted?


Sent from my iPhone using Tapatalk
 

jd1639

Inactive Recognized Contributor
Sep 21, 2012
16,833
5,404
Minnesota
Thanks for trying to help man!

I'm on cwm recovery.

I tried adb pull to copy all the stuff on my phone using the command "adb pull /" but the files copied did not include my pics or any personal media etc.

What would be the exact location of my pics inside the phone?? Also maybe it's not working because the sdcard is not mounted?


Sent from my iPhone using Tapatalk

Try /sdcard/DCIM/Camera

Sent from my Nexus 5 using XDA Free mobile app
 

fredcorp6

Senior Member
Apr 22, 2011
384
64
You're using cwm aren't you? Try adb pull /data/media. Or adb pull /data/media/0. Cwm is messed up on how it handles the file structure

Sent from my Nexus 5 using XDA Free mobile app

Neither work! It would be massively helpful if you could go to a camera picture on your phone and lookup where it is actually stored? Then hopefully it will be the same on mine.
 

fredcorp6

Senior Member
Apr 22, 2011
384
64
We tried that already. It's in /sdcard/DCIM/Camera

Sent from my Nexus 5 using XDA Free mobile app

I'm making progress! managed to get all my app data off the phone.

Originally when I did adb pull /data, it returned "0 files pulled, 0 files skipped".

Then I went into adb shell and mounted /data, exited adb shell, did the pull again and it worked!

So I'm close... all I need to know is the specific location of my pictures in the file system and I can do it.