[Q] How to enable UMS/Mass storage mode??

Search This thread

prasannapmv

Senior Member
May 31, 2012
93
216
Yesterday I made a custom usb Y cable and connected it to a USB OTG adapter to our phone and supplied a external +5v power then connected USB keyboard and mouse both worked.
But when i tried connecting my pen drive it did not shown any sign of life.

I searched and narrowed these methods:
http://www.chinadigitalcomm.com/how-to-mount-usb-flash-drives-t1865.html
http://xdaforums.com/showthread.php?t=1334444
http://xdaforums.com/showthread.php?t=997187

According to these two methods I should get sda1 and sda 2 in dev/block after connecting a USB pen drive but that is not happening.
Then I searched and found out that our kernel should have UMS enabled to mount any usb storage device as stated here:
http://xdaforums.com/showpost.php?p=22597744&postcount=3

I am really confused now, I know I have enabled USB Host mode as usb mouse and keyboard are working but dont know how to modify our kernel to get usb pen drive work.
 
Last edited:
  • Like
Reactions: john1989

lkrasner

Senior Member
Apr 14, 2012
1,091
540
Brighton, MI
Yesterday I made a custom usb Y cable and connected it to a USB OTG adapter to our phone and supplied a external +5v power then connected USB keyboard and mouse both worked.
But when i tried connecting my pen drive it did not shown any sign of life.

I searched and narrowed these methods:
http://www.chinadigitalcomm.com/how-to-mount-usb-flash-drives-t1865.html
http://xdaforums.com/showthread.php?t=1334444
http://xdaforums.com/showthread.php?t=997187

According to these two methods I should get sda1 and sda 2 in dev/block after connecting a USB pen drive but that is not happening.
Then I searched and found out that our kernel should have UMS enabled to mount any usb storage device as stated here:
http://xdaforums.com/showpost.php?p=22597744&postcount=3

I am really confused now, I know I have enabled USB Host mode as usb mouse and keyboard are working but dont know how to modify our kernel to get usb pen drive work.

you won't be able to modify our kernel with our locked bootloader, but your problem could be elsewhere. the drive requires more power than a mouse or keyboard, so it just may not be getting enough. will your power supply give a full 500mA that is what a normal usb port gives, and is probably overkill for a flash drive, but it would prove whether that is the problem or not.

Does the drive have a light on it that usually turns on when you plug it in? if so, does it come on when you plug it in with your splitter into the phone.

It may be that it is just not supported on our phone, but I think a power problem is much more likely.

EDIT: once you think it is getting power, check for it in /dev/block by running this in terminal emulator. you can check before and after to see what changes, if anything in case it is not named /sdxx
Code:
ls /dev/block
 
Last edited:

jimbridgman

Senior Member
Dec 21, 2007
2,345
3,069
Dallas, TX
you won't be able to modify our kernel with our locked bootloader, but your problem could be elsewhere. the drive requires more power than a mouse or keyboard, so it just may not be getting enough. will your power supply give a full 500mA that is what a normal usb port gives, and is probably overkill for a flash drive, but it would prove whether that is the problem or not.

Does the drive have a light on it that usually turns on when you plug it in? if so, does it come on when you plug it in with your splitter into the phone.

It may be that it is just not supported on our phone, but I think a power problem is much more likely.

EDIT: once you think it is getting power, check for it in /dev/block by running this in terminal emulator. you can check before and after to see what changes, if anything in case it is not named /sdxx
Code:
ls /dev/block

That is right, our phone does not provide power on the usb connection, it is a one way charge only, no matter which cable you use, it is an issue with moto's implementation of the USB protocol.

---EDIT---

I do think that I read that someone was able to get it working by using a powered usb hub attached in between the A2 and the usb device. WARNING some assembly/dis-assembly was required!
 
Last edited:

lkrasner

Senior Member
Apr 14, 2012
1,091
540
Brighton, MI
That is right, our phone does not provide power on the usb connection, it is a one way charge only, no matter which cable you use, it is an issue with moto's implementation of the USB protocol.

devices do work as long as you provide external power, which is what he has done. basically you cut the power wires out of the cable and hook them up to a power supply, thus givng the power and giving the data to the phone. Since it supports host mode, it SHOULD work with a flash drive as well as mice, I have heard of people doing it.
 

jimbridgman

Senior Member
Dec 21, 2007
2,345
3,069
Dallas, TX
devices do work as long as you provide external power, which is what he has done. basically you cut the power wires out of the cable and hook them up to a power supply, thus givng the power and giving the data to the phone. Since it supports host mode, it SHOULD work with a flash drive as well as mice, I have heard of people doing it.

I know this does not explain it, but it is mentioned that a powered hub is needed.... This person was thinking of making basically a DIY HD doc, and there was someone else on here that has done it too, but I can't find that post and I can't remember the users name.

http://xdaforums.com/showthread.php?t=1462541

A cheap hub will do the job much better, and I have heard of other users having trouble with the otg cable and usb storage.

Just more information to think about and look into.
 

prasannapmv

Senior Member
May 31, 2012
93
216
I've tried every single thing that I can to make Usb flash drive work but its something in our software that is restricting it detect any of my storage devices.

I saw one more thread yesterday it was for XOOM which says kernel has to be modified in order to get usb Drives work:
http://xdaforums.com/showthread.php?t=1068999

I now understand that with locked bootloader it will not be possible to modify the kernel so i am abandoning this project and hope we find a way to unlock bootloader soon in the future.
 
  • Like
Reactions: john1989

john1989

Member
Jul 4, 2012
26
3
You can try by using a self powered hub which provide power to devices, If it works do post the results as I am also looking forward to use USB HOST feature
 

duchski

Senior Member
Dec 16, 2005
343
38
It does work when you connect pen drive to lapdock so its not software/firmware/kernel issue.
Easy solution: buy a lapdock or a media dock with usb ports and connect your drive there.

Sent from my MB865 using Tapatalk 2
 

Rebelj12a

Senior Member
Mar 29, 2013
54
21
Wausau
rebelmm.com
I did finally get this to work.

One caveat, you have to connect the power directly from the cable to the otg cable. Basically power the hub and the otg cable from one line even though they are connected. This is what did the trick for me.

Ill post pictures when i can if its still foggy.

Sent from my MB865 using xda premium
 
Last edited:

Rebelj12a

Senior Member
Mar 29, 2013
54
21
Wausau
rebelmm.com
I did finally get this to work.

One caveat, you have to connect the power directly from the cable to the otg cable. Basically power the hub and the otg cable from one line even though they are connected. This is what did the trick for me.

Ill post pictures when i can if its still foggy.

Sent from my MB865 using xda premium

Update and edit. No automounting at all. Have to use an external program to mount. Been trying to debug this for a while but the OS is not seeing the usb device.

Using USB host diagnostics Android api does not detect the device. Although the claims and classes were found. Kernel is in the green here too. Unfortunitely this makes it so that the USB device cannot be used by 3rd party programs. Still working on figuring this out. I saw a post about shorting out the 4 and 5 line of the microusb cable. Going to try that see where it goes.
 

Top Liked Posts