# [SOLVED] Mounting Samsung Galaxy phone (Android)

## rowi

I fail to mount my Samsung Galaxy (Android 1.5 Cupcake) with my Gentoo Machine  :Sad: 

The phone gets recognised just fine:

```
sb 8-5: new high speed USB device using ehci_hcd and address 5

usb 8-5: configuration #2 chosen from 1 choice

scsi7 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 5

usb-storage: waiting for device to settle before scanning

usb-storage: device scan complete

scsi 7:0:0:0: Direct-Access     Samsung  SAMSUNG Android  Mass PQ: 0 ANSI: 2

sd 7:0:0:0: [sdc] Attached SCSI removable disk

sd 7:0:0:0: Attached scsi generic sg3 type 0

```

I tell the phone to share the sdcard.

The gnome desktop doesn't show anything like an USB device as I'm used to with my Sony Ericsson phones.

If I try to mount to mount the phone manually I get the following:

```
# mount -v /dev/sdc /mnt/foo/

mount: you didn't specify a filesystem type for /dev/sdc

       I will try all types mentioned in /etc/filesystems or /proc/filesystems

Trying #

Trying #vfat

Trying gfs2meta

mount: No such file or directory

```

```
mount -v  -t vfat /dev/sdc /mnt/foo/

mount: no medium found on /dev/sdc ...trying again

mount: no medium found on /dev/sdc ...trying again

mount: no medium found on /dev/sdc ...trying again

mount: no medium found on /dev/sdc ...trying again

```

I'm not sure what I'm missing from my (presumably) kernel config. My Ubuntu system at work mounts the phone just fine as usb mass-storage device.

I can mount usb memory sticks and my other phone just fine, only the android device I'm not able to mount. I've enabled nearly every usb option and also the usb gadget options within the kernel without luck. I'm sure it's only a small thing I'm missing but I have no clue what I'm missing.

Can anybody helb me?Last edited by rowi on Sun Aug 09, 2009 9:52 am; edited 1 time in total

----------

## theotherjoe

what does fdisk -l tell you?

----------

## rowi

fdisk -l gives no output at all, cfdisk complains: "FATAL ERROR: Cannot open disk drive"

----------

## theotherjoe

there is definitely something going pear-shaped.

You sure you have a sd card in your phone?

maybe not seated properly? problems with cable?

is the device connected directly to the hub on the

machine?

edit: puzzling is that there are no block device parameters

(number of blocks and so on) printed at all in your syslog

----------

## rowi

 *theotherjoe wrote:*   

> You sure you have a sd card in your phone?
> 
> maybe not seated properly?

 

There's no SD-Card in the phone but the internal 8GB are organized in a way that 1GB is the regularar 'internal' memory, 7GB are an internal SD-card. The 'internal' SD-Card is being recognized as such with Ubuntu.

Windows shows two devices, the internal memory and the internal SD-Card.

 *theotherjoe wrote:*   

> problems with cable?

 

is the device connected directly to the hub on the

machine?[/quote]

It's the original cable and it works fine when I boot if I boot Vista or plug it to my notebook at work (with Ubuntu).

At home it's connected directly to the internal USB-Port of the Computer.

 *theotherjoe wrote:*   

> edit: puzzling is that there are no block device parameters
> 
> (number of blocks and so on) printed at all in your syslog

 That's why I think I'm missing a simple but important kernel option or module. 

I also tried at the computer of a colleague. He uses Slackware with a custum build kernel and on that machine the phone also isn't useable. It also get's recodnized as an /dev/sd device, though.

Both are custom configured so I think we both missed an option we normally don't need (and he still doesn't).

With the Ubuntu Kernel everything is fine but unfortunately it's build without /proc/config support and the only modules which get loaded if I plug the phone in are the general for usb and usb mass-storage. So it must be a build in option.

The hint with usb gadget devices I got on #gentoo.de didn't work, either.

I'm thinking of something like an unrecognized partition table which it obviously isn't but somethin 'simple' like that.

----------

## theotherjoe

just for comparison here is a list of USB options

from my .config

```
# USB Network Adapters

# USB Input Devices

CONFIG_USB_HID=y

CONFIG_USB_SUPPORT=y

CONFIG_USB_ARCH_HAS_HCD=y

CONFIG_USB_ARCH_HAS_OHCI=y

CONFIG_USB_ARCH_HAS_EHCI=y

CONFIG_USB=y

# Miscellaneous USB options

CONFIG_USB_DEVICEFS=y

CONFIG_USB_DEVICE_CLASS=y

CONFIG_USB_DYNAMIC_MINORS=y

CONFIG_USB_SUSPEND=y

# USB Host Controller Drivers

CONFIG_USB_OHCI_HCD=y

CONFIG_USB_OHCI_LITTLE_ENDIAN=y

# USB Device Class drivers

CONFIG_USB_PRINTER=y

# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;

# see USB_STORAGE Help for more information

CONFIG_USB_STORAGE=y

# USB Imaging devices

# USB port drivers

# USB Miscellaneous drivers
```

