kangear
kangear

Reputation: 2613

Android.mk copy a bin to /system/xbin

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

Upvotes: 1

Views: 2684

Answers (3)

atla praveen
atla praveen

Reputation: 49

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)

Upvotes: 0

amonthedeamon
amonthedeamon

Reputation: 346

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

Upvotes: 0

vishalm
vishalm

Reputation: 477

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)

Upvotes: 3

Related Questions