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

WisdomWolf

Senior Member
Sep 6, 2006
426
92
0
www.developingwisdom.org
I just completed some quick testing on my 16GB Nvidia Shield TV:

Wireless Xbox 360 controller - works as expected and correctly indicates that it's paired as player 1 rather than endless blinking.

Wired Xbox One Controller - works as expected.

Wireless Xbox One Controller - not working. No action from controller button presses and no light on dongle when attempting to pair.
 

socksi

Senior Member
Jun 3, 2010
53
27
18
I just completed some quick testing on my 16GB Nvidia Shield TV:

Wireless Xbox 360 controller - works as expected and correctly indicates that it's paired as player 1 rather than endless blinking.

Wired Xbox One Controller - works as expected.

Wireless Xbox One Controller - not working. No action from controller button presses and no light on dongle when attempting to pair.
Thanks for reporting.
I will update the starting post respectively.
 

Zacharybinx34

Senior Member
Mar 20, 2012
638
38
58
Thanks for this!

Two questions:

1. Do you think it will ever be possible to get the XBOX ONE Controller working wirelessly? I'd love that.

2. Not sure if you could do this, but do you have the knowledge to make the Nintendo Gamecube Adapter + Gamecube Controllers work on the shield? Someone already got it working on Linux, so I'm guessing someone smart like you would be able to do it pretty easily? I'd really appreciate it!

https://www.reddit.com/r/smashbros/comments/2nghc7/wii_u_gamecube_adapter_now_works_on_linux/


Thanks!
 

alsheron

Senior Member
Jul 15, 2006
373
82
0
This looks fantastic - exactly what I/we need for the 360 wireless controller flashing problem.

Trouble is, I've had a look at some of the other threads on XDA but I can't find anywhere any clear step by step instructions on how to access the Shield TV using fastboot. Surprised there isn't a sticky. I've done this many times with my Nexus 5 though so understand issuing the commands well enough.

Got a few questions:

Do I need to root my Shield TV to be able to flash this Kernel? Will I need to unlock the bootloader first? Will flashing this kernel require the Shield TV gets wiped and needs to start over with a fresh OS installation?

I've seen somewhere mention of needing to use a USB OTG cable to access fastboot? How do you connect a USB otg cable to the Shield TV and then PC (laptop?) can someone provide pics of the cable needed? I've got a USB OTG with a female end for using USB sticks - is it one of those?

Thanks!
 

mythamp

Senior Member
Nov 2, 2009
335
57
0
Toronto
www.munakib.com
Do I need to root my Shield TV to be able to flash this Kernel? Will I need to unlock the bootloader first? Will flashing this kernel require the Shield TV gets wiped and needs to start over with a fresh OS installation?

- You will not need root but you will have to unlock bootloader which will wipe your device. If you get that far, might as well install TWRP recovery, root it & install adaway (adblocker).

I've seen somewhere mention of needing to use a USB OTG cable to access fastboot? How do you connect a USB otg cable to the Shield TV and then PC (laptop?) can someone provide pics of the cable needed? I've got a USB OTG with a female end for using USB sticks - is it one of those?

- USB cable comes with the shield tv, you can use any micro-usb cable that basically charge android phones. You connect the USB side to the PC/Mac the MicroUSB side goes into shield's microusb port. I will try to grab a photo sometime for you, but trust me its not rocket science - can be scary for a beginner i guess.

This looks fantastic - exactly what I/we need for the 360 wireless controller flashing problem.

Trouble is, I've had a look at some of the other threads on XDA but I can't find anywhere any clear step by step instructions on how to access the Shield TV using fastboot. Surprised there isn't a sticky. I've done this many times with my Nexus 5 though so understand issuing the commands well enough.

Got a few questions:

Do I need to root my Shield TV to be able to flash this Kernel? Will I need to unlock the bootloader first? Will flashing this kernel require the Shield TV gets wiped and needs to start over with a fresh OS installation?

I've seen somewhere mention of needing to use a USB OTG cable to access fastboot? How do you connect a USB otg cable to the Shield TV and then PC (laptop?) can someone provide pics of the cable needed? I've got a USB OTG with a female end for using USB sticks - is it one of those?

Thanks!
 
  • Like
Reactions: alsheron

alsheron

Senior Member
Jul 15, 2006
373
82
0
Do I need to root my Shield TV to be able to flash this Kernel? Will I need to unlock the bootloader first? Will flashing this kernel require the Shield TV gets wiped and needs to start over with a fresh OS installation?

- You will not need root but you will have to unlock bootloader which will wipe your device. If you get that far, might as well install TWRP recovery, root it & install adaway (adblocker).

I've seen somewhere mention of needing to use a USB OTG cable to access fastboot? How do you connect a USB otg cable to the Shield TV and then PC (laptop?) can someone provide pics of the cable needed? I've got a USB OTG with a female end for using USB sticks - is it one of those?

