---------- Forwarded message ----------
From: jhon d <jhon9...@gmail.com>
Date: Thu, Jun 10, 2010 at 6:52 PM
Subject: How to mount/umount sdcard
To: android-developers@googlegroups.com


Hi
i want to mount/unmount my sdcard from my application using jni
I used the following c code to mount sd card
main(int argc,char argv**){
 int status=mount("/dev/block//vold/179:0", "/sdcard", "vfat", MS_MGC_VAL |
MS_NOSUID, "");
printf("%d\n",status);
status=0;
status=umount("/sdcard");
printf("%d\n",status);
}
I created a binary of the above c file using arm tool chain
and i pushed the binary to /data/misc/ of my emulator
Then i executed it
It is working fine
Now my question is how to use this  in my android application using jni
I follwed the ndk tools
i generated the headers for native method and implemented above c code
When i run my android application it is returning the value -1
that means the mout() function is failing
I am facing same problem for unmount also
Any help please,

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to