How to pair a Wireless Xbox 360 Controller and fix Camera Spin

Search This thread

sleeplessninja

Senior Member
Mar 14, 2011
156
152
Amherst
Video that demonstrates the setup, show an example of the problem, the steps to solve the problem, and the working solution!!!
http://www.youtube.com/watch?v=9czISrLGXNI&hd=1


So first lets just talk about the Hardware Setup.

  • Xbox 360 Wireless Controller
  • OTG Cable.
  • Xbox 360 Wireless Dongle (This is meant for the PC but also works on the Android, and quite lovely on emulators)

This setup alone works well for allot of the emulators out there, however some of the games are not working with the controller, for instance GTA3 , Dead Trigger, Shadowgun and others. So by reading the logcat I was able to figure out a solution. Snippet of logcat below

--------------------
07-22 19:55:48.039 350 405 D EventHub: No input device configuration file found for device 'Xbox 360 Wireless Receiver'.
07-22 19:55:48.059 350 405 I EventHub: New device: id=4, fd=269, path='/dev/input/event3', name='
360 Wireless Receiver', classes=0x80000341, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=false

<6>[ 117.819812] usb 2-1: new full speed USB device number 2 using tegra-ehci
<6>[ 117.873142] usb 2-1: New USB device found, idVendor=045e, idProduct=0719
<6>[ 117.873219] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[ 117.873337] usb 2-1: Product: Xbox 360 Wireless Receiver for Windows
<6>[ 117.873403] usb 2-1: Manufacturer: ©Microsoft
<6>[ 117.873518] usb 2-1: SerialNumber: FE425DB0
-------------------

So when i searched through the /system/usr/keylayout/ I saw there was a profile for the xbox 360 wired controller so I thought why not copy the profile and name it a wireless xbox controller. This idea worked. You name keylayouts by Vendor ID and Product ID which I also was able to get from the logcat. What is nice about this is I think we can use this to solve issues with other controllers as well, but I don't know of any that are also having problems.

For this solution a rooted Nexus 7 is required. I already have a step by step video on rooting if you need the help on the nexus 7. but after obtaining root you need to enter into the Android Shell (i was using Terminal Emulator for Android on the Nexus 7 downloaded from the google play store ) . I entered this commands to get this all setup.


  • 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

Restart System and Enjoy!!!!

UPDATE 2
I attached the Key Character Mapping file as well. This is found in /system/usr/keychars . For nexus 7 users this isn't necessary but some other devices have different generic .kcm so this is needed (in the process of being confirmed) PLEASE NOTE THE .KCM Extension

UPDATE
Some of you do not have the Keylayout file for even the USB Xbox Controller, I am attaching the file (it needs to be unzipped), you will need to paste it into the /system/usr/keylayout/ folder. You also could rename this to the Wireless Xbox Controller Vendor and Product ID and copy it 'Vendor_045e_Product_0719' .
Update 2: When copying the file you still need to mount the Systems folder using the command listed above: "mount -o remount,rw /system" and also remember to modify its priveledges using the
"chmod 644 Vendor_045e_Product_0291.kl"
PLEASE NOTE THE .KL EXTENSION FOR THIS FILE
 

Attachments

  • Vendor_045e_Product_0291.kl.zip
    1.6 KB · Views: 35,526
  • Vendor_045e_Product_0719.kcm.zip
    2.7 KB · Views: 27,356
Last edited:

Zardos66

Senior Member
Jun 5, 2010
366
12
Nice. If I didn't already use PS3 controllers I'd check it out.

Sent from my Nexus S using xda premium
 

ptesmoke

Senior Member
Sep 23, 2008
2,960
796
Cold Lake
So does it have to be the pc version of the xbox controller? Or a regular xbox controller?

Sent from my One X using xda premium
 

Cybore

Member
Mar 7, 2011
49
2
Is Vendor_045e_Product_0291.kl created when you sync your wireless controller? because I don't have such file on my keylayout folder.
 

sleeplessninja

Senior Member
Mar 14, 2011
156
152
Amherst
Is Vendor_045e_Product_0291.kl created when you sync your wireless controller? because I don't have such file on my keylayout folder.

Are you using a Rom? I was doing this with a rooted verion of stock 4.1.1.

I'm not at my Nexus 7 for the rest of the night but can upload the file tomorrow if you don't have it. But yes Vendor_045e_Product_0291.kl should be for this to work. In the case its not we will have to push the file to the folder and then set the permission for it.
 

