Merge "Add support for /product-services partition."

This commit is contained in:
Treehugger Robot 2018-07-27 17:15:05 +00:00 committed by Gerrit Code Review
commit 18be1e2f7e
5 changed files with 27 additions and 2 deletions

View file

@ -119,6 +119,9 @@ static void LoadBootScripts(ActionManager& action_manager, ServiceList& service_
if (!parser.ParseConfig("/product/etc/init")) {
late_import_paths.emplace_back("/product/etc/init");
}
if (!parser.ParseConfig("/product-services/etc/init")) {
late_import_paths.emplace_back("/product-services/etc/init");
}
if (!parser.ParseConfig("/odm/etc/init")) {
late_import_paths.emplace_back("/odm/etc/init");
}

View file

@ -691,6 +691,7 @@ void property_load_boot_defaults() {
}
}
load_properties_from_file("/product/build.prop", NULL);
load_properties_from_file("/product-services/build.prop", NULL);
load_properties_from_file("/odm/default.prop", NULL);
load_properties_from_file("/vendor/default.prop", NULL);

View file

@ -130,7 +130,7 @@ static const char* conf[][2] = {
// Vendor entries should be done via a vendor or device specific config.fs.
// See https://source.android.com/devices/tech/config/filesystem#using-file-system-capabilities
static const struct fs_path_config android_files[] = {
// clang-format off
// clang-format off
{ 00644, AID_SYSTEM, AID_SYSTEM, 0, "data/app/*" },
{ 00644, AID_SYSTEM, AID_SYSTEM, 0, "data/app-ephemeral/*" },
{ 00644, AID_SYSTEM, AID_SYSTEM, 0, "data/app-private/*" },
@ -149,6 +149,7 @@ static const struct fs_path_config android_files[] = {
{ 00444, AID_ROOT, AID_ROOT, 0, oem_conf_dir + 1 },
{ 00444, AID_ROOT, AID_ROOT, 0, oem_conf_file + 1 },
{ 00600, AID_ROOT, AID_ROOT, 0, "product/build.prop" },
{ 00600, AID_ROOT, AID_ROOT, 0, "product-services/build.prop" },
{ 00750, AID_ROOT, AID_SHELL, 0, "sbin/fs_mgr" },
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump32" },
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump64" },
@ -200,7 +201,7 @@ static const struct fs_path_config android_files[] = {
{ 00755, AID_ROOT, AID_SHELL, 0, "vendor/bin/*" },
{ 00755, AID_ROOT, AID_SHELL, 0, "vendor/xbin/*" },
{ 00644, AID_ROOT, AID_ROOT, 0, 0 },
// clang-format on
// clang-format on
};
#ifndef __ANDROID_VNDK__
auto __for_testing_only__android_files = android_files;

View file

@ -93,6 +93,11 @@ ifdef BOARD_USES_PRODUCTIMAGE
else
LOCAL_POST_INSTALL_CMD += ; ln -sf /system/product $(TARGET_ROOT_OUT)/product
endif
ifdef BOARD_USES_PRODUCT_SERVICES_IMAGE
LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/product-services
else
LOCAL_POST_INSTALL_CMD += ; ln -sf /system/product-services $(TARGET_ROOT_OUT)/product-services
endif
# For /odm partition.
LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/odm
@ -202,6 +207,7 @@ $(2): $(1)
$$(hide) sed -i -e 's?%SANITIZER_RUNTIME_LIBRARIES%?$$(PRIVATE_SANITIZER_RUNTIME_LIBRARIES)?g' $$@
$$(hide) sed -i -e 's?%VNDK_VER%?$$(PRIVATE_VNDK_VERSION)?g' $$@
$$(hide) sed -i -e 's?%PRODUCT%?$$(TARGET_COPY_OUT_PRODUCT)?g' $$@
$$(hide) sed -i -e 's?%PRODUCTSERVICES%?$$(TARGET_COPY_OUT_PRODUCTSERVICES)?g' $$@
llndk_libraries_list :=
vndksp_libraries_list :=

View file

@ -8,6 +8,7 @@
dir.system = /system/bin/
dir.system = /system/xbin/
dir.system = /%PRODUCT%/bin/
dir.system = /%PRODUCTSERVICES%/bin/
dir.vendor = /odm/bin/
dir.vendor = /vendor/bin/
@ -40,6 +41,7 @@ namespace.default.isolated = true
namespace.default.search.paths = /system/${LIB}
namespace.default.search.paths += /%PRODUCT%/${LIB}
namespace.default.search.paths += /%PRODUCTSERVICES%/${LIB}
# We can't have entire /system/${LIB} as permitted paths because doing so
# makes it possible to load libs in /system/${LIB}/vndk* directories by
@ -52,6 +54,7 @@ namespace.default.permitted.paths = /system/${LIB}/drm
namespace.default.permitted.paths += /system/${LIB}/extractors
namespace.default.permitted.paths += /system/${LIB}/hw
namespace.default.permitted.paths += /%PRODUCT%/${LIB}
namespace.default.permitted.paths += /%PRODUCTSERVICES%/${LIB}
# These are where odex files are located. libart has to be able to dlopen the files
namespace.default.permitted.paths += /system/framework
namespace.default.permitted.paths += /system/app
@ -66,6 +69,9 @@ namespace.default.permitted.paths += /oem/app
namespace.default.permitted.paths += /%PRODUCT%/framework
namespace.default.permitted.paths += /%PRODUCT%/app
namespace.default.permitted.paths += /%PRODUCT%/priv-app
namespace.default.permitted.paths += /%PRODUCTSERVICES%/framework
namespace.default.permitted.paths += /%PRODUCTSERVICES%/app
namespace.default.permitted.paths += /%PRODUCTSERVICES%/priv-app
namespace.default.permitted.paths += /data
namespace.default.permitted.paths += /mnt/expand
@ -73,6 +79,8 @@ namespace.default.asan.search.paths = /data/asan/system/${LIB}
namespace.default.asan.search.paths += /system/${LIB}
namespace.default.asan.search.paths += /data/asan/product/${LIB}
namespace.default.asan.search.paths += /product/${LIB}
namespace.default.asan.search.paths += /data/asan/product-services/${LIB}
namespace.default.asan.search.paths += /product-services/${LIB}
namespace.default.asan.permitted.paths = /data
namespace.default.asan.permitted.paths += /system/${LIB}/drm
@ -92,6 +100,10 @@ namespace.default.asan.permitted.paths += /%PRODUCT%/${LIB}
namespace.default.asan.permitted.paths += /%PRODUCT%/framework
namespace.default.asan.permitted.paths += /%PRODUCT%/app
namespace.default.asan.permitted.paths += /%PRODUCT%/priv-app
namespace.default.asan.permitted.paths += /%PRODUCTSERVICES%/${LIB}
namespace.default.asan.permitted.paths += /%PRODUCTSERVICES%/framework
namespace.default.asan.permitted.paths += /%PRODUCTSERVICES%/app
namespace.default.asan.permitted.paths += /%PRODUCTSERVICES%/priv-app
namespace.default.asan.permitted.paths += /mnt/expand
###############################################################################
@ -328,6 +340,7 @@ namespace.system.isolated = false
namespace.system.search.paths = /system/${LIB}
namespace.system.search.paths += /%PRODUCT%/${LIB}
namespace.system.search.paths += /%PRODUCTSERVICES%/${LIB}
namespace.system.asan.search.paths = /data/asan/system/${LIB}
namespace.system.asan.search.paths += /system/${LIB}
@ -346,3 +359,4 @@ namespace.system.asan.search.paths += /product/${LIB}
namespace.default.isolated = false
namespace.default.search.paths = /system/${LIB}
namespace.default.search.paths += /%PRODUCT%/${LIB}
namespace.default.search.paths += /%PRODUCTSERVICES%/${LIB}