USB mass storage functionality missing

Bug #897549 reported by Abhishek Paliwal on 2011-11-29
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IglooCommunity
Medium
supriya karanth
Linaro Android
Confirmed
Medium
Unassigned

Bug Description

Description:
==========
Connect USB cable to Board, UI shows USB connection notification but there is no option to use SD card for mass storage transfers over USB.

Reproducible:
===========
Yes, 5/5 time

IMPACT:
========
Unable to test mass storage feature.

Steps:
==========
1. Boot up device
2. Connect USB cable between host machine and device
3. No notification about available USB mass storage feature under USB connection notifications.

Hardware:
==========
Panda Board Rev A3
USB Mouse connected
HDMI out to TV
8GB SD card

Software:
==========
https://android-build.linaro.org/builds/~linaro-android/staging-snowball-11.12-release/#build=1
https://android-build.linaro.org/builds/~linaro-android/tracking-panda/#build=77
https://android-build.linaro.org/builds/~linaro-android/staging-panda/#build=111
And in all other ICS releases as well.

Note: Logs attached are for another issue so ignore them.

Also observed with following builds.

https://android-build.linaro.org/builds/~linaro-android/staging-panda-11.12-release/#build=2
https://android-build.linaro.org/builds/~linaro-android/staging-panda-11.12-release/#build=3
https://android-build.linaro.org/builds/~linaro-android/staging-imx53-11.12-release/#build=7
https://android-build.linaro.org/builds/~linaro-android/snowball-ics-gcc46-igloo-stable-blob-12.04-release/#build=6
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=23
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=36
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=44
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=54
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob-12.09-release/#build=5
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=96
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob-12.10-release/#build=1
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=112
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=117
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=127
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=148
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob-12.12-release/
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=177
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=193
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb/#build=205
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb/#build=212
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb/#build=219
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb-13.03-release/
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb-13.04-release/
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb/#build=305
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb-13.05-release/
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb-13.06-release/#build=1

description: updated
description: updated
Botao (botao-sun) wrote :

For iMX53 11.12 final RC:

https://android-build.linaro.org/builds/~linaro-android/staging-imx53-11.12-release/#build=7

The USB flash drive can be recognized and mounted, but can't be used as a normal disk.

root@android:/ # [ 40.694902] usb 2-1: new high speed USB device number 2 usii
[ 40.919406] usb 2-1: New USB device found, idVendor=03f0, idProduct=ae07
[ 41.004714] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 41.114659] usb 2-1: Product: v250w
[ 41.122916] usb 2-1: Manufacturer: HP
[ 41.274672] usb 2-1: SerialNumber: 0000000000000256
[ 41.449375] scsi0 : usb-storage 2-1:1.0
[ 42.646073] scsi 0:0:0:0: Direct-Access hp v250w 0.00 P2
[ 42.931188] sd 0:0:0:0: [sda] 31711232 512-byte logical blocks: (16.2 GB/15.)
[ 43.034780] sd 0:0:0:0: [sda] Write Protect is off
[ 43.134764] sd 0:0:0:0: [sda] Asking for cache data failed
[ 43.225932] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 43.421517] sd 0:0:0:0: [sda] Asking for cache data failed
[ 43.515892] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 43.637911] sda: sda1
[ 43.761890] sd 0:0:0:0: [sda] Asking for cache data failed
[ 43.864661] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 43.974021] sd 0:0:0:0: [sda] Attached SCSI removable disk

Changed in linaro-android:
importance: Low → Medium
Botao (botao-sun) wrote :

Observed on:

https://android-build.linaro.org/builds/~linaro-android/imx53-ics-gcc46-freescalelt-stable-open-12.02-release/#build=1

Log shows USB storage has been attached, but no any notification shows on screen, can't find that USB storage in system either.

[ 1165.634417] usb 2-1: new high speed USB device number 5 using fsl-ehci
[ 1165.810511] usb 2-1: New USB device found, idVendor=05e3, idProduct=0717
[ 1165.844293] usb 2-1: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[ 1165.851458] usb 2-1: Product: USB Reader
[ 1165.922890] usb 2-1: Manufacturer: Genesys
[ 1165.965100] usb 2-1: SerialNumber: 000000009407
[ 1166.067438] scsi0 : usb-storage 2-1:1.0
[ 1167.214480] scsi 0:0:0:0: Direct-Access Generic STORAGE DEVICE 9407 P0
[ 1167.463021] sd 0:0:0:0: [sda] 7744512 512-byte logical blocks: (3.96 GB/3.69)
[ 1167.526497] sd 0:0:0:0: [sda] Write Protect is off
[ 1167.574358] sd 0:0:0:0: [sda] No Caching mode page present
[ 1167.579878] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1167.736105] sd 0:0:0:0: [sda] No Caching mode page present
[ 1167.741624] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1167.767946] sda: sda1
[ 1167.796862] sd 0:0:0:0: [sda] No Caching mode page present
[ 1167.802380] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1167.808697] sd 0:0:0:0: [sda] Attached SCSI removable disk

