[Galaxy S 4 Q&A, Help & Troubleshooting] avah:
Hello All,

Couple of days ago I decided to escape Samsung Knox while I still had the chance. So I flashed TWRP and a 4.3 GE ROM. Flashing went fine, but when I go to settings and try to enable device encryption, the phone just reboots back to lock screen as if nothing had happened. No problems what so ever after the reboot but no encryption either. With stock ROM encryption worked as expected and I decrypted the device before flashing anything.

Phone:

Hardware: Galaxy S4 GT-I9505 (originally a Samsung TW device running Knox-free I9505XXUBMGA)

ROM: Google Edition Android 4.3 | UNTOUCHED | JWR66Y.S003 | VERSION 2.0 (23/09)

Recovery: TWRP 2.6

How did I get here:

Brand new phone > Root > Encrypt > Regular use > Decrypt > TWRP > Wipe > GE ROM > No more encryption

What I have tried so far:

Googling & searching: Found some fellow victims and tried their suggestions but no help

Retried some 20 times at least

With and without USB connected

Portrait and landscape orientation

Reboot to safe mode

Reboot without SIM and MicroSD

Wipe and skip restore, thus no 3rd party apps installed

Wipe and re-flash

Wipe and flash different ROM: [AOSP]Official 4.3- S4 Google Edition- Finaly v2.0

Command line: vdc cryptfs enablecrypto inplace <password>

adb logcat: See below

All failed.

Here is some logs I managed to capture with adb logcat:

10-14 00:56:44.872 D/ActivityManager( 703): Trying to launch com.android.settings/.CryptKeeperConfirm$Blank

10-14 00:56:45.703 I/MountService( 703): encrypting storage...

10-14 00:56:45.703 D/VoldCmdListener( 225): cryptfs inplace {}

10-14 00:56:45.753 E/Vold ( 225): unmountEcryptFs not mounted /mnt/secure/staging

10-14 00:56:45.753 E/Vold ( 225): unmountEcryptFs not mounted /storage/extSdCard

10-14 00:56:47.355 I/CryptfsEE( 225): Just asked init to shut down class main

10-14 00:56:47.835 I/CryptfsUT( 225): /mnt_1/sdcard_1 sucessfully unmounted

10-14 00:56:47.835 I/CryptfsUT( 225): /mnt/shell/container sucessfully unmounted

10-14 00:56:47.835 I/CryptfsUT( 225): /data/data1 sucessfully unmounted

10-14 00:56:47.835 I/CryptfsUT( 225): /mnt/shell/emulated sucessfully unmounted

10-14 00:56:47.835 I/CryptfsUT( 225): /data_1 sucessfully unmounted

10-14 00:56:47.835 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 19, action 1)

10-14 00:56:48.896 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 18, action 1)

10-14 00:56:49.997 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 17, action 1)

10-14 00:56:51.109 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 16, action 1)

10-14 00:56:52.210 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 15, action 1)

10-14 00:56:53.321 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 14, action 2)

10-14 00:56:54.412 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 13, action 2)

10-14 00:56:55.503 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 12, action 2)

10-14 00:56:56.594 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 11, action 2)

10-14 00:56:57.685 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 10, action 2)

10-14 00:56:58.766 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 9, action 2)

10-14 00:56:59.877 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 8, action 2)

10-14 00:57:00.958 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 7, action 2)

10-14 00:57:02.049 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 6, action 2)

10-14 00:57:03.150 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 5, action 2)

10-14 00:57:04.241 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 4, action 2)

10-14 00:57:05.332 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 3, action 2)

10-14 00:57:06.423 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 2, action 2)

10-14 00:57:07.505 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 1, action 2)

10-14 00:57:08.606 W/CryptfsUT( 225): Failed to unmount /data (Device or resource busy, retries 0, action 2)

10-14 00:57:09.697 E/CryptfsUT( 225): Giving up on unmount /data (Device or resource busy)

10-14 00:57:53.259 E/CryptfsEE( 225): Error (null) after framework is shutdown, no data changed, restarting system

Looks like failure on unmounting /data is the problem here but what's the root cause? And how get /data unmounted? I would greatly appreciate if someone could point me to right direction, or - even better - tell me what to do to get it fixed and my device encrypted again?