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:
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:
[[protocols]]
name = "tanix_tx6"
protocol = "nec"
variant = "necx"
[protocols.scancodes]
0xdf1c = "KEY_POWER"
0xdff1 = "KEY_POWER"
0xdff2 = "KEY_SWITCHVIDEOMODE"
0xdff3 = "KEY_MUTE"
0xdff4 = "KEY_VOLUMEDOWN"
0xdff5 = "KEY_VOLUMEUP"
0xdf4b = "KEY_PREVIOUS"
0xdf4f = "KEY_NEXT"
0xdf01 = "KEY_YELLOW"
0xdf5f = "KEY_BLUE"
0xdf5c = "KEY_VOLUMEDOWN"
0xdf5d = "KEY_VOLUMEUP"
0xdf42 = "KEY_HOME"
0xdf0a = "KEY_BACK"
0xdf1a = "KEY_UP"
0xdf48 = "KEY_DOWN"
0xdf47 = "KEY_LEFT"
0xdf07 = "KEY_RIGHT"
0xdf06 = "KEY_OK"
0xdf03 = "KEY_MENU"
0xdf18 = "KEY_EPG"
0xdf54 = "KEY_1"
0xdf16 = "KEY_2"
0xdf15 = "KEY_3"
0xdf50 = "KEY_4"
0xdf12 = "KEY_5"
0xdf11 = "KEY_6"
0xdf4c = "KEY_7"
0xdf0e = "KEY_8"
0xdf0d = "KEY_9"
0xdf41 = "KEY_SUBTITLE"
0xdf0c = "KEY_0"
0xdf10 = "KEY_DELETE"
Display More
The remote does not have Pause and Stop buttons, so I replaced "Apps" (Yellow) and "Set" (Blue) with this:
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:
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun50i-h6";
fragment@0 {
target-path = "/";
__overlay__ {
leds {
compatible = "gpio-leds";
blue_led {
label = "tanix:blue";
gpios = <&r_pio 0 7 0>; /* PL07 / GPIO 359 */
linux,default-trigger = "rc-feedback";
default-state = "on";
};
red_led {
label = "tanix:red";
gpios = <&r_pio 0 4 0>; /* PL04 / GPIO 356 */
linux,default-trigger = "heartbeat";
default-state = "on";
};
};
};
};
};
Display More
Finally, after compiling the dts
... enabling rw on /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:
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:
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