0

I'm trying to access "external" folder of Android, but I can't find it. Note that my device is Motorola Xoom and I use adb shell.

How can I find external folder? Should I install NDK?

Thank

user91625
  • 31
  • 1
  • 7

5 Answers5

0

Some folders cannot be available to access due to their access permission (require root user permissions). Try to access this folder in emulator. It is rooted by default, and you will see if that is the reason.

0

I think you mean the return value of Envronment.getExternalStrorageDirectory() by "external", right ?

Then the directory isn't "external", maybe /mnt/sdcard/ or other things you can logcat to get the return value from above function.

You can access it in the shell by "ls /mnt/sdcard/"

Sotiris
  • 38,986
  • 11
  • 53
  • 85
Cedric Fung
  • 477
  • 1
  • 4
  • 12
  • Actually I'm trying do the procedure described here: http://discuz-android.blogspot.com/2008/11/add-new-component-into-open-source.html and can't find external, build and other related folders in my android. – user91625 Aug 15 '11 at 12:10
  • 1
    So, you are asking a wrong question. The external folder is exactly in the android source directory, you can get android source code from http://source.android.com/source/index.html – Cedric Fung Aug 15 '11 at 12:22
0

I guess you're referring to sdcard folder.

Some devices have only one sdcard, and some android devices have built-in sdcard and support additional so called "external" sdcard.

Usually primary sdcard is mounted at /mnt/sdcard while secondary sdcard (if such thing is supported) is mounted at /mnt/sdcard/external_sd. This locations are not documented and actually up to device vendor to decide (and sometimes they are different).


If you are not sure what sdcard mount points your device has, then you can list them using:

adb shell mount | grep sdcard

Here is my output from Samsung Infusion 4g:

/dev/block/vold/179:1 /mnt/sdcard vfat rw,...
/dev/block/vold/179:9 /mnt/sdcard/external_sd vfat rw,...
tmpfs /mnt/sdcard/external_sd/.android_secure tmpfs ro,...
inazaruk
  • 74,247
  • 24
  • 188
  • 156
0

get the state of external storage to make sure its available :

Environment.getExternalStorageState();

this will return the state as String then you can compare it to:

- Environment.MEDIA_UNMOUNTABLE
- Environment.MEDIA_REMOVED

....

Mohammad Ersan
  • 12,304
  • 8
  • 54
  • 77
0

The external SD Card in Xoom is mounted at /mnt/external1/ and nothing but read access is granted to this directory from any level since it is mounted as read only. As of 3.2 permissions for SD write can be specified in the manifest but MEDIA access remains limited.