X96 MAX

Last updated 12-24-2024

 


Android sits on top of a Linux kernel OS. You can replace the provided OS with Armbian, a build of Debian linux for arm cpus installed on a MicroSD card. https://docs.armbian.com/

Wow! One x96 MAX supporting 3 independent workstations. The central monitor is connected directly to the x96 Max, while the two silver boxes are HP T150 USB 2.0 zero clients which I have plugged into a Plugable brand USB 3.0 hub connected to the USB 3.0 port of the x96 Max. Their monitors are showing login forms for other users. See my home page for configuring these zero clients as separate workstations.

Unfortunately, the Linux 5.9.0-arm-64 version of Armbian has dropped support for the USB 2.0 DisplayLink driver module. However, it is still a very cost and energy efficient platform for web browsing, office tasks, learning programing, or configured with x2goclient for multi-seat or remote access to a network attached server.

https://monitorsanywhere.com has moved to the x96max for its video walls. More recently it has started manufacturing its own upgrade with a s905x3 cpu. I first learned of the x96max from them and wondered whether it could be adapted to Linux and multi-seat computing? Windows only software for extending desktop to this Android device used by Monitors Anywhere can be downloaded here: https://spacedesk.net DisplayLink has also released drivers for Android, but these mirror the display which makes sense for an Android phone, but it would be more interesting to me if it could extend an Android TV box desktop across dual monitors since the x96max has only one HDMI output.  https://www.synaptics.com/node/3471

This last version of Armbian for the x96max can no longer be downloaded because there are so many cheap commodity AndroidTV box models to support that Armbian developers are only supporting specific SBC from better known manufactures. Contact me if you wish a legacy copy that I have saved.

NEW: An unsupported newer 12-18-2024 version can be downloaded here:
https://www.armbian.com/amlogic-s9xx-tv-box/

The front panel lights, wifi, and analog audio were not supported. However I had success with USB wifi, USB audio, and USB tethering from my phone for internet. The rndis_host driver module will not load until the phone is connected by USB cable and currently it will show a new ethernet device instead of a usb0 network device.

I wondered why the X96Max generates so much less heat than the Raspberry Pi 4B. The answer appears to be that the x905x2 is 12nm process, while the Pi 4B SOC uses the older 28nm process so these greater distances generate more resistance heat.

After flashing microSD card, be sure to open the BOOT partition and to copy u-boot-s905x2-s922 to a new file called u-boot.ext otherwise the display colors will be odd and nearly unreadable You must also edit extlinux.conf and extlinux.conf-menu in the extlinux subdirectory to comment out lines referring to different hardware, and uncomment lines near the bottom for the x96max hardware since this distribution supports several different arm cpu boards by different manufacturers.

To get the x96 Max to boot from this microSD card, use a nonconducting probe inserted into the AV port to press a little micro switch before and while turning on power. Once you have booted once this way, this will be the default in subsequent boots as long as this same micros SD card remains inserted, but the x96 Max will revert to booting normally into Android without the microSD card. When there is no microSD card inserted, holding that same microswitch pressed during power on will boot the Android recovery program, providing the internal copy of the firmware still exists and that you haven’t overwritten the internal recovery app.

To play commercial DVD movies, Use the same process I have described for the Raspberrry Pi 4B.

One of my monitors, an HP W2082a has an unsupported resolution of 1600 x 900 @ 60 Hz. To add these specs, use gtf command to calculate the required timings (using a monitor that is supported) and then use xrandr to add these values.

asm32@arm-64:~$ gtf 1600 900 60
 # 1600x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 119.00 MHz
   Modeline "1600x900_60.00"  119.00  1600 1696 1864 2128  900 901 904 932  -HSync +Vsync
asm32@arm-64:~$ xrandr --newmode "1600x900_60.00"  119.00  1600 1696 1864 2128  900 901 904 932  -HSync +Vsyn

Reboot after reconnecting the monitor that previously was not supported.

My main interest for the x96 Max is to use as a networked attached zero client. It is approximately 1/3 the hardware cost of currently manufactured alternative network attached zero clients based on the Elite Silicone Technology chip. The x96 Max is a little cheaper than the Raspberry Pi because of the scale of production as an Android TV box.

It is also a thinner package which is attractive mounted on the back of a monitor. It boots more quickly and reliably than the raspberry pi because it has an internal eMMC that the OS can be installed to. The down side is that it only has one HDMI connection compared to the Raspberry Pi 4B with two HDMI connections for dual 1920 x 1080 displays.

