summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
Diffstat (limited to 'cmds')
-rw-r--r--cmds/installd/commands.cpp1
-rw-r--r--cmds/installd/installd.cpp6
-rw-r--r--cmds/installd/installd.h3
-rw-r--r--cmds/installd/utils.cpp2
4 files changed, 12 insertions, 0 deletions
diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp
index 55cdabc..322d537 100644
--- a/cmds/installd/commands.cpp
+++ b/cmds/installd/commands.cpp
@@ -39,6 +39,7 @@ dir_rec_t android_app_private_dir;
dir_rec_t android_app_lib_dir;
dir_rec_t android_media_dir;
dir_rec_t android_mnt_expand_dir;
+dir_rec_t android_prebundled_dir;
dir_rec_array_t android_system_dirs;
static const char* kCpPath = "/system/bin/cp";
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
index d0e1747..c92bed0 100644
--- a/cmds/installd/installd.cpp
+++ b/cmds/installd/installd.cpp
@@ -385,6 +385,12 @@ int initialize_globals() {
return -1;
}
+ // Get the android external app directory.
+ if (get_path_from_string(&android_prebundled_dir, PREBUNDLED_APP_PREFIX) < 0) {
+ return -1;
+ }
+
+
// Take note of the system and vendor directories.
android_system_dirs.count = 4;
diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h
index 2745ba0..70e5e16 100644
--- a/cmds/installd/installd.h
+++ b/cmds/installd/installd.h
@@ -92,6 +92,8 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
+#define PREBUNDLED_APP_PREFIX "/vendor/bundled-app/"
+
/* data structures */
typedef struct {
@@ -111,6 +113,7 @@ extern dir_rec_t android_data_dir;
extern dir_rec_t android_asec_dir;
extern dir_rec_t android_media_dir;
extern dir_rec_t android_mnt_expand_dir;
+extern dir_rec_t android_prebundled_dir;
extern dir_rec_array_t android_system_dirs;
typedef struct cache_dir_struct {
diff --git a/cmds/installd/utils.cpp b/cmds/installd/utils.cpp
index 7db3fb9..a32d1a0 100644
--- a/cmds/installd/utils.cpp
+++ b/cmds/installd/utils.cpp
@@ -1061,6 +1061,8 @@ static int validate_apk_path_internal(const char *path, int maxSubdirs) {
if (maxSubdirs < 2) {
maxSubdirs = 2;
}
+ } else if (!strncmp(path, android_prebundled_dir.path, android_prebundled_dir.len)) {
+ dir = &android_prebundled_dir;
} else {
return -1;
}