I used my new Moto X phone, then I encountered a basic problem. It's running Android 4.4.2. I take a photo and want to send it to my PC. The Gallery app tells me the photo is at /storage/emulated/0/DCIM/Camera/, but in adb shell I cannot find it.

shell@ghost:/ $ cd /storage/emulated/0/DCIM/Camera/                            
/system/bin/sh: cd: /storage/emulated/0/DCIM/Camera: No such file or directory  

I find it at /storage/emulated/legacy/DCIM/Camera/

Question 1: Why is the legacy dir 0 dir?

Then I send it to the phone.

Question 2: Is there a convenient way to use adb pull when I am in adb shell?

➜  ~  adb pull /storage/emulated/legacy/DCIM/Camera/*.*                        
zsh: no matches found: /storage/emulated/legacy/DCIM/Camera/*.*
➜  ~  adb pull /storage/emulated/legacy/DCIM/Camera/IMG_20140302_105047591_HDR.jpg
5326 KB/s (2746404 bytes in 0.503s)

Question 3: Why can't I use * in adb pull?

1 Answer 1


* is being processed by YOUR zsh. There's no /storage/... path on YOUR system, where you're running the adb commands. zsh cannot possibly know that you're trying to talk to an Android device, so it's trying to expand the wildcards using local system paths. Since that path doesn't exist, let alone have files in it, it's properly telling you "no matches".

You probably want

adb pull '/storage/emulated/legacy/DCIM/Camera/*.*'

Note the '-quotes. They prevent zsh from seeing the wilcards AS wildcards - they'll be treated like plain text by the shell, and passed in to adb as literal text.

  • O,thanks!A nice answer.In this way {adb pull '[path]'},the path is only a string.can I use ` adb push ` where I use ` adb shell `? If you want to send a file to pc ,how you do ?
    – Ninja
    Mar 2, 2014 at 4:09
  • Thank you for the explanation. This answer is helping me here. It seems that it doesn't work. For example adb-ls 'IMG*' gives the same list as adb-ls. Feb 15 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .