Since Android 3.0 full disk encryption is supported, but I can't see any API to that ability. The two specific things I need to know are:
I found a low level explanation of the process here and it seems to suggest the encryption used is 128 AES with CBC and ESSIV:SHA256, but it does not talk about a way to find whether the device is encrypted.
So, is there a way my app can query whether the device is using the full disk encryption feature, or do I need to resort to hacky solutions like Runtime.exec calls?
Windows - DDPE (Credant)In the Data Protection window, click on the icon of the hard drive (aka System Storage). Under System Storage, if you see the following text: OSDisk (C) and In compliance underneath, then your hard drive is encrypted.
You can check the encryption status for Android devices by navigating to Settings > Security > Encryption. This tab shows whether the device is encrypted or not. In case the Android device is not encrypted, you can enable encryption from the same tab.
Full-disk encryption is the process of encoding all user data on an Android device using an encrypted key. Once a device is encrypted, all user-created data is automatically encrypted before committing it to disk and all reads automatically decrypt data before returning it to the calling process.
Whole disk encryption protects a disk in the event of theft or accidental loss. Whole disk encryption encrypts the entire disk including swap files, system files, and hibernation files.
As @Mikle mentions you can just call the DevicePolicyManager
and ask it the status
@SuppressLint("NewApi")
private boolean isEncrypted(Context context) {
DevicePolicyManager devicePolicyManager = (DevicePolicyManager) context
.getSystemService(Context.DEVICE_POLICY_SERVICE);
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) {
int status = devicePolicyManager.getStorageEncryptionStatus();
if (DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE == status) {
return true;
}
}
return false;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With