diff --git a/base.mk b/base.mk index f1bad7d..3277699 100644 --- a/base.mk +++ b/base.mk @@ -43,3 +43,6 @@ PRODUCT_COPY_FILES += \ # vendor/etc PRODUCT_COPY_FILES += \ device/phh/treble/nfc/libnfc-nci.conf:system/etc/libnfc-nci.conf + +PRODUCT_PACKAGES += \ + treble-environ-rc diff --git a/environ/Android.mk b/environ/Android.mk new file mode 100644 index 0000000..2eec2d5 --- /dev/null +++ b/environ/Android.mk @@ -0,0 +1,10 @@ +include $(CLEAR_VARS) + +LOCAL_MODULE := treble-environ-rc +LOCAL_MODULE_TAGS := optional + +LOCAL_POST_INSTALL_CMD := \ + sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g' device/phh/treble/environ/init.treble-environ.rc > $(PRODUCT_OUT)/system/etc/init/init.treble-environ.rc && \ + sed -i -e 's?%SYSTEMSERVERCLASSPATH%?$(PRODUCT_SYSTEM_SERVER_CLASSPATH)?g' $(PRODUCT_OUT)/system/etc/init/init.treble-environ.rc + +include $(BUILD_PHONY_PACKAGE) diff --git a/environ/init.treble-environ.rc b/environ/init.treble-environ.rc new file mode 100644 index 0000000..db095c8 --- /dev/null +++ b/environ/init.treble-environ.rc @@ -0,0 +1,4 @@ +# set up the global environment +on init + export BOOTCLASSPATH %BOOTCLASSPATH% + export SYSTEMSERVERCLASSPATH %SYSTEMSERVERCLASSPATH%