The AV port does not have analog audio under Armbian. Use the digital audio from either the HDMI cable attached to a monitor with HDMI audio support and perhaps a port for analog headphones on the monitor, or attach a DAC by optical digital cable to the x96 max if you need headphones or to drive speakers with an amplifier that requires analog audio input.

For Android and Armbian projects, this very detailed book on Android internals is now available for free pdf download from its author who will later in 2021 be releasing his Volume II for sale: http://newandroidbook.com/AIvI-M-RL1.pdf

My other potential projects are: 1) an Android version of x2goclient which would save having to install Armbian to run x2goclient; 2) a DisplayLink module for a second DisplayLink usb monitor for Armbian; 3) for video, it is much more efficient to play locally using hardware decompression, than to mirror a server that plays remotely and has to use a less efficient compression system to retransmit the image frame buffer which then has to be decompressed again locally. If the video is to be split between multiple screen as in digital signage, that requires a different approach when played locally than when it is split remotely with different data for each zeroclient to mirror.

The x96max can also boot from its USB 3.0 port so it may be of interest to compare read/write speed of several USB media with the internal microSD slot and internal emmc as I have done for the Raspberry Pi 4B.

Notice that these speeds in the x96max are significantly faster than in the Raspberry Pi 4B.

Before writing to internal storage, protect yourself by backing up any content and browser bookmarks and passwords you may have added, to external storage, in case something goes wrong. The script provided fails because one of the commands is not in the default path. If you modify the script to correct this, then it will have done two edits of the boot code when you rerun it and that will produce boot code that does not work.

Also download the firmware image and microSD card bootable restore code so that in the worst case scenario you can restore your x96 max device. See https://androidpctv.com/firmware-update-guide-tvbox-soc-amlogic/ for instructions on how to unbrick your x96max. The first time I bricked my x96max, I was able to use the all Linux method I outline further below. The second time I bricked my device, the boot code had been overwritten and I had to use the USB/PC method. On the x96max, you need a USB 2.0 A to A cable. You must connect the x96max end to the USB 3.0 port, not its USB 2.0 port. The USB 3.0 port can act as USB storage. It will be powered by your PC USB 2.0 port, so you don’t need the x96max power adapter. With the PC booted, insert a non-metalic probe into the A/V port of the x96max to depress the little switch inside and hold it depressed as you connect the USB cable to the x96max and PC. This will cause the x96max to configure its USB 3.0 port as USB storage allowing the PC to write to it directly. Amlogic_USB_Burning_Tool_v2.2.0_AndroidPC.zip which also needs to be unzipped first, includes the driver for the x96max USB storage device. On Windows 7, 64bit, the easiest temporary way to allow unsigned drivers is to use F8 when booting Windows for the session you are using the Amlogic_USB_Burning_Tool to reflash your x96max. Choose the option for allowing unsigned drivers, or the application will not be able to connect to the x96max.

 

If your img file is compressed with rar:

[root@asus-centos7]# cd /tmp
[root@asus-centos7 tmp]# wget https://www.rarlab.com/rar/rarlinux-x64-5.6.0.tar.gz
--2020-11-28 20:58:57--  https://www.rarlab.com/rar/rarlinux-x64-5.6.0.tar.gz
Resolving www.rarlab.com (www.rarlab.com)... 51.195.68.162
Connecting to www.rarlab.com (www.rarlab.com)|51.195.68.162|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 541604 (529K) [application/x-gzip]
Saving to: ‘rarlinux-x64-5.6.0.tar.gz’

100%[======================================>] 541,604      389KB/s   in 1.4s  

2020-11-28 20:58:59 (389 KB/s) - ‘rarlinux-x64-5.6.0.tar.gz’ saved [541604/541604]

[root@asus-centos7 tmp]# tar -zxvf rarlinux-x64-5.6.0.tar.gz
rar/
rar/order.htm
rar/acknow.txt
rar/readme.txt
rar/default.sfx
rar/license.txt
rar/rarfiles.lst
rar/whatsnew.txt
rar/makefile
rar/rar
rar/unrar
rar/rar.txt
[root@asus-centos7 tmp]# cd rar
[root@asus-centos7 rar]# cp -v unrar /usr/bin/
[root@asus-centos7 rar]# unrar

