yashsingh1/xdaforums huggingface dataset:
[Nexus 7 General] shaolinx:
Tried this on Galaxy note i717 Liquid Smooth Rom.

edit: works now!
[Nexus 7 General] mtdrdn:
1. I've downloaded the file, because it wasn't in the keylayout folder

2. put it in the download folder

3. moved it in the keylayout folder with Root Explorer

4. changed the both files via Terminal Emulator (as shown in the video)

5. restarted the system

... but the controller is still not responding in Android.

OTG cable works, i've tried it with an simple wired controller.

Don't know how to fix this problem... anyone have an idea?
[Nexus 7 General] Schpammer:
Hello, I just bought a OTG, it works great with USB flasdrives and an old Sidewinder gamepad. But when I connect the wireless receiver to my SGSII with Resurrection Remix, the controller connects, but does not response. Then I added the files, but there was allready that xxx_028e.kl file, but no xxx_0719.kl But it's not working at all. Do I need the xxx_0291.kl? Because I can't change the rights with chmod for this file!

Update: I just figured out that the phone is not recognizing the receiver. Any ideas? Maybe it's just a problem with the AOKP Roms (CM 9 is not working too) or maybe it's the Siyah Kernel...
[Nexus 7 General] Burlyirishdude:
Great stuff!!
[Nexus 7 General] D-m-x:
Tried it, and it works without Problems. Had to Download the USB Xbox Controller Keylayout though, so it was good you attached it. Thank you very much!!!
[Nexus 7 General] 2kbandit:
The keylayout was missing from my nexus 7. So I downloaded it and placed it on my nexus just like you said.

Just got to wait for my otg cable to show up to try it.

Sent from my Nexus 7
[Nexus 7 General] D-m-x:
It does work, i had to do the same. No problems here. GTA VC runs fine, altough it is a little bit confusing in the beginning ;)
[Nexus 7 General] TomAshcroft:
Does any of this relate to the wired Xbox controller? Vice city works fine for me without any custimizatiin whatsoever, whereas modern combat 4 works partially (right analogue doesn't work so I therefore cannot turn only go forward it backward) can anyone walk me through how to set my button layout for this game? Would be awesome, thanks
[Nexus 7 General] flashpants88:
I'm having trouble pasting the file into system/usr/keylayout/

I have extracted the file and its currently sitting my download folder, however it won't move. Can someone explain to this noob how I paste this. I have tried a few file explorers.

Cheers :)
[Nexus 7 General] cdromo90:
work?

Do the key mappings automatically work? Like for emulators? Up down left right A B etc, or do you need to map those? Can you map those in the emulator app itself?

---------- Post added at 04:19 AM ---------- Previous post was at 04:14 AM ----------

And also does the dongle have to be ,Microsoft certified?

---------- Post added at 04:20 AM ---------- Previous post was at 04:19 AM ----------

Do you have root access? To edit /system files you need to have a root explorer with root access.
[Nexus 7 General] flashpants88:
Yeah I have root access and I'm using root file manager pro. Is there any setting I need to have activated? I can seem to do everything else root wise.
[Nexus 7 General] D-m-x:
You need to mount the filesystem rw. By standard it is ro!
[Nexus 7 General] Luda305:
+1

I tried to use the wired controller to play contract killer 2 zombies but it's a no go... Is there anything I gotta do or is it just that game?
[Nexus 7 General] shaolinx:
i cant seem to use more then 1 controller. they got the same mappings. anyhone know how to fix this?
[Nexus 7 General] vlx600d:
ahhhhh yeah

Perfect and easy. Thanks.
[Nexus 7 General] princado:
Same thing here with a Pipo M3 with TNT rom, it doesn't seem to work.

¿How can I debug the problem?¿Where is the logcat?
[Nexus 7 General] shaolinx:
I tried using logcat to see the product and vendor id but it doesnt show up. Where did you findit.?

Edit. Found it. Its in sys/kernel/debug/devices
[Nexus 7 General] princado:
Located mine on /sys/kernel/debug/usb/devices, is there anything wrong in it?

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
B: Alloc= 0/800 us ( 0%), #Int= 1, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 3.00
S: Manufacturer=Linux 3.0.8+ host20_hcd
S: Product=DWC OTG Controller
S: SerialNumber=usb20_host
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 4
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1a40 ProdID=0101 Rev= 1.11
S: Product=USB 2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms

