1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.os; 18 19 /** {@hide} */ 20 interface IInstalld { createUserData(@ullable @tf8InCpp String uuid, int userId, int userSerial, int flags)21 void createUserData(@nullable @utf8InCpp String uuid, int userId, int userSerial, int flags); destroyUserData(@ullable @tf8InCpp String uuid, int userId, int flags)22 void destroyUserData(@nullable @utf8InCpp String uuid, int userId, int flags); 23 createAppData(@ullable @tf8InCpp String uuid, in @utf8InCpp String packageName, int userId, int flags, int appId, in @utf8InCpp String seInfo, int targetSdkVersion)24 long createAppData(@nullable @utf8InCpp String uuid, in @utf8InCpp String packageName, 25 int userId, int flags, int appId, in @utf8InCpp String seInfo, int targetSdkVersion); restoreconAppData(@ullable @tf8InCpp String uuid, @utf8InCpp String packageName, int userId, int flags, int appId, @utf8InCpp String seInfo)26 void restoreconAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName, 27 int userId, int flags, int appId, @utf8InCpp String seInfo); migrateAppData(@ullable @tf8InCpp String uuid, @utf8InCpp String packageName, int userId, int flags)28 void migrateAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName, 29 int userId, int flags); clearAppData(@ullable @tf8InCpp String uuid, @utf8InCpp String packageName, int userId, int flags, long ceDataInode)30 void clearAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName, 31 int userId, int flags, long ceDataInode); destroyAppData(@ullable @tf8InCpp String uuid, @utf8InCpp String packageName, int userId, int flags, long ceDataInode)32 void destroyAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName, 33 int userId, int flags, long ceDataInode); 34 fixupAppData(@ullable @tf8InCpp String uuid, int flags)35 void fixupAppData(@nullable @utf8InCpp String uuid, int flags); 36 getAppSize(@ullable @tf8InCpp String uuid, in @utf8InCpp String[] packageNames, int userId, int flags, int appId, in long[] ceDataInodes, in @utf8InCpp String[] codePaths)37 long[] getAppSize(@nullable @utf8InCpp String uuid, in @utf8InCpp String[] packageNames, 38 int userId, int flags, int appId, in long[] ceDataInodes, 39 in @utf8InCpp String[] codePaths); getUserSize(@ullable @tf8InCpp String uuid, int userId, int flags, in int[] appIds)40 long[] getUserSize(@nullable @utf8InCpp String uuid, int userId, int flags, in int[] appIds); getExternalSize(@ullable @tf8InCpp String uuid, int userId, int flags, in int[] appIds)41 long[] getExternalSize(@nullable @utf8InCpp String uuid, int userId, int flags, in int[] appIds); 42 setAppQuota(@ullable @tf8InCpp String uuid, int userId, int appId, long cacheQuota)43 void setAppQuota(@nullable @utf8InCpp String uuid, int userId, int appId, long cacheQuota); 44 moveCompleteApp(@ullable @tf8InCpp String fromUuid, @nullable @utf8InCpp String toUuid, @utf8InCpp String packageName, @utf8InCpp String dataAppName, int appId, @utf8InCpp String seInfo, int targetSdkVersion)45 void moveCompleteApp(@nullable @utf8InCpp String fromUuid, @nullable @utf8InCpp String toUuid, 46 @utf8InCpp String packageName, @utf8InCpp String dataAppName, int appId, 47 @utf8InCpp String seInfo, int targetSdkVersion); 48 dexopt(@tf8InCpp String apkPath, int uid, @nullable @utf8InCpp String packageName, @utf8InCpp String instructionSet, int dexoptNeeded, @nullable @utf8InCpp String outputPath, int dexFlags, @utf8InCpp String compilerFilter, @nullable @utf8InCpp String uuid, @nullable @utf8InCpp String sharedLibraries, @nullable @utf8InCpp String seInfo, boolean downgrade, int targetSdkVersion, @nullable @utf8InCpp String profileName, @nullable @utf8InCpp String dexMetadataPath, @nullable @utf8InCpp String compilationReason)49 void dexopt(@utf8InCpp String apkPath, int uid, @nullable @utf8InCpp String packageName, 50 @utf8InCpp String instructionSet, int dexoptNeeded, 51 @nullable @utf8InCpp String outputPath, int dexFlags, 52 @utf8InCpp String compilerFilter, @nullable @utf8InCpp String uuid, 53 @nullable @utf8InCpp String sharedLibraries, 54 @nullable @utf8InCpp String seInfo, boolean downgrade, int targetSdkVersion, 55 @nullable @utf8InCpp String profileName, 56 @nullable @utf8InCpp String dexMetadataPath, 57 @nullable @utf8InCpp String compilationReason); 58 rmdex(@tf8InCpp String codePath, @utf8InCpp String instructionSet)59 void rmdex(@utf8InCpp String codePath, @utf8InCpp String instructionSet); 60 mergeProfiles(int uid, @utf8InCpp String packageName, @utf8InCpp String profileName)61 boolean mergeProfiles(int uid, @utf8InCpp String packageName, @utf8InCpp String profileName); dumpProfiles(int uid, @utf8InCpp String packageName, @utf8InCpp String profileName, @utf8InCpp String codePath)62 boolean dumpProfiles(int uid, @utf8InCpp String packageName, @utf8InCpp String profileName, 63 @utf8InCpp String codePath); copySystemProfile(@tf8InCpp String systemProfile, int uid, @utf8InCpp String packageName, @utf8InCpp String profileName)64 boolean copySystemProfile(@utf8InCpp String systemProfile, int uid, 65 @utf8InCpp String packageName, @utf8InCpp String profileName); clearAppProfiles(@tf8InCpp String packageName, @utf8InCpp String profileName)66 void clearAppProfiles(@utf8InCpp String packageName, @utf8InCpp String profileName); destroyAppProfiles(@tf8InCpp String packageName)67 void destroyAppProfiles(@utf8InCpp String packageName); 68 createProfileSnapshot(int appId, @utf8InCpp String packageName, @utf8InCpp String profileName, @utf8InCpp String classpath)69 boolean createProfileSnapshot(int appId, @utf8InCpp String packageName, 70 @utf8InCpp String profileName, @utf8InCpp String classpath); destroyProfileSnapshot(@tf8InCpp String packageName, @utf8InCpp String profileName)71 void destroyProfileSnapshot(@utf8InCpp String packageName, @utf8InCpp String profileName); 72 idmap(@tf8InCpp String targetApkPath, @utf8InCpp String overlayApkPath, int uid)73 void idmap(@utf8InCpp String targetApkPath, @utf8InCpp String overlayApkPath, int uid); removeIdmap(@tf8InCpp String overlayApkPath)74 void removeIdmap(@utf8InCpp String overlayApkPath); rmPackageDir(@tf8InCpp String packageDir)75 void rmPackageDir(@utf8InCpp String packageDir); markBootComplete(@tf8InCpp String instructionSet)76 void markBootComplete(@utf8InCpp String instructionSet); freeCache(@ullable @tf8InCpp String uuid, long targetFreeBytes, long cacheReservedBytes, int flags)77 void freeCache(@nullable @utf8InCpp String uuid, long targetFreeBytes, 78 long cacheReservedBytes, int flags); linkNativeLibraryDirectory(@ullable @tf8InCpp String uuid, @utf8InCpp String packageName, @utf8InCpp String nativeLibPath32, int userId)79 void linkNativeLibraryDirectory(@nullable @utf8InCpp String uuid, 80 @utf8InCpp String packageName, @utf8InCpp String nativeLibPath32, int userId); createOatDir(@tf8InCpp String oatDir, @utf8InCpp String instructionSet)81 void createOatDir(@utf8InCpp String oatDir, @utf8InCpp String instructionSet); linkFile(@tf8InCpp String relativePath, @utf8InCpp String fromBase, @utf8InCpp String toBase)82 void linkFile(@utf8InCpp String relativePath, @utf8InCpp String fromBase, 83 @utf8InCpp String toBase); moveAb(@tf8InCpp String apkPath, @utf8InCpp String instructionSet, @utf8InCpp String outputPath)84 void moveAb(@utf8InCpp String apkPath, @utf8InCpp String instructionSet, 85 @utf8InCpp String outputPath); deleteOdex(@tf8InCpp String apkPath, @utf8InCpp String instructionSet, @nullable @utf8InCpp String outputPath)86 void deleteOdex(@utf8InCpp String apkPath, @utf8InCpp String instructionSet, 87 @nullable @utf8InCpp String outputPath); installApkVerity(@tf8InCpp String filePath, in FileDescriptor verityInput, int contentSize)88 void installApkVerity(@utf8InCpp String filePath, in FileDescriptor verityInput, 89 int contentSize); assertFsverityRootHashMatches(@tf8InCpp String filePath, in byte[] expectedHash)90 void assertFsverityRootHashMatches(@utf8InCpp String filePath, in byte[] expectedHash); 91 reconcileSecondaryDexFile(@tf8InCpp String dexPath, @utf8InCpp String pkgName, int uid, in @utf8InCpp String[] isas, @nullable @utf8InCpp String volume_uuid, int storage_flag)92 boolean reconcileSecondaryDexFile(@utf8InCpp String dexPath, @utf8InCpp String pkgName, 93 int uid, in @utf8InCpp String[] isas, @nullable @utf8InCpp String volume_uuid, 94 int storage_flag); 95 hashSecondaryDexFile(@tf8InCpp String dexPath, @utf8InCpp String pkgName, int uid, @nullable @utf8InCpp String volumeUuid, int storageFlag)96 byte[] hashSecondaryDexFile(@utf8InCpp String dexPath, @utf8InCpp String pkgName, 97 int uid, @nullable @utf8InCpp String volumeUuid, int storageFlag); 98 invalidateMounts()99 void invalidateMounts(); isQuotaSupported(@ullable @tf8InCpp String uuid)100 boolean isQuotaSupported(@nullable @utf8InCpp String uuid); 101 prepareAppProfile(@tf8InCpp String packageName, int userId, int appId, @utf8InCpp String profileName, @utf8InCpp String codePath, @nullable @utf8InCpp String dexMetadata)102 boolean prepareAppProfile(@utf8InCpp String packageName, 103 int userId, int appId, @utf8InCpp String profileName, @utf8InCpp String codePath, 104 @nullable @utf8InCpp String dexMetadata); 105 } 106