blob: d457a2ad419ef750ff4cd886c40090ca0bb9d81a [file] [log] [blame]
Jeff Sharkey90874002016-12-05 11:18:55 -07001/*
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
17package android.os;
18
Jeff Sharkey6c2c0562016-12-07 12:12:00 -070019/** {@hide} */
Jeff Sharkey90874002016-12-05 11:18:55 -070020interface IInstalld {
Jeff Sharkeyc1e93e72016-12-05 23:39:32 -070021 void createUserData(@nullable @utf8InCpp String uuid, int userId, int userSerial, int flags);
22 void destroyUserData(@nullable @utf8InCpp String uuid, int userId, int flags);
23
Jeff Sharkey36a900a2016-12-19 16:39:18 -070024 long createAppData(@nullable @utf8InCpp String uuid, in @utf8InCpp String packageName,
Jeff Sharkey0274c972016-12-06 09:32:04 -070025 int userId, int flags, int appId, in @utf8InCpp String seInfo, int targetSdkVersion);
Jeff Sharkeyc1e93e72016-12-05 23:39:32 -070026 void restoreconAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName,
27 int userId, int flags, int appId, @utf8InCpp String seInfo);
28 void migrateAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName,
29 int userId, int flags);
30 void clearAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName,
31 int userId, int flags, long ceDataInode);
32 void destroyAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName,
33 int userId, int flags, long ceDataInode);
Jeff Sharkeydf2d7542017-01-07 09:19:35 -070034
Jeff Sharkeye12d5962017-04-03 16:41:02 -060035 void fixupAppData(@nullable @utf8InCpp String uuid, int flags);
36
Jeff Sharkeydf2d7542017-01-07 09:19:35 -070037 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);
40 long[] getUserSize(@nullable @utf8InCpp String uuid, int userId, int flags, in int[] appIds);
Jeff Sharkeya084fcd2017-04-17 16:44:41 -060041 long[] getExternalSize(@nullable @utf8InCpp String uuid, int userId, int flags, in int[] appIds);
Jeff Sharkeyc1e93e72016-12-05 23:39:32 -070042
Jeff Sharkey88ddd942017-01-17 18:05:54 -070043 void setAppQuota(@nullable @utf8InCpp String uuid, int userId, int appId, long cacheQuota);
44
Jeff Sharkey0274c972016-12-06 09:32:04 -070045 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);
Jeff Sharkey475c6f92016-12-07 10:37:27 -070048
Jeff Sharkey6c2c0562016-12-07 12:12:00 -070049 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,
Calin Juravlecb556e32017-04-04 20:22:50 -070053 @nullable @utf8InCpp String sharedLibraries,
Calin Juravle562de812018-01-20 23:34:18 -080054 @nullable @utf8InCpp String seInfo, boolean downgrade, int targetSdkVersion,
55 @nullable @utf8InCpp String profileName);
Jeff Sharkey6c2c0562016-12-07 12:12:00 -070056
Jeff Sharkey475c6f92016-12-07 10:37:27 -070057 void rmdex(@utf8InCpp String codePath, @utf8InCpp String instructionSet);
58
Calin Juravle562de812018-01-20 23:34:18 -080059 boolean mergeProfiles(int uid, @utf8InCpp String packageName, @utf8InCpp String profileName);
60 boolean dumpProfiles(int uid, @utf8InCpp String packageName, @utf8InCpp String profileName,
61 @utf8InCpp String codePath);
Mathieu Chartierf966f2a2017-05-10 12:48:37 -070062 boolean copySystemProfile(@utf8InCpp String systemProfile, int uid,
Calin Juravle562de812018-01-20 23:34:18 -080063 @utf8InCpp String packageName, @utf8InCpp String profileName);
64 void clearAppProfiles(@utf8InCpp String packageName, @utf8InCpp String profileName);
Jeff Sharkey475c6f92016-12-07 10:37:27 -070065 void destroyAppProfiles(@utf8InCpp String packageName);
66
Calin Juravlec41dac22017-12-05 12:29:15 -080067 boolean createProfileSnapshot(int appId, @utf8InCpp String packageName,
Calin Juravle562de812018-01-20 23:34:18 -080068 @utf8InCpp String profileName);
69 void destroyProfileSnapshot(@utf8InCpp String packageName, @utf8InCpp String profileName);
Calin Juravle29591732017-11-20 17:46:19 -080070
Jeff Sharkey475c6f92016-12-07 10:37:27 -070071 void idmap(@utf8InCpp String targetApkPath, @utf8InCpp String overlayApkPath, int uid);
MÃ¥rten Kongstad5c6944c2015-12-15 14:02:30 +010072 void removeIdmap(@utf8InCpp String overlayApkPath);
Jeff Sharkey475c6f92016-12-07 10:37:27 -070073 void rmPackageDir(@utf8InCpp String packageDir);
74 void markBootComplete(@utf8InCpp String instructionSet);
Jeff Sharkey60f8a532017-05-30 14:38:42 -060075 void freeCache(@nullable @utf8InCpp String uuid, long targetFreeBytes,
76 long cacheReservedBytes, int flags);
Jeff Sharkey475c6f92016-12-07 10:37:27 -070077 void linkNativeLibraryDirectory(@nullable @utf8InCpp String uuid,
78 @utf8InCpp String packageName, @utf8InCpp String nativeLibPath32, int userId);
79 void createOatDir(@utf8InCpp String oatDir, @utf8InCpp String instructionSet);
80 void linkFile(@utf8InCpp String relativePath, @utf8InCpp String fromBase,
81 @utf8InCpp String toBase);
82 void moveAb(@utf8InCpp String apkPath, @utf8InCpp String instructionSet,
83 @utf8InCpp String outputPath);
84 void deleteOdex(@utf8InCpp String apkPath, @utf8InCpp String instructionSet,
Andreas Gampec5234092017-05-31 16:39:58 -070085 @nullable @utf8InCpp String outputPath);
Victor Hsieh99de5162017-10-06 14:44:14 -070086 void installApkVerity(@utf8InCpp String filePath, in FileDescriptor verityInput);
Victor Hsiehc6d738a2018-01-20 15:06:39 -080087 void assertFsverityRootHashMatches(@utf8InCpp String filePath, in byte[] expectedHash);
Jeff Sharkey66b1a122017-01-16 20:57:45 -070088
Calin Juravlebd968362017-01-25 01:17:17 -080089 boolean reconcileSecondaryDexFile(@utf8InCpp String dexPath, @utf8InCpp String pkgName,
90 int uid, in @utf8InCpp String[] isas, @nullable @utf8InCpp String volume_uuid,
91 int storage_flag);
92
Alan Stokes753dc712017-10-16 10:56:00 +010093 byte[] hashSecondaryDexFile(@utf8InCpp String dexPath, @utf8InCpp String pkgName,
94 int uid, @nullable @utf8InCpp String volumeUuid, int storageFlag);
95
Jeff Sharkey66b1a122017-01-16 20:57:45 -070096 void invalidateMounts();
Jeff Sharkey325b8c92017-02-21 10:00:53 -070097 boolean isQuotaSupported(@nullable @utf8InCpp String uuid);
Calin Juravlebc5ab872018-01-18 22:32:58 -080098
99 boolean prepareAppProfile(@utf8InCpp String packageName,
100 int userId, int appId, @utf8InCpp String profileName, @utf8InCpp String codePath,
101 @nullable @utf8InCpp String dexMetadata);
Jeff Sharkey90874002016-12-05 11:18:55 -0700102}