T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS= 8 #Cfgs= 1
[B]P: Vendor=045e ProdID=0719 Rev= 1.00
S: Manufacturer=©Microsoft
S: Product=Xbox 360 Wireless Receiver for Windows[/B]
S: SerialNumber=FD2AF4E0
C:* #Ifs= 8 Cfg#= 1 Atr=a0 MxPwr=260mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=81 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl=1ms
E: Ad=01(O) Atr=03(Int.) MxPS= 32 Ivl=8ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=82 Driver=(none)
E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=2ms
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=81 Driver=(none)
E: Ad=83(I) Atr=03(Int.) MxPS= 32 Ivl=1ms
E: Ad=03(O) Atr=03(Int.) MxPS= 32 Ivl=8ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=82 Driver=(none)
E: Ad=84(I) Atr=03(Int.) MxPS= 32 Ivl=2ms
E: Ad=04(O) Atr=03(Int.) MxPS= 32 Ivl=4ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=81 Driver=(none)
E: Ad=85(I) Atr=03(Int.) MxPS= 32 Ivl=1ms
E: Ad=05(O) Atr=03(Int.) MxPS= 32 Ivl=8ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=82 Driver=(none)
E: Ad=86(I) Atr=03(Int.) MxPS= 32 Ivl=2ms
E: Ad=06(O) Atr=03(Int.) MxPS= 32 Ivl=4ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=81 Driver=(none)
E: Ad=87(I) Atr=03(Int.) MxPS= 32 Ivl=1ms
E: Ad=07(O) Atr=03(Int.) MxPS= 32 Ivl=8ms
I:* If#= 7 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=82 Driver=(none)
E: Ad=88(I) Atr=03(Int.) MxPS= 32 Ivl=2ms
E: Ad=08(O) Atr=03(Int.) MxPS= 32 Ivl=4ms
[Nexus 7 General] Kieran5492:
Did you ever figure out how to get the files onto the tablet? I'm also missing the 0291 file so I've downloaded it but don't know where to go from there...
[Nexus 7 General] D-m-x:
Easiest way if you don't know how to type the commands in manually, is to use some sort of Root File Explorer (like Root Explorer etc.) Just Copy and Paste the file to the right destination and set the permissions.
[Nexus 7 General] 2kbandit:
That's is how I placed the file on my nexus 7. My otg cables just showed up today in the mail from Honk Kong paid whole $1.64 for two cables. My Xbox controller working just fine on my tablet.

Sent from my Nexus 7
[Nexus 7 General] tek86:
because when I enter this code

"cp Vendor_045e_Product_0291.kl Vendor_045e_Product_0719.kl "

this message appears

cp: omitting directory 'vendor_045e_Product_0291.kl'

I have Asus tf300t
[Nexus 7 General] Krippo:
Make sure you copy and paste the file and not the directory after unpacking.
[Nexus 7 General] kissofsmoke:
im a noob

Do I have to change permission on the .kcm file in terminal emulator also? I am running nexus 10, copied and changed permission on the .kl files and it stopped the spinning but I cannot correctly map the keys. I pasted the .kcm file to the appropriate folder but it didnt change much. Help.
[Nexus 7 General] Eef:
works perfect, is there a way to make this work with fifa 12?
[Nexus 7 General] ICEMANhalo96:
Wild Blood, Button re-mapping

I have followed your guide and sucessfully got my Xbox 360 Wireless controller working with my Nexus 7. I am playing a game by Game Loft called Wild Blood and some of the buttons do not work or are not mapped properly, it is possible to change the mappings of them?
[Nexus 7 General] yarkeshav:
:) thanks
[Nexus 7 General] i0nsn0w_devs:
Hey, thanks for posting that.

I'm using a Xperia Pro with my wireless controller. In Modern Combat 3, some buttons work, but most of them not. In example, I can walk forward, but when I want to walk backwards, the character knees down. Shooting and aiming works fine.

What can I do?
[Nexus 7 General] geronemo:
Un f**king believable.

I didn't know Nexux 7 had the OTG built in.

I already have the xbox wireless controller.

I already have the USB wireless dongle that i use to play PC games using xbox wireless controller.

Now is it possible to get a OTG and MHL cable, 2 in 1, i am asking because than i can output games from my GNex to my 24" monitor and play using xbox wireless controller, which would be awesome???

Also is there a software hack to get MHL on Nexus 7???

