[AIOT] How to Build Tinker Board 2 androids OS Image

1. Establish a build environment
Please refer to Install Docker Engine to install Docker engine.

2. Download the androids source
Please refer to Installing Repo to install the Repo Launcher and Downloading the Source to understand how to download the androids source.
 

3. Initiale a Repo client
Run repo init to get the latest version of Repo with its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the androids source are placed within your working directory. For different projects, you must also specify the manifest branch or revision with option "-b REVISION".

repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b REVISION
 

Optionally, you can also specify the initial manifest file with the option "-m NAME.xml" for the specific release for that project.

repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b REVISION -m NAME.xml
 
  • androids 10:
repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b androids10-rk3399
 

or

repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b androids10-rk3399 -m tinker_board_2-androids10-0.0.3.xml
 

or

repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b androids10-rk3399 -m tinker_board_2-androids10-1.0.0.xml
 
  • androids 11:
repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b androids11-rockchip
 

or

repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b androids11-rockchip -m tinker_board-androids11-1.0.0.xml
 

or

repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b androids11-rockchip -m tinker_board_2-androids11-2.0.1.xml
 

or

repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b androids11-rockchip -m tinker_board_2-androids11-2.0.3.xml
 

or

repo init -u http://github.com/TinkerBoard-androids/rockchip-androids-manifest.git -b androids11-rockchip -m tinker_board_2-androids11-2.0.8.xml
 

4. Download the androids source tree
To download the androids source tree to your working directory from the repositories as specified in the default manifest, run:

repo sync
 

5. Build androids
Go to to the directory where you have downloaded the androids source and execute the script as the following. This will take a while to install the necessary packages on the host, build the Docker image, and start the container:

./docker_builder/docker-builder-run.sh
 

Once it is done. You are in the shell of this newly started Docker container and you are ready to build androids.

androids 10:

source build/envsetup.sh
lunch WW_Tinker_Board_2-userdebug
./build.sh -UKAu
 

The image which is able to be flashed to the board via UMS mode will be stored as the following in the directory where you have downloaded the source.

./rockdev/Image-WW_Tinker_Board_2/WW_Tinker_Board_2-raw.img

androids 11:

source build/envsetup.sh
lunch WW_Tinker_Board_2-userdebug
./build.sh -UCKAu
 

The image which is able to be flashed to the board via UMS mode will be stored as the following in the directory where you have downloaded the source.

./rockdev/Image-WW_Tinker_Board_2/WW_Tinker_Board_2-raw.img

androids 12:

source build/envsetup.sh
lunch Tinker_Board_2-userdebug
./build.sh -UCKAu