summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInseob Kim2018-05-30 23:03:58 -0500
committerInseob Kim2018-05-31 18:33:04 -0500
commit25195daaca079e048e47b38b83fc41527a89ccb0 (patch)
tree7e206333a423a770b017dfd96512a98f82e6b0d0
parentd580c441ab45a6b7278da003e19af64e9ea2cc71 (diff)
downloadplatform-system-core-25195daaca079e048e47b38b83fc41527a89ccb0.tar.gz
platform-system-core-25195daaca079e048e47b38b83fc41527a89ccb0.tar.xz
platform-system-core-25195daaca079e048e47b38b83fc41527a89ccb0.zip
Support /product/bin
Bug: 80422611 Test: m -j succeeded and permissions of files under /product/bin are set correctly Change-Id: I83377d809c47c92da6b226d2853ea6a7462fb127
-rw-r--r--libcutils/fs_config.cpp7
-rw-r--r--rootdir/etc/ld.config.txt1
-rw-r--r--rootdir/etc/ld.config.vndk_lite.txt1
3 files changed, 7 insertions, 2 deletions
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp
index 0f2b46075..6169324cb 100644
--- a/libcutils/fs_config.cpp
+++ b/libcutils/fs_config.cpp
@@ -80,6 +80,7 @@ static const struct fs_path_config android_dirs[] = {
80 { 00775, AID_ROOT, AID_ROOT, 0, "data/preloads" }, 80 { 00775, AID_ROOT, AID_ROOT, 0, "data/preloads" },
81 { 00771, AID_SYSTEM, AID_SYSTEM, 0, "data" }, 81 { 00771, AID_SYSTEM, AID_SYSTEM, 0, "data" },
82 { 00755, AID_ROOT, AID_SYSTEM, 0, "mnt" }, 82 { 00755, AID_ROOT, AID_SYSTEM, 0, "mnt" },
83 { 00755, AID_ROOT, AID_SHELL, 0, "product/bin" },
83 { 00750, AID_ROOT, AID_SHELL, 0, "sbin" }, 84 { 00750, AID_ROOT, AID_SHELL, 0, "sbin" },
84 { 00777, AID_ROOT, AID_ROOT, 0, "sdcard" }, 85 { 00777, AID_ROOT, AID_ROOT, 0, "sdcard" },
85 { 00751, AID_ROOT, AID_SDCARD_R, 0, "storage" }, 86 { 00751, AID_ROOT, AID_SDCARD_R, 0, "storage" },
@@ -195,6 +196,7 @@ static const struct fs_path_config android_files[] = {
195 { 00755, AID_ROOT, AID_ROOT, 0, "bin/*" }, 196 { 00755, AID_ROOT, AID_ROOT, 0, "bin/*" },
196 { 00640, AID_ROOT, AID_SHELL, 0, "fstab.*" }, 197 { 00640, AID_ROOT, AID_SHELL, 0, "fstab.*" },
197 { 00750, AID_ROOT, AID_SHELL, 0, "init*" }, 198 { 00750, AID_ROOT, AID_SHELL, 0, "init*" },
199 { 00755, AID_ROOT, AID_SHELL, 0, "product/bin/*" },
198 { 00750, AID_ROOT, AID_SHELL, 0, "sbin/*" }, 200 { 00750, AID_ROOT, AID_SHELL, 0, "sbin/*" },
199 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" }, 201 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" },
200 { 00755, AID_ROOT, AID_ROOT, 0, "system/lib/valgrind/*" }, 202 { 00755, AID_ROOT, AID_ROOT, 0, "system/lib/valgrind/*" },
@@ -237,9 +239,10 @@ static int fs_config_open(int dir, int which, const char* target_out_path) {
237 return fd; 239 return fd;
238} 240}
239 241
240// if path is "vendor/<stuff>", "oem/<stuff>" or "odm/<stuff>" 242// if path is "odm/<stuff>", "oem/<stuff>", "product/<stuff>" or
243// "vendor/<stuff>"
241static bool is_partition(const char* path, size_t len) { 244static bool is_partition(const char* path, size_t len) {
242 static const char* partitions[] = {"vendor/", "oem/", "odm/"}; 245 static const char* partitions[] = {"odm/", "oem/", "product/", "vendor/"};
243 for (size_t i = 0; i < (sizeof(partitions) / sizeof(partitions[0])); ++i) { 246 for (size_t i = 0; i < (sizeof(partitions) / sizeof(partitions[0])); ++i) {
244 size_t plen = strlen(partitions[i]); 247 size_t plen = strlen(partitions[i]);
245 if (len <= plen) continue; 248 if (len <= plen) continue;
diff --git a/rootdir/etc/ld.config.txt b/rootdir/etc/ld.config.txt
index 51e3f9efc..a0b1996ad 100644
--- a/rootdir/etc/ld.config.txt
+++ b/rootdir/etc/ld.config.txt
@@ -7,6 +7,7 @@
7# absolute path of an executable is selected. 7# absolute path of an executable is selected.
8dir.system = /system/bin/ 8dir.system = /system/bin/
9dir.system = /system/xbin/ 9dir.system = /system/xbin/
10dir.system = /product/bin/
10 11
11dir.vendor = /odm/bin/ 12dir.vendor = /odm/bin/
12dir.vendor = /vendor/bin/ 13dir.vendor = /vendor/bin/
diff --git a/rootdir/etc/ld.config.vndk_lite.txt b/rootdir/etc/ld.config.vndk_lite.txt
index ab0375539..db65c14fc 100644
--- a/rootdir/etc/ld.config.vndk_lite.txt
+++ b/rootdir/etc/ld.config.vndk_lite.txt
@@ -7,6 +7,7 @@
7# absolute path of an executable is selected. 7# absolute path of an executable is selected.
8dir.system = /system/bin/ 8dir.system = /system/bin/
9dir.system = /system/xbin/ 9dir.system = /system/xbin/
10dir.system = /product/bin/
10 11
11dir.vendor = /odm/bin/ 12dir.vendor = /odm/bin/
12dir.vendor = /vendor/bin/ 13dir.vendor = /vendor/bin/