Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 911c7f33 authored by Steve Kondik's avatar Steve Kondik
Browse files

installd: Consider bundled app dir as a valid apk path

Change-Id: I92db56f21bf91e0816b63faffcfbb270ca2d8fca
parent 4cf97420
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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";
+6 −0
Original line number Diff line number Diff line
@@ -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;

+3 −0
Original line number Diff line number Diff line
@@ -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 {
+2 −0
Original line number Diff line number Diff line
@@ -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;
    }