1

像这样 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
4

3 回答 3

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)
于 2013-12-15T16:21:08.207 回答
0

不要使用

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

只是

LOCAL_MODULE_CLASS := OPTIONAL_EXECUTABLES

形式上更好。参见核心/envsetup.mk

于 2018-09-26T14:43:19.217 回答
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)
于 2021-06-08T10:16:55.247 回答