Moon Light Box

Time is Money

Posts match “ sdcard ” tag:

Android - /storage/emulated/legacy vs /storage/emulated/0

| Comments

Usually, we get the external storage via this


And get the result.


Then we use adb to see the path.

adb shell ls -la /storage/emulated/0
/storage/emulated/0: No such file or directory

Again, we can see the correct path.

adb shell ls -la /storage/emulated/
lrwxrwxrwx root     root              2015-04-22 14:05 legacy -> /mnt/shell/emulated/0

But how do we get /storage/emulated/legacy?
According to AOSP, we can echo $EXTERNAL_STORAGE.

adb shell echo $EXTERNAL_STORAGE

Use code method.