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
17package android.os;
18
19/** {@hide} */
20interface IInstalld {
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
24    long createAppData(@nullable @utf8InCpp String uuid, in @utf8InCpp String packageName,
25            int userId, int flags, int appId, in @utf8InCpp String seInfo, int targetSdkVersion);
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);
34
35    void fixupAppData(@nullable @utf8InCpp String uuid, int flags);
36
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);
41    long[] getExternalSize(@nullable @utf8InCpp String uuid, int userId, int flags, in int[] appIds);
42
43    void setAppQuota(@nullable @utf8InCpp String uuid, int userId, int appId, long cacheQuota);
44
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
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);
55
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);
60    boolean copySystemProfile(@utf8InCpp String systemProfile, int uid,
61            @utf8InCpp String packageName);
62    void clearAppProfiles(@utf8InCpp String packageName);
63    void destroyAppProfiles(@utf8InCpp String packageName);
64
65    void idmap(@utf8InCpp String targetApkPath, @utf8InCpp String overlayApkPath, int uid);
66    void removeIdmap(@utf8InCpp String overlayApkPath);
67    void rmPackageDir(@utf8InCpp String packageDir);
68    void markBootComplete(@utf8InCpp String instructionSet);
69    void freeCache(@nullable @utf8InCpp String uuid, long targetFreeBytes,
70            long cacheReservedBytes, int flags);
71    void linkNativeLibraryDirectory(@nullable @utf8InCpp String uuid,
72            @utf8InCpp String packageName, @utf8InCpp String nativeLibPath32, int userId);
73    void createOatDir(@utf8InCpp String oatDir, @utf8InCpp String instructionSet);
74    void linkFile(@utf8InCpp String relativePath, @utf8InCpp String fromBase,
75            @utf8InCpp String toBase);
76    void moveAb(@utf8InCpp String apkPath, @utf8InCpp String instructionSet,
77            @utf8InCpp String outputPath);
78    void deleteOdex(@utf8InCpp String apkPath, @utf8InCpp String instructionSet,
79            @nullable @utf8InCpp String outputPath);
80
81    boolean reconcileSecondaryDexFile(@utf8InCpp String dexPath, @utf8InCpp String pkgName,
82        int uid, in @utf8InCpp String[] isas, @nullable @utf8InCpp String volume_uuid,
83        int storage_flag);
84
85    void invalidateMounts();
86    boolean isQuotaSupported(@nullable @utf8InCpp String uuid);
87}
88