What's new

Tutorial How to use Xbox controllers on your Android device

  • Thread starter Holy Jesus
  • Start date
  • Views 403,428
Status
Not open for further replies.
Holy Jesus

Holy Jesus

Drunk MOTY 2011-14
Contest Sponsor Grammar Nazi Platinum Record
Messages
6,486
Reaction score
3,032
Points
1,440
Sin$
0
ATTENTION:
XBOX 360 CONTROLLERS ARE NO LONGER NATIVELY SUPPORTED ON SAMSUNG DEVICES
This tutorial is slightly out of date and therefore may not be valid for your situation. Some information in this tutorial may differ from what current devices and Android versions require. Unfortunately I haven't found the time to update it recently.

Initial requirements -

USB OTG compatibility - If you don't have it the information in this thread is useless to you. See http://www.themobimag.com/check-device-compatibility-for-usb-otg/ to check for your devices compatibility. Most modern devices have this feature.

Common devices that feature USB OTG -
  • Google/asus nexus 7
  • Samsung Galaxy tab 10.1/8.9 (Requires different OTG cable to other devices)
  • Samsung Galaxy S3/S2
  • Motorola Droid X
  • Sony Xperia (some models - Google your device model for more information)
  • LG Optimus (some models - Google your device model for more information
  • Many more devices feature this capability, if yours isn't listed Google your model number followed by "OTG"
USB OTG cable - This cord connects to your device and allows you to connect other peripherals (such as the controller). For this exercise you will require a male micro-usb to female USB cable. For the Galaxy Tab devices you may require a different male 30pin to female usb cable. These can both be picked up from ebay or amazon for ~$3. See below for pictures of what you're looking at.
usb-otg-cable1.jpg

For galaxy tab variants -
315%2BvwqZsqL._SY300_.jpg

An Android device running 4.0 (Ice Cream Sandwich) or higher - These android versions include controller support without root or kernal/rom modifications. It is possible on other versions of android but you'll require root and other modifications which I'm not going to go through here.

Microsoft Xbox 360 controller - This can be either wired or wireless. If you have a wired controller use it, save yourself the trouble of configuring a wireless one. Use of wireless controllers will also require root access (for some games/emulators) and a Microsoft Xbox 360 Wireless Controller Receiver on top of the USB OTG cable. These range from $10 (3rd party) to around $25. I'll explain configuration of wireless controllers later on in the thread. Third party controllers can be used but to save heartbreak and compatibility issues I recommend using a Microsoft branded controller.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Alright, now that's over let's get into it.

How to connect and use an Xbox 360 controller (wired) on Android -
1. Plug USB cable of Xbox controller into Female USB port of OTG cable
2. Plug OTG cable into your device
3. That's all. It's really that simple for a wired controller.

Some games will not respond well to controller input (without the help of 3rd party apps) and this is normal. A list of known compatible games will be featured at the end of this post.

If this doesn't work -
-You may be missing the Keylayout file for USB Xbox 360 controllers. This is unusual but does occur on some devices. You can download the file here. Paste it into the directory /system/usr/Keylayout. (Will require root access).

How to connect and use an Xbox 360 controller (wireless) on Android (requires root) -
1. Plug Xbox 360 Wireless Controller Receiver into OTG cable
2. Plug OTG cable into device

Now comes the fun bit. Wireless controllers aren't naturally supported by android and will not work flawlessly without modification to some system files on your device. Many emulators and games will run perfectly happily simply on a plug-n-play basis but an issue presents itself often where this is not the case. Wireless controllers require calibration if you will to properly communicate with your Android device.

This is where root is needed. You need to access the Android shell and enter some commands to fix this problem. Once into the shell (using an app such as Terminal Emulator) enter the following commands -
Code:
su
cd /system/usr/keylayout/
mount -o remount,rw /system
cp Vendor_045e_Product_0291.kl Vendor_045e_Product_0719.kl
chmod 644 Vendor_045e_Product_0291.kl
chmod 644 Vendor_045e_Product_0719.kl
exit
exit

Then restart your device and your wireless controller should work fine. Remember that different devices will function differently and this may have no effect on your device. This DOES work on the Nexus 7. Credit to sleeplessninja of XDA-developers for his discovery relating to wireless controllers which can be found here.

All games are controller compatible, even if they aren't -
If you have root getting an app like sixaxis may prove invaluable. There definitely are games out there that aren't compatible with controllers, in fact more of them exist than it's opposite. Using these controller apps can help you map controller profiles for certain games allowing you to use a controller for games that weren't even considered controller capable. Be weary though, a lot of them are very different from device to device and using it doesn't guarantee that it'll agree with the app you're trying to make a profile for. It's just a thought to keep in mind.

Games that are compatible (I will be adding to this. Again, varies from device to device but these games do work on most Android devices) -
  • GTA Vice City
  • Max Payne mobile
  • Dead Trigger
  • Riptide GP
  • Bards Tale
Check for yourself what games are compatible -
There exists an app called TegraZone (There's a website to that does practically the same thing). You can use this app to search for a game and it'll tell you whether it's controller compatible or not. Check for a little green tick and/or some text that says 'controller'
46348.jpeg


Other useful information -
If you need to root your phone in order to use a wireless controller or add the Keylayoutfile and you aren't sure how to root or even what rooting is then post any questions below. These links will also be beyond useful -
Some FAQs regarding rooting -
  • Will it void my warranty? Yes (depending on company, some really don't care. Be sure to read up on this before taking action). Although it is possible to unroot and restore to factory settings wiping any evidence along the way. If you destroy your phone (after rooting) to the stage you can't even get into the bootloader then you're **** out of luck. Sending in a rooted phone for repair or replacement isn't ideal but if you have no other option it might go un-noticed.
  • Will I have to wipe my phone to root? This depends on multiple things but usually the answer is no. If you are required to unlock the bootloader before rooting (again, this isn't really common practice but exceptions exist) then yes you will usually have to wipe your phone. If this is the case be sure to research your phone extensively before doing anything and ALWAYS BACKUP YOUR APPS AND DETAILS!
  • What is a bootloader? http://forum.xda-developers.com/wiki/Bootloader
This is a working thread. I'll be adding more to it and fleshing it out with more in depth information.
 
Last edited:
lowpro

lowpro

Professional Abecedarian
Programmer Mythical Veteran Mr. Nice Guy
Messages
4,528
Reaction score
2,041
Points
725
Sin$
0
Nice job. I'm surprised there haven't been any comments. I might try this sometime :smile:.
 
Holy Jesus

Holy Jesus

Drunk MOTY 2011-14
Contest Sponsor Grammar Nazi Platinum Record
Messages
6,486
Reaction score
3,032
Points
1,440
Sin$
0
Nice job. I'm surprised there haven't been any comments. I might try this sometime :smile:.

Yeah it goes alright. Most devices these days are plug'n'play depending on your Android version.

It does chew your battery though so don't go playing GTA on the bus to work wasting all of your power haha.
 
Pray For Blood

Pray For Blood

"Can you hear the thunder that's breaking?"
Premium
Legendary Veteran Grammar Nazi Mr. Nice Guy
Messages
3,044
Reaction score
934
Points
445
Sin$
0
This is cool. Too bad I have an iPhone...:frown:
 
Alle

Alle

Your Boy
Platinum Record Experienced Veteran Grizzled Veteran
Messages
3,176
Reaction score
361
Points
355
Sin$
0
That's awesome. Reason number 129102 why Android is better than iOS :smile:
 
T

tav

Newbie
Messages
7
Reaction score
3
Points
45
Sin$
7
Anybody managed to get this working on a HTC ONE? It just won't recognize the the 360 controller. Mouse, keyboard and external storage all work fine over USB OTG but it say's the controller is an unsupported device and ask's me to unplug it.
HTC one
Stock Rom
rooted
Official M.soft wired 360 controller
I've downloaded the .kcm file and pasted it into the Keylayout directory but it still won't recognize the joypad.
Any help would be appreciated, even if it's just to say that it won't work atm. I am a complete noob where Android is concerned.

Thanks.
 
Holy Jesus

Holy Jesus

Drunk MOTY 2011-14
Contest Sponsor Grammar Nazi Platinum Record
Messages
6,486
Reaction score
3,032
Points
1,440
Sin$
0
Anybody managed to get this working on a HTC ONE? It just won't recognize the the 360 controller. Mouse, keyboard and external storage all work fine over USB OTG but it say's the controller is an unsupported device and ask's me to unplug it.
HTC one
Stock Rom
rooted
Official M.soft wired 360 controller
I've downloaded the .kcm file and pasted it into the Keylayout directory but it still won't recognize the joypad.
Any help would be appreciated, even if it's just to say that it won't work atm. I am a complete noob where Android is concerned.

Thanks.

Did you try playing a game with controller support any how?

Did some looking around turns out xbox controllers aren't good on one or onex. On the other hand apparently PS3 controllers can be used wireless via bluetooth.
 
T

tav

Newbie
Messages
7
Reaction score
3
Points
45
Sin$
7
Did you try playing a game with controller support any how?

Did some looking around turns out xbox controllers aren't good on one or onex. On the other hand apparently PS3 controllers can be used wireless via bluetooth.

Thanks for the reply. Yeah, there was no power to the pad. It flashed once when plugged in and that was it. I did try a Sixaxis pad but even with the app and joy2touch software's I failed to get it working. I'll have another look into the sixaxis because I tried using sixaxis pair tool to get the B/T address but I couldn't install it properly. I did borrow a generic pc joypad from next-door though and it works great. It'll do for now.Thanks again.
 
thetechnation

AM A BAD MAN

gaming developer
Messages
1,418
Reaction score
144
Points
165
Sin$
0
n
Initial requirements -

USB OTG compatibility - If you don't have it the information in this thread is useless to you. See http://www.themobimag.com/check-device-compatibility-for-usb-otg/ to check for your devices compatibility. Most modern devices have this feature.

Common devices that feature USB OTG -
  • Google/asus nexus 7
  • Samsung Galaxy tab 10.1/8.9 (Requires different OTG cable to other devices)
  • Samsung Galaxy S3/S2
  • Motorola Droid X
  • Sony Xperia (some models - Google your device model for more information)
  • LG Optimus (some models - Google your device model for more information
  • Many more devices feature this capability, if yours isn't listed Google your model number followed by "OTG"
USB OTG cable - This cord connects to your device and allows you to connect other peripherals (such as the controller). For this exercise you will require a male micro-usb to female USB cable. For the Galaxy Tab devices you may require a different male 30pin to female usb cable. These can both be picked up from ebay or amazon for ~$3. See below for pictures of what you're looking at.

usb-otg-cable1.jpg

For galaxy tab variants -
315%2BvwqZsqL._SY300_.jpg

An Android device running 4.0 (Ice Cream Sandwich) or higher - These android versions include controller support without root or kernal/rom modifications. It is possible on other versions of android but you'll require root and other modifications which I'm not going to go through here.

Microsoft Xbox 360 controller - This can be either wired or wireless. If you have a wired controller use it, save yourself the trouble of configuring a wireless one. Use of wireless controllers will also require root access (for some games/emulators) and a Microsoft Xbox 360 Wireless Controller Receiver on top of the USB OTG cable. These range from $10 (3rd party) to around $25. I'll explain configuration of wireless controllers later on in the thread. Third party controllers can be used but to save heartbreak and compatibility issues I recommend using a Microsoft branded controller.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Alright, now that's over let's get into it.

How to connect and use an Xbox 360 controller (wired) on Android -
1. Plug USB cable of Xbox controller into Female USB port of OTG cable
2. Plug OTG cable into your device
3. That's all. It's really that simple for a wired controller.

Some games will not respond well to controller input (without the help of 3rd party apps) and this is normal. A list of known compatible games will be featured at the end of this post.

If this doesn't work -
-You may be missing the Keylayout file for USB Xbox 360 controllers. This is unusual but does occur on some devices. You can download the file here. Paste it into the directory /system/usr/Keylayout. (Will require root access).

How to connect and use an Xbox 360 controller (wireless) on Android (requires root) -
1. Plug Xbox 360 Wireless Controller Receiver into OTG cable
2. Plug OTG cable into device

Now comes the fun bit. Wireless controllers aren't naturally supported by android and will not work flawlessly without modification to some system files on your device. Many emulators and games will run perfectly happily simply on a plug-n-play basis but an issue presents itself often where this is not the case. Wireless controllers require calibration if you will to properly communicate with your Android device.

This is where root is needed. You need to access the Android shell and enter some commands to fix this problem. Once into the shell (using an app such as Terminal Emulator) enter the following commands -

Code:
su
cd /system/usr/keylayout/
mount -o remount,rw /system
cp Vendor_045e_Product_0291.kl Vendor_045e_Product_0719.kl
chmod 644 Vendor_045e_Product_0291.kl
chmod 644 Vendor_045e_Product_0719.kl
exit
exit

Then restart your device and your wireless controller should work fine. Remember that different devices will function differently and this may have no effect on your device. This DOES work on the Nexus 7. Credit to sleeplessninja of XDA-developers for his discovery relating to wireless controllers which can be found here.

All games are controller compatible, even if they aren't -
If you have root getting an app like sixaxis may prove invaluable. There definitely are games out there that aren't compatible with controllers, in fact more of them exist than it's opposite. Using these controller apps can help you map controller profiles for certain games allowing you to use a controller for games that weren't even considered controller capable. Be weary though, a lot of them are very different from device to device and using it doesn't guarantee that it'll agree with the app you're trying to make a profile for. It's just a thought to keep in mind.

Games that are compatible (I will be adding to this. Again, varies from device to device but these games do work on most Android devices) -
  • GTA Vice City
  • Max Payne mobile
  • Dead Trigger
  • Riptide GP
  • Bards Tale
Check for yourself what games are compatible -

There exists an app called TegraZone (There's a website to that does practically the same thing). You can use this app to search for a game and it'll tell you whether it's controller compatible or not. Check for a little green tick and/or some text that says 'controller'
46348.jpeg


Other useful information -
If you need to root your phone in order to use a wireless controller or add the Keylayoutfile and you aren't sure how to root or even what rooting is then post any questions below. These links will also be beyond useful -
Some FAQs regarding rooting -

  • Will it void my warranty? Yes (depending on company, some really don't care. Be sure to read up on this before taking action). Although it is possible to unroot and restore to factory settings wiping any evidence along the way. If you destroy your phone (after rooting) to the stage you can't even get into the bootloader then you're **** out of luck. Sending in a rooted phone for repair or replacement isn't ideal but if you have no other option it might go un-noticed.
  • Will I have to wipe my phone to root? This depends on multiple things but usually the answer is no. If you are required to unlock the bootloader before rooting (again, this isn't really common practice but exceptions exist) then yes you will usually have to wipe your phone. If this is the case be sure to research your phone extensively before doing anything and ALWAYS BACKUP YOUR APPS AND DETAILS!
  • What is a bootloader? http://forum.xda-developers.com/wiki/Bootloader
This is a working thread. I'll be adding more to it and fleshing it out with more in depth information.

nice tut
 
T

tav

Newbie
Messages
7
Reaction score
3
Points
45
Sin$
7
+1. It doesn't work for the HTC one though. HTC limits OTG compatibility apparently. I've had to use a
custom ROM and kernel to get it to work. It wouldn't work with my DSLR either. Does now!

...Sixaxis won't work. The Bluetooth stack won't allow it.
 
Holy Jesus

Holy Jesus

Drunk MOTY 2011-14
Contest Sponsor Grammar Nazi Platinum Record
Messages
6,486
Reaction score
3,032
Points
1,440
Sin$
0
+1. It doesn't work for the HTC one though. HTC limits OTG compatibility apparently. I've had to use a
custom ROM and kernel to get it to work. It wouldn't work with my DSLR either. Does now!

...Sixaxis won't work. The Bluetooth stack won't allow it.

Good to hear you're having at least some success. I never came across HTC limiting OTG but I've never owned one personally and I've never worked on one so I guess you learn something new every day.

You mentioned you're having trouble with bluetooth so I assume you've tried pairing a PS3 controller? I'm not sure why that wouldn't work as Android features native controller support and limited OTG wouldn't come into effect. The one shipped with 4.1.2 if I'm correct?

Out of interest what ROM and Kernel are you using? Might list it in the OP so others can see if they're having problems with the HTC one (giving due credit of course).
 
T

tav

Newbie
Messages
7
Reaction score
3
Points
45
Sin$
7
Good to hear you're having at least some success. I never came across HTC limiting OTG but I've never owned one personally and I've never worked on one so I guess you learn something new every day.

You mentioned you're having trouble with bluetooth so I assume you've tried pairing a PS3 controller? I'm not sure why that wouldn't work as Android features native controller support and limited OTG wouldn't come into effect. The one shipped with 4.1.2 if I'm correct?

Out of interest what ROM and Kernel are you using? Might list it in the OP so others can see if they're having problems with the HTC one (giving due credit of course).

Thanks. I didn't think there'd be any difference between a HTC and a Samsung as far as compatibility went for OTG but after reading umpteen threads and posts on the subject it seems there is. It's my first Android phone.

I did try pairing a friends Sixaxis controller and had no luck. It connected as far as power went(all the lights were flashing) but not over Bluetooth. I couldn't get Sixaxis pair tool to run on my Pc for the Controller's Bluetooth address. I just read up on the kernel I'm now using and it said that the Bluetooth stack in the HTC wasn't capable of pairing with the controller. I've no other option than to take it as gospel really. It was shipped with 4.1.2 (1.28.771.6).

I'm now using ARHD 8.0 Rom(Android Revolution by mike1986 - version 1.29.401.16) and I love it. Looks completely stock but seems to run much quicker and smoother. I've had it on for 3 days now with no issues and I'm also using ElementalX 8.1 Kernel by flar2. The kernel allows for a huge list of OTG devices to work, especially controller's and my DSLR.

Tav
 
Holy Jesus

Holy Jesus

Drunk MOTY 2011-14
Contest Sponsor Grammar Nazi Platinum Record
Messages
6,486
Reaction score
3,032
Points
1,440
Sin$
0
Thanks. I didn't think there'd be any difference between a HTC and a Samsung as far as compatibility went for OTG but after reading umpteen threads and posts on the subject it seems there is. It's my first Android phone.

I did try pairing a friends Sixaxis controller and had no luck. It connected as far as power went(all the lights were flashing) but not over Bluetooth. I couldn't get Sixaxis pair tool to run on my Pc for the Controller's Bluetooth address. I just read up on the kernel I'm now using and it said that the Bluetooth stack in the HTC wasn't capable of pairing with the controller. I've no other option than to take it as gospel really. It was shipped with 4.1.2 (1.28.771.6).

I'm now using ARHD 8.0 Rom(Android Revolution by mike1986 - version 1.29.401.16) and I love it. Looks completely stock but seems to run much quicker and smoother. I've had it on for 3 days now with no issues and I'm also using ElementalX 8.1 Kernel by flar2. The kernel allows for a huge list of OTG devices to work, especially controller's and my DSLR.

Tav

Thanks for your response, I will add the ROM and Kernel information to the OP later on.

Out of interest have you tried sixaxis after changing ROM and Kernel? I'm quite interested to see how that would go as it looks as if the OTG compatibility was somehow limited by something in the Kernel.

EDIT: I did notice you mentioned that you have tried it, I just wasn't sure if you were referring to before or after the rom and kernel swap.
 
T

tav

Newbie
Messages
7
Reaction score
3
Points
45
Sin$
7
It was before the ROM flash and kernel swap that I tried it. I'll try it again just to make sure over the weekend. I'm going to have to use my mates Pc to try and install the pair tool though because mine won't entertain it. I'll post my findings when I've tried it again. Fingers crossed.

Tav
 
G

giorgio79

Newbie
Messages
2
Reaction score
0
Points
35
Sin$
0
Just tried connecting a wired xbox with Samsung Galaxy SIII, but it did not work. xbox connected fine, but could not control games. I did not root the phone, so maybe the key layout file is missing.
 
T

tav

Newbie
Messages
7
Reaction score
3
Points
45
Sin$
7
I've no experience with Samsung's but I thought you could connect almost anything over usb. If the pad lights up when plugged into the phone then it's just a matter of mapping the keys. As far as I'm aware you do need to be rooted to use the key mapping software but I could be wrong. I use USB/BT joycenter which does require root access. I don't know if there's anything like that, that doesn't require root.
 
Holy Jesus

Holy Jesus

Drunk MOTY 2011-14
Contest Sponsor Grammar Nazi Platinum Record
Messages
6,486
Reaction score
3,032
Points
1,440
Sin$
0
Just tried connecting a wired xbox with Samsung Galaxy SIII, but it did not work. xbox connected fine, but could not control games. I did not root the phone, so maybe the key layout file is missing.

Like T tav said if the ring of lights light up then it's merely an issue of mapping keys. What games did you try using the controller for?

Also, try using sixaxis or USB/BT joycenter and mapping the keys yourself. You shouldn't need the keylayout file if you're using a wired controller. I assume you're using a version 4.0 or later?
 
G

giorgio79

Newbie
Messages
2
Reaction score
0
Points
35
Sin$
0
Thanks guys. Yep, the xbox button was blinking green and Android version was greater than 4. Tried Dead Trigger only for now :biggrin: Will try usb bt or sixaxis and report back.
 
K

kieth epstein

Newbie
Messages
1
Reaction score
0
Points
35
Sin$
0
Are you saying that you can use the sixaxis app to map a xbox 360 controller? Doesnt it only work for the PS3 controller?

I want to buy a 360 controller for my nexus 7 but Ive heard they have compatibility issues with many games. Dont know what to do.
 
T

tav

Newbie
Messages
7
Reaction score
3
Points
45
Sin$
7
Are you saying that you can use the sixaxis app to map a xbox 360 controller? Doesnt it only work for the PS3 controller?

I want to buy a 360 controller for my nexus 7 but Ive heard they have compatibility issues with many games. Dont know what to do.



No and yes:smile: The sixaxis app is specifically for PS3/Bluetooth calibration. I believe there are other key mapping apps out there but I've had some success with USB/BTJoycenter so it's the only one I can vouch for. I doubt all games will work. Some work OTB and some will need mapping. Some will run brilliantly and some won't be so good in my experience. It's the look of the draw really.
I take it your Nexus is rooted? It needs to be for the key mapping app. According to this tut your Nexus will work. Is the 360 pad to be a wired one or wireless?
 
Status
Not open for further replies.
Top Bottom
Login
Register