Android uses dm-crypt for providing disk-encryption as stated in the implementation notes. Those notes also state (emphasis mine):

While the actual encryption work is a standard linux kernel feature, enabling it on an Android device proved somewhat tricky. The Android system tries to avoid incorporating GPL components, so using the cryptsetup command or libdevmapper were not available options. So making the appropriate ioctl(2) calls into the kernel was the best choice. The Android volume daemon (vold) already did this to support moving apps to the SD card, so I chose to leverage that work for whole disk encryption. The actual encryption used for the filesystem for first release is 128 AES with CBC and ESSIV:SHA256. The master key is encrypted with 128 bit AES via calls to the openssl library.

Once it was decided to put the smarts in vold, it became obvious that invoking the encryption features would be done like invoking other vold commands, by adding a new module to vold (called cryptfs) and teaching it various commands. The commands are checkpw, restart, enablecrypto, changepw and cryptocomplete. They will be described in more detail below.

So Android does not an existing tool due to licensing issues... As a user in recovery mode, I do not have vold running and would like to have a minimum program that can:

  1. Create a new encrypted partition.
  2. Unlock existing encrypted partitions.
  3. (optional) View information about the encrypted partition.

Does such a program exist? Ideally it can also run in a non-Android environment, but at the moment it is important to create an encrypted partition in recovery mode.

The subject OS is Android 4.2.2 with CWM as recovery image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.