# Android 2.2 (LG Optimus) USB storage device



## instain (Jan 6, 2011)

Can anyone help get my LG Optimus, running Android 2.2.1, to show up properly as a mass storage device in FreeBSD 8.1?  It works find in Windows and Linux, but I get the following errors:


```
$ uname -a
FreeBSD calvin 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #2: Tue Nov 30 14:29:54 CST 2010     root@calvin:/usr/obj/usr/src/sys/GENERIC  i386
```


```
$ dmesg | tail -n 12
ugen10.3: <LG Electronics Inc.> at usbus10
umass0: <LG Electronics Inc. LG Android USB Device, class 0/0, rev 2.00/1.00, addr 3> on usbus10
umass0:  SCSI over Bulk-Only; quirks = 0x0000
umass0:3:0:-1: Attached to scbus3
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
(da0:umass-sim0:0:0:0): unsupportable block size 0
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): unsupportable block size 536870912
(da0:umass-sim0:0:0:0): removing device entry
```

The block size reported in the second to last line seems to change every time it's connected.

I'm guessing it may have something to do with the fact that USB storage isn't turned on at the time the device is connected, you have to wait until the phone detects the connection and then turn on mass storage mode.


----------



## mav@ (Jan 7, 2011)

This is a bug of the device - it is incorrectly reports lack of media (until you make menu selection). It was workarounded recently in 8.2.


----------



## thierry@ (Apr 9, 2011)

Hello mav@,

The problem persists on the box just updated to 8.2-STABLE (8.2-STABLE #1: Sat Apr  9 16:50:36 CEST 2011):


```
Apr  9 17:23:55 graf root: Unknown USB device: vendor 0x22b8 product 0x2d67 bus uhub4
Apr  9 17:23:55 graf kernel: ugen4.3: <Motorola> at usbus4
Apr  9 17:23:55 graf kernel: umass1: <Motorola MSD Interface> on usbus4
Apr  9 17:23:55 graf kernel: umass1:  SCSI over Bulk-Only; quirks = 0x0000
Apr  9 17:23:56 graf kernel: umass1:3:1:-1: Attached to scbus3
Apr  9 17:23:57 graf kernel: (probe0:umass-sim1:1:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
Apr  9 17:23:57 graf kernel: (probe0:umass-sim1:1:0:0): CAM status: SCSI Status Error
Apr  9 17:23:57 graf kernel: (probe0:umass-sim1:1:0:0): SCSI status: Check Condition
Apr  9 17:23:57 graf kernel: (probe0:umass-sim1:1:0:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
Apr  9 17:23:57 graf kernel: (da4:umass-sim1:1:0:0): unsupportable block size 3087466496
Apr  9 17:23:57 graf kernel: (da4:umass-sim1:1:0:0): unsupportable block size 788987904
Apr  9 17:23:57 graf kernel: (da4:umass-sim1:1:0:0): unsupportable block size 537329664
```

Best regards,


----------



## ericbsd (Dec 15, 2011)

Try this but make sure /dev/da0 is the right da for you.

```
dd if=/dev/null of=/dev/da0 count=0
```
I mount LG Optimus with that command.


----------



## aragon (Dec 17, 2011)

Or this:


```
:>/dev/da0
```


----------

