[AIOT] How to Build Tinker Board 2 Android OS Image
- Source code:
https://github.com/TinkerBoard-Android/rockchip-android-manifest/tree/android12-rockchip (Android)
1. Establish a build environment
Please refer to Install Docker Engine to install Docker engine.
2. Download the Android source
Please refer to Installing Repo to install the Repo Launcher and Downloading the Source to understand how to download the Android 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 Android 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 https://github.com/TinkerBoard-Android/rockchip-android-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 https://github.com/TinkerBoard-Android/rockchip-android-manifest.git -b REVISION -m NAME.xml
- Android 10:
repo init -u https://github.com/TinkerBoard-Android/rockchip-android-manifest.git -b android10-rk3399
or
repo init -u https://github.com/TinkerBoard-Android/rockchip-android-manifest.git -b android10-rk3399 -m tinker_board_2-android10-0.0.3.xml
or
repo init -u https://github.com/TinkerBoard-Android/rockchip-android-manifest.git -b android10-rk3399 -m tinker_board_2-android10-1.0.0.xml
- Android 11:
repo init -u https://github.com/TinkerBoard-Android/rockchip-android-manifest.git -b android11-rockchip
or
repo init -u https://github.com/TinkerBoard-Android/rockchip-android-manifest.git -b android11-rockchip -m tinker_board-android11-1.0.0.xml
or
repo init -u https://github.com/TinkerBoard-Android/rockchip-android-manifest.git -b android11-rockchip -m tinker_board_2-android11-2.0.1.xml
or
repo init -u https://github.com/TinkerBoard-Android/rockchip-android-manifest.git -b android11-rockchip -m tinker_board_2-android11-2.0.3.xml
or
repo init -u https://github.com/TinkerBoard-Android/rockchip-android-manifest.git -b android11-rockchip -m tinker_board_2-android11-2.0.8.xml
4. Download the Android source tree
To download the Android source tree to your working directory from the repositories as specified in the default manifest, run:
repo sync
5. Build Android
Go to to the directory where you have downloaded the Android 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 Android.
Android 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
Android 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
Android 12:
source build/envsetup.sh
lunch Tinker_Board_2-userdebug
./build.sh -UCKAu