I enable Android mass storage gadget by doing the following settings
# echo 0 > /sys/class/android_usb/android0/enable
# echo adb,mass_storage > /sys/class/android_usb/android0/functions
# echo 1 > /sys/class/android_usb/android0/enable
After I attach the adb cable I expect /mnt/sdcard to auto mount on my
host pc.
But that is not happening and there is no notice on Android UI too. I
checked the dmesg on host and I see this..
[530775.376052] usb 1-6: new high speed USB device using ehci_hcd and
address 74
[530775.509063] usb 1-6: configuration #1 chosen from 1 choice
[530775.537197] scsi9 : SCSI emulation for USB Mass Storage devices
[530775.551438] usb-storage: device found at 74
[530775.551443] usb-storage: waiting for device to settle before
scanning
[530780.548338] usb-storage: device scan complete
[530780.548922] scsi 9:0:0:0: Direct-Access Linux File-CD Gadget
0000 PQ: 0 ANSI: 2
[530780.560560] sd 9:0:0:0: Attached scsi generic sg4 type 0
[530780.572419] sd 9:0:0:0: [sdd] Attached SCSI removable disk
What is going on here? Am I missing some settings in kernel?
BTW, adb is working correctly.
-Vishveshwar
On Wed, Dec 7, 2011 at 9:12 AM, Vishveshwar Bhat
<vishves...@aim.com> wrote:
[..]
> [530780.560560] sd 9:0:0:0: Attached scsi generic sg4 type 0
> [530780.572419] sd 9:0:0:0: [sdd] Attached SCSI removable disk
>
> What is going on here? Am I missing some settings in kernel?
>
> BTW, adb is working correctly.
I'm not seeing any partition detected, not sure if this all the dmesg
log or they aren't. If no partitions are showing on fdisk -l /dev/sdd
then
f_mass_storage is not correctly configured.
Nicu
I will try this out and let you know.
Thanks,
Vishveshwar
-----Original Message-----
From: Nicu Pavel <npa...@ituner.com>
To: vishveshwarbhat <vishves...@aim.com>
Cc: android-porting <android...@googlegroups.com>
Sent: Fri, Dec 9, 2011 10:18 am
Subject: Re: [android-porting] Enabling usb mass storage gadget in
kernel 3.1
Hi,On Wed, Dec 7, 2011 at 9:12 AM, Vishveshwar
Bhat<vishves...@aim.com> wrote:[..]> [530780.560560] sd 9:0:0:0:
Attached scsi generic sg4 type 0> [530780.572419] sd 9:0:0:0: [sdd]
Attached SCSI removable disk>> What is going on here? Am I missing some
settings in kernel?>> BTW, adb is working correctly.I'm not seeing any
partition detected, not sure if this all the dmesglog or they aren't.
Moving to ICS is not feasible currently.
The android gadget framework changed in kernel-3.0. I'm guessing, I
have to backport the ICS vold changes to get it to work with GB.
-Vishveshwar