Prepare
Get the docker image from Sinovoip Docker Hub , Build the android source with this docker environment.
Other environment requirements, please refer to google Android's official build environment requirements and set up guide
Get source code
$ git clone https://github.com/Dangku/BPI-Rockchip-Android11 --depth=1
Because github limit 100MB size for single file, please download the oversize files and merge them to correct directory before build.
Another way is get the source code tar archive from BaiduPan(pincode: 8888) or GoogleDrive
Build
$ cd BPI-Rockchip-Android11
$ source build/envsetup.sh
$ lunch
You're building on Linux
Lunch menu... pick a combo:
...
16. bananapi_r2pro-user
17. bananapi_r2pro-userdebug
18. bananapi_r2pro_box-user
19. bananapi_r2pro_box-userdebug
...
---------------------------------------------------------------
Which would you like? [aosp_arm-eng] 17
...
Target bananapi_r2pro is a tablet type UI, bananapi_r2pro_box is a box type UI and only support hdmi display.
If bananapi_r2pro target choosen , then
$ ./build.sh -AUCKu
Or bananapi_r2pro_box target choosen, then
$ ./build.sh -AUCKu -d rk3568-bananapi-r2pro-hdmi
Flash
The target download image is rockdev/Image-bananapi_r2pro*/update.img, flash it to your device by Rockchip USB Download Tool. Please refer to Bananapi R2Pro wiki for how to flash the android image.