From aed3337f29a7e1ef2beead2a403ad97a4f8a16f2 Mon Sep 17 00:00:00 2001 From: Songchun Fan Date: Wed, 5 Feb 2020 12:02:22 -0800 Subject: Passing code path to installd moveCompleteApps With 2-level code dirs installd can no longer guess app code path. (Will cherry-pick into aosp after merging into master) BUG: b/148844589 b/148237378 Test: atest AdoptableHostTest Change-Id: Ifa60ada4688eaafea452847b9a5177ca821b3224 --- cmds/installd/InstalldNativeService.cpp | 7 +++---- cmds/installd/InstalldNativeService.h | 2 +- cmds/installd/binder/android/os/IInstalld.aidl | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp index cfd6a3eb9f..08d4657a48 100644 --- a/cmds/installd/InstalldNativeService.cpp +++ b/cmds/installd/InstalldNativeService.cpp @@ -1102,7 +1102,7 @@ binder::Status InstalldNativeService::destroyAppDataSnapshot( binder::Status InstalldNativeService::moveCompleteApp(const std::unique_ptr& fromUuid, const std::unique_ptr& toUuid, const std::string& packageName, const std::string& dataAppName, int32_t appId, const std::string& seInfo, - int32_t targetSdkVersion) { + int32_t targetSdkVersion, const std::string& fromCodePath) { ENFORCE_UID(AID_SYSTEM); CHECK_ARGUMENT_UUID(fromUuid); CHECK_ARGUMENT_UUID(toUuid); @@ -1119,13 +1119,12 @@ binder::Status InstalldNativeService::moveCompleteApp(const std::unique_ptr& fromUuid, const std::unique_ptr& toUuid, const std::string& packageName, const std::string& dataAppName, int32_t appId, const std::string& seInfo, - int32_t targetSdkVersion); + int32_t targetSdkVersion, const std::string& fromCodePath); binder::Status dexopt(const std::string& apkPath, int32_t uid, const std::unique_ptr& packageName, const std::string& instructionSet, diff --git a/cmds/installd/binder/android/os/IInstalld.aidl b/cmds/installd/binder/android/os/IInstalld.aidl index 07ced0d013..80d97038b4 100644 --- a/cmds/installd/binder/android/os/IInstalld.aidl +++ b/cmds/installd/binder/android/os/IInstalld.aidl @@ -52,7 +52,7 @@ interface IInstalld { void moveCompleteApp(@nullable @utf8InCpp String fromUuid, @nullable @utf8InCpp String toUuid, @utf8InCpp String packageName, @utf8InCpp String dataAppName, int appId, - @utf8InCpp String seInfo, int targetSdkVersion); + @utf8InCpp String seInfo, int targetSdkVersion, @utf8InCpp String fromCodePath); void dexopt(@utf8InCpp String apkPath, int uid, @nullable @utf8InCpp String packageName, @utf8InCpp String instructionSet, int dexoptNeeded, -- cgit v1.2.3-59-g8ed1b