edit:

wrt partition table: I am running a MP3 player via USB connection 

which also signs up as a mass storage device w/o a valid partition 

table and I am able to mount it without problem. But, as I mentioned

before, the bus scan comes back with some reasonable info!

----------

## rowi

 *theotherjoe wrote:*   

> just for comparison here is a list of USB options
> 
> from my .config
> 
> 

 

By comparison my kernel is missing the following options:

```
# USB Network Adapters

# Miscellaneous USB options

CONFIG_USB_DEVICE_CLASS=y

CONFIG_USB_SUSPEND=y

```

I'll try weather they are the ones I'm missing and report here

Thanks for your help!

----------

## theotherjoe

again for comparison here are additionally the scsi options

from .conflg:

```
# SCSI device support

CONFIG_SCSI=y

CONFIG_SCSI_DMA=y

# SCSI support type (disk, tape, CD-ROM)

# Some SCSI devices (e.g. CD jukebox) support multiple LUNs

CONFIG_SCSI_MULTI_LUN=y

CONFIG_SCSI_CONSTANTS=y

CONFIG_SCSI_WAIT_SCAN=m

# SCSI Transports

# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;

```

edit: missing 

```

#

# SCSI support type (disk, tape, CD-ROM)

#

CONFIG_BLK_DEV_SD=y

# CONFIG_CHR_DEV_ST is not set

# CONFIG_CHR_DEV_OSST is not set

CONFIG_BLK_DEV_SR=y

# CONFIG_BLK_DEV_SR_VENDOR is not set

CONFIG_CHR_DEV_SG=y

# CONFIG_CHR_DEV_SCH is not set

```

----------

## rowi

I GOT IT!

After enabling the two options:

```
CONFIG_SCSI_MULTI_LUN=y

CONFIG_USB_DEVICE_CLASS=y 
```

My Galaxy is recognised and mounted  :Smile: 

After looking into the output of dmesg I'm pretty sure it was the multi-LUN support I was missing:

```
usb 8-5: new high speed USB device using ehci_hcd and address 3

usb 8-5: configuration #2 chosen from 1 choice

scsi5 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 3

usb-storage: waiting for device to settle before scanning

usb-storage: device scan complete

scsi 5:0:0:0: Direct-Access     Samsung  SAMSUNG Android  Mass PQ: 0 ANSI: 2

scsi 5:0:0:1: Direct-Access     Samsung  SAMSUNG Android  Mass PQ: 0 ANSI: 2

sd 5:0:0:0: [sdf] Attached SCSI removable disk

sd 5:0:0:0: Attached scsi generic sg6 type 0

sd 5:0:0:1: [sdg] Attached SCSI removable disk

sd 5:0:0:1: Attached scsi generic sg7 type 0

sd 5:0:0:1: [sdg] 13762432 512-byte hardware sectors: (7.04 GB/6.56 GiB)

sd 5:0:0:1: [sdg] Write Protect is off

sd 5:0:0:1: [sdg] Mode Sense: 00 00 00 00

sd 5:0:0:1: [sdg] Assuming drive cache: write through

sd 5:0:0:1: [sdg] 13762432 512-byte hardware sectors: (7.04 GB/6.56 GiB)

sd 5:0:0:1: [sdg] Write Protect is off

sd 5:0:0:1: [sdg] Mode Sense: 00 00 00 00

sd 5:0:0:1: [sdg] Assuming drive cache: write through

 sdg:

```

Thanks for your help!

----------

## theotherjoe

 :Laughing:  after reading up on CONFIG_USB_DEVICE_CLASS, which

actually is obsolete nowadays, I expected something wrt scsi

emulation. good thing, rowi, enjoy!

----------

## motosauro

 *rowi wrote:*   

> I GOT IT!
> 
> After enabling the two options:
> 
> ```
> ...

 

Yeh, that does it  :Smile: 

I had the same issue with my Galaxy and I was getting quite mad at Samsung because of it.

Now both media mount r/w just fine (internal sd + additional microsd)

Enabling DEPRECATED options in the kernel is not very nice but in this case I guess only Samsung is to blame

Next phone will be a SonyEriccson or a Motorola, surely not a Samsung

Thanks everyone  :Smile: 

----------

