dimanche 24 janvier 2016

I recently bought an Android TV BOX from a chinese vendor for less than 30 euros. The model is the MXQ one, embedding an Amlogic S805 quad core UC under Android 4.4 (kitkat).
Board model is "m201".

Connected via HDMI to a Samsung flat screen, I can say it does the job. I can browse my LAN with the 10/100M ethernet to watch HD movies , and that is much faster than using any WIFI connection. It also supports external NTFS USB2 hard drive.
Specifications :
  • Chipset: Am logic S805 Quad-Core Cortex-A5 at 1.5GHz
  • GPU: Quad-Core Mali-450 at 600MHz+
  • USB host: 4 High speed USB 2.0,support U DISK and USB HDD
  • Card reader: SD/SDHC/MMC cards
  • High Definition video output: SD/HD max.1920×1080 pixel
  • LAN: Ethernet:10/100M, standard RJ-45 / Wireless: Built in WiFi
  • HDMI: HDMI 1.4b with CEC / AV: Support / SPDIF/IEC958: Coaxial

I have installed the Archos Video Player app from the Google market. This small piece of software is perfect for the box, and much faster and simplier than the XBMC app on Android. It allows me to browse my SMB shares with a really cool GUI, designed especially for TV.

I own 2 PC Logitech cordless rumble pad,
so I wanted to use them with MAME, to play retro-games. But no luck. The Linux kernel of the beast doesn't include any game pad drivers, so Android apps can't see them. I tested also my Xbox 360 game pad : same result.

After a full kernel recompilation, I have now full gamepad support for both Logitech and Xbox gamepads !!

Hopefully, the box is pre-rooted, so you don't have to hack it to get superuser permissions.
Drivers can be loaded as module with the "insmod" shell command, in a terminal session (use adb or a terminal Android app). You must be in su mode.
for instance: 

insmod ff-memless.ko
insmod xpad.ko
insmod hid-logitech.ko

will load Xbox gamepads support (ff-memless is the force feedback driver) + HID Logitech support.

You have to install some "keylayout" to the /system/usr/keylayout directory if you want to use the gamepad to navigate in Android menu and applications.  The kl file maps gamepad events to keys events that Android will interpret. You can edit the mapping to build you customized controls.
To copy theses files , you must remount the system partition as writeable.

I made a zip pack containing all games pads drivers as ko modules I was able to compile with the kernel,  a set of keylayout. and a script to launch modules. I recommend to unzip on the /sdcard and to not modify system/lib.  Modules can be loaded from the sdcard.

To launch modules at each boot, you can use SManager (Script manager), an app on the market, and making the sh script to be "boot" and "root".  It is the most easy and safe way.

Download here
Enjoy !!

49 commentaires :

  1. Hi
    Thank you for the modules.
    Could you do hid.dr.ko modules please
    Kind regards

  2. I put the codes in the terminal and I get:

    insmod: can't open ff-memless.ko
    insmod: can't open xpad.ko
    insmod: can't open hid-logitech.ko

    why?? please help me

  3. Check your hardware : modules are for a 32 bits platform (S805only). Or, check the path...copy all .ko modules in the same directory.

  4. my Board model is "m201

    i copy the files to the sdcard and /system/usr/keylayout directory, but not working why???

  5. Try with adb shell first. You must be root.

  6. I have a Dual PSX Adaptor .
    Could you compile hid-pl.ko module.
    Thank you.

  7. Ce commentaire a été supprimé par l'auteur.

  8. I have a SNES USB gamepad (http://tinyurl.com/gvkrpv7) would it work? Would a usb PC gamepad type playstation work? I wanted to buy this box to play emulators then saw that there wasn't bluetooth. What module should i load?

  9. Some additional modules

  10. Additional files:
    and Vendor_0810_Product_0001.kl

  11. for 64 bit modules go here

  12. Thank you so much. It works. But when playing MAME. 2 gamepad same function. If you enable autodetect, button( dont work.
    How to map keylayout.
    I have worked since 2day to it run. Now What had I to do next?

    1. Hi,

      Could you help me to install it? I run the script but it doesn't work.

  13. I cant install the modules i dont know what im i doing wrong is there any tutorial explained step by step?? I cant find anything

  14. Thanks for all your help! Any ideas where I can get 64bit drivers for hid-logitech.ko?

  15. Hi does this work on S905 im having problems with the gamepads and hoping this would help

  16. You can find the S905 Xbox drivers in the link above.

  17. Hello – Just got the Mad Catz for Android and works well.
    There is a real concern that the drone keeps flyng /drifting in the last direction you sent it, even when joy stick is recentered. Is there a way to fix this .
    Also, can controls be added fro android to control the camera

  18. Yes your 3D games graphics along with crystal clear 4K UHD video and GOSTREAMER G8 runs on Android 4.2 Kit-Kat and allows you to install and run some of the most popular Android apps direct from the Google Play Store. This box gives you everything and more with quality at affordable prices .

  19. would this method work for any box? Does it include drivers for the Dual Shock 3?

  20. I'm also having trouble installing this, left a message for you on XDA with screenshots, would be great if you could help.

  21. Isn't there any " easier" way to fix this problem on s905 boxes? Like a flashable zip or something? My knowledge of coding and the whereabouts or android are far from a power user ( or coder), but since the firmware lacks a set of proper files, wouldn't it be easier ( with less user errors) to properly flash it, since most of these boxes come pre rooted only lacking a recovery. Again i apologise if what i am saying is too much work to make, and i never meant to make the effort you've done so far pointless. Thank you for the good work.

  22. It says 'xpad.ko' failed (Exec format error)

  23. Hi,

    Do you think it will work for MXQ Pro 4K S905? I got same problem with this.

    Kim Son

  24. Any news ? I mean like did you lanage to find a solution for less tech-savvy people , or people who don't have access to a computer to follow your tutorial? Thank you for your hard work by the way. Have a nice day

  25. request: hid-dr.ko for dragonrise controllers

  26. Can you help me to load the bluetooth modules, because the s805 dont load bluetooth dongle, thank you in advanced

  27. How about a youtube tutorial? That would really help out

  28. Hi!! Same problem here, i've bougth an mxq tv box but mine came with amlogic s905 processor and kernel 3.14.29. I can't get it to work, a little help will be MUCH apreciatted

    1. Check the link above for 64 bits

    2. Hi, thanks for your answer. I've suscripted into that forum and downloaded the modules, but when i try to execute the insmod command (after SU command) it says "insmod failed no such file or directory" and the file is there, i'm sure...but it didn't find it...i don't understand

    3. those modules are for the s905x (android 6.0) and my mxq console is s905 (5.1) so that could be the problem why they don't work

    4. Remember : modules for 64 bits will not work on a 32 bits.
      The Android version could play a role, but the insmod is a totally low level trick, not Android dependant...

  29. if you want root your mxq s805,you can do it with app root 360.

  30. (Exec format error) on android 4.4.2
    in some sites they said it might be due to kernel differences,,i dont know how this can be solved..may be some one have to repack those modules againfor different kernel versions

  31. Can i use Nyko Playpad bluetooth android controller for TV box as well as fo my Phone?

  32. can you plz help with step by step procedure.. MXQ PRO Amlogic S905x Android 6.0 .
    thanking you sir....

  33. Hi, could create apk to joystick Power Fast USB. Similar to playstation 2 controller.

  34. Do i just download to file and im ready to go, or do i do more than that, also will this work with the Logitech f710 gamepad?

  35. Will this work with any generic usb gamepad?