UberMudkipz

Member
Feb 19, 2012
15
1
Port Townsend, WA
So does it have to be the pc version of the xbox controller? Or a regular xbox controller?

Sent from my One X using xda premium

There is no specific controllers to PC or Xbox. A wired controller works with both PC and 360 due to it being a USB connection. A wireless controller still can work with PC if you purchase a wireless adapter. That is what I do: sync up with this PC adapter when I want to play PC games with a controller, and sync the same controller up to my 360 on the off chance I want to play some Halo or something.

Anyway, I assume the same method of hooking up a wired 360 controller to an Android device is applicable as it uses the same drivers as the wireless one, just requires one less piece of equipment.
 

Cybore

Member
Mar 7, 2011
49
2
Are you using a Rom? I was doing this with a rooted verion of stock 4.1.1.

I'm not at my Nexus 7 for the rest of the night but can upload the file tomorrow if you don't have it. But yes Vendor_045e_Product_0291.kl should be for this to work. In the case its not we will have to push the file to the folder and then set the permission for it.

Nope, rooted stock 4.1.1 as well. Please upload the file if you get a chance.
 

eawooten

Senior Member
Jul 26, 2009
65
3
So during cinematics like in Dead Trigger when the Zack gets too close, do you drop the controller and have to touch the screen?

I suck at this game, so that happens to me a LOT.
 

sleeplessninja

Senior Member
Mar 14, 2011
156
152
Amherst
Updated OP with Attachment

Nope, rooted stock 4.1.1 as well. Please upload the file if you get a chance.

Sorry for the delay. I appreciate you bringing this up and I updated the original post to include the attachment. Please let me know how it works out for you.

So during cinematics like in Dead Trigger when the Zack gets too close, do you drop the controller and have to touch the screen?

I suck at this game, so that happens to me a LOT.
Yes, as far as i know you can't use the controller, i'd imagine the developers would change this to fix it though. But I was only showing the game to demonstrate the issue not so much discuss its gameplay with the xbox controller. I think there is a thread on here that is discussing this and might even direct you to a petition to Madfinger (developer of dead trigger) to request it to be changed.
 
  • Like
Reactions: eawooten

Cybore

Member
Mar 7, 2011
49
2
Thanks for the up, I'll give it a go once my otg cable arrives. I wanted to get my n7 ready to sync once it got here.
 

vzwty

Member
Jan 30, 2008
32
3
I did not have the file either so I downloaded it to my nexus. When I try to copy the file after unzipping it it always says copy failed. I've tried Astro, ES, and File Manager with the same results. I've even moved it from my pc to my Nexus after unzipping and still having the same problem. Any ideas?
 

sleeplessninja

Senior Member
Mar 14, 2011
156
152
Amherst
I did not have the file either so I downloaded it to my nexus. When I try to copy the file after unzipping it it always says copy failed. I've tried Astro, ES, and File Manager with the same results. I've even moved it from my pc to my Nexus after unzipping and still having the same problem. Any ideas?

Are you mounting the Systems folder using the command " mount -o remount,rw /system " Just like in the instructions for copying the file, you need to mount the folder with write privledges using that command. I'm not sure if the file manager after remounting will allow you to still move it, you might need to use a command to move the file yourself. But let me know how it works out with the file manager first.
 

Cybore

Member
Mar 7, 2011
49
2
So I just got a chance to test it and it worked for me. I renamed the file to "Vendor_045e_Product_0719" and used root explorer to copy it into the keylayout folder. Just make sure to Mount r/w which should enable to set permissions as well.
 

burntcustard

Member
Nov 3, 2009
9
3
Good work sleeplessninja! If only I had rooted my Nexus 7 already I'd be playing right now :p

Do you think getting wireless xbox controllers will become simpler in the near future through updates (preferably without rooting, not for me but for other who have no desire to root)? Also, can anyone comment on how much the wireless receiver drains the battery?
 

sleeplessninja

Senior Member
Mar 14, 2011
156
152
Amherst
Good work sleeplessninja! If only I had rooted my Nexus 7 already I'd be playing right now :p

Do you think getting wireless xbox controllers will become simpler in the near future through updates (preferably without rooting, not for me but for other who have no desire to root)? Also, can anyone comment on how much the wireless receiver drains the battery?

