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
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.
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/"
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,...
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
....
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.