[mono-android] detect SD Card path?

Jonathan Pryor jonp at xamarin.com
Thu Jun 7 18:07:25 UTC 2012


On Jun 7, 2012, at 12:46 PM, moelski wrote:
> now I got confused 

Aren't we all....

> 
>> Your SD card is in fact mounted at /mnt/sdcard: 
> Ok I removed my SD card from my phone and put it in my card reader of my laptop. 
> 
> There I can find a file which is named "wiki_prefix_like_enwiki_1.lwk". This is a 476 MB file which belongs to wikipedia offline. 

What directory is it in?

> And I can´t find this file in the folder "/mnt/sdcard". 
> In fact /mnt/sdcard contains all which is on my phones internal memory. 

How are you defining "internal memory"? I suspect we may be talking about different things...

> What about this line: 
> /dev/block/vold/179:25 /mnt/sdcard/external_sd *vfat *rw,dirsync,nosuid,nodev,noexec,noatim

Strange; /mnt/sdcard/external_sd is mounted twice:

	tmpfs /mnt/sdcard/external_sd tmpfs rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,size=0k,mode=755,gid=1000 0 0
	/dev/block/vold/179:25 /mnt/sdcard/external_sd vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=000

I'm not sure how that works; /dev/block/vold appears to be the volume manager daemon, so I'm not sure where those files are physically stored. Very strange.

Let's try a different experiment: from your desktop machine, put a file into the Download directory of the SD card. Move the SD card back to your Android device, and see if the file is in /mnt/sdcard/Download. It should...

 - Jon



More information about the Monodroid mailing list