May 27, 2020, 05:56:45 pm


Have you visited the Allwinner Chipset wiki? -

Cubietruck - gamepad won't work <<== SOLVED!

Started by actkk2000, March 09, 2014, 08:02:24 pm

Previous topic - Next topic


March 09, 2014, 08:02:24 pm Last Edit: March 23, 2014, 08:42:31 pm by actkk2000

I would like to know if there is a gamepad/joypad/game controller that really works on CT with Android...
I have a common USB dualshock gamepad, also tried a Sixaxis PS3, installed USB/BT Joystick Center, and no luck...
Tested on all nand 1.01 versions of
I read that with Gamepad IME and joydev.ko file may work, but dont know where to get a compatible one...
So, is there anyone that could help on this?
Thank you,


hi install a 'terminal ide' and 'busybox', and check your 'dmesg'  after/before when you plug your game pad and check what driver is load or not. if not this is the problem..

try tu put your usb joystick in a linux machine and check what drivers are load. my joystik is a pantherlord (chinesse dual ps2 clone)

in other device like cubieboard (mele a2000) months ago I 'll have to compile the driver and load with insmod for play two players retro games like snes and neogeo in android ;).
(I think that you will have to create also a new joystick keyboard layout. generic.kl  for android (find ind google is easy,  but with your id gamepad)

when the driver is load with joytick center you can map buttons because not all games can play jostick and mapping joystick to keyboard keys is the clue.

try ;)


Thank you calhemp.
But I am not sure to be capable to do all this stuff... could you be more specific on "compile the driver and load with insmod", do you mean joydev.ko or something else?
And in that case do I have to compile the entire Android system from the SDK?...
Don't know where to start looking to modify Android...  :o


March 23, 2014, 08:23:25 pm #3 Last Edit: April 01, 2014, 08:59:53 pm by actkk2000
After struggling myself to get a driver for my usb gamepad, I finally managed to compile one.
I am using this image on my CT with kernel 3.4.39 for resolution 1080p:

QuoteQuote from: @lex on March 14, 2014, 06:26:36 PM

Here is a CT image with HDMI 1080p (1920x1080):

I compiled the driver module with this source code:

Quote from: @lex on March 20, 2014, 08:25:11 AM
try this:

