简体   繁体   中英

Adding a custom etc file to aosp build

I have a set of custom etc files including text files, binary data files that I want to see populated into aosp's system/etc folder.

I saw the previous question Add custom.xml file to AOSP etc folder which is similar but isn't what I want to do.

I tried: mkdir external/mydata

then in the android.mk, i put:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := mydata.xml
LOCAL_MODULE_TAGS := optional

LOCAL_MODULE_CLASS := ETC

# This will install the file in /system/etc/permissions
#
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/

LOCAL_SRC_FILES := $(LOCAL_MODULE)

include $(BUILD_PREBUILT)

In the above example just as a starting point, I wanted to add mydata.xml to system/etc/ . Then I did the build using my normal m -j1 iso_img

I can see that ninja picks up the change Running kati to generate build-android_x86.ninja... ./external/mydata/Android.mk was modified, regenerating...

But I do not see mydata.mxl get populated anywhere.

$ find out/ -name mydata.xml

Comes back empty...

Any ideas? I'm using android-x86 aosp build.

You are missing permissions text in your module path

LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions

plus you can add configuration to just add it for specific platform

LOCAL_MODULE_TARGET_ARCH := x86_64

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM