Loading cmds/installd/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ cc_defaults { shared_libs: [ "libbase", "libbinder", "libcrypto", "libcutils", "liblog", "liblogwrap", Loading cmds/installd/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ LOCAL_SRC_FILES := otapreopt.cpp globals.cpp utils.cpp dexopt.cpp LOCAL_HEADER_LIBRARIES := dex2oat_headers LOCAL_SHARED_LIBRARIES := \ libbase \ libcrypto \ libcutils \ liblog \ liblogwrap \ Loading cmds/installd/InstalldNativeService.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -2312,6 +2312,22 @@ binder::Status InstalldNativeService::reconcileSecondaryDexFile( return result ? ok() : error(); } binder::Status InstalldNativeService::hashSecondaryDexFile( const std::string& dexPath, const std::string& packageName, int32_t uid, const std::unique_ptr<std::string>& volumeUuid, int32_t storageFlag, std::vector<uint8_t>* _aidl_return) { ENFORCE_UID(AID_SYSTEM); CHECK_ARGUMENT_UUID(volumeUuid); CHECK_ARGUMENT_PACKAGE_NAME(packageName); // mLock is not taken here since we will never modify the file system. // If a file is modified just as we are reading it this may result in an // anomalous hash, but that's ok. bool result = android::installd::hash_secondary_dex_file( dexPath, packageName, uid, volumeUuid, storageFlag, _aidl_return); return result ? ok() : error(); } binder::Status InstalldNativeService::invalidateMounts() { ENFORCE_UID(AID_SYSTEM); std::lock_guard<std::recursive_mutex> lock(mMountsLock); Loading cmds/installd/InstalldNativeService.h +3 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,9 @@ public: binder::Status reconcileSecondaryDexFile(const std::string& dexPath, const std::string& packageName, int32_t uid, const std::vector<std::string>& isa, const std::unique_ptr<std::string>& volumeUuid, int32_t storage_flag, bool* _aidl_return); binder::Status hashSecondaryDexFile(const std::string& dexPath, const std::string& packageName, int32_t uid, const std::unique_ptr<std::string>& volumeUuid, int32_t storageFlag, std::vector<uint8_t>* _aidl_return); binder::Status invalidateMounts(); binder::Status isQuotaSupported(const std::unique_ptr<std::string>& volumeUuid, Loading cmds/installd/binder/android/os/IInstalld.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,9 @@ interface IInstalld { int uid, in @utf8InCpp String[] isas, @nullable @utf8InCpp String volume_uuid, int storage_flag); byte[] hashSecondaryDexFile(@utf8InCpp String dexPath, @utf8InCpp String pkgName, int uid, @nullable @utf8InCpp String volumeUuid, int storageFlag); void invalidateMounts(); boolean isQuotaSupported(@nullable @utf8InCpp String uuid); } Loading
cmds/installd/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ cc_defaults { shared_libs: [ "libbase", "libbinder", "libcrypto", "libcutils", "liblog", "liblogwrap", Loading
cmds/installd/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ LOCAL_SRC_FILES := otapreopt.cpp globals.cpp utils.cpp dexopt.cpp LOCAL_HEADER_LIBRARIES := dex2oat_headers LOCAL_SHARED_LIBRARIES := \ libbase \ libcrypto \ libcutils \ liblog \ liblogwrap \ Loading
cmds/installd/InstalldNativeService.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -2312,6 +2312,22 @@ binder::Status InstalldNativeService::reconcileSecondaryDexFile( return result ? ok() : error(); } binder::Status InstalldNativeService::hashSecondaryDexFile( const std::string& dexPath, const std::string& packageName, int32_t uid, const std::unique_ptr<std::string>& volumeUuid, int32_t storageFlag, std::vector<uint8_t>* _aidl_return) { ENFORCE_UID(AID_SYSTEM); CHECK_ARGUMENT_UUID(volumeUuid); CHECK_ARGUMENT_PACKAGE_NAME(packageName); // mLock is not taken here since we will never modify the file system. // If a file is modified just as we are reading it this may result in an // anomalous hash, but that's ok. bool result = android::installd::hash_secondary_dex_file( dexPath, packageName, uid, volumeUuid, storageFlag, _aidl_return); return result ? ok() : error(); } binder::Status InstalldNativeService::invalidateMounts() { ENFORCE_UID(AID_SYSTEM); std::lock_guard<std::recursive_mutex> lock(mMountsLock); Loading
cmds/installd/InstalldNativeService.h +3 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,9 @@ public: binder::Status reconcileSecondaryDexFile(const std::string& dexPath, const std::string& packageName, int32_t uid, const std::vector<std::string>& isa, const std::unique_ptr<std::string>& volumeUuid, int32_t storage_flag, bool* _aidl_return); binder::Status hashSecondaryDexFile(const std::string& dexPath, const std::string& packageName, int32_t uid, const std::unique_ptr<std::string>& volumeUuid, int32_t storageFlag, std::vector<uint8_t>* _aidl_return); binder::Status invalidateMounts(); binder::Status isQuotaSupported(const std::unique_ptr<std::string>& volumeUuid, Loading
cmds/installd/binder/android/os/IInstalld.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,9 @@ interface IInstalld { int uid, in @utf8InCpp String[] isas, @nullable @utf8InCpp String volume_uuid, int storage_flag); byte[] hashSecondaryDexFile(@utf8InCpp String dexPath, @utf8InCpp String pkgName, int uid, @nullable @utf8InCpp String volumeUuid, int storageFlag); void invalidateMounts(); boolean isQuotaSupported(@nullable @utf8InCpp String uuid); }