roger_that
roger_that

Reputation: 9791

Android: adb pull command not working/not able to perform

I am trying to copy a complete directory on my device(not rooted) to a directory in my mac say /Users/myUserName/Documents/Copied using the android Pull commands but every time I run the command, it gives me a message saying remote object does not exist.

I used

File file = new File(Environment.getExternalStorageDirectory()+"/PB/").getAbsolutePath();

to get the absolute path of the directory in my device which comes out to be /storage/emulated/0/PB . Now I run the below command

./adb pull /storage/emulated/0/PB /Users/myUserName/Documents/Copied/

and I get following response

remote object '/storage/emulated/0/PB' does not exist

I don't know whats wrong with my approach and why is this not working even if the directory is there in my device.

Please guide.

Upvotes: 3

Views: 20799

Answers (3)

Saroja Shrinivas
Saroja Shrinivas

Reputation: 31

I had a similar problem, which got resolved, and this is what I found. 1) The file/folder names are case-sensitive. IF I use the wrong case, it returns the same error. 2) I had to find the correct path. I used the following command to locate the folder 'Backups'.

adb shell find / -type d -iname backups

-type d is to specify 'directory' and -iname is to specify a case insensitive name search.

So, I got a list of folder paths where I also got the case of the folders. I found it was all-caps.

I then did adb pull /sdcard/TWRP/BACKUPS and it worked perfectly rightaway.

Upvotes: 0

xuehui
xuehui

Reputation: 945

In the cell, the path maybe:

/storage/emulated/0/miad/cache/3287521801

and you should convert the path to

/sdcard/miad/cache/3287521801

when invokingadb pull:

adb pull /sdcard/miad/cache/3287521801

Upvotes: 0

pdegand59
pdegand59

Reputation: 13039

You should use adb pull /sdcard/PB.

Upvotes: 7

Related Questions