Weekend project: DIY USB on-the-go from old cables

USB on-the-go cables are handy as heck with Android devices. They're a specially wired cable that allows the same USB port you use to charge or communicate with a computer to be used to connect USB peripherals right to your tablet or phone. That means things like game controllers, mice or keyboards, USB thumb drives, or even USB hard drives if you have access to an older model one with a separate power supply.

There are no set and fast rules about what USB gadgets you can and can't use, or if you'll need root to do anything with them but in general "standard" Android devices won't allow you to mount a USB thumb drive without being rooted and having a way to send the commands to mount the device, and Samsung devices running Android 4.0 or higher will. Most devices running Ice Cream Sandwich or higher will recognize game controllers, mice, or keyboards. For more information about your particular device, head into the forums and ask the hackers -- they know everything in there.

Before we get started, know up front that this is not the best way to get a USB OTG cable. The easy way is to order one from Amazon for a buck or so (opens in new tab), and wait for it to be delivered. But I know I'm not the only smartphone geek who has cables laying around and would rather do-it-myself. It's fun, it saves a buck, gets some of that junk you just can't bring yourself to throw away used up, and offers instant gratification. If you're semi-handy with a soldering iron, have the parts, it's fun and it's for you. Read on past the break.

The parts and tools

You'll need a few things to get started here, but nothing too exotic -- everything you'll need is standard stuff in a D-I-Y-er's toolbox.

  • A soldering iron. Lower wattage is better
  • Some fine lead-free solder
  • A sharp knife
  • Some electrical tape and or heat shrink tubing
  • A standard micro USB data cable
  • A type A USB extension cable

Doctor your micro USB cable

You'll need to attach the "micro" end of the micro USB cable to the female end of the USB extension cable. But you'll also need to solder in a jumper at the micro USB connector. Grab your micro USB cable and cut the outer jacket away from the small end. You'll need to get to the solder points on the connector itself, so you might have to dig out some hardened silicon as well. 

Swipe to scroll horizontally
Solder points
Pin oneRed wire (VCC)
Pin twoWhite wire (DATA -)
Pin threeGreen wire (DATA +)
Pin fourNone (ID connection)
Pin fiveBlack wire (GROUND)

