USB flash drive detected but not mounted

1,359 views
Skip to first unread message

BiX

unread,
Apr 5, 2011, 9:30:19 PM4/5/11
to android-porting
I plugged in my thumb drive to a usb hub connected to Beagleboard
running Gingerbread and minicom shows that the device is recognized as
shown below:

usb 1-2.3: new high speed USB device using ehci-omap and address
4
usb 1-2.3: New USB device found, idVendor=0781,
idProduct=5567
usb 1-2.3: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
usb 1-2.3: Product: Cruzer
Blade
usb 1-2.3: Manufacturer:
SanDisk
usb 1-2.3: SerialNumber:
20044318630C8D218CFD
scsi1 : usb-storage
1-2.3:1.0
scsi 1:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0
ANSI: 2
sd 1:0:0:0: Attached scsi generic sg1 type
0
sd 1:0:0:0: [sdb] 15625216 512-byte logical blocks: (8.00 GB/7.45
GiB)
sd 1:0:0:0: [sdb] Write Protect is
off
sd 1:0:0:0: [sdb] Assuming drive cache: write
through
sd 1:0:0:0: [sdb] Assuming drive cache: write
through

sdb:

sdb1
sd 1:0:0:0: [sdb] Assuming drive cache: write
through
sd 1:0:0:0: [sdb] Attached SCSI removable disk


However, executing a mount does not show the device:

# mount
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,relatime,errors=continue,data=writeback 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat
rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-
ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat
rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-
ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0
0

# df
Filesystem Size Used Free Blksize
/ 3G 184M 3G 4096
/ 3G 184M 3G 4096
/dev 120M 44K 120M 4096
/mnt/asec 120M 0K 120M 4096
/mnt/obb 120M 0K 120M 4096
/mnt/sdcard 69M 4M 65M 512
/mnt/secure/asec 69M 4M 65M 512


Am I missing any modules or steps? I've built all the SCSI modules
already and usb mass storage.

freakingtux

unread,
Apr 7, 2011, 2:42:14 PM4/7/11
to android...@googlegroups.com
Hi,

You might be missing entries in vold.conf,

Greetings

Amit Pundir

unread,
Apr 8, 2011, 2:55:40 AM4/8/11
to bix...@gmail.com, android-porting
*Mounting the drive:*
Either do it manually by running "mount" command from Android shell or
use "vold" to automount the drive.

Way to use "vold" is to add the sysfs entry of the drive in
/system/etc/vold.fstab and run "vold" from Android shell. You can also
automate this procedure by using "on device-added-*" trigger in
init.rc and start "vold" whenever your drive get added.

Sadly I couldn't find a way to do hot plug and play. sysfs entry of
your drive changes if you unplug the card and plug it back in. Because
of that "vold" wont be able to mount your drive and only option
available is to mount it manually or reboot.

*Browsing through the media on the mounted drive:*
You need to browse through the files from any of the available file
managers[1] because your device won't be mounted as External Storage
and won't be auto scanned for media files.

Hope it will help.

Regards,
Amit Pundir

[1]
http://www.lysesoft.com/products/andexplorer/
http://www.mydroid.info/android-apps/ghost-commander-file-manager-v1-33/

> --
> unsubscribe: android-porti...@googlegroups.com
> website: http://groups.google.com/group/android-porting
>

BiX

unread,
Apr 10, 2011, 10:19:41 PM4/10/11
to android-porting
Although the minicom shows "sdb: sdb1" when I plug in the thumb drive,
it does not appear under mount.
Mounting manually does not help either, "mount -t vfat /dev/sdb1 /mnt/
usb" tells me that I do not have a file or directory under that name
even after I manually created the folders.
I've tried adding "dev_mount /dev/sdb1 /mnt/usb vfat
user,noauto,uid=1000,rw,noexec,sync,noatime 0 0" to vold.fstab and run
vold from android shell but nothing occurred?