thanks :)
[Nexus 7 General] jake9891:
Just wanted to say thanks! Attached file works perfectly. Just had to rename it to match wireless Xbox controller Product id (which is 0719 - taken from sys/kernel/debug/USB/devices file). Here is logcat after restart:

01-07 01:06:14.982 439 513 I EventHub: New device: id=8, fd=225, path='/dev/input/event3', name='Xbox 360 Wireless Receiver', classes=0x80000341, configuration='', keyLayout='/system/usr/keylayout/Vendor_045e_Product_0719.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=false

Fixed camera issue and works perfectly in GTA VC, thanks again!
[Nexus 7 General] XxSHaDoWxSLaYeRxX:
so i ccan wirelessly connect my xbox controller to my N7?
[Nexus 7 General] jake9891:
Not wirelessly,still need to have WiFi receiver plugged in
[Nexus 7 General] simonxliu:
Does not work on my note 2
[Nexus 7 General] jake9891:
Any more details on your problem? What did you do?
[Nexus 7 General] juliusjonzon:
So I got the 360 controller to pair and I can navigate the home screen, but when I start an emulator the sticks dont work and only "start" and "X" works. Tried more games and I get the same result.

I pasted the files, and all went smooth in Terminal, but I still can't use my controller for ... I dont get the spin any more in GTA, but in muppen64 I can only use 2 buttons and not move. I also tryed n64oid and there I can move in smashbros but can't pick player, and in supermario I can't do anything.

Should I just keep trying different Roms?

Please help

Thanx for doing a great job!
[Nexus 7 General] Fujiwarano:
So how do i get to /system/usr/keylayout/ folder

I need to copy those two files in there.

i'm using the galaxy note 10.1
[Nexus 7 General] jake9891:
You need to be rooted and have some sort of file manager installed, I use File Manager HD on my nexus 7
[Nexus 7 General] Fujiwarano:
has rlysver

EDIT: nvm i found out.

Does anyone has a preset layout for the wired controller? With USB Joycenter?
[Nexus 7 General] Garridon:
Man I got my mhl cable a few days ago and I thought to myself "I wish I could plug up my controller"
[Nexus 7 General] Radeon1337:
sdcard_rw !?

I might have f***ed this up some how...

I downloaded the files and put them on my N7 then used root explorer to copy them to /system/usr/keylayout

Followed the instructions and ended up with this:

Tryed GTA Vice city and had the camera spin, so what to do?

Thanks! :)
[Nexus 7 General] repvik:
I've plugged in my wireless receiver, and I now get 045e:0291 up as a USB device. But the keys are really weird.

I've copied the .kl file for that vendor/product ID, put it in the right folder and given it the right permissions. I don't get why this isn't working.

The A and B buttons do nothing at all. X and Y are "ok" and "back". I can navigate (kind of) with the arrow pad, so that's working.

Neither sticks nor triggers give any response.

What am I missing?

(I'm not using a Nexus 7, but an Odroid U2 running CM10.1)
[Nexus 7 General] wapvirus:
I think you could be missing the xpad.ko see if this file is in your system/lib/modules this is the xbox360 driver file ;)

If that file is missing i would suggest you try to get a working version for your kenel/device :good:

Thanks sleeplessninja your fix works a treat I copied the two files to my device using RootExplorer changed the permissions using that app rebooted and all was working no terminal or typing commands :cool:
[Nexus 7 General] cdordon:
I have a wired Afterglow xbox 360 controller and I am getting the camera spin. How do I stop this? Is the process the same as for wireless?

I should point out that it only does camera spin if I attempt to rotate the camera with the left trigger.
[Nexus 7 General] ipub:
Hi guys, firstly I wanted to say thanks to the original poster. This has been very informative.

I have the sumvision voyager 10.1 and had to insmod the xpad.xo file each time I boot and am having some difficulty, logcat suggests it doesn't read the key files which are both in the corresponding folders. I noted that the log suggested that I should use an uppercase E instead so I tried that but no luck. I appear to be reverting to the generic key mapping and when I load dead trigger I sping around in circles. Is this right? or can anybody else see what I've done wrong here:
[Nexus 7 General] johrie:
can not map any D-Pad directions. Is there a way to fix this?
[Nexus 7 General] hunterx82:
Awesome video, thanks. I followed it all the way through and my controller seems to be connected.