Once you have the connector open, you'll see the colored wires soldered to little pins. Those pins and wires correspond to the chart above. What you'll need to do is jumper pin four (that's the ID connection) to pin five (ground). In a standard USB cable pin four is open, and in a USB OTG cable pin four is grounded. You can jumper this out however you like, just make sure you have one continuous connection between pin four, pin five, and the black wire in the cable.

Now cut the full-sized end off the USB data cable, and slide the right sized piece of shrink tubing on if you're going with shrink tubing. Also slide a piece to cover the splice you're about to make that joins the two cables. Don't heat the shrink tubing just yet, test things first!

Splicing the cables

Cut the male end from the USB extension cable, and strip back and inch or two of the jacket. Look at the wires and see if you have the same colors as the first cable you chopped up. If you do, they should match color to color just fine. If you don't, see the chart above and open the male end you cut off and check the pins. You could also ring out the wires with a multimeter if you have one handy. Just make sure you know which wire is which if they don't color-match.

Carefully solder the two pieces together, making sure to put your shrink tube in place before you make the connections. This is going to wiggle and move a lot, so take time to have good, solid solder joints.

Testing it

Once everything has cooled down, carefully plug the cable into your phone or tablet. Grab an old wired USB mouse, and throw it on the other end. In a few seconds you should see a mouse pointer on your device! If the mouse you're using has a sensor instead of a ball, you'll also see it light up as soon as you plug it all in. 

Yes, having a mouse connected to your phone or tablet is cool in theory, but not very practical. This was just to test the connections. If everything is working, heat your shrink tubing or tape up the points of the cable you opened. A mouse uses the same four connections as any other USB device, so if it works you're good to go.

Making it useful

If you have a Galaxy S 3, you can plug a thumb drive right into the cable and go. You'll find a new folder called USB storage in your file explorer, which will be all the stuff on your thumb drive. If you're using a Nexus 7 or a Galaxy Nexus, things are a little more involved. 

Stock Jelly Bean can see and recognize a USB thumb drive, but the system won't just auto-mount it. That means it's there, but you can't get to it. The Android developers have said this is done on purpose, as they provide everything to make it happen except a UI. Without a UI, they don't want it to happen automagically. The last time the subject came up on Google+ it turned into quite the debate. Read it and see both sides.

For now, the only option I can find needs root. Yes, the code is there for it to be done without root, but it seems that no developers have done it yet. If you're rooted, just install StickMount from Google Play (opens in new tab). Now when you plug a thumb drive in you'll get a prompt for StickMount to start, and it mounts the folder so you can get to the files.

The good news is that even without root things like gamepads and DLSR camera cables now work. But that's another post for another weekend!

Jerry Hildenbrand
Senior Editor — Google Ecosystem

Jerry is an amateur woodworker and struggling shade tree mechanic. There's nothing he can't take apart, but many things he can't reassemble. You'll find him writing and speaking his loud opinion on Android Central and occasionally on Twitter.

  • Jerry, you are absolutely the geek's geek. Well done.
  • more important than all of this. circle widget from razr hd? share plz.
  • That clock widget has been around for awhile. Not all the cool features like motorolas but still cool. One more clock widget https://www.androidcentral.com/e?link=https2F2F...
  • Check out One More Clock widget. It's called Chrome Rings.
  • Why not just do the grounding of the wires where you splice the 2 cords together?
  • "Cause there's no wire connected to pin 4 inside the micro USB connector body. Pin 4 is what needs grounded.
  • Got it. Thanks
  • Just thought I would mention you can mount USB devices without root, there are two apps on the Play store that allow it. I'll link to the free one below (: https://www.androidcentral.com/e?link=https2F2F...
  • Or just.. you know, buy one for 1 dollar on ebay..
  • Is it possible to make a charging / OTG cable? I'd use OTG a lot more often if the battery were charging.
  • You and me both buddy.
  • Yes it's possible, but fiddly. Instead of mounting a jumper, mount a tiny switch instead. When the switch is open it will charge, when the switch is shorted it will be OTG.
  • Anyone have a clue why StickMount won't install on the NS4G?
  • I'd do it if I had to, but I don't: https://www.androidcentral.com/e?link=https2F2Fcli...
  • Why not splice the micro usb cord further down instead of at the end?
  • will this method of using an otg cable with stickmount app work with any rooted phone
  • Can you do a tutorial how to charge it while using USB OTG? This would be awesome :)
  • Beware that some cheaper micro-USB cables do not have a way to solder anything to pin 4. I picked up a couple discount brand cables specifically for the purpose of trying this out... pin 4 was a dummy pin that didn't extend past the plastic housing. Just an FYI for those who might start cutting open USB cables only to find that they cannot be used for this weekend project.
  • Can I use USB 2.0 A Female to A Female Coupler Adapter with my original data cable instead of doing this?
  • i love this, got to check it out
  • Old post, but if you dont wish to root your phone/ tablet -> "Nexus Media Importer" works just fine. there is a free version to test and a paid version that unlocks all modes. just wont let you swap data directly from the older galaxy nexus 2, have to hop it from a drive to the new device. Cheers mate!
  • Instead of shorting pin 4 and 5 from within the cable head, would it also be viable to short them from within the device itself? Say if I disassembled the phone to access the back of the female usb micro connector and soldered the pins. Would there be any damage caused if the permanently shorted pins 4 and 5 (within the device) is connected to a charging adapter/PC?
  • Thanks man.....
    I have been searching OTG Y cable in INDIA but I havnt found it.
    But now I have made my own working OTG cable with external power . now my nexus 4 has supported OTG .
  • This is the type of information I'm looking for my question being can you do the same to an HDMI one cord on one end to plug in Xbox one into an old TV using RCA jacks
  • HDMI cables are digital, and rca cables are analog, so a conversion by just cutting one wire and attaching it to another wouldn't work. HDMI cables carry more information and use more pins; taking output from only one of the pins would carry only some of the information. One would need a device to interpret the digital signals and convert them to analog for the RCA.
  • Here's a daft question.
    If you have a USB device you want to use with Android exclusively, could you simply replace the USB plug with a micro one, and short out the ID & ground pins to bypass the OTG cable? Cheers.