[Nook Touch Android Development] antsm:
Hi Renate NST,

Unfortunately, i was unable to make USB automount work :(

I have replaced /system/bin/vold (set perm to 755), added the following lines to /system/etc/vold.conf:

volume_usb
{
media_path /devices/platform/musb_hdrc/usb1
media_type mmc
partition 1
mount_point /usb
}

... and edited /init.rc with:

mkdir /usb 0777 system system

It seems that something wrong happens with vold when I plug usb flash drive and press "HOST" button. Here is the logcat output:

I/DEBUG ( 972): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 972): Build fingerprint: 'generic/zoom2/zoom2/zoom2:2.1/ERD79/1.1.2:user/test-keys'
I/DEBUG ( 972): pid: 971, tid: 971 >>> /system/bin/vold <<<
I/DEBUG ( 972): signal 11 (SIGSEGV), fault addr 0ccccccc
I/DEBUG ( 972): r0 0ccccccc r1 00000000 r2 80808080 r3 00000000
I/DEBUG ( 972): r4 0ccccccc r5 00000002 r6 00000000 r7 bec6622c
I/DEBUG ( 972): r8 00000000 r9 00000000 10 00000000 fp bec66a2c
I/DEBUG ( 972): ip ffffffff sp bec661a8 lr afe162bb pc afe0e530 cpsr 60000010
I/DEBUG ( 972): #00 pc 0000e530 /system/lib/libc.so
I/DEBUG ( 972): #01 pc 000162b8 /system/lib/libc.so
I/DEBUG ( 972):
I/DEBUG ( 972): code around pc:
I/DEBUG ( 972): afe0e520 1afffff6 e1a00002 e3082080 e3482080
I/DEBUG ( 972): afe0e530 e490c004 e0433000 f5d0f040 e04c13a2
I/DEBUG ( 972): afe0e540 e0011002 e1d1100c 0490c004 1a000022
I/DEBUG ( 972):
I/DEBUG ( 972): code around lr:
I/DEBUG ( 972): afe162a8 1b039c09 bfa84563 e0034663 f7f89809
I/DEBUG ( 972): afe162b8 4603e90a 7e88f50d 0c00f04f 46629c06
I/DEBUG ( 972): afe162c8 cc01f80e c018f8cd 970ee140 0610f046
I/DEBUG ( 972):
I/DEBUG ( 972): stack:
I/DEBUG ( 972): bec66168 00000000
I/DEBUG ( 972): bec6616c 00000000
I/DEBUG ( 972): bec66170 00000000
I/DEBUG ( 972): bec66174 00000000
I/DEBUG ( 972): bec66178 00000000
I/DEBUG ( 972): bec6617c 00000000
I/DEBUG ( 972): bec66180 00000000
I/DEBUG ( 972): bec66184 00000000
I/DEBUG ( 972): bec66188 00000000
I/DEBUG ( 972): bec6618c 00000000
I/DEBUG ( 972): bec66190 00000000
I/DEBUG ( 972): bec66194 00000000
I/DEBUG ( 972): bec66198 00000000
I/DEBUG ( 972): bec6619c 00000000
I/DEBUG ( 972): bec661a0 df002777
I/DEBUG ( 972): bec661a4 e3a070ad
I/DEBUG ( 972): #00 bec661a8 00000000
I/DEBUG ( 972): bec661ac 0ccccccc
I/DEBUG ( 972): #01 bec661b0 00000000
I/DEBUG ( 972): bec661b4 00000000
I/DEBUG ( 972): bec661b8 00000000
I/DEBUG ( 972): bec661bc 00000000
I/DEBUG ( 972): bec661c0 00000000
I/DEBUG ( 972): bec661c4 00000000
I/DEBUG ( 972): bec661c8 bec668d8 [stack]
I/DEBUG ( 972): bec661cc 00000000
I/DEBUG ( 972): bec661d0 00000000
I/DEBUG ( 972): bec661d4 0ccccccc
I/DEBUG ( 972): bec661d8 bec66444 [stack]
I/DEBUG ( 972): bec661dc 00000073
I/DEBUG ( 972): bec661e0 afe3ae08 /system/lib/libc.so
I/DEBUG ( 972): bec661e4 bec662bf [stack]
I/DEBUG ( 972): bec661e8 000176dc /system/bin/vold
I/DEBUG ( 972): bec661ec 00000000
I/DEBUG ( 972): bec661f0 00000000
I/DEBUG ( 972): bec661f4 00000006
E/MountListener( 1051): Failed to connect to vold
E/MountListener( 1051): java.lang.IllegalStateException
E/MountListener( 1051):	at com.android.server.MountListener.listenToSocket(MountListener.java:269)
E/MountListener( 1051):	at com.android.server.MountListener.run(MountListener.java:289)
E/MountListener( 1051):	at java.lang.Thread.run(Thread.java:1096)
I/vold ( 4450): Android Volume Daemon version 2.0
D/vold ( 4450): Partition not specified, defaulting to 1
W/vold ( 4450): Volume '/media' already mounted at startup
W/vold ( 4450): Volume '/sdcard' already mounted at startup
I/vold ( 4450): Name: 002G00, Serial: 0x090fe044
E/vold ( 4450): Error making device nodes for '/dev/block/vold/179:0' (File exists)
I/vold ( 4450): New blkdev 179.0 on media 002G00, media path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0
E/vold ( 4450): Could not find volume by /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0 and 0
E/vold ( 4450): Error making device nodes for '/dev/block/vold/179:1' (File exists)
I/vold ( 4450): New blkdev 179.1 on media 002G00, media path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p1
E/vold ( 4450): Could not find volume by /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0 and 1
E/vold ( 4450): Error making device nodes for '/dev/block/vold/179:2' (File exists)
I/vold ( 4450): New blkdev 179.2 on media 002G00, media path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p2
E/vold ( 4450): Could not find volume by /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0 and 2
E/vold ( 4450): Error making device nodes for '/dev/block/vold/179:3' (File exists)
I/vold ( 4450): New blkdev 179.3 on media 002G00, media path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p3
E/vold ( 4450): Could not find volume by /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0 and 3
E/vold ( 4450): Error making device nodes for '/dev/block/vold/179:4' (File exists)
I/vold ( 4450): New blkdev 179.4 on media 002G00, media path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p4
E/vold ( 4450): Could not find volume by /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0 and 4
E/vold ( 4450): Error making device nodes for '/dev/block/vold/179:5' (File exists)
I/vold ( 4450): New blkdev 179.5 on media 002G00, media path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p5
E/vold ( 4450): Could not find volume by /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0 and 5
E/vold ( 4450): Error making device nodes for '/dev/block/vold/179:6' (File exists)
I/vold ( 4450): New blkdev 179.6 on media 002G00, media path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p6
E/vold ( 4450): Volume /media already mounted (did we just crash?)
E/vold ( 4450): Error making device nodes for '/dev/block/vold/179:7' (File exists)
I/vold ( 4450): New blkdev 179.7 on media 002G00, media path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p7
E/vold ( 4450): Could not find volume by /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0 and 7
E/vold ( 4450): Error making device nodes for '/dev/block/vold/179:8' (File exists)
I/vold ( 4450): New blkdev 179.8 on media 002G00, media path /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p8
E/vold ( 4450): Could not find volume by /devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0 and 8
D/vold ( 4450): send_msg(ums_disabled):
D/vold ( 4450): send_msg(ums_disconnected):
D/vold ( 4450): Bootstrapping complete
D/dalvikvm( 4071): GC freed 3242 objects / 522848 bytes in 36ms
D/vold ( 4450): Accepted connection from framework
D/vold ( 4450): send_msg(volume_mounted:/media):
D/MountListener( 1051): handleEvent volume_mounted:/media
D/vold ( 4450): send_msg(volume_mounted:/sdcard):
D/vold ( 4450): send_msg(volume_nomedia:/usb):
D/vold ( 4450): dispatch_cmd(send_ums_status):
D/vold ( 4450): send_msg(ums_disabled):
D/vold ( 4450): send_msg(ums_disconnected):
D/vold ( 4450): dispatch_cmd(mount_volume:/sdcard):
E/vold ( 4450): Cannot start volume '/sdcard' (volume is not bound)
D/vold ( 4450): dispatch_cmd(mount_volume:/media):
E/vold ( 4450): Cannot consider volume '/media' because it is in state '4
E/vold ( 4450): volmgr failed to start volume '/media'
D/MountListener( 1051): handleEvent volume_mounted:/sdcard
I/ActivityManager( 1051): Starting activity: Intent { flg=0x10000000 cmp=android/com.android.internal.app.ExternalMediaStatusActivity (has extras) }
D/MountListener( 1051): handleEvent volume_nomedia:/usb
D/MediaScannerService( 1152): start scanning volume external
I/ActivityManager( 1051): Starting activity: Intent { flg=0x10000000 cmp=android/com.android.internal.app.ExternalMediaStatusActivity (has extras) }
D/MountListener( 1051): handleEvent ums_disabled
D/MountListener( 1051): handleEvent ums_disconnected

