Tuesday, February 8, 2011

[android-developers] Howto get string /dev/block/vold/179:1 ( sdcard device) in an android app

Hi:

Anyone knows if there is any way to get the device path of the SDCARD?
I have mounted /dev/block/vold/179:1 on /mnt/sdcard and type is vfat.
My app runs ok cause I'm runnin the command "mount |grep sdcard |grep
vfat | awk -F" " '{print $1}' and get corresponding "/dev/block/vold/
179:1. But, what happens if other users have sdcard filesystem with
ext2, ext4, etc,,,? The app will not run correctly. The solution may
be change the command I've wrote below by other that can get directly
the string referent to the sdcard device.

Please, help me and If you can tell me a good reference for these
topics I will be grateful.

Thanks.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment