Add init.treble-environ.rc to properly setup bootclasspath/serverclasspath

This commit is contained in:
Pierre-Hugues Husson 2018-03-04 21:33:55 +01:00
parent ccfcad1254
commit 3afca900ad
3 changed files with 17 additions and 0 deletions

View File

@ -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

10
environ/Android.mk Normal file
View File

@ -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)

View File

@ -0,0 +1,4 @@
# set up the global environment
on init
export BOOTCLASSPATH %BOOTCLASSPATH%
export SYSTEMSERVERCLASSPATH %SYSTEMSERVERCLASSPATH%