UNRAR 5.60 freeware      Copyright (c) 1993-2018 Alexander Roshal

Usage:     unrar <command> -<switch 1> -<switch N> <archive> <files...>
               <@listfiles...> <path_to_extract\>

[more  how to use information follows which I have cut...]

Now choose and download the firmware for the device you have. Mine was the version with 4GB ram, yours might be different.

https://androidpctv.com/firmware-x96-max-rom-box/ (update 2-09-2022: this download link does not appear to still work. Make sure that the sha256 given later on this page is correct if you download this file from a different site).

If your img file was compressed with rar, the unrar utility is freeware.

[asm32@asus-centos7 Downloads]$ unrar e X96Max_8.1-9.0_V311P_4GB_20190722_AndroidPC.rar
UNRAR 5.60 freeware Copyright (c) 1993-2018 Alexander Roshal

Extracting from X96Max_8.1-9.0_V311P_4GB_20190722_AndroidPC.rar

Extracting readme.txt OK
Extracting X96Max_8.1-9.0_V311P_4GB_20190722.img OK
Extracting AndroidPC.es.url OK
Extracting AndroidPCtv.com.url OK
All OK
[asm32@asus-centos7 Downloads]$

The next step is copying this firmware image file to a microSD card formatted FAT 32.

What files are required on the FAT 32 microSD card you are making? There are three: the firmware .img file which is unmodified from the one you extracted from the .rar one. Then there are two others, aml_sdc_burn.ini and aml_sdc_burn.UBOOT, that are required to boot your bricked box and reinstall the proper firmware. Burn_Card_Maker_V2.0.3.exe under Windows gets these automatically from the firmware.img, but in Linux we need a program or script. From examining a hexdump of the image file, I was able to identify the location and length of the two files we need to extract. A block size of 24 was the largest common denominator of the skip and count bytes for the first file and 86 for the second (a block size of 1 would be very slow for the first larger file).

#!/bin/bash
#extract.sh
#
dd skip=58901 count=55866 bs=24 if=X96Max_8.1-9.0_V311P_4GB_20190722.img  of=aml_sdc_burn.UBOOT
dd skip=32028 count=7 bs=86 if=X96Max_8.1-9.0_V311P_4GB_20190722.img  of=aml_sdc_burn.ini

sha256sum for each of these three files are:

58803f7a2da820f6bc1205b6df91f0a64603b685dcc62685dcf145bfbefd570e  X96Max_8.1-9.0_V311P_4GB_20190722.img
26faef75bbbde29a7959ac71e5c662673113d6597f3f973fae91a058a83a2025  aml_sdc_burn.UBOOT
f945823579836ea88161844d13ee8e062c1a35139ebd2ed6e9c25756c3ddf448  aml_sdc_burn.ini

This script is specific for the 4GB version of the X96Max. I have since downloaded the purported firmware for the 2GB version of the X96Max. I don’t have that model, so can not test it, but I have confirmed that my script will extract the required two file and that they are identical to the 4GB version. You just have to edit my script to change the filename.

pi@raspberrypi:~ $ ls -l *.img
 -rw-r--r-- 1 pi pi 1194033152 Dec 11 11:23 X96Max8.1-9.0_V311P_20190722.img
 -rw-rw-r-- 1 pi pi 1863838296 Sep 10  2019 X96Max_8.1-9.0_V311P_4GB_20190722.img
 pi@raspberrypi:~ $ 
8080c14ccd5964193a599f66bc49f632daa67bb10f898b20cda96210d45b4c46  X96Max8.1-9.0_V311P_20190722.img

Further more, the shorter version for the 2GB X96Max is identical to the same number of bytes at the beginning of the longer version for the 4GB X96Max.

pi@raspberrypi:~ $ cmp -b X96Max8.1-9.0_V311P_20190722.img X96Max_8.1-9.0_V311P_4GB_20190722.img
 cmp: EOF on X96Max8.1-9.0_V311P_20190722.img after byte 1194033152, in line 7435532
pi@raspberrypi:~ $ ls -l *.img
 -rw-r--r-- 1 pi pi 1194033152 Dec 11 11:23 X96Max8.1-9.0_V311P_20190722.img
 -rw-rw-r-- 1 pi pi 1863838296 Sep 10  2019 X96Max_8.1-9.0_V311P_4GB_20190722.img
pi@raspberrypi:~ $