Question

like this Android.mk can copy 123.bin into /system/bin .

LOCAL_PATH := $(call my-dir)
$(call add-prebuilt-files, EXECUTABLES, 123.bin)

but i want to copy 123.bin into /system/xbin, how can i do it. i know this:

               will copy to
ETC                ====>    /system/etc
EXECUTABLES        ====>    /system/bin
SHARED_LIBRARIES   ====>    /system/lib
STATIC_LIBRARIES   ====>    /system/lib
Was it helpful?

Solution

Try this

include $(CLEAR_VARS)
LOCAL_MODULE := 123.bin
LOCAL_MODULE_PATH := $(TARGET_OUT)/xbin
LOCAL_SRC_FILES := 123.bin
LOCAL_MODULE_CLASS := EXECUTABLE
include $(BUILD_PREBUILT)

OTHER TIPS

don't use

LOCAL_MODULE_CLASS := OPTIONAL_EXECUTABLES
LOCAL_MODULE_PATH := $(TARGET_OUT)/xbin

but just

LOCAL_MODULE_CLASS := OPTIONAL_EXECUTABLES

which is formally better. See core/envsetup.mk

You should try this

include $(CLEAR_VARS)
LOCAL_MODULE := 123.bin
LOCAL_MODULE_PATH := $(PRODUCT_OUT)/system/xbin   ---> INFO : Just mention the path where you want your app, xml, exec etc
LOCAL_SRC_FILES := 123.bin
LOCAL_MODULE_CLASS := EXECUTABLE
include $(BUILD_PREBUILT)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top