LOCAL_MODULE_PATH wasn't strictly necessary in make either -- if you had set `LOCAL_PROPRIETARY_MODULE := true` like the `proprietary: true` in the Android.bp, it would get installed into the correct location. The `androidmk` tool tries to auto-fix some cases of LOCAL_MODULE_PATH, but it can't understand everything. So the `prebuilt_etc` module that you wrote should install into /vendor/etc/location.pem (or /system/vendor if there's no vendor partition).
What will break is the "../" in the src field -- we don't allow references outside of the current directory and its subdirectories in Soong. We require the directory with the sources to opt-into being used by others, either by directly defining the modules, or by defining filegroup modules that can be used in the src[s] fields via ":myfilegroup" (colon-prefixed module name). This way we can actually let you control who uses files within your directory (via visibility), and tools like `mma` and `atest` are more likely to be able to handle "build/test everything in this directory" properly. - Dan On Thu, Oct 17, 2019 at 9:35 AM Akanksha <[email protected]> wrote: > Hello, I am trying to convert Android.mk to Android.bp files here is a > sample .mk module > > include $(CLEAR_VARS) > LOCAL_MODULE := location.pem > LOCAL_MODULE_OWNER := x > LOCAL_MODULE_TAGS := optional > LOCAL_MODULE_CLASS := ETC > LOCAL_SRC_FILES := > ../../.././target/product/msmnile/vendor/etc/location.pem > LOCAL_MODULE_PATH := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)/etc > include $(BUILD_PREBUILT) > > when i Convert this to > > prebuilt_etc { > name: "location.pem", > owner: "x", > > src: "../../.././target/product/msmnile/vendor/etc/location.pem", > proprietary: true, > > } it works fine but when included sub_dir inplace of LOCAL_MODULE_PATH I > am getting "sub_dir " unrecognized property > > How to change LOCAL_MODULE_PATH module descriptor in Android.bp, > Thanks in advance:) > > -- > -- > You received this message because you are subscribed to the "Android > Building" mailing list. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-building?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Android Building" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/android-building/051f8105-57ee-4f3a-aabe-3359dec9142d%40googlegroups.com > <https://groups.google.com/d/msgid/android-building/051f8105-57ee-4f3a-aabe-3359dec9142d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/CALQgHdnaa9XvJphVbXE9F4Zxr3U7YAZemA26_DUCr4V8czvnZQ%40mail.gmail.com.