I say "seems" because I am able to navigate the icons on my homescreen with the d-pad and thumbstick, but the lights on my controller keep flashing as if it's not paired with anything. I have tried taking the batteries out and resynching and it still flashes.

As far as emulators go, the NES and SNES are working just fine when I bind/map the keys. Is there an ap out there that will "universally" bind or map the keys? When I am not in an emulator and the controller is connected, the tablet randomly opens applications as if the remote is sending some signals to it even if I am not touching it.

Another question - any of you do this on KFHD? My wife just saw me playing SNES on mine and was anxious to do the same thing on her tablet. I have no experience with her KFHD except installing apps for her, but I imagine I would have to root and find emulators by side loading them?
[Nexus 7 General] hunterx82:
Is there a way to use 2 wireless xbox 360 controllers? Would you have to create a second keyboard profile in the root process?
[Nexus 7 General] D-m-x:
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.
[Nexus 7 General] amit2410:
Does it work with chat pad?

I tried this on my Xperia Neo V it works perfectly.

Can anyone confirm if the Xbox ChatPad connected to the controller can be used to type on Nexus 7 (or any other device)?

That would be really helpful if I can PLAY and also TYPE by ChatPad with the wireless controller.

Thanks.
[Nexus 7 General] Snakebear:
So I'm trying this method on my Imito MX1 Android mini PC. I unzipped the the OP's original attachments and copied them to the correct folder. I followed the Terminal commands and everything seemed to work. I also tried the commands on the kcm file as well, "cp Vendor_045e_Product_0719.kcm" didnt seem to work (it was telling me what cp is for as if I just typed cp it and nothing else) but the chmod command seemed to work and if I type "ls -l" Vendor_045e_Product_0719.kcm is now listed with an r next to it, where it did not have one before. Still after all this my controller still has limited function. I cant use the d pad, right analog or triggor buttons. Anyone got any ideas? I know the creator of my rom said that xbox controller support was included, but I didn't copy over any identical files, so if it's there it's called something different. Would this cause a conflict?
[Nexus 7 General] kofiaa:
So if I get this right, a wired 360 controller just needs off to work. Can I use a third party controller?
[Nexus 7 General] outlawbiker:
Has anyone got this to work with a note 2?
[Nexus 7 General] awesomejt:
I use a wired MadCatz xbox 360 controller and it works just fine on vice city and on fpse using OTG.
[Nexus 7 General] sd_dracula:
Guys,

Has anyone managed to get this to work on an S3 with 4.1.2 Root?

Followed the guidelines on page 1 but no luck so far, does it just not work for the S3?
[Nexus 7 General] jblade1000:
Updated: I used Logcat Extreme and captured the Vendor and Product ID, its the same as when connected via usb. i used Root Explorer, copied the 45e_28e.kl file, and renamed it to reflect the onlive wireless controller attributes. gta 3, vice city, and dead trigger work well now (however dead trigger doesnt like the right trigger so i use the left trigger for firing). i will test more games and the DroidMote solution for touch only games and see how this goes.

Original Post: Did anything ever come of this? I have an OnLive controller and I desperately want to use it with my tablet. You were correct with regards to the vendor id and product id, the same values (2378 and 100a, respectively) show up when using USBView on my computer with the controller hooked up via USB. But I ofcourse want to use the controller wirelessly, via bluetooth. Any help getting this up and running would be great!
[Nexus 7 General] alakyr:
Hello,

i followed the guide and now the visual work correctly but, with dead trigger, i can't shoot...no one key is used for shoot or every other action..i can only move and look around...

another thing...insted use this command

i made a copy of the 291 file and renamed it 719 cause the command cp didn't work for this error:

system/bin/sh: cp: not found

ps. i'm using a Xiaomi Mi2 with ther latest MIUI V5 3.3.15

EDIT: checked via Root Browser and both the files have permission 0644
[Nexus 7 General] 19rsn007:
Dudes I have an ACRyan Veolo media player that runs Android 2.2

If I install these files to the corresponding folders and fix the permission, would it work?

I tried doing this and tried playing a genesis emulator, but the thing didn't communicate with the controller.

Do I have to change the key mappings in the emulator settings?

It takes USB keyboard and mouse....so maybe something can be done with that.

It has 2 USB host ports....
[Nexus 7 General] [ThibaulT]:
Hi :)

Thank you for your great work, it's perfect with a friend's wireless Xbox 360 official gamepad.

But do you know how to make my Razer Onza (with wire) work with my Nexus 7 ?

