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

Commit b8858e32 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-d8901a87-7dd0-4cc8-a44e-d04982e429da-for-git_oc-mr1-release-41...

release-request-d8901a87-7dd0-4cc8-a44e-d04982e429da-for-git_oc-mr1-release-4198291 snap-temp-L50900000084068812

Change-Id: I88cee9049987c635ca56c44b40024273c454d5a5
parents bdb3f87e b11d9c84
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1825,7 +1825,7 @@ binder::Status InstalldNativeService::dexopt(const std::string& apkPath, int32_t
        const std::unique_ptr<std::string>& packageName, const std::string& instructionSet,
        int32_t dexoptNeeded, const std::unique_ptr<std::string>& outputPath, int32_t dexFlags,
        const std::string& compilerFilter, const std::unique_ptr<std::string>& uuid,
        const std::unique_ptr<std::string>& sharedLibraries,
        const std::unique_ptr<std::string>& classLoaderContext,
        const std::unique_ptr<std::string>& seInfo, bool downgrade) {
    ENFORCE_UID(AID_SYSTEM);
    CHECK_ARGUMENT_UUID(uuid);
@@ -1840,10 +1840,10 @@ binder::Status InstalldNativeService::dexopt(const std::string& apkPath, int32_t
    const char* oat_dir = outputPath ? outputPath->c_str() : nullptr;
    const char* compiler_filter = compilerFilter.c_str();
    const char* volume_uuid = uuid ? uuid->c_str() : nullptr;
    const char* shared_libraries = sharedLibraries ? sharedLibraries->c_str() : nullptr;
    const char* class_loader_context = classLoaderContext ? classLoaderContext->c_str() : nullptr;
    const char* se_info = seInfo ? seInfo->c_str() : nullptr;
    int res = android::installd::dexopt(apk_path, uid, pkgname, instruction_set, dexoptNeeded,
            oat_dir, dexFlags, compiler_filter, volume_uuid, shared_libraries, se_info,
            oat_dir, dexFlags, compiler_filter, volume_uuid, class_loader_context, se_info,
            downgrade);
    return res ? error(res, "Failed to dexopt") : ok();
}
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public:
            const std::unique_ptr<std::string>& packageName, const std::string& instructionSet,
            int32_t dexoptNeeded, const std::unique_ptr<std::string>& outputPath, int32_t dexFlags,
            const std::string& compilerFilter, const std::unique_ptr<std::string>& uuid,
            const std::unique_ptr<std::string>& sharedLibraries,
            const std::unique_ptr<std::string>& classLoaderContext,
            const std::unique_ptr<std::string>& seInfo, bool downgrade);

    binder::Status rmdex(const std::string& codePath, const std::string& instructionSet);
+20 −11
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ static const char* get_location_from_path(const char* path) {
static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vdex_fd, int image_fd,
        const char* input_file_name, const char* output_file_name, int swap_fd,
        const char* instruction_set, const char* compiler_filter,
        bool debuggable, bool post_bootcomplete, int profile_fd, const char* shared_libraries) {
        bool debuggable, bool post_bootcomplete, int profile_fd, const char* class_loader_context) {
    static const unsigned int MAX_INSTRUCTION_SET_LEN = 7;

    if (strlen(instruction_set) >= MAX_INSTRUCTION_SET_LEN) {
@@ -291,6 +291,12 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd
    char dex2oat_swap_fd[arraysize("--swap-fd=") + MAX_INT_LEN];
    bool have_dex2oat_image_fd = false;
    char dex2oat_image_fd[arraysize("--app-image-fd=") + MAX_INT_LEN];
    size_t class_loader_context_size = arraysize("--class-loader-context=") + PKG_PATH_MAX;
    char class_loader_context_arg[class_loader_context_size];
    if (class_loader_context != nullptr) {
        snprintf(class_loader_context_arg, class_loader_context_size, "--class-loader-context=%s",
            class_loader_context);
    }

    sprintf(zip_fd_arg, "--zip-fd=%d", zip_fd);
    sprintf(zip_location_arg, "--zip-location=%s", relative_input_file_name);
@@ -387,7 +393,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd
                     + (have_app_image_format ? 1 : 0)
                     + dex2oat_flags_count
                     + (profile_fd == -1 ? 0 : 1)
                     + (shared_libraries != nullptr ? 4 : 0)
                     + (class_loader_context != nullptr ? 1 : 0)
                     + (has_base_dir ? 1 : 0)
                     + (have_dex2oat_large_app_threshold ? 1 : 0)];
    int i = 0;
@@ -447,15 +453,13 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd
    if (profile_fd != -1) {
        argv[i++] = profile_arg;
    }
    if (shared_libraries != nullptr) {
        argv[i++] = RUNTIME_ARG;
        argv[i++] = "-classpath";
        argv[i++] = RUNTIME_ARG;
        argv[i++] = shared_libraries;
    }
    if (has_base_dir) {
        argv[i++] = base_dir;
    }
    if (class_loader_context != nullptr) {
        argv[i++] = class_loader_context_arg;
    }

    // Do not add after dex2oat_flags, they should override others for debugging.
    argv[i] = NULL;

@@ -1568,7 +1572,7 @@ static bool process_secondary_dex_dexopt(const char* original_dex_path, const ch

int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* instruction_set,
        int dexopt_needed, const char* oat_dir, int dexopt_flags, const char* compiler_filter,
        const char* volume_uuid, const char* shared_libraries, const char* se_info,
        const char* volume_uuid, const char* class_loader_context, const char* se_info,
        bool downgrade) {
    CHECK(pkgname != nullptr);
    CHECK(pkgname[0] != 0);
@@ -1577,7 +1581,12 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins
    }

    if (!validate_dex_path_size(dex_path)) {
        return false;
        return -1;
    }

    if (class_loader_context != nullptr && strlen(class_loader_context) > PKG_PATH_MAX) {
        LOG(ERROR) << "Class loader context exceeds the allowed size: " << class_loader_context;
        return -1;
    }

    bool is_public = (dexopt_flags & DEXOPT_PUBLIC) != 0;
@@ -1682,7 +1691,7 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins
                    debuggable,
                    boot_complete,
                    reference_profile_fd.get(),
                    shared_libraries);
                    class_loader_context);
        _exit(68);   /* only get here on exec failure */
    } else {
        int res = wait_child(pid);
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ bool reconcile_secondary_dex_file(const std::string& dex_path,

int dexopt(const char *apk_path, uid_t uid, const char *pkgName, const char *instruction_set,
        int dexopt_needed, const char* oat_dir, int dexopt_flags, const char* compiler_filter,
        const char* volume_uuid, const char* shared_libraries, const char* se_info,
        const char* volume_uuid, const char* class_loader_context, const char* se_info,
        bool downgrade);

}  // namespace installd
+1 −1
Original line number Diff line number Diff line
@@ -394,7 +394,7 @@ status_t SensorService::dump(int fd, const Vector<String16>& args) {
            }
        } else if (!mSensors.hasAnySensor()) {
            result.append("No Sensors on the device\n");
            result.append("devInitCheck : %d\n", SensorDevice::getInstance().initCheck());
            result.appendFormat("devInitCheck : %d\n", SensorDevice::getInstance().initCheck());
        } else {
            // Default dump the sensor list and debugging information.
            //
Loading