HI
What i am doing:
I am successfully able to mount my USB stick on Android 2.3.4 on Beagleboard-xm using this code from the following link.
http://processors.wiki.ti.com/index.php/Android_Developer_FAQs#Q:_How_to_get_USB_stick_installed.C2.A0.3F_How_to_install_apk_residing_on_USB_stick.C2.A0.3F
=====================================================================================================================================
Q: How to get USB stick installed ? How to install apk residing on USB stick ?
Ans: :
a) In the init.rc file do the following changes as shown with '+' sign (patch)
# mount sdcard third partition on /part-3
mkdir /part-3
+ mkdir /usbmountd
mount vfat /dev/block/mmcblk0p3 /part-3/
# mount mtd partitions
@@ -361,6 +369,9 @@
on property:persist.service.adb.enable=0
stop adbd
+on device-added-/dev/block/sda
+ service usbmountd /system/bin/usbmountd start
+
service servicemanager /system/bin/servicemanager
user system
critical
b) Create a new file /system/bin/usbmountd and copy the below
#!/system/bin/sh
case "$1" in
"start")
mount -t vfat /dev/block/sda1 /usbmountd
;;
"stop")
sync
umount /dev/block/sda1
;;
*)
echo "$0: unknown argument $1." >&2;
;;
esac
Make sure that /system/bin/usbmountd has executable permissions
c) Use the Filemanager app#http://openintents.googlecode.com/files/FileManager-1.1.4.apk,when you browse the USB folder, it should show the .apk file, just click on this, it will install the application on the device directly.
==================================================================================================================================
using this i am able to browse through my "USB Stick" which i have mounted on Android 2.3.4 on Beagleboard-xm
THE PROBLEM:
The problem started when i remove and the USB stick and again i inserted the USB Stick i am not able to browse the through the files in the USB stick and get the message
"No files in the folder"
by seeing the above patch code, i added the following in the "init.rc " file.
===============================================================================================================================
on device-removed-/dev/block/sda
service usbmountd /system/bin/usbmountd stop
==============================================================================================================================
so that the stop case in the "usbmountd" get executed to get the umount the USB stick.
even after adding the above code in init.rc file i am not able to mount the USB stick on the device when i reinsert the usb.
I am looking for a solution when i remove the USB Stick, the Android OS should unmount the it automatically and when i insert the USB Stick it should get mounted.
Please help me out in getting a solution.
Regards
Aslam