Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Chinese Dragonrise gamepad support on Allwinner a20 dual core box (Jesurun 4.2.2 A20 1Gb RAM)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Chinese Dragonrise gamepad support on Allwinner a20 dual core box (Jesurun 4.2.2 A20 1Gb RAM)

    Hi,


    I have this android box:





    It's working great. But my gamepad (Chinese, branded as "TEEM") was not being recognized.


    I searched over the web but couldn't find anyone who had one compatible with my box (kernel 3.3.0 for arm sun7i). So I decided to compile it by myself.


    It worked for me. If you don't have support for this gamepad, have a device like mine (or compatible) and want to try it (AT YOUR OWN RISK - THIS CAN DAMAGE YOUR BOX):


    Note: I used Root Browser to execute the steps bellow:


    1) Copy attached file (hid-dr.ko) to /mnt/sdcard/ in you box;


    2) Create a script named load-dragonrise.sh in /mnt/sdcard/ in your box and type the 2 following lines:


    #!/sbin/sh
    insmod /mnt/sdcard/hid-dr.ko


    3) Run it clicking the script and select Execute (Make sure "run as root" is checked)




    If you have luck, your gamepad will be recognized and you can play some games using it




    Credits:
    #http://rhombus-tech.net/allwinner/a20/boot/
    (for kernel source and procedure to compile it)


    # http://stackoverflow.com/questions/2...ncompatibility
    (hint on how to change modversions/magic number using an hex editor)


    #debian.org
    (for providing us a nice Linux distro)


    # Allwinner
    (for designing this good low cost chip, A20)
    Attached Files

    #2
    Originally posted by Taajan
    By the way, you can use the decompiled tool from the in my last thread to create your recovery if you haven't already. Its under Decompiled etc... can't miss it.
    Thank you for the info!

    EDIT: Does the Decompiled tools work with a A20 SoC? Description only mention A31.

    http://www.freaktab.com/showthread.php?11620-Tvheadend-compiled-for-Allwinner-A31-kernel-3-3-0-for-android&p=161666&highlight=#post161666

    Thanks!
    Last edited by pstglia; 04-01-2014, 00:41.

    Comment


      #3
      Originally posted by Taajan
      When u get a chance I'm me. Thanks

      Sent from my M8HD using Tapatalk
      Sorry, I don't understand "I'm me". It's an expression used in forums?
      I'm too dummy

      About the decompiling tools, I'm still reading docs to know how to properly use it. I'm new in this Android world and just a single user with some basic knowledge in gcc/make (that's how I could compile the kernel module I needed). Have to sure before trying to dump my firmware.

      Thanks for your attention!

      Comment


        #4
        Originally posted by Taajan
        Lol sorry it was suppose to im or message me. Damn spell check. From what I have tested it with u just launch the application and have it find the stock rom and it will break it down completely. I did it all the way down to the kernel but that didn't work for me. U maybe new but u are several steps ahead of me. I don't have any deving skills. I'm trying to learning my own. So far I've failed at just setting up the environment

        Sent from my M8HD using Tapatalk

        it should be PM,right?
        Coolicool - Located in China and a trusted seller on Freaktab. We are selling loads of Android TV Sticks, Tablets, Smartphones and consuming electronic merchandises to all over the world. We have local Warehouse in Europe that our customers can get what they want in 72 hours(2-5 Days Delivery&No tariff).
        Lowest Price Guarantee
        Easter Special Offer!
        Link: http://bit.ly/2Iy2Av4

        Comment


          #5
          Originally posted by Taajan
          Lol sorry it was suppose to im or message me. Damn spell check. From what I have tested it with u just launch the application and have it find the stock rom and it will break it down completely. I did it all the way down to the kernel but that didn't work for me. U maybe new but u are several steps ahead of me. I don't have any deving skills. I'm trying to learning my own. So far I've failed at just setting up the environment

          Sent from my M8HD using Tapatalk
          Hi, here's some additional info / clarify info:

          My only goal was having the kernel module to support my gamepad (hid-dr.ko). As my device was shipped already rooted, I can do a "insmod" and load it whenever I want to use the gamepad
          I haven't modded my box for this

          My next step is figure out a way to load it every time the box boots. That's the part I still learning how to do (as you know, init scripts are on ramfs). So far, I'm not aiming to write a entire new rom in my box.

          * * *

          You mean setting up a compiling environment to build a new kernel for you device or for packing a entire custom firmware?

          The environment I created was just for compiling the kernel for allwinner a20 image and modules.
          I created a new VM in VirtualBox and:
          1) I installed debian (latest 64 bits version available)

          Under the created VM:

          2) Edited /etc/apt/sources.list and added these 2 repositories:

          deb http://ftp.uk.debian.org/emdebian/toolchains squeeze maindeb http://ftp.uk.debian.org/emdebian/toolchains testing main3) Downloaded gcc 4.4:

          apt-get install gcc-4.4-arm-linux-gnueabi

          4) Created a symlink:

          ln -sf `which arm-linux-gnueabi-gcc-4.4 ` /usr/local/bin/arm-linux-gnueabi-gcc

          5) Checked out (downloaded) kernel sources modified to support allwinner devices (haven't used sunxi because they are using version 3.4 and I needed 3.3.0 to match my device):

          git clone http://git.hands.com/linux.git

          6) Downloaded this kernel config and saved inside linux directory as .config:



          7) Under linux directory, executed a "make ARCH=arm menuconfig" to select the so called DragonRise module (it's under
          Devices Drivers -> HID-Support -> Special HID Drivers -> Dragon Rise Inc Game Controller

          8) Under linux directory, compiled it using these cmds:

          make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KDIR="$PWD" -C arch/arm/mach-sun7i/pm/standby all

          make -j3 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage modules

          9) Edited the generated module (~/linux/drivers/hid/hid-dr.ko) using a hex editor to match the magic number from my device's kernel. To do this, I got a module from the box (hid-logitech-dj.ko) and dumped the modversions. Them, did the same to my generated module and replaced inside the hex editor.

          Ex:
          modprobe --dump-modversions hid-logitech-dj.ko

          0x75646f6d708a9a2b le_layout

          modprobe --dump-modversions hid-dr.ko

          0x75646f6dfe158218 le_layout <had to replace the part in bold by d708a9a2b, under hex editor)

          10) After changing all necessary parameters, copied the file to flashdrive and then to my Android box (copied to /mnt/sdcard)


          For sure this is not the correct way for doing this. At least, worked for me

          Hope this info helps

          Comment


            #6
            Re: Chinese Dragonrise gamepad support on Allwinner a20 dual core box (Jesurun 4.2.2 A20 1Gb RAM)

            I think there's a chance, since a31 and a20 are similar (both arm7)

            Get a existing module from your box and check it with modeprobe as i described

            Enviado de meu GT-S5367 usando o Tapatalk 2

            Comment


              #7
              Re: Chinese Dragonrise gamepad support on Allwinner a20 dual core box (Jesurun 4.2.2 A20 1Gb RAM)

              Get also your kernel version

              Enviado de meu GT-S5367 usando o Tapatalk 2

              Comment


                #8
                Don't worry. This is not complicated. You have to do this:

                1) Check the kernel version of your Android box under settings -> about tablet -> kernel version

                2) Using root browser app (or any other of your preference) navigate to /system/vendor/modules directory/folder.

                3) Check if you have filenames starting with "hid" (like "hid-logitech-dj.ko" or "hid-dr.ko") and copy them to a flash drive. In root browser you can copy files selecting them with "Multi-Sel" -> select files -> "copy" -> Navigate to /mnt/usbhost0 -> "paste"

                4) Using some linux distribution ( you can use Ubuntu ), open a terminal, navigate to the folder/directory where you copied the files in step 2 (or your flashdrive directly) and type the following command (replace FILENAME by one of your files):

                modprobe --dump-modversions FILENAME

                5) Get the kernel version and the output of modprobe and post here. If you don't have a Linux distro to execute this commands, post the files here so we can execute it for you

                Cheers,
                pstglia

                Comment


                  #9
                  Re: Chinese Dragonrise gamepad support on Allwinner a20 dual core box (Jesurun 4.2.2 A20 1Gb RAM)

                  Something I should have asked before: you have a ps1/ps2 or a ps3 controller? If it's a ps1/ps2, you have one of those usb adapters, right?


                  Enviado de meu GT-S5367 usando o Tapatalk 2

                  Comment


                    #10
                    Hi Taajan,

                    Have you got those files from your box?

                    Comment


                      #11
                      SMART MEDIA PLAYER Mini PC

                      Hi. Maybe you can help me with my problem. I bought a noname Chinese SMART MEDIA PLAYER Mini PC resembling in appearance, features and technical details with this: http://www.****.com/itm/Dual-Core-An...p2054897.l4275 . In one of the tests I've done I selected to display the last option. I do not know who it was (maybe you are kind and post a printscreen with sub display). Since then no longer see any HDMI or AV than the blackscreen. After booting enter blackscreen. Has a hole in the back where he is a reset button. I tried, by pressing all the variations. 5 seconds, 10 seconds, 30 seconds, until it starts ..... just managed to reset or get into recovery. Player have root by default. We could not do anything. Please help me. Maybe I'll be able to make it up somehow someday. Thank you.

                      Comment


                        #12
                        Hi,

                        These boxes don't use to have a factory reset button (back reset has the same effect of unplugging power cord and plugging it again).

                        Have you tried connecting it in a different tv set?

                        My box controller has a button named "source". It changes between hdmi and av port. If your controller is the same that Amazon link you posted, you have it also. Try pressing it and wait a few seconds.

                        Also, have you already tried to contact the reseller you bought your box from? Maybe he can help.

                        As a last resource, you can try to update your box with a new fw. To do this, you have to know which config you have in details (SoC brand and model, internal storage, etc) and choose the right tools and firmware (most of them available on Freaktab).
                        I never did this with a Android box/stick, but there's a lot of people here that knows. I guess they can help.

                        Sorry not being able to give more help.




                        Originally posted by ionek View Post
                        Hi. Maybe you can help me with my problem. I bought a noname Chinese SMART MEDIA PLAYER Mini PC resembling in appearance, features and technical details with this: http://www.****.com/itm/Dual-Core-An...p2054897.l4275 . In one of the tests I've done I selected to display the last option. I do not know who it was (maybe you are kind and post a printscreen with sub display). Since then no longer see any HDMI or AV than the blackscreen. After booting enter blackscreen. Has a hole in the back where he is a reset button. I tried, by pressing all the variations. 5 seconds, 10 seconds, 30 seconds, until it starts ..... just managed to reset or get into recovery. Player have root by default. We could not do anything. Please help me. Maybe I'll be able to make it up somehow someday. Thank you.

                        Comment


                          #13
                          Originally posted by pstglia View Post
                          Hi,

                          These boxes don't use to have a factory reset button (back reset has the same effect of unplugging power cord and plugging it again).

                          Have you tried connecting it in a different tv set?

                          My box controller has a button named "source". It changes between hdmi and av port. If your controller is the same that Amazon link you posted, you have it also. Try pressing it and wait a few seconds.

                          Also, have you already tried to contact the reseller you bought your box from? Maybe he can help.

                          As a last resource, you can try to update your box with a new fw. To do this, you have to know which config you have in details (SoC brand and model, internal storage, etc) and choose the right tools and firmware (most of them available on Freaktab).
                          I never did this with a Android box/stick, but there's a lot of people here that knows. I guess they can help.

                          Sorry not being able to give more help.
                          I connected media player to Full Hd TV via both methods (AV and HDMI). It show me logo screen after that blackscreen. I tried to select source of plug pushing to source button from remote controller. If i want to rewrite firmware first of all i have to enter in recovery mode? I want to do that but i don't know how.

                          Allwinner A20 Dual Core
                          RMA: DDR3 1GB
                          Storage Capacity: 4GB
                          Built-in WiFi: 802.11b/g/n.
                          Support Ethernet cable for Internet.
                          Support SD card up to 32GB.

                          Support network 1080P HDMI videos.
                          Latest Android smartphone operating system
                          Built-in wireless WiFi Internet module
                          Support video on demand online
                          Support QQ,Skype,MSN and other chat software
                          Support 1080P,3D effects perfectly

                          Easy file sharing within the LAN.
                          Support 3D Red Blue movies

                          Video output: HDMI (1920×1080 full HD output) / Audio (AV)

                          Comment


                            #14
                            Hi, found a procedure for a A20 firmware upgrade.

                            So after emailing almost every supplier of the box I posted, I finally got a link to the IMG original file.  I've uploaded the files to my g...


                            According to this, there's no need to enter a recovery mode.

                            Basically you execute a firmware tool (PhoenixCard - this link provide the downloads), select a firmware file (IMPORTANT: Compatible with your device) and a SD card. It'll format the SD and copy img files to it.
                            When completed, you turn off your Android Box, connect this SD card and turn it on.
                            It'll update your fw (front led will be flashing during the procedure). When completed, turn off the box, remove the sd card and turn it on.
                            All the procedure (with pictures) is described here:


                            Again, this is what I read. I've never done this.
                            If you want to try it, is *at your own risk*.

                            Regards,
                            pstglia


                            Originally posted by ionek View Post
                            I connected media player to Full Hd TV via both methods (AV and HDMI). It show me logo screen after that blackscreen. I tried to select source of plug pushing to source button from remote controller. If i want to rewrite firmware first of all i have to enter in recovery mode? I want to do that but i don't know how.

                            Comment

                            Working...
                            X