Also observed on
https://android-build.linaro.org/builds/~linaro-android/snowball-ics-gcc46-igloo-stable-blob-12.04-release/#build=6

Also there is no MTP option as well when USB cable connected to snowball device.

Changed in igloocommunity:
assignee: nobody → supriya karanth (supriya-karanth)
importance: Undecided → Medium

The default.prop is set to adb only

persist.sys.usb.config=adb

It should include mass storage also like below

persist.sys.usb.config=adb,mass_storage

Changed in igloocommunity:
status: New → Confirmed
Changed in igloocommunity:
status: Confirmed → In Progress

Need changes in the init.rc for enabling mtp, USB tethering and mass storage

Default init,rc has only adb

Need a init.rc change like what is done below

http://review.android.git.linaro.org/1573

For enabling mass storage a workaround for the time being is below:

#Associate SDcard with lun0
echo /dev/block/mmcblk1p1 > /sys/devices/platform/musb-ux500.0/musb-hdrc/gadget/lun0/file

#configuration with mass storage and adb
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

#plugin usb cable

With this the sdcard gets mounted automatically when snowball is connected to a ubuntu PC
There is currently an issue with writing to the sdcard from the PC. Further investigation needed

Changed in igloocommunity:
milestone: none → 2012.06

For snowball:

Kernel patch pushed to fix issue in write.

init.rc changes pending

Changed in igloocommunity:
status: In Progress → Fix Committed

Since there is no mass storage support from UI, the below command should be used to access SD card

For 3.3 kernel
echo /dev/block/mmcblk1p1 > /sys/devices/platform/musb-ux500.0/musb-hdrc/gadget/lun0/file

For 3.4 kernel
echo /dev/block/mmcblk1p1 > /sys/devices/soc0/musb-ux500.0/musb-hdrc/gadget/lun0/file

The above command associates SDcard with lun0

Fathi Boudra (fboudra) on 2012-06-18
Changed in linaro-android:
status: New → Confirmed
milestone: none → 12.06
Zach Pfeffer (pfefferz) on 2012-06-25
Changed in linaro-android:
milestone: 12.06 → none

On Snowball build:
https://android-build.linaro.org/builds/~linaro-android/snowball-ics-gcc46-igloo-stable-blob/#build=339

I cannot see any USB mass storage or MTP notification on connecting USB storage device to snowball via USB hub,
Although the files on USB mass storage drive can be accesses via serial console once the partition is mounted, but form UI no USB related operations can be done.
Expected: USB mass storage or MTP notification on UI once USB mass storage device is connected.

The fix has been given for device side mass storage i.e connecting snowball to PC.

Paul Larson (pwlars) wrote :

Looking at the 12.06 release build, I see:
[109464.314884] usbcore: registered new interface driver rndis_wlan
[109465.209394] scsi 7:0:0:0: Direct-Access Linux File-CD Gadget 0000 PQ: 0 ANSI: 2
[109465.211403] sd 7:0:0:0: Attached scsi generic sg1 type 0
[109465.216658] sd 7:0:0:0: [sdb] Attached SCSI removable disk

When plugging it in, but no partitions are visible from /dev/sdb, and there is no notification on the UI of the host pc. There are some notifications that pop up for usb debugging, and possibly one for usb access? on the android UI. However, since I had to unplug my mouse/keyboard to plug into the usb-otg port, I can't really get to them to check. Anyone know of a way to drive the notification acceptance from the command line? I could get to it over adb shell or serial console if so.

Hi Paul,

Please see comment #22 in this bug

You need associate SDcard to a lun thru command line.

Amit Khare (amit-khare) wrote :

observed with android snowball build
 https://android-build.linaro.org/builds/~linaro-android/snowball-ics-gcc46-igloo-stable-blob-12.07-release/#build=1

I see USB connection notification on Notification UI. However, since I had to unplug my mouse/keyboard to plug into the usb-otg port, I can't really get to them to check

