Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -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.storage; |
| 18 | |
| 19 | import android.content.pm.IPackageMoveObserver; |
| 20 | import android.os.ParcelFileDescriptor; |
| 21 | import android.os.storage.DiskInfo; |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 22 | import android.os.storage.IStorageEventListener; |
| 23 | import android.os.storage.IStorageShutdownObserver; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 24 | import android.os.storage.IObbActionListener; |
| 25 | import android.os.storage.StorageVolume; |
| 26 | import android.os.storage.VolumeInfo; |
| 27 | import android.os.storage.VolumeRecord; |
Daichi Hirono | 9fb0018 | 2016-11-08 14:12:17 +0900 | [diff] [blame] | 28 | import com.android.internal.os.AppFuseMount; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 29 | |
| 30 | /** |
| 31 | * WARNING! Update IMountService.h and IMountService.cpp if you change this |
| 32 | * file. In particular, the transaction ids below must match the |
| 33 | * _TRANSACTION enum in IMountService.cpp |
| 34 | * |
| 35 | * @hide - Applications should use android.os.storage.StorageManager to access |
| 36 | * storage functions. |
| 37 | */ |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 38 | interface IStorageManager { |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 39 | /** |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 40 | * Registers an IStorageEventListener for receiving async notifications. |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 41 | */ |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 42 | void registerListener(IStorageEventListener listener) = 0; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 43 | /** |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 44 | * Unregisters an IStorageEventListener |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 45 | */ |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 46 | void unregisterListener(IStorageEventListener listener) = 1; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 47 | /** |
| 48 | * Returns true if a USB mass storage host is connected |
| 49 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 50 | boolean isUsbMassStorageConnected() = 2; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 51 | /** |
| 52 | * Enables / disables USB mass storage. The caller should check actual |
| 53 | * status of enabling/disabling USB mass storage via StorageEventListener. |
| 54 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 55 | void setUsbMassStorageEnabled(boolean enable) = 3; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 56 | /** |
| 57 | * Returns true if a USB mass storage host is enabled (media is shared) |
| 58 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 59 | boolean isUsbMassStorageEnabled() = 4; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 60 | /** |
| 61 | * Mount external storage at given mount point. Returns an int consistent |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 62 | * with StorageResultCode |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 63 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 64 | int mountVolume(in String mountPoint) = 5; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 65 | /** |
| 66 | * Safely unmount external storage at given mount point. The unmount is an |
| 67 | * asynchronous operation. Applications should register StorageEventListener |
| 68 | * for storage related status changes. |
| 69 | * @param mountPoint the mount point |
| 70 | * @param force whether or not to forcefully unmount it (e.g. even if programs are using this |
| 71 | * data currently) |
| 72 | * @param removeEncryption whether or not encryption mapping should be removed from the volume. |
| 73 | * This value implies {@code force}. |
| 74 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 75 | void unmountVolume(in String mountPoint, boolean force, boolean removeEncryption) = 6; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 76 | /** |
| 77 | * Format external storage given a mount point. Returns an int consistent |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 78 | * with StorageResultCode |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 79 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 80 | int formatVolume(in String mountPoint) = 7; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 81 | /** |
| 82 | * Returns an array of pids with open files on the specified path. |
| 83 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 84 | int[] getStorageUsers(in String path) = 8; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 85 | /** |
| 86 | * Gets the state of a volume via its mountpoint. |
| 87 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 88 | String getVolumeState(in String mountPoint) = 9; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 89 | /* |
| 90 | * Creates a secure container with the specified parameters. Returns an int |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 91 | * consistent with StorageResultCode |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 92 | */ |
| 93 | int createSecureContainer(in String id, int sizeMb, in String fstype, in String key, |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 94 | int ownerUid, boolean external) = 10; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 95 | /* |
| 96 | * Finalize a container which has just been created and populated. After |
| 97 | * finalization, the container is immutable. Returns an int consistent with |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 98 | * StorageResultCode |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 99 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 100 | int finalizeSecureContainer(in String id) = 11; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 101 | /* |
| 102 | * Destroy a secure container, and free up all resources associated with it. |
| 103 | * NOTE: Ensure all references are released prior to deleting. Returns an |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 104 | * int consistent with StorageResultCode |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 105 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 106 | int destroySecureContainer(in String id, boolean force) = 12; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 107 | /* |
| 108 | * Mount a secure container with the specified key and owner UID. Returns an |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 109 | * int consistent with StorageResultCode |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 110 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 111 | int mountSecureContainer(in String id, in String key, int ownerUid, boolean readOnly) = 13; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 112 | /* |
| 113 | * Unount a secure container. Returns an int consistent with |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 114 | * StorageResultCode |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 115 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 116 | int unmountSecureContainer(in String id, boolean force) = 14; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 117 | /* |
| 118 | * Returns true if the specified container is mounted |
| 119 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 120 | boolean isSecureContainerMounted(in String id) = 15; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 121 | /* |
| 122 | * Rename an unmounted secure container. Returns an int consistent with |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 123 | * StorageResultCode |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 124 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 125 | int renameSecureContainer(in String oldId, in String newId) = 16; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 126 | /* |
| 127 | * Returns the filesystem path of a mounted secure container. |
| 128 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 129 | String getSecureContainerPath(in String id) = 17; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 130 | /** |
| 131 | * Gets an Array of currently known secure container IDs |
| 132 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 133 | String[] getSecureContainerList() = 18; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 134 | /** |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 135 | * Shuts down the StorageManagerService and gracefully unmounts all external media. |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 136 | * Invokes call back once the shutdown is complete. |
| 137 | */ |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 138 | void shutdown(IStorageShutdownObserver observer) = 19; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 139 | /** |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 140 | * Call into StorageManagerService by PackageManager to notify that its done |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 141 | * processing the media status update request. |
| 142 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 143 | void finishMediaUpdate() = 20; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 144 | /** |
| 145 | * Mounts an Opaque Binary Blob (OBB) with the specified decryption key and |
| 146 | * only allows the calling process's UID access to the contents. |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 147 | * StorageManagerService will call back to the supplied IObbActionListener to inform |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 148 | * it of the terminal state of the call. |
| 149 | */ |
| 150 | void mountObb(in String rawPath, in String canonicalPath, in String key, |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 151 | IObbActionListener token, int nonce) = 21; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 152 | /** |
| 153 | * Unmounts an Opaque Binary Blob (OBB). When the force flag is specified, |
| 154 | * any program using it will be forcibly killed to unmount the image. |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 155 | * StorageManagerService will call back to the supplied IObbActionListener to inform |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 156 | * it of the terminal state of the call. |
| 157 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 158 | void unmountObb(in String rawPath, boolean force, IObbActionListener token, int nonce) = 22; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 159 | /** |
| 160 | * Checks whether the specified Opaque Binary Blob (OBB) is mounted |
| 161 | * somewhere. |
| 162 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 163 | boolean isObbMounted(in String rawPath) = 23; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 164 | /** |
| 165 | * Gets the path to the mounted Opaque Binary Blob (OBB). |
| 166 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 167 | String getMountedObbPath(in String rawPath) = 24; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 168 | /** |
| 169 | * Returns whether or not the external storage is emulated. |
| 170 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 171 | boolean isExternalStorageEmulated() = 25; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 172 | /** |
| 173 | * Decrypts any encrypted volumes. |
| 174 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 175 | int decryptStorage(in String password) = 26; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 176 | /** |
| 177 | * Encrypts storage. |
| 178 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 179 | int encryptStorage(int type, in String password) = 27; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 180 | /** |
| 181 | * Changes the encryption password. |
| 182 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 183 | int changeEncryptionPassword(int type, in String password) = 28; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 184 | /** |
| 185 | * Returns list of all mountable volumes. |
| 186 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 187 | StorageVolume[] getVolumeList(int uid, in String packageName, int flags) = 29; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 188 | /** |
| 189 | * Gets the path on the filesystem for the ASEC container itself. |
| 190 | * |
| 191 | * @param cid ASEC container ID |
| 192 | * @return path to filesystem or {@code null} if it's not found |
| 193 | * @throws RemoteException |
| 194 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 195 | String getSecureContainerFilesystemPath(in String cid) = 30; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 196 | /** |
| 197 | * Determines the encryption state of the volume. |
| 198 | * @return a numerical value. See {@code ENCRYPTION_STATE_*} for possible |
| 199 | * values. |
| 200 | * Note that this has been replaced in most cases by the APIs in |
| 201 | * StorageManager (see isEncryptable and below) |
| 202 | * This is still useful to get the error state when encryption has failed |
| 203 | * and CryptKeeper needs to throw up a screen advising the user what to do |
| 204 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 205 | int getEncryptionState() = 31; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 206 | /** |
| 207 | * Verify the encryption password against the stored volume. This method |
| 208 | * may only be called by the system process. |
| 209 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 210 | int verifyEncryptionPassword(in String password) = 32; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 211 | /* |
| 212 | * Fix permissions in a container which has just been created and populated. |
Sudheer Shanka | 2250d56 | 2016-11-07 15:41:02 -0800 | [diff] [blame] | 213 | * Returns an int consistent with StorageResultCode |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 214 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 215 | int fixPermissionsSecureContainer(in String id, int gid, in String filename) = 33; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 216 | /** |
| 217 | * Ensure that all directories along given path exist, creating parent |
| 218 | * directories as needed. Validates that given path is absolute and that it |
| 219 | * contains no relative "." or ".." paths or symlinks. Also ensures that |
| 220 | * path belongs to a volume managed by vold, and that path is either |
| 221 | * external storage data or OBB directory belonging to calling app. |
| 222 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 223 | int mkdirs(in String callingPkg, in String path) = 34; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 224 | /** |
| 225 | * Determines the type of the encryption password |
| 226 | * @return PasswordType |
| 227 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 228 | int getPasswordType() = 35; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 229 | /** |
| 230 | * Get password from vold |
| 231 | * @return password or empty string |
| 232 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 233 | String getPassword() = 36; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 234 | /** |
| 235 | * Securely clear password from vold |
| 236 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 237 | oneway void clearPassword() = 37; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 238 | /** |
| 239 | * Set a field in the crypto header. |
| 240 | * @param field field to set |
| 241 | * @param contents contents to set in field |
| 242 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 243 | oneway void setField(in String field, in String contents) = 38; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 244 | /** |
| 245 | * Gets a field from the crypto header. |
| 246 | * @param field field to get |
| 247 | * @return contents of field |
| 248 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 249 | String getField(in String field) = 39; |
| 250 | int resizeSecureContainer(in String id, int sizeMb, in String key) = 40; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 251 | /** |
| 252 | * Report the time of the last maintenance operation such as fstrim. |
| 253 | * @return Timestamp of the last maintenance operation, in the |
| 254 | * System.currentTimeMillis() time base |
| 255 | * @throws RemoteException |
| 256 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 257 | long lastMaintenance() = 41; |
Sudheer Shanka | f734114 | 2016-10-18 17:15:18 -0700 | [diff] [blame] | 258 | /** |
| 259 | * Kick off an immediate maintenance operation |
| 260 | * @throws RemoteException |
| 261 | */ |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 262 | void runMaintenance() = 42; |
| 263 | void waitForAsecScan() = 43; |
| 264 | DiskInfo[] getDisks() = 44; |
| 265 | VolumeInfo[] getVolumes(int flags) = 45; |
| 266 | VolumeRecord[] getVolumeRecords(int flags) = 46; |
| 267 | void mount(in String volId) = 47; |
| 268 | void unmount(in String volId) = 48; |
| 269 | void format(in String volId) = 49; |
| 270 | void partitionPublic(in String diskId) = 50; |
| 271 | void partitionPrivate(in String diskId) = 51; |
| 272 | void partitionMixed(in String diskId, int ratio) = 52; |
| 273 | void setVolumeNickname(in String fsUuid, in String nickname) = 53; |
| 274 | void setVolumeUserFlags(in String fsUuid, int flags, int mask) = 54; |
| 275 | void forgetVolume(in String fsUuid) = 55; |
| 276 | void forgetAllVolumes() = 56; |
| 277 | String getPrimaryStorageUuid() = 57; |
| 278 | void setPrimaryStorageUuid(in String volumeUuid, IPackageMoveObserver callback) = 58; |
| 279 | long benchmark(in String volId) = 59; |
| 280 | void setDebugFlags(int flags, int mask) = 60; |
| 281 | void createUserKey(int userId, int serialNumber, boolean ephemeral) = 61; |
| 282 | void destroyUserKey(int userId) = 62; |
| 283 | void unlockUserKey(int userId, int serialNumber, in byte[] token, in byte[] secret) = 63; |
| 284 | void lockUserKey(int userId) = 64; |
| 285 | boolean isUserKeyUnlocked(int userId) = 65; |
| 286 | void prepareUserStorage(in String volumeUuid, int userId, int serialNumber, int flags) = 66; |
| 287 | void destroyUserStorage(in String volumeUuid, int userId, int flags) = 67; |
| 288 | boolean isConvertibleToFBE() = 68; |
Sudheer Shanka | 34b3388 | 2016-11-01 00:13:51 -0700 | [diff] [blame] | 289 | void addUserKeyAuth(int userId, int serialNumber, in byte[] token, in byte[] secret) = 70; |
| 290 | void fixateNewestUserKeyAuth(int userId) = 71; |
Jeff Sharkey | 31d0b70 | 2016-11-21 14:16:53 -0700 | [diff] [blame] | 291 | void fstrim(int flags) = 72; |
Daichi Hirono | 9fb0018 | 2016-11-08 14:12:17 +0900 | [diff] [blame] | 292 | AppFuseMount mountProxyFileDescriptorBridge() = 73; |
| 293 | ParcelFileDescriptor openProxyFileDescriptor(int mountPointId, int fileId, int mode) = 74; |
Jeff Sharkey | 9bed070 | 2017-01-23 20:37:05 -0700 | [diff] [blame] | 294 | long getCacheQuotaBytes(String volumeUuid, int uid) = 75; |
| 295 | long getCacheSizeBytes(String volumeUuid, int uid) = 76; |
Jeff Sharkey | 35e46d2 | 2017-06-09 10:01:20 -0600 | [diff] [blame^] | 296 | long getAllocatableBytes(String volumeUuid, int flags, String callingPackage) = 77; |
| 297 | void allocateBytes(String volumeUuid, long bytes, int flags, String callingPackage) = 78; |
Rubin Xu | aa32d15 | 2017-04-27 17:01:05 +0100 | [diff] [blame] | 298 | void secdiscard(in String path) = 79; |
Jeff Sharkey | 31d0b70 | 2016-11-21 14:16:53 -0700 | [diff] [blame] | 299 | } |