Mount sdcard USB Storage through adb.

Showing 1-3 of 3 messages
Mount sdcard USB Storage through adb. Nathan 9/30/10 11:28 AM
I can't seem to find a command that will allow me to mount/unmount the
sdcard from the adb prompt.

From the documentation, it appears that this can't be done in an
emulator, so I am trying with a Nexus One.

I would like to simulate the card being mounted or unmounted while my
Activity is active. I can't do this on the Nexus One through the
notification menu, because this will pause and then resume and
activity, during which time storage card broadcast notifications are
not sent.

I know other devices can and do mount the storage without leaving an
Activity, in particular because they will automount the storage
whenever the USB is plugged in (according to users, even if you tell
it not to). For that reason, this is a case I want to test.

Nathan
Re: Mount sdcard USB Storage through adb. FrankG 10/1/10 4:14 AM
Your subject is strange .. as the sdcard has nothing to do with the
sdcard.

I assume you would like to know how to mount the sdcard via a command
from
a adb prompt .

You can do this  via a "system call" command.

I haven't the details by hand, but it is one of the system services
which allow you to do this.
You need to look into the aidl interface for them and then you can
call them via "system call" ..

As a joke try out : service call  phone 2 s16  <a phone number of a
friend>

Good luck !

  Frank
Re: [android-developers] Re: Mount sdcard USB Storage through adb. Zero 10/1/10 5:07 AM
You can try:

1. Enable USB MASS STORAGE mode (UMS)
adb shell /system/bin/sdutil ums enable

2. Mount it into a folder
sudo mount /dev/sdb ~/SDCARD

3. Disable USB MASS STORAGE
adb shell /system/bin/sdutil ums disable

BR,
Nam