5

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.

Dr Mido
  • 2,414
  • 4
  • 32
  • 72
Jaya Kumar
  • 51
  • 3

1 Answers1

0

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
Vishal Pawar
  • 4,324
  • 4
  • 28
  • 54
  • Vishal. Thanks for your comment but I think you may have misunderstood due to a stray comment in the text above. I don't want to add it to the "system/etc/permissions" folder which is what adding "/permissions" would do. I am adding to etc and in any case, it doesn't show up even in permissions. I tried the LOCAL_MODULE_TARGET_ARCH := x86_64 addition but that had no effect. Does this work on your setup? Are you able to see the file populated anywhere in out/system? Is there any dependency? As mentioned, I am populating this in external/mydata/android.mk. – Jaya Kumar Mar 21 '19 at 09:24