From f40156d69cb6593e6ebeec3b6128ed445cc9ee7a Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Wed, 23 Jan 2019 09:58:29 +0000 Subject: [PATCH] Add a symlink for the ICU .dat file The ICU .dat file was moved into the runtime APEX file in commit b6d855f081c232309961f31c7c7c8a76abf79c3c. There are some apps that know the old location and its absence causes them to fail. This change adds a symlink from the old directory to the new directory. The ICU .dat file changes its name with every ICU major release so this is simpler than linking the file itself. Bug: 119293618 Bug: 120853401 Bug: 122985829 Test: make droid / inspect output Test: Confirm broken app works on an internal master build Change-Id: I452dcb5e52975011c9ebd3db2caa621bbefedaf3 --- rootdir/Android.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rootdir/Android.mk b/rootdir/Android.mk index f88f6b945..f1a38c799 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -130,6 +130,19 @@ LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/overlay $(TARGET_ROOT_OUT)/odm/ov LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/priv-app $(TARGET_ROOT_OUT)/odm/priv-app LOCAL_POST_INSTALL_CMD += ; ln -sf /vendor/odm/usr $(TARGET_ROOT_OUT)/odm/usr +# Start of runtime APEX compatibility. +# Keeping the appearance of files/dirs having old locations for apps that have +# come to rely on them. + +# http://b/121248172 - create a link from /system/usr/icu to +# /apex/com.android.runtime/etc/icu so that apps can find the ICU .dat file. +# A symlink can't overwrite a directory and the /system/usr/icu directory once +# existed so the required structure must be created whatever we find. +LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_OUT)/usr && rm -rf $(TARGET_OUT)/usr/icu +LOCAL_POST_INSTALL_CMD += ; ln -sf /apex/com.android.runtime/etc/icu $(TARGET_OUT)/usr/icu + +# End of runtime APEX compatibilty. + ifdef BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/cache else