Videostrong KII Pro (videostrong-kii-pro)

The KII Pro is a set-top box made by Videostrong, using an Amlogic S905 SoC, and running a custom (proprietary) fork of AOSP based on Amlogic's reference build. It also comes with DVB inputs and an infrared TV remote.


 * DVB
 * Running mainline U-Boot as the primary bootloader

Beaware of different versions
There were different versions of this TV box, all made by the same manufacturer.

Videostrong just happens to (re)sell some of their products under the Mecool brand, with different hardware.

The 2 known versions of the KII Pro are the "original" KII Pro (the version this port is made for), which uses the Amlogic S905 SoC, and the newer Mecool KII Pro, which uses the Amlogic S905D SoC instead. They both look the same except the newer one most likely has a Mecool logo on the front, and the Mecool KII Pro seems to use Android 7.1.1 instead of Android 5.1.1. If you own the Mecool KII Pro then this port won't work there without some changes. It may work by using the right DTB file though but that's untested since F doesn't own a Mecool KII Pro.

How to enter flash mode
You need a USB Type-A to USB Type-A cable.

You'd also need a computer running Microsoft Windows with the Amlogic USB Burner or Amlogic Update if you wish to use GNU+Linux. Both software are proprietary.
 * Unplug everything from your set-top box
 * Plug your USB cable to the USB port at the top left (other USB ports won't work)
 * Press and hold the reset button
 * While holding the reset button, plug the USB cable to your computer
 * After 5 seconds or so, release the reset button
 * Run, you should see something like this:

How to enter recovery mode
Also not needed. Press the reset button once while booting. You'll be booted to an Android recovery, where it may be possible to flash postmarketOS, but this is untested.

Installation
Only installing to an SD card works currently.

Use pmbootstrap to build your own image, like so:

What you need to do, basically is:


 * 1) Select the correct release channel (this device is currently only supported by edge)
 * 2) Select the right manufacturer (videostrong)
 * 3) Select the right device codename (kii-pro)
 * 4) Choose if you want nonfree firmware or not (required for working Wi-Fi and bluetooth)
 * 5) Answer all the other questions as you wish

Then:


 * 1) Put the SD card you installed postmarketOS on in the SD card slot
 * 2) The steps below need to be done only once (unless you format the internal eMMC)
 * 3) Unplug the power supply
 * 4) Press and hold the reset button below your TV box
 * 5) While holding the reset button, plug in your power supply back
 * 6) Keep holding the reset button until your screen gets a signal

A mainline U-Boot should load, and postmarketOS should boot up.

What works
See the device status at the top (mobile) or at the right (desktop).

UART
UART works, but is disabled by default when booting postmarketOS. You can enable UART in postmarketOS by editing the file located in the boot partition.

Find this line:

And change it to:

Then connect RX, TX, and Ground to your USB-to-TTL, according to the pinout shown above. DO NOT CONNECT THE 3V3 PAD

Afterwards, you can now run:

LEDs
The 2 LEDs the device has are functionnal.

Use  to control the LEDs, like this for example:

DVB hardware
See Videostrong KII Pro (videostrong-kii-pro)/DVB.

IR Receiver
Works! No setup is needed apart from using an interface that's optimized for remote controls.

Wi-Fi and Ethernet
Wi-Fi works, but requires a nonfree firmware. It also doesn't seem to work properly sometimes. This issue also happens on the Xiaomi POCO F1 (xiaomi-beryllium). Doesn't happen on LibreELEC, which doesn't use NetworkManager, so it may be a problem with NetworkManager after all.

The TV box has an 8P8C port used for connecting to the internet (so-called 'Ethernet port') which works fine on postmarketOS as long as you boot it using a mainline U-Boot chainloaded from the vendor U-Boot. This weird quirk has to do with the device tree.

Bluetooth
Bluetooth works, but requires nonfree firmware. It also requires a DTS patch which has been sent upstream.

FOSS bootloader
The KII Pro uses U-Boot as its primary bootloader. U-Boot v2020.07 (with some minor modifications) works on the TV box. Newer versions also work, although HDMI output (until postmarketOS boots) and ethernet are broken.

Audio
Works. Needs a DTS kernel patch, which has been sent upstream. There are no ALSA UCM configs, so you may need to tinker around a little bit with  for HDMI audio to work, which is fairly straightforward. And when you're done, you can save your configuration with this command:

Hardware acceleration
Seems to work! Weston and Plasma, as well as Plasma Bigscreen run fine on the device and the postmarketOS demos work fine too. Video encoding/decoding doesn't work however.

X11
Works fine. A custom configuration file is needed else it crashes (included).

HDMI-CEC
Sort of works. The TV detects a CEC device, but you cannot use the TV's remote to control the set-top box (at least, on Plasma Bigscreen). Seems like  does detect which button in the remote is pressed.

UIs
Most UIs are expected to work, although you may want to use one suited for televisions (such as Plasma Bigscreen).

(This list isn't in any particular order)

Disassembly guide

 * Flip your set-top box and unscrew the following screws:
 * Unscrew the nut in the DVB-S2 port
 * Pry the top casing

Boot process (very simplified)
(Useful for porting other OSes to it)

Replace the vendor U-Boot
See Running mainline U-Boot as the primary bootloader

Maintainers

 * F ( on OFTC and Libera,   on Matrix (NOT USED. PLEASE USE IRC))