Following the instructions in the Aosp-Node-Prebuilts README, I cloned the repository in the external directory of the Orange Pi 4 LTS RK3399-Android8.1 tree (which I have successfully built), and successfully ran make arm64
. But because I build using the build.sh
included in the Orange Pi 4 LTS Android sources, my shell is not "initialised with the buildenv and lunch combo".
The README states:
If you want the Android.mk to be executed automatically, add it as a dependency of another project.
How do I add Aosp-Node-Prebuilts as a dependency of another project?
I tried adding "Aosp-Node-Prebuilts" to PRODUCT_PACKAGES
in build/make/target/product/base.mk
, but that didn't work.
I tried searching for how other packages in the external directory with Android.mk
files are added as a dependency, but didn't find anything. (I searched for strace
and tcpdump
--both of which I confirmed are in /system/xbin
on the target.)
I did the equivalent of "adding Aosp-Node-Prebuilts as a dependency of another project" by adding node
to PRODUCT_PACKAGES
in build/make/target/product/base.mk
:
PRODUCT_PACKAGES += \
node \
20-dns.conf \
...
I believe the package name is "node" because LOCAL_MODULE
is set to node
in the Aosp-Node-Prebuilts Android.mk file. I confirmed this worked by adding this to Android.mk
:
LOCAL_POST_INSTALL_CMD := echo "Aosp-Node-Prebuilts LOCAL_SRC_FILES: $(LOCAL_SRC_FILES)"
...and I confirmed this was echoed when I ran the build:
Aosp-Node-Prebuilts LOCAL_SRC_FILES: target/node
I also confirmed that target/node
in the external/Aosp-Node-Prebuilts
directory was copied to out/target/product/rk3399/system/bin
. And I mounted the system.img
on Linux and confirmed it is in /system/bin
.