Jump to content

USB host/CIFS access to thumb drive


Guest drewstiff

Recommended Posts

Guest drewstiff

I am currently running MCR and although I'm not an Android "n00b" I'm not exactly a Linux master so was wondering if someone could give me some pointers on how to use my USB thumb drive with my GN.

I have the appropriate cable and the device shows up in dmesg as having attached successfully [sda]. So I kinda guessed that all I would have to do would be to mount it via CIFSmanager; so I put share path as /dev/sda and mount point was pre-filled as /mnt/cifs/sda which sounded perfectly reasonable. I left the username as guest and password and options both blank.

When I try to mount the drive I then get the following error:

"Mounting the share has failed with an error.

mount: invalid argument"

Anyone able to advise where I am going wrong?... Or have I completely got the wrong end of the stick?

Link to comment
Share on other sites

Guest drewstiff

CIFS is a file system for mounting windows file shares (also known as Samba) it is nothing to do with mounting usb drives

Well that would explain where I am going wrong then!

I knew CIFS was primarily for shares but I think that because the function was added to the ROM the same time as the USB host function I assumed it used CIFS to access the USB drive, hence enabling one enabled the other - but it appears this is a coincidence.

Okay then, now that is sorted - if my USB drive is connected as sda, then how do I access it? Do I need to set the mount in fstab?

If so, could I mount it as a subfolder of my "SDCARD" partition so that it is picked up by music apps etc.?

Link to comment
Share on other sites

Guest drewstiff

Well that would explain where I am going wrong then!

I knew CIFS was primarily for shares but I think that because the function was added to the ROM the same time as the USB host function I assumed it used CIFS to access the USB drive, hence enabling one enabled the other - but it appears this is a coincidence.

Okay then, now that is sorted - if my USB drive is connected as sda, then how do I access it? Do I need to set the mount in fstab?

If so, could I mount it as a subfolder of my "SDCARD" partition so that it is picked up by music apps etc.?

For anyone else who wasn't sure how to mount a usb drive, I was making it far more complicated than it needed to be and the following command will mount the usb device within a folder called "usbstick" on the sdcard:

mount -t vfat /dev/block/sda1 /sdcard/usbstick

Problem solved.

Link to comment
Share on other sites

Guest gandalf027

For anyone else who wasn't sure how to mount a usb drive, I was making it far more complicated than it needed to be and the following command will mount the usb device within a folder called "usbstick" on the sdcard:

mount -t vfat /dev/block/sda1 /sdcard/usbstick

Problem solved.

Hey,

Can you give me some pointers to how can i do this? I know a bit of linux and i can use a termnal.

I have a USB OTG cable that works very well, at least in a SGS2. But in the SGS2 the pendrive (2GB Fat) is mounted auto.

In this one i cannot see it, it only appears in /d/usb devices file ... is there a way i can mount this?

Do i need to have themtp disabled or the usb debug on/off?

Thanks

Link to comment
Share on other sites

Guest drewstiff

Hey,

Can you give me some pointers to how can i do this? I know a bit of linux and i can use a termnal.

I have a USB OTG cable that works very well, at least in a SGS2. But in the SGS2 the pendrive (2GB Fat) is mounted auto.

In this one i cannot see it, it only appears in /d/usb devices file ... is there a way i can mount this?

Do i need to have themtp disabled or the usb debug on/off?

Thanks

I had OS Monitor app install so kept an eye on dmesg through that and saw that the usb stick was detected as [sda], then used the command I mention above (as su) in terminal in order to mount the drive. Then obviously you need to umount after.

If you are having problems they I might not be the best source of technical support for this particular issue but will do my best to help... I have not had to disable MTP and I have USB debugging on.

Link to comment
Share on other sites

Guest gandalf027

I had OS Monitor app install so kept an eye on dmesg through that and saw that the usb stick was detected as [sda], then used the command I mention above (as su) in terminal in order to mount the drive. Then obviously you need to umount after.

If you are having problems they I might not be the best source of technical support for this particular issue but will do my best to help... I have not had to disable MTP and I have USB debugging on.

Thanks, i will install os monitor and see if i can figure it out. I'll give feedback later :)

Link to comment
Share on other sites

For anyone else who wasn't sure how to mount a usb drive, I was making it far more complicated than it needed to be and the following command will mount the usb device within a folder called "usbstick" on the sdcard:

mount -t vfat /dev/block/sda1 /sdcard/usbstick

Problem solved.

Hello,

tried that in terminal emulator, only got a mount : not such file or directory, don't really know what I'm doing wrong, kinda noob with command lines and stuff ^^

Regards

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.