Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP sleeplessninja

View First Unread
24th July 2012, 06:25 AM   |  #1  
sleeplessninja's Avatar
OP Senior Member
Flag Amherst
Thanks Meter: 142
 
155 posts
Join Date:Joined: Mar 2011
Donate to Me
More
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
Last edited by sleeplessninja; 9th August 2012 at 05:12 PM. Reason: Updated with Attachment
The Following 82 Users Say Thank You to sleeplessninja For This Useful Post: [ View ]
24th July 2012, 06:31 AM   |  #2  
Senior Member
Flag Sumter, S.C. (Not by choice)
Thanks Meter: 116
 
676 posts
Join Date:Joined: Jun 2009
More
Good work!
The Following User Says Thank You to r4d14n7 For This Useful Post: [ View ]
24th July 2012, 06:52 AM   |  #3  
Zardos66's Avatar
Senior Member
Thanks Meter: 11
 
366 posts
Join Date:Joined: Jun 2010
More
Nice. If I didn't already use PS3 controllers I'd check it out.

Sent from my Nexus S using xda premium
24th July 2012, 07:14 AM   |  #4  
ptesmoke's Avatar
Senior Member
Flag Cold Lake
Thanks Meter: 731
 
2,703 posts
Join Date:Joined: Sep 2008
More
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
24th July 2012, 07:17 AM   |  #5  
Member
Thanks Meter: 2
 
49 posts
Join Date:Joined: Mar 2011
Is Vendor_045e_Product_0291.kl created when you sync your wireless controller? because I don't have such file on my keylayout folder.
24th July 2012, 07:21 AM   |  #6  
sleeplessninja's Avatar
OP Senior Member
Flag Amherst
Thanks Meter: 142
 
155 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Post
Quote:
Originally Posted by Cybore

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.
24th July 2012, 07:22 AM   |  #7  
UberMudkipz's Avatar
Junior Member
Flag Port Townsend, WA
Thanks Meter: 1
 
15 posts
Join Date:Joined: Feb 2012
More
Quote:
Originally Posted by ptesmoke

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.
24th July 2012, 07:22 AM   |  #8  
sleeplessninja's Avatar
OP Senior Member
Flag Amherst
Thanks Meter: 142
 
155 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Post
Quote:
Originally Posted by ptesmoke

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

The controller itself is a regular xbox 360 controller. The dongle is just used on the PC so it can communicate with the controller like a xbox 360 does.
24th July 2012, 09:12 AM   |  #9  
Member
Thanks Meter: 2
 
49 posts
Join Date:Joined: Mar 2011
Quote:
Originally Posted by sleeplessninja

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.
24th July 2012, 06:12 PM   |  #10  
Member
Thanks Meter: 3
 
64 posts
Join Date:Joined: Jul 2009
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.

Post Reply Subscribe to Thread

Tags
nexus 7, otg, spinning camera, wireless controller, xbox controller wireless
Previous Thread Next Thread