[KERNEL]Kernel with full support for XBox 360 / One controllers[v1.3]

MadZiontist

Senior Member
Feb 10, 2015
120
19
0
Amityville
Nice. Inadvertently just got my Shield ATV yesterday, after having owned the Portable for over a year and a half. I say inadvertently, cause I intended to buy the JXD S192 Singularity, but was emailed by JXD, asking that I cancel the order, and place it again in a couple of months. So I decided to put the Singularity on ice for now, and pick up the NSATV.

Anyhow, thanks for this mod. The Xbox One controller is the nicest console controller I've ever held.
 

tman777

Member
Dec 14, 2015
24
3
0
On the stock rom The Shield Nvidia controller R analog stick acts as as a mouse pointer in some apps. So does the wireless Xbox 360 controller. (On the stock Rom)

I've installed 1.3 kernel on Zulu99's 1.4 Full Android Marshmallow rom. But the right stick doesn't doesn't seem to do anything. Any chance this could be made to work as it does on the stock firmware with the shield controller?
 
Last edited:

Felnarion

Senior Member
Mar 23, 2011
350
168
0
The Xbox One S controller is out now, and the shield mostly detects it, but some of the buttons are mapped wrong (left shoulder seems to be Y, triggers don't seem to do anything). But I notice that some emulators can work, if you manually map the buttons. Is that something that could be added/changed here, or is that an entirely different area? I wouldn't mind testing, if needed.
 

I_did_it_just_tmrrow

Senior Member
Feb 27, 2011
337
53
0
I will provide a new kernel if necessary.
Does "if necessary" mean I can try to boot your kernel after the 3.3 update? If it fails it means you need to recompile, if not the update leaves the kernel untouched?

Another question is:
Is not possible to create a kernel module instead of flashing and compile the whole kernel?

Greetings by Idijt
 

socksi

Senior Member
Jun 3, 2010
53
27
18
Does "if necessary" mean I can try to boot your kernel after the 3.3 update? If it fails it means you need to recompile, if not the update leaves the kernel untouched?
Yes, you can give it a try. Even if the kernel has changed there is a good chance it will work.
I'm just downloading the latest 3.3.0 sources from Nvidia but it's awfully slow.
I will update the starting thread when compilation has finished.

Another question is:
Is not possible to create a kernel module instead of flashing and compile the whole kernel?
Loadable module support is present but almost all drivers (including xpad) are compiled into the kernel by Nvidia.
AFAIK, there is no way to replace a builtin driver with a module.
 

Con21

Member
Apr 22, 2015
12
3
0
Thank you for v1. 4 - works on 16 GB model without any problems so far. Although the wired Xbox One Controller worked out of the box, I had to adjust/add the specific keylayout to get home button, back button and two of the four shoulder buttons working as expected.

Edit: The keylayout for wired Xbox One Controller is basically identical to the Xbox 360 Controller but the product ID is different and therefore the file name, too. I created a keylayout file named "Vendor_045e_Product_02dd.kl" and took the content from: http://forum.xda-developers.com/showpost.php?p=67691145&postcount=40. Don't forget to add the permissions (644)!

Alternatively, take a look at: http://forum.xda-developers.com/nexus-6p/orig-development/kernel-elementalx-n6p-t3240571/page598
 
Last edited:

Con21

Member
Apr 22, 2015
12
3
0
Yes i have one of the newer xbox s controllers and it does indeed work, although it seems to need pairing again after reboot. Thanks
That might be either a bug with Shield TV or Android TV. Tried several Bluetooth-apps (auto-connect etc) but it just doesn't work without pairing again and again. In contrast, it works perfectly with my Sony Xperia. We should submit some feedback to Nvidia.
 

Toniooo

Senior Member
Oct 31, 2009
89
42
0
Crotone
Nice! very good job all work as expected the only issue for me is the common "spin issue" with my wireless receiver for the xbox 360 controller but with an edit of kl file all goes fine even the select key and xbox key. @socksi it's possible add ntfs (r/w) support?
thanks for your work
 
Last edited:

I_did_it_just_tmrrow

Senior Member
Feb 27, 2011
337
53
0
Changelog:

Code:
v1.4
 - kernel for firmware 3.3.0
v1.3
 - kernel for firmware 3.2.0
v1.2
 - kernel for firmware 3.1.0
v1.1
 - found a newer version of the xpad driver directly from Valve
 - support for Xbox One Elite and a few other third party controllers has been added
@socksi is there a chance to get the newest, compiled kernel for the 5.0.2? If you can help me to compile the kernel and explain me some things, I can help with future kernel updates to provide a new, patched kernel for this thread.

Greetings by Idijt
 

slikerhael

Member
Feb 7, 2013
49
5
0
@socksi is there a chance to get the newest, compiled kernel for the 5.0.2? If you can help me to compile the kernel and explain me some things, I can help with future kernel updates to provide a new, patched kernel for this thread.

Greetings by Idijt
He has to wait for the source of the last update to get released to compile the latest kernel. In the past Nvidia releases them a few weeks after the update and socksi is on it pretty quickly. However Nvidia updated again before the source was released for the first one, so I'm unsure what kind of timeframe we're looking at.
 

darksabre_x

Senior Member
Nov 8, 2008
115
41
0
He has to wait for the source of the last update to get released to compile the latest kernel. In the past Nvidia releases them a few weeks after the update and socksi is on it pretty quickly. However Nvidia updated again before the source was released for the first one, so I'm unsure what kind of timeframe we're looking at.
5.02 source has been up almost since launch of the update for Shield TV 2015. I recently tried my hand at compiling, using the excellent sources cited, and got a working kernel img for 5.02. I'm still waiting on 5.1 kernel sources, but this should help for those waiting on 5.02. It uses xpad from kernel.org.


Thanks!
 

Attachments