Amit Khare (amit-khare) wrote :

Also observed with Snowball Android JellyBean build
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=36

@supriya-karanth
I tried this command For 3.4 kernel
echo /dev/block/mmcblk1p1 > /sys/devices/soc0/musb-ux500.0/musb-hdrc/gadget/lun0/file

how to access lun0 ??

Hi Amit,

Your not able to access the partition on the PC?

Did the command fail?

Changed in igloocommunity:
status: Fix Committed → Fix Released
Amit Khare (amit-khare) wrote :

Observed with snowball android JB build.
https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=44

@supriya-karanth
ya i tried that command
echo /dev/block/mmcblk1p1 > /sys/devices/soc0/musb-ux500.0/musb-hdrc/gadget/lun0/file

No the command did not failed but how to access lun0 ??

Hi Amit,

You should have been able to access lun0 in the PC. But looks like JB release has only adb and mass storage has to be enabled again

Amit Khare (amit-khare) on 2012-10-18
description: updated
Amit Khare (amit-khare) on 2012-10-23
description: updated

This will be fixed with 1062195 for JB release

description: updated
description: updated
description: updated
Soumya Basak (soumya-basak) wrote :

observed with snowball android-jb builds

https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/#build=141

log details same as comment #9,

log shows usb storage has been attached, but flash-drive can not be mounted, can't find that USB storage in system either.

description: updated
description: updated
description: updated
description: updated
Soumya Basak (soumya-basak) wrote :

also observed with the android jb release builds:
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb-13.01-release/
on the serial log it does not detect any usb flash device connected.

description: updated
description: updated
description: updated
Soumya Basak (soumya-basak) wrote :

the same behaviour observed with snowball linaro android jb 4.2.2 builds:
https://android-build.linaro.org/builds/~linaro-android-member-ste/snowball-linaro-jb-13.02-release/
usb-mass storage device is never detected.
the following log is observed:
[ 2446.096984] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[ 2454.157135] hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad?
[ 2463.344299] hub 1-0:1.0: unable to enumerate USB device on port 1

description: updated
description: updated
description: updated
description: updated
description: updated
Soumya Basak (soumya-basak) wrote :

this issue is reproduced on Linaro android kitkat Panda build:

https://android-build.linaro.org/builds/~linaro-android-member-ti/panda-linaro-14.04-release/#build=1

when connect USB cable from Target to Host, no notification about usb mass storage transfer features.

also reconfirm the issue with Linaro Android kitkat Samsung Arndale build:

https://android-build.linaro.org/builds/~linaro-android/arndale-linaro-14.04-release/#build=1

the same issue is reproduced.

the features is not include on Linaro Android kitkat build.

Please refer to the attached logcat details.

Soumya Basak (soumya-basak) wrote :

on Linaro android kitkat Panda build:

https://android-build.linaro.org/builds/~linaro-android-member-ti/panda-linaro-14.04-release/#build=1

# I can see the log message on serial console when USB mass stoarge device is connected.

root@pandaboard:/ # [ 1172.670562] usb 1-1.3: new high-speed USB device number 5 using ehci-omap
[ 1172.839355] usb 1-1.3: New USB device found, idVendor=13fe, idProduct=1d00
[ 1172.839355] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1172.854522] usb 1-1.3: Product: DataTraveler 2.0
[ 1172.854522] usb 1-1.3: Manufacturer: Kingston
[ 1172.864105] usb 1-1.3: SerialNumber: 5B77128807BA
[ 1172.871917] scsi0 : usb-storage 1-1.3:1.0
[ 1173.891204] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS
[ 1175.952850] sd 0:0:0:0: [sda] 4030464 512-byte logical blocks: (2.06 GB/1.92 GiB)
[ 1175.961761] sd 0:0:0:0: [sda] Write Protect is off
[ 1175.967864] sd 0:0:0:0: [sda] No Caching mode page present
[ 1175.967864] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1175.985717] sd 0:0:0:0: [sda] No Caching mode page present
[ 1175.985717] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1175.999206] sda: sda1
[ 1176.007202] sd 0:0:0:0: [sda] No Caching mode page present
[ 1176.013214] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1176.019714] sd 0:0:0:0: [sda] Attached SCSI removable disk

# after mount /mnt/msc for mass storage from the console,
 * df will show the partition.
 * usb mass transfer successful via adb (read/write)
 * But no MTP notification on UI, once the storage device is conncted.

Chase Qi (chase-qi) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.