Thank you a lot.
[Nexus 7 General] [ThibaulT]:
I just "up" my previous post. :)
[Nexus 7 General] Fernze411:
Wireless dongle!! argh

Having the wireless dongle plugged in kinda negates the need for a wireless pad.

I was dreaming of a situation for not needing to plug anything in to my N7. I think I will just stick to having a wired pad.

I will check out the PS3 controller method and see what that is all about.. but PS3 controller sucks!!

Good work though!! :good:
[Nexus 7 General] issak42:
I hooked up the wireless controller, it works awesome (i followed that guide where you rename the key layout files and stuff), but in SG: dead zone in settings I can't map the d-pad buttons, it does nothing, as if I wasn't pressing anything. Anyone else experiencing anything like that?
[Nexus 7 General] csick:
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.
[Nexus 7 General] issak42:
No, this doesn't work.

I mean yes, it makes d-pad recognizable, but in sg: dead zone d-pad buttons are recognized the same as X Y A B buttons (buttons 0 to 3), so it's not really usable.

I haven't tested other games.

Is this the same on wired x360 controller?

And another thing, has anyone figured out how to get rid of guide button blinking all the time?
[Nexus 7 General] csick:
Interesting. I'm mapping the dpad buttons to the android dpad keypresses, so sg: dead zone seems to be interpreting those as the same as the face buttons. I'll download it and mess around with mapping the buttons to different things to see what works for deadzone. Unfortunately, It means we may need to use different keylayout files for different games.

You should be able to use the key layout file for the wired controller as well if you overwrite the wired controller keylayout. I don't have a wired controller to test it with, and I would recommend backing up the original in any case.
[Nexus 7 General] csick:
So I tried changing the mappings for the dpad buttons to other buttons in the keylayout file, but SG: Dead Zone still interprets it as buttons 0-3.

It seems to me that the game is interpreting the button presses at the driver level, and ignoring whatever the buttons are actually mapped to.

In other words, it would probably require a driver change to get it working properly.
[Nexus 7 General] N4warhead:
I did everything the OP said, and I can't get it to work for any games. With dead trigger I try to customize the game pad after only doing like 1 or 2 buttons when I click to change others it replaces it with the last button I configured also crashes dead trigger. Any help will be appreciated

Edit: I attached the logcat logs, I don't know what most of it means but hope it helps

04-17 05:42:58.359 D/EventHub(389): No input device configuration file found for device 'Mad Catz Wired Xbox 360 Controller'.
04-17 05:42:58.374 I/EventHub(389): New device: id=10, fd=323, path='/dev/input/event4', name='Mad Catz Wired Xbox 360 Controller', classes=0x80000341, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=true
04-17 05:42:58.379 I/InputReader(389): Device added: id=10, name='Mad Catz Wired Xbox 360 Controller', sources=0x01000511
04-17 05:42:58.379 W/EventHub(389): An input event from /dev/input/event4 has a timestamp that appears to have been generated using the wrong clock source (expected CLOCK_MONOTONIC): event time 1366191778367790000, current time 22290249465465, call time 22290249446340. Using current time instead.
04-17 05
[Nexus 7 General] Mavamaarten:
Thanks a bunch mate. I tried copying the already installed Xbox wired controller profile to the newer name, but that simply made it so my controller stopped working completely. Your .kcm file, however, did the trick, and now i'm playing PS1 games on my phone, awesome!

Btw, the xbox360 receiver from DealExtreme or ebay works fine, you don't need a legit receiver.
[Nexus 7 General] Yarox:
Thanks to you and to the OP. I have a Logitech F710f wireless gamepad, which uses 360 drivers, but obviously has another vendor ID. By finding the devices ID and downloading the layout attached in the first post and naming it according to the ID I found I got it to work.

Edit: I copied the xbox layout to these two ids:

046d c22f

046d c21f

Edit 2: I also use a Nexus 10, although this obviously isn't important.
[Nexus 7 General] ojsimpsonn:
Question for sleepless ninja:

First, great guide really appreciate it. I have an issue that you may be able to address. I have a rooted stock N7 and am using a wireless Xbox 360 controller. My controller works fine for a few minutes but then the connection randomly drops and I have to unplug and plug the otg cable back in for it to work...then it drops again and I repeat the process. What do you think could be the issue here? Could it be the OTG cable I am using? Please let me know what you think. Thanks.