How about checking the source yourself?

http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=tree;h=refs/heads/froyo;hb=refs/heads/froyo

However, Settings might be using an internal API not available to applications (most likely is), and, AFAIK, is signed with the platform key, which you can't replicate in your code, root or not.

Your best bet might be to directly exec "mount" with appropriate parameters. Also try asking on android-porting or on http://www.xda-developers.com/ - programmers there should be able to tell you for sure.

-- Kostya

08.02.2011 20:04, maikelalonso пишет:
Hi,  I've rooted my device and I've root privileges. All is Ok. The
only one problem is the code to run in order to get mounted the sd
card.
What's the command running in Android when I make Menu->Settings-
External storage->Mount SD CARD?
On 8 feb, 17:45, Marcin Orlowski<webnet.andr...@gmail.com>  wrote:
On 8 February 2011 16:41, maikelalonso<maikelalonsob...@gmail.com>  wrote:

Hi:
Anyone know how to mount the sdcard from code? I umount this storage
from menu->settings->umount sd card and I want to mount it from an
androd application.  I can get the state with getExternalStorageState
and the path to the mounted sdcard folder but I dont know if it's
possible to mount the device from java code.
Mount requires certain privileges your app simply does not have unless
you got rooted device (and grant yourself root rights)


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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