Android.mk将bin复制到/ system / xbin

时间:2013-11-14 08:58:43

标签: android android.mk

像这样Android.mk可以将 123.bin 复制到 / system / bin

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

但我想将123.bin复制到 / system / xbin ,我该怎么办呢。我知道这个:

               will copy to
ETC                ====>    /system/etc
EXECUTABLES        ====>    /system/bin
SHARED_LIBRARIES   ====>    /system/lib
STATIC_LIBRARIES   ====>    /system/lib

3 个答案:

答案 0 :(得分:3)

试试这个

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)

答案 1 :(得分:0)

不要使用

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

但只是

LOCAL_MODULE_CLASS := OPTIONAL_EXECUTABLES

在形式上更好。参见core/envsetup.mk

答案 2 :(得分:0)

你应该试试这个

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)