I have a native binary that I want to include into Android's source code, so that when I compile it my binary will be included in /system/bin .
I've copied my binary into the folder /prebuilt/android-arm/my-binary , and I've created a new Android.mk with the following:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := my-binary
LOCAL_MODULE := my-binary
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_TAGS := optional
include $(BUILD_PREBUILT)
But when I run make, the only reference I get in the log is the following:
target Prebuilt: my-binary (out/target/product/generic/obj/EXECUTABLES/my-binary_intermediates/my-binary)
And the binary isn't installed into system.img at all. There's an almost identical question in Installing a prebuilt binary on Android: "not found" , but the asker already knew the basic procedure and it isn't explained at all. If I run make my-binary, I get the same line I posted.
I've also tried to run make out/target/product/generic/system.img my-binary but it doesn't work either. My binary shows up in the the out subfolder but it won't be included into system.imng
Am I missing something? Is there any way so that with just running make -j# my binary will be included in /system/bin ?