Get remote & red/blue leds working on generic Tanix-TX6 clone

  • I want to share my current config of a generic Tanix clone, a cheap chinese android box from ~2020 with an H6 called the "Z3". It came with a horrible version of Android 9 labeled "ZMAGIC" upon boot, very slow and buggy, and strangely without any spyware! Obviously, I replaced it with LE anyways, and have been using it without any major issue. It's very capable of playing 4k videos, and even Playstation 1 games without any framerate drop.

    It has 32 GB of flash storage and (theoretically) 4GB of RAM, but LE can only see 3 GB, I still don't know why.

    Here's some info and pictures:

    A95X Z3 un Smart Box de gama barata con poco que enseñar
    Parece que despues del paron de casi 3 meses propiciado por el coronavirus y el año nuevo Chino los talleres de ensamblajes de TV-boxes empiezan a funcionar ya…
    androidpc.es

    The first thing that I configured was the remote, because it was not working ootb at all. I captured all the scancodes and created a TOML file inside /storage/.config/rc_keymaps/

    Here's the contents of the TOML file I managed to create, all keys working, even the default non-configured "TV" buttons:

    The remote does not have Pause and Stop buttons, so I replaced "Apps" (Yellow) and "Set" (Blue) with this:

    Code
    0xdf01 = "KEY_PLAYPAUSE"
    0xdf5f = "KEY_STOP"


    Then I managed to enable the onboard Red and Blue status leds.

    I used a little script to find which GPIO pins control the leds, which in this box are : GPIO 356 (Port L pin 4) for RED, and GPIO 359 (Port L pin 7) for BLUE.

    With this info and some help of AI, I created a DTS overlay file:


    Finally, after compiling the dts

    Code
    dtc -I dts -O dtb -@ tanix-tx6-leds.dts -o tanix-tx6-leds.dtbo 2>&1

    ... enabling rw on /flash

    Code
    # mount -o rw,remount /flash

    ... copying the dtbo into the /flash/overlays folder using any scp, usb drive, sd card or any other method

    ... editing /flash/extlinux/extlinux.conf, adding:

    Code
    FDTOVERLAYS /overlays/tanix-tx6-leds.dtbo

    after "FDT..."

    ... and rebooting, both leds will be visible in /sys/class/leds and you can control them at will.


    Configured like that, the red will blink twice every 0.8 seconds, and the blue one will react to the remote control buttons.

    Here's the list of all the triggers available in my system:

    Code
    none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock disk-activity disk-read disk-write heartbeat cpu cpu0 cpu1 cpu2 cpu3 default-on panic mmc1 mmc0 mmc2 rfkill-any rfkill-none bluetooth-power

    Some of them look interesting but they actually don't do anything:

    - disk-activity disk-read disk-write : led always off

    - cpu cpu0 cpu1 cpu2 cpu3 : led always on

    - mmc1 mmc0 mmc2 : led always off

  • It has 32 GB of flash storage and (theoretically) 4GB of RAM, but LE can only see 3 GB, I still don't know why.

    Open the box and see whether you have 2x 2GB or 3x 1GB DDR RAM chips on the board. The 3GB RAM config is quite common on Android boards, with stickers lying about the installed RAM size (and Android hacked to show 4GB) also not unusual.