Jeff Sharkey | 9087400 | 2016-12-05 11:18:55 -0700 | [diff] [blame] | 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 | |
Jeff Sharkey | 6c2c056 | 2016-12-07 12:12:00 -0700 | [diff] [blame] | 19 | /** {@hide} */ |
Jeff Sharkey | 9087400 | 2016-12-05 11:18:55 -0700 | [diff] [blame] | 20 | interface IInstalld { |
Jeff Sharkey | c1e93e7 | 2016-12-05 23:39:32 -0700 | [diff] [blame] | 21 | 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 Sharkey | 36a900a | 2016-12-19 16:39:18 -0700 | [diff] [blame] | 24 | long createAppData(@nullable @utf8InCpp String uuid, in @utf8InCpp String packageName, |
Jeff Sharkey | 0274c97 | 2016-12-06 09:32:04 -0700 | [diff] [blame] | 25 | int userId, int flags, int appId, in @utf8InCpp String seInfo, int targetSdkVersion); |
Jeff Sharkey | c1e93e7 | 2016-12-05 23:39:32 -0700 | [diff] [blame] | 26 | 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 Sharkey | df2d754 | 2017-01-07 09:19:35 -0700 | [diff] [blame] | 34 | |
Jeff Sharkey | e12d596 | 2017-04-03 16:41:02 -0600 | [diff] [blame] | 35 | void fixupAppData(@nullable @utf8InCpp String uuid, int flags); |
| 36 | |
Jeff Sharkey | df2d754 | 2017-01-07 09:19:35 -0700 | [diff] [blame] | 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); |
| 40 | long[] getUserSize(@nullable @utf8InCpp String uuid, int userId, int flags, in int[] appIds); |
Jeff Sharkey | a084fcd | 2017-04-17 16:44:41 -0600 | [diff] [blame] | 41 | long[] getExternalSize(@nullable @utf8InCpp String uuid, int userId, int flags, in int[] appIds); |
Jeff Sharkey | c1e93e7 | 2016-12-05 23:39:32 -0700 | [diff] [blame] | 42 | |
Jeff Sharkey | 88ddd94 | 2017-01-17 18:05:54 -0700 | [diff] [blame] | 43 | void setAppQuota(@nullable @utf8InCpp String uuid, int userId, int appId, long cacheQuota); |
| 44 | |
Jeff Sharkey | 0274c97 | 2016-12-06 09:32:04 -0700 | [diff] [blame] | 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); |
Jeff Sharkey | 475c6f9 | 2016-12-07 10:37:27 -0700 | [diff] [blame] | 48 | |
Jeff Sharkey | 6c2c056 | 2016-12-07 12:12:00 -0700 | [diff] [blame] | 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, |
Calin Juravle | cb556e3 | 2017-04-04 20:22:50 -0700 | [diff] [blame] | 53 | @nullable @utf8InCpp String sharedLibraries, |
David Brazdil | 570d398 | 2018-01-16 20:15:43 +0000 | [diff] [blame] | 54 | @nullable @utf8InCpp String seInfo, boolean downgrade, int targetSdkVersion); |
Jeff Sharkey | 6c2c056 | 2016-12-07 12:12:00 -0700 | [diff] [blame] | 55 | |
Jeff Sharkey | 475c6f9 | 2016-12-07 10:37:27 -0700 | [diff] [blame] | 56 | void rmdex(@utf8InCpp String codePath, @utf8InCpp String instructionSet); |
| 57 | |
| 58 | boolean mergeProfiles(int uid, @utf8InCpp String packageName); |
| 59 | boolean dumpProfiles(int uid, @utf8InCpp String packageName, @utf8InCpp String codePaths); |
Mathieu Chartier | f966f2a | 2017-05-10 12:48:37 -0700 | [diff] [blame] | 60 | boolean copySystemProfile(@utf8InCpp String systemProfile, int uid, |
| 61 | @utf8InCpp String packageName); |
Jeff Sharkey | 475c6f9 | 2016-12-07 10:37:27 -0700 | [diff] [blame] | 62 | void clearAppProfiles(@utf8InCpp String packageName); |
| 63 | void destroyAppProfiles(@utf8InCpp String packageName); |
| 64 | |
Calin Juravle | c41dac2 | 2017-12-05 12:29:15 -0800 | [diff] [blame] | 65 | boolean createProfileSnapshot(int appId, @utf8InCpp String packageName, |
| 66 | @utf8InCpp String codePath); |
Calin Juravle | 2959173 | 2017-11-20 17:46:19 -0800 | [diff] [blame] | 67 | void destroyProfileSnapshot(@utf8InCpp String packageName, @utf8InCpp String codePath); |
| 68 | |
Jeff Sharkey | 475c6f9 | 2016-12-07 10:37:27 -0700 | [diff] [blame] | 69 | void idmap(@utf8InCpp String targetApkPath, @utf8InCpp String overlayApkPath, int uid); |
MÃ¥rten Kongstad | 5c6944c | 2015-12-15 14:02:30 +0100 | [diff] [blame] | 70 | void removeIdmap(@utf8InCpp String overlayApkPath); |
Jeff Sharkey | 475c6f9 | 2016-12-07 10:37:27 -0700 | [diff] [blame] | 71 | void rmPackageDir(@utf8InCpp String packageDir); |
| 72 | void markBootComplete(@utf8InCpp String instructionSet); |
Jeff Sharkey | 60f8a53 | 2017-05-30 14:38:42 -0600 | [diff] [blame] | 73 | void freeCache(@nullable @utf8InCpp String uuid, long targetFreeBytes, |
| 74 | long cacheReservedBytes, int flags); |
Jeff Sharkey | 475c6f9 | 2016-12-07 10:37:27 -0700 | [diff] [blame] | 75 | void linkNativeLibraryDirectory(@nullable @utf8InCpp String uuid, |
| 76 | @utf8InCpp String packageName, @utf8InCpp String nativeLibPath32, int userId); |
| 77 | void createOatDir(@utf8InCpp String oatDir, @utf8InCpp String instructionSet); |
| 78 | void linkFile(@utf8InCpp String relativePath, @utf8InCpp String fromBase, |
| 79 | @utf8InCpp String toBase); |
| 80 | void moveAb(@utf8InCpp String apkPath, @utf8InCpp String instructionSet, |
| 81 | @utf8InCpp String outputPath); |
| 82 | void deleteOdex(@utf8InCpp String apkPath, @utf8InCpp String instructionSet, |
Andreas Gampe | c523409 | 2017-05-31 16:39:58 -0700 | [diff] [blame] | 83 | @nullable @utf8InCpp String outputPath); |
Victor Hsieh | 99de516 | 2017-10-06 14:44:14 -0700 | [diff] [blame] | 84 | void installApkVerity(@utf8InCpp String filePath, in FileDescriptor verityInput); |
Victor Hsieh | c6d738a | 2018-01-20 15:06:39 -0800 | [diff] [blame^] | 85 | void assertFsverityRootHashMatches(@utf8InCpp String filePath, in byte[] expectedHash); |
Jeff Sharkey | 66b1a12 | 2017-01-16 20:57:45 -0700 | [diff] [blame] | 86 | |
Calin Juravle | bd96836 | 2017-01-25 01:17:17 -0800 | [diff] [blame] | 87 | boolean reconcileSecondaryDexFile(@utf8InCpp String dexPath, @utf8InCpp String pkgName, |
| 88 | int uid, in @utf8InCpp String[] isas, @nullable @utf8InCpp String volume_uuid, |
| 89 | int storage_flag); |
| 90 | |
Alan Stokes | 753dc71 | 2017-10-16 10:56:00 +0100 | [diff] [blame] | 91 | byte[] hashSecondaryDexFile(@utf8InCpp String dexPath, @utf8InCpp String pkgName, |
| 92 | int uid, @nullable @utf8InCpp String volumeUuid, int storageFlag); |
| 93 | |
Jeff Sharkey | 66b1a12 | 2017-01-16 20:57:45 -0700 | [diff] [blame] | 94 | void invalidateMounts(); |
Jeff Sharkey | 325b8c9 | 2017-02-21 10:00:53 -0700 | [diff] [blame] | 95 | boolean isQuotaSupported(@nullable @utf8InCpp String uuid); |
Jeff Sharkey | 9087400 | 2016-12-05 11:18:55 -0700 | [diff] [blame] | 96 | } |