Thursday, October 27, 2016

Install Android on Halios x20

Image result for android install

If you build your own image or get some special image from official website, you need follow the bellowing instruction to download the image onto the X20 96Boards.

Linux User

Prepare tools: xflash & fastboot

xflash is dedicated Flash Tool developed by MediaTek, you can download the Linux version for Ubuntu 14.04 via

$ cd
$ curl -c 
$ tar vxfz xflash.tar.gz
$ cd xflash
$ cp xflash ~/bin/
$ chmod 755 ~/bin/xflash
$ cp /usr/lib/
$ chmod 644 /usr/lib/

fastboot, to flash the board using one of the system images, confirm that you have the fastboot tool in the platform-tools/ directory of the Android SDK. Be sure that you have the latest version of the Android SDK Platform-tools from the SDK Manager.
After you confirm that you have the fastboot tool, add the tool to your PATH environment variable so the tool can be found when you flash the board.

Also, you can install fastboot tool from Ubuntu yum repository:

$ sudo apt-get install android-tools-fastboot

Download the image

Copy the image files to your linux home directory, enter into the image files directory then execute the following commands:

$ xflash enter-fastboot MT6797_Android_scatter.txt

Make sure that you have set the board into USB Device Mode, connect the board to your Linux PC via Micro USB cable.

Now, power on the board, the xflash tool will continue to download and write the board.

If everything is OK, please go ahead to execute the rest part of commands:

$ fastboot devices
$ fastboot flash gpt PGPT
$ fastboot flash preloader preloader_amt6797_64_open.bin
$ fastboot flash recovery recovery.img
$ fastboot flash scp1 tinysys-scp.bin
$ fastboot flash scp2 tinysys-scp.bin
$ fastboot flash lk lk.bin
$ fastboot flash lk2 lk.bin
$ fastboot flash boot boot.img
$ fastboot flash logo logo.bin
$ fastboot flash tee1 trustzone.bin
$ fastboot flash tee2 trustzone.bin
$ fastboot flash system system.img
$ fastboot flash cache cache.img
$ fastboot flash userdata userdata.img
$ fastboot reboot

If everything goes success, the board will reboot and be patient to wait for about 5 minutes for the Android initial boot up.

If you have any questions when you download your own build image, please feel free to discuss in comments. If you are compiling the android images, click here for more info.

For Windows User

Prepare tools: xflash & fastboot

xflash is dedicated Flash Tool developed by MediaTek, you can get it from the sla.tar.gz, it was stored in the sub directory: .\vendor\mediatek\proprietary\system\core\xflash\bin\win

Just copy the following files to your local tool directory and add the tool directory to your PATH environment variable.


For more details, please refer to the thread: and follow step 8~12 of "For Windows User" section.

fastboot,  to flash the board using one of the system images. You can just use the fastboot tool which has been prepared by above section. If you like, you can replace it by yourself. e.g.: follow step 1~16 of "For Windows User" section described in

Download the image

Copy the image files to your local image directory, downloand the batch file ( ), and extract into the image files directory.

Open command prompt on your computer (“Start -> run -> cmd”). On the cmd window type "cd" to change into the image directory, then execute the batch file: xflash_x20.bat

Sometimes, you need to modify the xflash_20.bat file to fit your requirements and target image files. e.g.: ignore partition table image (PGPT).