Search code examples
makefileandroid-sourceandroid.mk

Android.mk add binary into /system/bin


I have a binary, with Android.mk as below.


include $(CLEAR_VARS)

LOCAL_MODULE := binary_test
LOCAL_LDLIBS := libs
LOCAL_CFLAGS := -O3 -UNDEBUG

LOCAL_C_INCLUDES += tools/
LOCAL_SRC_FILES := main.c

include $(BUILD_EXECUTABLE) 

And I want to add the binary_test into android /system/bin how this can be done?

Thanks.


Solution

  • Android use PRODUCT_PACKAGES to include all modules to be installed.

    Add the following lines to your product makefiles.

    PRODUCT_PACKAGES += binary_test