- USB cable comes with the shield tv, you can use any micro-usb cable that basically charge android phones. You connect the USB side to the PC/Mac the MicroUSB side goes into shield's microusb port. I will try to grab a photo sometime for you, but trust me its not rocket science - can be scary for a beginner i guess.
Ah thanks for explaining! I've submitted a request to Nvidia through their feedback form to fix the flashing light problem on the xbox wireless controller by updating the kernel. Imma wait till the next update to see if they apply the fix before trying this.
 
  • Like
Reactions: copticwalad

jaisonm

Member
May 2, 2008
6
0
0
Curious to know if anyone has tried this on the new firmware as well.. was running this on prior to the update perfectly.. After the update, back to the blinking light and non functional D-Pad...
 

socksi

Senior Member
Jun 3, 2010
53
27
18
Curious to know if anyone has tried this on the new firmware as well.. was running this on prior to the update perfectly.. After the update, back to the blinking light and non functional D-Pad...
I will provide a new kernel for firmware 3.2.0 when Nvidia has released the recovery image here.
 

slikerhael

Member
Feb 7, 2013
49
5
0
Are there any differences between the valve xpad driver and the Linux Kernel 4.7 version? My controller lights up #1 but does the all leds flashing thing every 5 seconds which never happened on the valve kernel on 3.1. After modifying keypad files got all buttons working again & no constant spinning.
 

darksabre_x

Senior Member
Nov 8, 2008
115
41
0
Are there any differences between the valve xpad driver and the Linux Kernel 4.7 version? My controller lights up #1 but does the all leds flashing thing every 5 seconds which never happened on the valve kernel on 3.1. After modifying keypad files got all buttons working again & no constant spinning.
What modifications did you do? I've searched all across the interwebz and tried various suggestions with no luck. The dpad not working everywhere is killing me.

Sent from my SM-G930T using XDA Labs
 

slikerhael

Member
Feb 7, 2013
49
5
0
What modifications did you do? I've searched all across the interwebz and tried various suggestions with no luck. The dpad not working everywhere is killing me.

Sent from my SM-G930T using XDA Labs
I modified Vendor_045e_Product_0291.kl in /system/usr/keylayout/ to include
Code:
# Dpad
key 704 DPAD_LEFT
key 705 DPAD_RIGHT
key 706 DPAD_UP
key 707 DPAD_DOWN
Also have my Xbox guide button mapped Home and back button mapped Back so those are functional too. I did notice using the d-pad on 3.2's Linux Kernel 4.7 ver Xpad module skips over a selection in the menu's which is ridiculously annoying and never happened on Valve's xpad kernel module.
 
Last edited:

darksabre_x

Senior Member
Nov 8, 2008
115
41
0
Doesn't seem that I have an 0291. I see 028e and 0719, which are the files I've been modifying...... hmmm seems I have some more poking to do on this system

Sent from my SM-G930T using XDA Labs

***Edit***

Do you feel giving enough to provide a copy of your kl? If not, it's cool you've provided a lot of help already!
 
Last edited:

slikerhael

Member
Feb 7, 2013
49
5
0
Doesn't seem that I have an 0291. I see 028e and 0719, which are the files I've been modifying...... hmmm seems I have some more poking to do on this system

Sent from my SM-G930T using XDA Labs

***Edit***

Do you feel giving enough to provide a copy of your kl? If not, it's cool you've provided a lot of help already!
Haha that's odd, I've only ever modified 0291, haven't heard of 028e. Did alot of trial and error stuff on 3.0 starting with getting the constant spin fixed, then mapping the back button for borderlands pre-sequal game menu. It seems that the wireless controller goes through it even though the text states its for usb controllers. I sourced the spin fix from here: http://forum.xda-developers.com/showthread.php?t=1792531 which also has 0291, maybe that thread will provide some help too. Can't remember where I found the dpad fix, it wasn't on xda. The 360 controller is my personal favorite, so I didn't stop until it felt native on my shield tv.

But here's my 0291.kl
Code:
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# XBox 360 USB Controller
#

key 304   BUTTON_A
key 305   BUTTON_B
key 307   BUTTON_X
key 308   BUTTON_Y
key 310   BUTTON_L1
key 311   BUTTON_R1
key 314   BACK
key 315   BUTTON_START
key 316   HOME
key 317   BUTTON_THUMBL
key 318   BUTTON_THUMBR

# Left and right stick.
# The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd.
# This confuses applications that rely on the flat value because the joystick actually
# settles in a flat range of +/- 4096 or so.
axis 0x00 X flat 4096
axis 0x01 Y flat 4096
axis 0x03 Z flat 4096
axis 0x04 RZ flat 4096

# Triggers.
axis 0x02 LTRIGGER
axis 0x05 RTRIGGER

# Hat.
axis 0x10 HAT_X
axis 0x11 HAT_Y

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