Here is the /data/voldlog:

12:49:55.406 Starting vold
12:49:55.610 <= volume_checking:/media
12:49:55.612 <= ums_disabled
12:49:55.612 <= ums_disconnected
12:49:56.487 <= volume_mounted:/media
12:50:08.605 Framework connected
12:50:08.605 <= volume_mounted:/media
12:50:08.605 <= volume_nomedia:/sdcard
12:50:08.605 <= volume_nomedia:/usb
12:50:08.606 <= ums_disabled
12:50:08.606 <= ums_disconnected
12:50:08.606 => send_ums_status
12:50:08.606 => mount_volume:/sdcard
12:50:08.606 => mount_volume:/media
12:50:14.008 Starting vold
12:50:14.012 <= ums_disabled
12:50:14.012 <= ums_disconnected
12:50:16.003 Framework connected
12:50:16.003 <= volume_mounted:/media
12:50:16.011 <= volume_mounted:/sdcard
12:50:16.012 <= volume_nomedia:/usb
12:50:16.012 <= ums_disabled
12:50:16.012 <= ums_disconnected
12:50:16.012 => send_ums_status
12:50:16.012 => mount_volume:/sdcard
12:50:16.012 => mount_volume:/media

USB host mode seems to work correctly, since i'm able to mount the drive manually:

mount -t vfat /dev/block/uba1 /usb