I have loved my Nexus 5 since it was released with KitKat, and last evening I decided to enable full disk encryption, which I expected might take around an hour or so. It's now about 12 hours in with no visible change. All I see are the Marshmallow four animated dots. I've never seen any progress display on encrypting the disk, and of course I'm trying to avoid rebooting the phone for fear that the disk will be a jumbled mess and I could either lose my data or even brick the phone.
What is the best course of action at this point, and possible consequences?
Could it be that your device is rooted? If yes, google a bit, there are some tutorials which could help. In that case killing or deactivating SuperSU (or similar) could bring success.
Here is what sometimes seem to work (answer is from aikidork):
Using Root Explorer, copy/backup the following files to external SD:
Kill all running apps.
suso that your prompt changes from "$" to "#" (you are now root)
Kill the SuperSU daemon to temporarily disable root mode (lasts until reboot):
pkill -KILL daemonsu
Your root daemon will kick you out of privileged status during shutdown, changing "#" prompt back to "$" (root is temporarily disabled).
PS: I currently have the same problem but none of the mentioned solutions helped so far.
UPDATE: This seems to be a common issue when an app is still holding open files. However, there is no official way to determine which process is causing these issue so far and it is recommended to have a chat with the support.
Success! As with others I had to uninstall an app or two to get it to work. Logcat gave the info I needed with these lines:
03-14 12:16:28.983 149 173 W Vold : Tearing down stale mount /mnt/asec/com.exozet.android.catan-1^M
03-14 12:16:29.002 149 173 W Vold : Tearing down stale mount /mnt/asec/ginlemon.flowerpro-1^M
So I removed Settlers of Catan (fun game) and SmartLauncher Pro (googling told me that's what the second app is). After that everything went fine.
I suggest using a file browser to see what you have in /mnt/asec/ and removing those apps. For me those two apps were the only two things in that directory, so it may be that the bug is dealing with stuff in that directory. If so this is a way to identify the problem apps without running logCat. Good luck!
If you're rooted, the encryption process will hang while booting, before the encryption even starts. It's safe to restart your phone when this happens.
If you have a Nexus, unrooting is just a matter of reflashing stock
boot.img. This doesn't delete your data or anything, it just replaces the boot partition modified by SuperSU with the default one, which is required by the encryption process.
Step by step guide:
fastboot flash boot boot.img- assuming fastboot and boot.img are in the same directory
Just tested this on a Nexus 5. After the encryption's finished, you can root your phone again.