The Orange Pi 4 is a single board computer with the Rockchip RK3399. You can download the Android image from the official page, but if you want to customize it, you need to build the image yourself.
--100GB or more free storage space --Docker environment
** Reference: My development environment **
Ryzen 3700X / 32GB RAM
It may depend on the
-jN option of make, but it seems that it consumes about 10GB of memory during the build.
From http://www.orangepi.org/downloadresources/ Download ** Orange Pi 4B / Android Source Code **. It's best to download from countries other than China with Google Drive. The size is 16GB.
Extract the source code Zip file
Extract the dropped
Android code source.zip to a suitable location.
Combine / expand tar.gzaX
Where there is
$ mkdir OrangePi_4 $ cat rk3399-android-8.1.tar.gz* > rk3399-android-8.1.tar.gz $ tar xvf rk3399-android-8.1.tar.gz -C OrangePi_4
$ cd OrangePi_4/rk3399-android-8.1/ $ docker run --rm -v $(pwd):/workdir aquahika/android-buildenv-orangepi4 ./make.sh -F -M -u
In my environment it took about an hour to finish the build
OrangePi_4 / rk3399-android-8.1 / rockdev / Image-rk3399_mid
$ cd rockdev/Image-rk3399_mid $ ls boot.img misc.img pcba_small_misc.img resource.img uboot.img kernel.img oem.img pcba_whole_misc.img system.img update.img MiniLoaderAll.bin parameter.txt recovery.img trust.img vendor.img
I don't actually write it because I don't have OrangePi4 yet, but the build itself seems to be done well.
The 11th line of
OrangePi_4 / rk3399-android-8.1 / make.sh says
MAKE = "make -j8", and it seems to build in parallel with 8 threads by default.
My Ryzen 7 3700X has 8 cores and 16 threads, so I rewrote it to
MAKE =" make -j16 ".
-jNoption the theory that it is better to specify the number of cores + 1. However, it feels good to see all the cores being fully used on the system monitor (laughs), so I set the maximum number of threads.
Issue / PR is welcome.