This driver is for "Dragon Rise USB gamepad" [ Generic Chinese Vendor_0079_Product_0006 ( VID:PID 0079:0006 ) or DragonRise Inc. PC TWIN SHOCK Gamepad, named hid-dr.ko, kernel version 3.4.39

Looks like this:

Download driver from here or from attachment:

Copy hid-dr.ko to "/system/vendor/modules" and load it with "insmod hid-dr.ko" from terminal.

Included is keyboard layout file (copy to "/system/usr/keylayout", not needed in my case) and a script to load the module at start (use a script manager)

Works great on FPse for PSX gaming!

Thanks @lex and calhemp for your help!  ;D


March 31, 2014, 07:22:48 pm #4 Last Edit: April 01, 2014, 08:07:02 pm by actkk2000
For what is worth, the steps I followed for driver compilation, a little more explained:
(Requirement: to know exactly what is the driver module needed)
(Done on Windows 8.1 PC, AMD Phenom II X4 processor, 8 GB RAM)

1- Install VMWare Workstation:

2- Download VMWare image of Ubuntu Linux machine:

3- Mount Ubuntu image on VMWare (set memory 1024 MB), login, open terminal, change to root (su -) and run:
apt-get update & upgrade

4- Follow these instructions to install software:
(could not install libraries 32 bit though :(, not sure if really necessary...)

5- Download, transfer (map a network drive) and decompress SDK file inside Ubuntu:

6- Go to "android-SDK/lichee/linux-3.4" dir, edit file ".config" with nano and find driver to enable. In this case:

7- Change the line to CONFIG_HID_DRAGONRISE=m
Copy ".config" file as "linux-3.3/arch/arm/configs/cubietruck_defconfig" (replace)

8- Follow these instructions, but starting from "Build Linux kernel" line:
and stop after "Success Building" (do not continue on "Build Android image")
(In this case OS dir name is Linux-3.4, not 3.3)

9- During the compiling process, when asked to compile driver module answer Y

10- After finishing, go to "android-SDK/lichee/linux-3.4/output/lib/modules/3.4/" dir
and find driver module (in this case hid-dr.ko), copy it to host PC.

11- Download this CT image (kernel 3.4.39, same as SDK):

12: Follow these instructions to install image on CT with PhoenixSuit:

13- Install in CT "SuperSu","Android Terminal Emulator", "Busybox", "Root Browser" from market.

14- Use usb cable to copy driver to CT, move it with "Root Browser" to "/system/vendor/modules" and load it with "insmod hid-dr.ko" from terminal (change to root with su -).

15- Create a "" file and install "SManager" from market to configure to load module on startup.



hi, i'm currently trying to get my xbox 360 controller working on CT.
In order to achieve this, i need to compile the xpad.ko driver located in "\drivers\input\joystick".
I have the same Android image (kernel-3.4.39) running on my CT as you.
I am a total noob at linux and also don't have a vm running it.
So, you can you do me a huge favor and compile it for me? (If it doesn't take you too much time and effort) :)


Perhaps, if you can find out exactly which line(s) of the .config file should I enable for the xpad driver.
Unfortunately I don't have such gamepad to test it, although I borrowed a wireless one once, prior to heard about the driver compiling procedure, and of course it didn't work either...  ???
Is your gamepad wireless or can be usb plugged?


I have the wireless version.
The gamepad requires a Receiver which is plugged in via USB.
According to this manual it should work with android:

I couldn't find a specific entry for the xpad.ko in .config.
But I think the flag that should be enabled is CONFIG_INPUT_JOYSTICK. This might let you access more specific entries.
In the Kconfig inside of "\drivers\input\joystick" I found the line which should enable the driver. It's called "config JOYSTICK_XPAD".


April 06, 2014, 10:46:01 pm #8 Last Edit: April 06, 2014, 11:05:51 pm by actkk2000
Well I had to do a couple more rounds since it didnt work at first  :-\

It seems that according to Kconfig file notes for xpad driver, it's also needed to enable in .config:

And since it failed at first, it was also needed to re-enable the new imported lines in .config from Kconfig:

Finally after the process finished for the 3rd time, it came out the xpad.ko driver  ;D

You can download it from here or from the attachment:

You may also will need to install the layout file following the instructions from the link you provided.
Remember this is only for kernel versi├│n 3.4.39.
And don't forget to let me know if this driver worked after all.

Good luck!


Finally it works.
I am now able to use one Xbox 360 controller. Another one will map to the same keys.
The D-PAD wasn't recognized at first. I slightly changed the .kl file, so it now recognizes it as the same keys as the left stick.
I attached the .kl in case s/o needs it.
The right and left trigger isn't working yet.


Good news!!
Seems that is really possible to make working drivers for CT after all! ;D


May 11, 2014, 01:26:11 am #11 Last Edit: May 14, 2014, 01:28:02 am by virtualaddict
Thank you guys SO MUCH for this post. I spent hours trying to figure out what USB controller I had and what the correct key layout was.

For anyone else who bought Etekcity controllers off Amazon (2 for $15 is nice deal - amazon link ) it turns out these controllers are technically DragonRise USB controllers and their vendor ID and product ID are 0079 and 0006.

This file: Vendor_0079_Product_0006.kl was what I needed to get my DragonRise USB controllers working properly, and it was the only file I needed to put in system/usr/keylayout/ to get everything working. Didn't need to mess around with anything in system/lib/modules/. I tweaked the file slightly for "DragonRise USB" controllers, since it was a little off at first, there's a comment that says it was actually for "Speedlink Strike gamepad", which have the same VID and PID. Weird. Anyway,. I can do just about everything with my controller now, including the process of opening emulators and closing them, saving, etc, which was what I REALLY wanted for my MK808B android mini TV.

I'll attach the file I tweaked to this comment. Hopefully Google will pick this up for the next  frustrated soul in my shoes. :)


edit: I just want to come back to say if you want your Select button to be HOME, then change this one line in the .kl file:
key 0x128    HOME              WAKE
For some reason,  when I just made it HOME the entire mapping structure was ruined and my controller wouldn't work at all. But when I add WAKE part, it works!  8)


Thank you very much virtualaddict!
I am very glad if this is helpful to people in some way  :D


woow atckk2000, sorry I forget that I had replied this thread ... and  how help you more.

you did the same I did ;)  and now is more clear here and best explicated for future.

great work been here  ;)


My pleasure! Feels good to help people, although I really know too little... [emoji6]