On Apr 8, 2:55 pm, Amit Pundir <pundira...@gmail.com> wrote:
> *Mounting the drive:*
> Either do it manually by running "mount" command from Android shell or
> use "vold" to automount the drive.
>
> Way to use "vold" is to add the sysfs entry of the drive in
> /system/etc/vold.fstab and run "vold" from Android shell. You can also
> automate this procedure by using "on device-added-*" trigger in
> init.rc and start "vold" whenever your drive get added.
>
> Sadly I couldn't find a way to do hot plug and play. sysfs entry of
> your drive changes if you unplug the card and plug it back in. Because
> of that "vold" wont be able to mount your drive and only option
> available is to mount it manually or reboot.
>
> *Browsing through the media on the mounted drive:*
> You need to browse through the files from any of the available file
> managers[1] because your device won't be mounted as External Storage
> and won't be auto scanned for media files.
>
> Hope it will help.
>
> Regards,
> Amit Pundir
>
> [1]http://www.lysesoft.com/products/andexplorer/http://www.mydroid.info/android-apps/ghost-commander-file-manager-v1-33/

Amit Pundir

unread,
Apr 11, 2011, 6:34:49 AM4/11/11
to bix...@gmail.com, android-porting
On Mon, Apr 11, 2011 at 7:49 AM, BiX <bix...@gmail.com> wrote:
> Although the minicom shows "sdb: sdb1" when I plug in the thumb drive,
> it does not appear under mount.
> Mounting manually does not help either, "mount -t vfat /dev/sdb1 /mnt/

try "mount -t vfat /dev/block/sdb1 /mnt/'

Regards,
Amit Pundir

denis

unread,
Apr 11, 2011, 10:59:01 AM4/11/11
to android-porting
If you are trying to push something onto your device. Forget to mount
your sdcard. Because the command "adb push system.img /sdcard" reads
the destination of your device's own drive structure. "/sdcard"
doesn't mean you need to have a mount point or directory on your own
computer. In the contrary, it exists on the device's flash drive.

In addition, once you have mounted your sdcard onto your computer, you
can not use the command "adb push" anymore, because it is only
readable at this moment. But you can still copy and paste your files
directly without using adb push.

Normally, the device's flash drive is separeted into three folders.
For me, there are: /data, /mnt, /system
and under /mnt, we have "sdcard". What's more, we have created a hard
link named "sdcard" at the root of system which points to "/mnt/
sdcard".
To know more about the system structure, try the command "adb shell",
then you can type the unix command like "ls" there.

Regards!

BiX

unread,
Apr 12, 2011, 3:13:09 AM4/12/11
to android-porting
Thanks a lot! The disk was under /dev/block although I don't know why
it changed to sda1 instead.
Do you know how to mount a usb flash drive with emulated cdrom?
Mounting it would only return 'Mount: Read-only file system' D:

On Apr 11, 6:34 pm, Amit Pundir <pundira...@gmail.com> wrote:
> >> [1]http://www.lysesoft.com/products/andexplorer/http://www.mydroid.info/...

BiX

unread,
Apr 12, 2011, 3:16:05 AM4/12/11
to android-porting
For some reason my adb does not work anymore. Must have been one of
the kernel modules I've configured. Any adb command will return that
no device is detected. I'm not trying to get something onto my device,
I just want to have the ability to connect my usb flash drives. Thanks
for the information though.

BiX

unread,
Apr 12, 2011, 4:09:00 AM4/12/11
to android-porting
Never mind, scratch that question about mounting cdrom. It was as easy
as adding a '-o ro'...

denis

unread,
Apr 12, 2011, 10:34:06 AM4/12/11
to android-porting
Yes, I've met a lot of errors like "device not found" before. Because
you need to enable the USB Debugging mode before. Take a look at the
Internet how to enable it. (Go to settings => applications
=>development => USB Debugging). After that, you can use "adb devices"
to view the list of devices connected to your computer.

Rgds!

BiX

unread,
Apr 12, 2011, 9:50:17 PM4/12/11
to android-porting
Nope, sad to say that that's not the cause. I've tried restarting,
toggling and untoggling USB debugging to no avail. I really think it's
something to do with one of the kernel modules.
Reply all
Reply to author
Forward
0 new messages