public interface IMountService extends IInterface
Modifier and Type | Interface and Description |
---|---|
static class |
IMountService.Stub
Local-side IPC implementation stub class.
|
Modifier and Type | Field and Description |
---|---|
static int |
ENCRYPTION_STATE_ERROR_CORRUPT
Underlying data is corrupt
|
static int |
ENCRYPTION_STATE_ERROR_INCOMPLETE
Encryption is incomplete
|
static int |
ENCRYPTION_STATE_ERROR_INCONSISTENT
Encryption is incomplete and irrecoverable
|
static int |
ENCRYPTION_STATE_ERROR_UNKNOWN
The volume is in a bad state.
|
static int |
ENCRYPTION_STATE_NONE
The volume is not encrypted.
|
static int |
ENCRYPTION_STATE_OK
The volume has been encrypted succesfully.
|
Modifier and Type | Method and Description |
---|---|
void |
addUserKeyAuth(int userId,
int serialNumber,
byte[] token,
byte[] secret) |
long |
benchmark(String volId) |
int |
changeEncryptionPassword(int type,
String password)
Changes the encryption password.
|
void |
clearPassword()
Securely clear password from vold
|
int |
createSecureContainer(String id,
int sizeMb,
String fstype,
String key,
int ownerUid,
boolean external) |
void |
createUserKey(int userId,
int serialNumber,
boolean ephemeral) |
int |
decryptStorage(String password)
Decrypts any encrypted volumes.
|
int |
destroySecureContainer(String id,
boolean force) |
void |
destroyUserKey(int userId) |
void |
destroyUserStorage(String volumeUuid,
int userId,
int flags) |
int |
encryptStorage(int type,
String password)
Encrypts storage.
|
int |
finalizeSecureContainer(String id) |
void |
finishMediaUpdate()
Call into MountService by PackageManager to notify that its done
processing the media status update request.
|
void |
fixateNewestUserKeyAuth(int userId) |
int |
fixPermissionsSecureContainer(String id,
int gid,
String filename) |
void |
forgetAllVolumes() |
void |
forgetVolume(String fsUuid) |
void |
format(String volId) |
int |
formatVolume(String mountPoint)
Format external storage given a mount point.
|
DiskInfo[] |
getDisks() |
int |
getEncryptionState()
Determines the encryption state of the volume.
|
String |
getField(String field)
Gets a field from the crypto header.
|
String |
getMountedObbPath(String rawPath)
Gets the path to the mounted Opaque Binary Blob (OBB).
|
String |
getPassword()
Get password from vold
|
int |
getPasswordType()
Determines the type of the encryption password
|
String |
getPrimaryStorageUuid() |
String |
getSecureContainerFilesystemPath(String cid)
Gets the path on the filesystem for the ASEC container itself.
|
String[] |
getSecureContainerList()
Gets an Array of currently known secure container IDs
|
String |
getSecureContainerPath(String id) |
int[] |
getStorageUsers(String path)
Returns an array of pids with open files on the specified path.
|
StorageVolume[] |
getVolumeList(int uid,
String packageName,
int flags)
Returns list of all mountable volumes.
|
VolumeRecord[] |
getVolumeRecords(int flags) |
VolumeInfo[] |
getVolumes(int flags) |
String |
getVolumeState(String mountPoint)
Gets the state of a volume via its mountpoint.
|
boolean |
isConvertibleToFBE() |
boolean |
isExternalStorageEmulated()
Returns whether or not the external storage is emulated.
|
boolean |
isObbMounted(String rawPath)
Checks whether the specified Opaque Binary Blob (OBB) is mounted
somewhere.
|
boolean |
isSecureContainerMounted(String id) |
boolean |
isUsbMassStorageConnected()
Returns true if a USB mass storage host is connected
|
boolean |
isUsbMassStorageEnabled()
Returns true if a USB mass storage host is enabled (media is shared)
|
boolean |
isUserKeyUnlocked(int userId) |
long |
lastMaintenance()
Report the time of the last maintenance operation such as fstrim.
|
void |
lockUserKey(int userId) |
int |
mkdirs(String callingPkg,
String path)
Ensure that all directories along given path exist, creating parent
directories as needed.
|
void |
mount(String volId) |
ParcelFileDescriptor |
mountAppFuse(String name) |
void |
mountObb(String rawPath,
String canonicalPath,
String key,
IObbActionListener token,
int nonce)
Mounts an Opaque Binary Blob (OBB) with the specified decryption key and
only allows the calling process's UID access to the contents.
|
int |
mountSecureContainer(String id,
String key,
int ownerUid,
boolean readOnly) |
int |
mountVolume(String mountPoint)
Mount external storage at given mount point.
|
void |
partitionMixed(String diskId,
int ratio) |
void |
partitionPrivate(String diskId) |
void |
partitionPublic(String diskId) |
void |
prepareUserStorage(String volumeUuid,
int userId,
int serialNumber,
int flags) |
void |
registerListener(IMountServiceListener listener)
Registers an IMountServiceListener for receiving async notifications.
|
int |
renameSecureContainer(String oldId,
String newId) |
int |
resizeSecureContainer(String id,
int sizeMb,
String key) |
void |
runMaintenance()
Kick off an immediate maintenance operation
|
void |
setDebugFlags(int flags,
int mask) |
void |
setField(String field,
String contents)
Set a field in the crypto header.
|
void |
setPrimaryStorageUuid(String volumeUuid,
IPackageMoveObserver callback) |
void |
setUsbMassStorageEnabled(boolean enable)
Enables / disables USB mass storage.
|
void |
setVolumeNickname(String fsUuid,
String nickname) |
void |
setVolumeUserFlags(String fsUuid,
int flags,
int mask) |
void |
shutdown(IMountShutdownObserver observer)
Shuts down the MountService and gracefully unmounts all external media.
|
void |
unlockUserKey(int userId,
int serialNumber,
byte[] token,
byte[] secret) |
void |
unmount(String volId) |
void |
unmountObb(String rawPath,
boolean force,
IObbActionListener token,
int nonce)
Unmounts an Opaque Binary Blob (OBB).
|
int |
unmountSecureContainer(String id,
boolean force) |
void |
unmountVolume(String mountPoint,
boolean force,
boolean removeEncryption)
Safely unmount external storage at given mount point.
|
void |
unregisterListener(IMountServiceListener listener)
Unregisters an IMountServiceListener
|
int |
verifyEncryptionPassword(String password)
Verify the encryption password against the stored volume.
|
void |
waitForAsecScan() |
asBinder
static final int ENCRYPTION_STATE_NONE
static final int ENCRYPTION_STATE_OK
static final int ENCRYPTION_STATE_ERROR_UNKNOWN
static final int ENCRYPTION_STATE_ERROR_INCOMPLETE
static final int ENCRYPTION_STATE_ERROR_INCONSISTENT
static final int ENCRYPTION_STATE_ERROR_CORRUPT
int createSecureContainer(String id, int sizeMb, String fstype, String key, int ownerUid, boolean external) throws RemoteException
RemoteException
int destroySecureContainer(String id, boolean force) throws RemoteException
RemoteException
int finalizeSecureContainer(String id) throws RemoteException
RemoteException
void finishMediaUpdate() throws RemoteException
RemoteException
int formatVolume(String mountPoint) throws RemoteException
RemoteException
String getMountedObbPath(String rawPath) throws RemoteException
RemoteException
String[] getSecureContainerList() throws RemoteException
RemoteException
String getSecureContainerPath(String id) throws RemoteException
RemoteException
int[] getStorageUsers(String path) throws RemoteException
RemoteException
String getVolumeState(String mountPoint) throws RemoteException
RemoteException
boolean isObbMounted(String rawPath) throws RemoteException
RemoteException
boolean isSecureContainerMounted(String id) throws RemoteException
RemoteException
boolean isUsbMassStorageConnected() throws RemoteException
RemoteException
boolean isUsbMassStorageEnabled() throws RemoteException
RemoteException
void mountObb(String rawPath, String canonicalPath, String key, IObbActionListener token, int nonce) throws RemoteException
RemoteException
int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly) throws RemoteException
RemoteException
int mountVolume(String mountPoint) throws RemoteException
RemoteException
void registerListener(IMountServiceListener listener) throws RemoteException
RemoteException
int renameSecureContainer(String oldId, String newId) throws RemoteException
RemoteException
void setUsbMassStorageEnabled(boolean enable) throws RemoteException
RemoteException
void shutdown(IMountShutdownObserver observer) throws RemoteException
RemoteException
void unmountObb(String rawPath, boolean force, IObbActionListener token, int nonce) throws RemoteException
RemoteException
int unmountSecureContainer(String id, boolean force) throws RemoteException
RemoteException
void unmountVolume(String mountPoint, boolean force, boolean removeEncryption) throws RemoteException
mountPoint
- the mount pointforce
- whether or not to forcefully unmount it (e.g. even if programs are using this
data currently)removeEncryption
- whether or not encryption mapping should be removed from the volume.
This value implies force
.RemoteException
void unregisterListener(IMountServiceListener listener) throws RemoteException
RemoteException
boolean isExternalStorageEmulated() throws RemoteException
RemoteException
int getEncryptionState() throws RemoteException
ENCRYPTION_STATE_*
for possible
values.
Note that this has been replaced in most cases by the APIs in
StorageManager (see isEncryptable and below)
This is still useful to get the error state when encryption has failed
and CryptKeeper needs to throw up a screen advising the user what to doRemoteException
int decryptStorage(String password) throws RemoteException
RemoteException
int encryptStorage(int type, String password) throws RemoteException
RemoteException
int changeEncryptionPassword(int type, String password) throws RemoteException
RemoteException
int verifyEncryptionPassword(String password) throws RemoteException
RemoteException
StorageVolume[] getVolumeList(int uid, String packageName, int flags) throws RemoteException
RemoteException
String getSecureContainerFilesystemPath(String cid) throws RemoteException
cid
- ASEC container IDnull
if it's not foundRemoteException
int fixPermissionsSecureContainer(String id, int gid, String filename) throws RemoteException
RemoteException
int mkdirs(String callingPkg, String path) throws RemoteException
RemoteException
int getPasswordType() throws RemoteException
RemoteException
String getPassword() throws RemoteException
RemoteException
void clearPassword() throws RemoteException
RemoteException
void setField(String field, String contents) throws RemoteException
field
- field to setcontents
- contents to set in fieldRemoteException
String getField(String field) throws RemoteException
field
- field to getRemoteException
boolean isConvertibleToFBE() throws RemoteException
RemoteException
int resizeSecureContainer(String id, int sizeMb, String key) throws RemoteException
RemoteException
long lastMaintenance() throws RemoteException
RemoteException
void runMaintenance() throws RemoteException
RemoteException
void waitForAsecScan() throws RemoteException
RemoteException
DiskInfo[] getDisks() throws RemoteException
RemoteException
VolumeInfo[] getVolumes(int flags) throws RemoteException
RemoteException
VolumeRecord[] getVolumeRecords(int flags) throws RemoteException
RemoteException
void mount(String volId) throws RemoteException
RemoteException
void unmount(String volId) throws RemoteException
RemoteException
void format(String volId) throws RemoteException
RemoteException
long benchmark(String volId) throws RemoteException
RemoteException
void partitionPublic(String diskId) throws RemoteException
RemoteException
void partitionPrivate(String diskId) throws RemoteException
RemoteException
void partitionMixed(String diskId, int ratio) throws RemoteException
RemoteException
void setVolumeNickname(String fsUuid, String nickname) throws RemoteException
RemoteException
void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException
RemoteException
void forgetVolume(String fsUuid) throws RemoteException
RemoteException
void forgetAllVolumes() throws RemoteException
RemoteException
void setDebugFlags(int flags, int mask) throws RemoteException
RemoteException
String getPrimaryStorageUuid() throws RemoteException
RemoteException
void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback) throws RemoteException
RemoteException
void createUserKey(int userId, int serialNumber, boolean ephemeral) throws RemoteException
RemoteException
void destroyUserKey(int userId) throws RemoteException
RemoteException
void addUserKeyAuth(int userId, int serialNumber, byte[] token, byte[] secret) throws RemoteException
RemoteException
void fixateNewestUserKeyAuth(int userId) throws RemoteException
RemoteException
void unlockUserKey(int userId, int serialNumber, byte[] token, byte[] secret) throws RemoteException
RemoteException
void lockUserKey(int userId) throws RemoteException
RemoteException
boolean isUserKeyUnlocked(int userId) throws RemoteException
RemoteException
void prepareUserStorage(String volumeUuid, int userId, int serialNumber, int flags) throws RemoteException
RemoteException
void destroyUserStorage(String volumeUuid, int userId, int flags) throws RemoteException
RemoteException
ParcelFileDescriptor mountAppFuse(String name) throws RemoteException
RemoteException