I'd have to look at the spec of the reciever to figure out battery drain. But I haven't noticed any substantial drain for the limited time i've used it.

I actually can become simpler. We should all submit a ticket to Asus or Google. Because its somethign as simple as including the file in their next OTA. That way we wouldn't need to root to add it ourselves. Anyone submit a ticket before and know how to go about it? I can look it up myself but in case you find the page before me please let us all know.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 92
    Video that demonstrates the setup, show an example of the problem, the steps to solve the problem, and the working solution!!!
    http://www.youtube.com/watch?v=9czISrLGXNI&hd=1


    So first lets just talk about the Hardware Setup.

    • Xbox 360 Wireless Controller
    • OTG Cable.
    • Xbox 360 Wireless Dongle (This is meant for the PC but also works on the Android, and quite lovely on emulators)

    This setup alone works well for allot of the emulators out there, however some of the games are not working with the controller, for instance GTA3 , Dead Trigger, Shadowgun and others. So by reading the logcat I was able to figure out a solution. Snippet of logcat below

    --------------------
    07-22 19:55:48.039 350 405 D EventHub: No input device configuration file found for device 'Xbox 360 Wireless Receiver'.
    07-22 19:55:48.059 350 405 I EventHub: New device: id=4, fd=269, path='/dev/input/event3', name='
    360 Wireless Receiver', classes=0x80000341, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=false

    <6>[ 117.819812] usb 2-1: new full speed USB device number 2 using tegra-ehci
    <6>[ 117.873142] usb 2-1: New USB device found, idVendor=045e, idProduct=0719
    <6>[ 117.873219] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    <6>[ 117.873337] usb 2-1: Product: Xbox 360 Wireless Receiver for Windows
    <6>[ 117.873403] usb 2-1: Manufacturer: ©Microsoft
    <6>[ 117.873518] usb 2-1: SerialNumber: FE425DB0
    -------------------

    So when i searched through the /system/usr/keylayout/ I saw there was a profile for the xbox 360 wired controller so I thought why not copy the profile and name it a wireless xbox controller. This idea worked. You name keylayouts by Vendor ID and Product ID which I also was able to get from the logcat. What is nice about this is I think we can use this to solve issues with other controllers as well, but I don't know of any that are also having problems.

    For this solution a rooted Nexus 7 is required. I already have a step by step video on rooting if you need the help on the nexus 7. but after obtaining root you need to enter into the Android Shell (i was using Terminal Emulator for Android on the Nexus 7 downloaded from the google play store ) . I entered this commands to get this all setup.


    • 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

    Restart System and Enjoy!!!!

    UPDATE 2
    I attached the Key Character Mapping file as well. This is found in /system/usr/keychars . For nexus 7 users this isn't necessary but some other devices have different generic .kcm so this is needed (in the process of being confirmed) PLEASE NOTE THE .KCM Extension

    UPDATE
    Some of you do not have the Keylayout file for even the USB Xbox Controller, I am attaching the file (it needs to be unzipped), you will need to paste it into the /system/usr/keylayout/ folder. You also could rename this to the Wireless Xbox Controller Vendor and Product ID and copy it 'Vendor_045e_Product_0719' .
    Update 2: When copying the file you still need to mount the Systems folder using the command listed above: "mount -o remount,rw /system" and also remember to modify its priveledges using the
    "chmod 644 Vendor_045e_Product_0291.kl"
    PLEASE NOTE THE .KL EXTENSION FOR THIS FILE
    4
    Modified Key Layout - DPad as buttons

    Hey guys, I've modified the .kl file for the xbox 360 controller so that the dpad is now getting mapped to buttons.
    I've tested it and the dpad now works in Conduit (it wasn't working for me before).
    The dpad now works in the android gui as well as in emulators (I tested in snesoid).
    It should theoretically work better in most games.

    Just install it the same way as in the original post.
    3
    So, i was a bit tired of editing this every time by hand if i updated my Rom on my Nexus 7 so i tried to write my first update.zip and i thought i share it here.
    This zip doesn't contain the kcm file, so if you need it on your device you probably have to add it for yourself. Everything else should work fine, i flashed it a few times myself.
    2
    d-pad

    You should add the following lines to the .kl file to get the d-pad working (needed for GTA):

    key 704 DPAD_LEFT
    key 705 DPAD_RIGHT
    key 706 DPAD_UP
    key 707 DPAD_DOWN

    Regards, Adam.