Unable to encrypt device after flashing TWRP & 4.3 GE

Search This thread

avah

Member
Oct 15, 2013
16
8
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?
 

thx1200

Inactive Recognized Developer
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?

I'm having the exact same problem since 4.3 and found multiple articles offering suggestions about how to find services that might be holding /data open, but I have had no luck. Did you figure out a way to do this?

There is this...
http://code.google.com/p/android/issues/detail?id=58073

And I did the losf trick and the thing is that there are no open files, so what else could be holding the partition open?

Is there any other way to do encryption other than the UI or cryptofs?
 

avah

Member
Oct 15, 2013
16
8
I'm having the exact same problem since 4.3 and found multiple articles offering suggestions about how to find services that might be holding /data open, but I have had no luck. Did you figure out a way to do this?

There is this...
code.google.com/p/android/issues/detail?id=58073

And I did the losf trick and the thing is that there are no open files, so what else could be holding the partition open?

Is there any other way to do encryption other than the UI or cryptofs?
The issue is still present and I haven't managed to enable encryption. Haven't done much debugging either, though. I did try to run the command
Code:
while true; do echo; lsof | grep /data; sleep 0.2; done
as root while trying to encrypt the phone but it didn't reveal any open files (I added one echo command to separate consecutive iterations of the loop). This was expected since my earlier tests using safe mode and without 3rd party apps installed also failed.

Looks like it's not about open files but something much deeper in the system, like stale mount or something related to init process. Unfortunately that's way beyond my debugging skills.
 

Arjan Mels

New member
Aug 11, 2012
3
1
www.fame-it.net
Similar problem on Galaxy S3 with CF-AUTO-ROOT

I experience a very similar issue on my Galaxy S3 with cf-auto-root.

I also tried losf : no open files on /data.
Manual unmount works, but does not stop the error.

I notice in the log that other unmounts work (like data_1), but am surprised by the mentioned directories as some of them I don't recognize from the mount table.

The unmounting and encryption is handled by the vold service. I looked into the AOSP source code, but the messages are slightly different, so I suspect samsung is using a customized version (but it is not included in their open source code).

Frustrating... I need root, but also would like to have encryption...

Does anybody have android 4.3 + root + encryption working on Samsung?
 
I experience a very similar issue on my Galaxy S3 with cf-auto-root.

I also tried losf : no open files on /data.
Manual unmount works, but does not stop the error.

I notice in the log that other unmounts work (like data_1), but am surprised by the mentioned directories as some of them I don't recognize from the mount table.

The unmounting and encryption is handled by the vold service. I looked into the AOSP source code, but the messages are slightly different, so I suspect samsung is using a customized version (but it is not included in their open source code).

Frustrating... I need root, but also would like to have encryption...

Does anybody have android 4.3 + root + encryption working on Samsung?

Can confirm is not just limited to S4. Same issue with my Note 2 and are threads detailing inability to encrypt after root on S3 as well. Am monitoring threads for both and if I find something will post here too.
 

Michael.Kyritsis

New member
Mar 1, 2011
1
0
Reverting to stock firmware seems only way to enable encryption

Can confirm is not just limited to S4. Same issue with my Note 2 and are threads detailing inability to encrypt after root on S3 as well. Am monitoring threads for both and if I find something will post here too.

I also encountered this issue on the GT-i9505 after I rooted the phone. As described by OP when try to encrypt it reboots - start up fine - but there is no encryption. This is a big problem for me because it's a work phone, and I order to access work email and contacts list I need to comply with the Google Policy tool, and the company I work for set up the policy to require encryption (among other things such as complex password).

Once I installed stock firmware 4.3 I was able to encrypt, comply with the policy, and sync my work email and work contacts.
 

razrielsch

Member
Aug 11, 2013
32
3
it seems do be really deep in android...
Because volks badadroid and Tigrouzen android images also have this issue...
 

vttoth

New member
Jan 20, 2014
1
0
Ottawa
I solved this issue on my Samsung Galaxy S4 2014 (P600).

I was able to encrypt the device after disabling SuperSU (which came with the auto-root rom) and rebooting.

How did you disable SuperSU? I'm having the same problem on my Samsung Galaxy S3 (SGH-I747M on Rogers Canada, JB4.3). I tried disabling SuperSU by unchecking its Enable checkbox and rebooting. Did not solve the problem. Like an earlier commenter, I also did not find anything suspicious with lsof. Also tried disabling Wi-Fi (as suggested in a Twitter post I came across) to no avail.
 

smep

Senior Member
Jul 30, 2013
219
34
Maybe Encryption was considered as a bloatware and been removed

Sent from dish washer
 

avah

Member
Oct 15, 2013
16
8
Ok, gave this one more try but still no luck. What I tried was to use the stock ROM mentioned in the OP for encryption then install TWRP on the already encrypted phone and then install a custom ROM again. The theory behind this approach is that encryption is a block level operation that happens below the file system and the encryption keys are stored at the very end of the volume on an unallocated area. Thus everything happens outside the file system and as long as you don't re-partition the drive, keys and encryption in general should stay intact even after complete wipe. I also had read rumors that some versions of TWRP should be encryption aware and be able to mount encrypted volumes. So I wiped, re-flashed stock ROM with Odin, preformed factory reset, rooted with CF-Auto-Root and encrypted the phone without any problems (except that not-so-minor fact that I was back with stock 4.2.2 TW phone.)

Then I flashed TWRP and tried to continue with custom ROM installation but this was the point where I learned that rumors about TWRP's encryption supports are just rumors. It doesn't work. At least not with the implementation used on stock I9505 and of course YMMV. Booting to recovery works and upon booting TWRP – depending on the version – even prompted for the password but then it claimed that my password was incorrect and /data wasn’t mounted. I had chosen a very simple password (Password123) because I didn't know what kind of UI and keyboard TWRP's password entry screen was going to have and I also tried several times, so typos were ruled out. No matter what did, my password wasn’t accepted in TWRP. Different versions didn't help either. Tried first with TWRP 2.6.3.1 then 2.6.1.0 and finally 2.6.0.0. All failed and TWRP 2.6.3.1 didn't even ask for the password. Meanwhile booting to OS worked fine with the same password.

At this point I decided that due to all the sensitive data – like work stuff, call recordings, etc. – I have stored in my phone, the encryption is more important than custom ROM. So I flashed back to stock (*sigh*) for good. Now I'm back in square one but at least I have an encrypted phone and I can use my SIM card PIN code again ;)
 

xdascrat

New member
Jul 24, 2012
4
0
DeviceEnryption with JB 4.3

I have an S3 but with same error
"....Failed to unmount /data (Device or resource busy, retries 19, action 1).."
With OmegaROMv54.
There are different solutions to overcome this error.
For me at the end altough a different phone, the solution stated in "https://code.google.com/p/android/issues/detail?id=58073 worked
#43 .. @gmail.com
I believe there is an issue with the power logic allowing it to start.
Do:
Start>Security>Encrypt Phone
Enter your PIN.
JUST BEFORE you press 'encrypt phone' to start the reboot process, unplug your USB, then press 'encrypt phone'.

You should be OK now.
"




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?
 
Last edited:

avah

Member
Oct 15, 2013
16
8
I have an S3 but with same error
"....Failed to unmount /data (Device or resource busy, retries 19, action 1).."
With OmegaROMv54.
There are different solutions to overcome this error.
For me at the end altough a different phone, the solution stated in "https://code.google.com/p/android/issues/detail?id=58073 worked
#43 .. @gmail.com
I believe there is an issue with the power logic allowing it to start.
Do:
Start>Security>Encrypt Phone
Enter your PIN.
JUST BEFORE you press 'encrypt phone' to start the reboot process, unplug your USB, then press 'encrypt phone'.

You should be OK now.
"
It's not about power logic. You can bypass the battery level and charging tests by initating the encryption directly from the command line. Just say "vdc cryptfs enablecrypto inplace your_max_16_char_password_here" as root. But the encryption will still fail.
And yes, I have tested also this unplug-your-usb-calbe trick mentioned above. And no, I it didn't help.
 

xdascrat

New member
Jul 24, 2012
4
0
Some details:
In my case entering the command "vdc cryptfs enablecrypto inplace" in terminal just doesn't work although repeated many times.
In adb logcat it was also trying to unmount /data many times, but failed.
I disabled many services, tried killing processes with a taskkiller short before performing the above command, as suggested in
code .google. com/p/android/issues/detail?id=58073#c48
But still umounting /data keeps on failing.
After that I enabled all services again,, rebooted, no more taskkilling, doing that USB Cable unplugging , and encryption worked. I hope, this issue will be fixed soon.
 

supermaz

Senior Member
Sep 24, 2011
62
24
I also ran into this problem after I did a manual update to 4.3 on my Galaxy S3 via Kies. I then decrypted the device, rooted it and wanted to encrypt again.

I finally got it into starting the encryption (currently 30%, fingers crossed) via:

1. Disabling SuperSU (app-manager), though I don't think that this is really needed as disabling alone didn't work
2. Unmounting everything that I could using adb shell
- everything under /mn/asec
- /mnt/asec itself
- every bind-mount from /data/ to some legacy folders

So, finally I had only the following left:

Code:
root@m0:/ # mount                                                              
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/mmcblk0p9 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p3 /efs ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p8 /cache ext4 rw,nosuid,nodev,noatime,errors=panic,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p12 /data ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
tmpfs /storage/emulated tmpfs rw,nosuid,nodev,relatime,mode=050,gid=1028 0 0

After that I started the command from the shell via vdc cryptfs enablecrypto inplace <password>

Maybe this helps others.

Best regards,

Maz

EDIT: Encryption finished and is working!
 
Last edited:

ncotton

Senior Member
Dec 22, 2007
52
9
I think I've got a fix!

I think I've found a way to do this!

I was having the same problem, press encrypt (or run the terminal command) and the phone would just reboot, still not encrypted.

I tried to unmount /data without luck, I tried airplane mode, I tried force-quitting and turing off as many services and apps as I could find, no luck.

Then I tried SAFE MODE. So if you LONG PRESS the power off button you'll get a window that pops up and asks...

Reboot to Safe Mode
Do you want to reboot into safe mode? This will disable all third party applications you have installed. They will be restored when you reboot again. Ok/Cancel.

So I rebooted into safe mode, went through the normal settings menu to engage encryption (did not have access to terminal anymore since all the apps were locked out) and now it's going strong.

So, to sum up, rebooting into safe mode may allow you to encrypt your device when it is otherwise failing. Enjoy.
 
  • Like
Reactions: TNAR

avah

Member
Oct 15, 2013
16
8
So, to sum up, rebooting into safe mode may allow you to encrypt your device when it is otherwise failing. Enjoy.

Glad to hear that booting into safe mode helped you. Safe mode is a lesser-known feature of Android and always worth a try when there is something weird going on (or not going on!) on the device. Unfortunately I had already tested that with no luck. As I wrote in my earlier posts, all these methods have failed:
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>
    ...
Thanks for the suggestion anyway!
 

mionita

New member
Apr 23, 2013
3
0
A slightly different issue

This is what keeps my encryption from starting (using vdc from the command line of ADB):


E/ProcessKiller( 1961): !@Process tmp-mksh (6996) has open file /data/data/eu.chainfire.supersu/logs/L13935954020000.GRANTED.ADB shell (deleted)
W/ProcessKiller( 1961): !@Sending SIGHUP to process 6996
D/ProcessKiller( 1961): Wait for death /proc/6996
W/CryptfsUT( 1961): Failed to unmount /data (Device or resource busy, retries 18, action 1)
...
W/CryptfsUT( 1961): Failed to unmount /data (Device or resource busy, retries 0, action 2)
E/CryptfsUT( 1961): Giving up on unmount /data (Device or resource busy)



And after disabling the supersu logging feature:

I did unmount /data and it did not complain about anything:
# umount /data
umount /data

then started encryption:
vdc cryptfs enablecrypto inplace whatever_password

and this is the log:
I/CryptfsUT( 1962): /mnt_1/sdcard_1 sucessfully unmounted
I/CryptfsUT( 1962): /mnt/shell/container sucessfully unmounted
I/CryptfsUT( 1962): /data/data1 sucessfully unmounted
I/CryptfsUT( 1962): /storage/PersonalPage sucessfully unmounted
I/CryptfsUT( 1962): /mnt/shell/personalpage sucessfully unmounted
I/CryptfsUT( 1962): /mnt/shell/emulated sucessfully unmounted
I/CryptfsUT( 1962): /data_1 sucessfully unmounted
W/CryptfsUT( 1962): Failed to unmount /data (Device or resource busy, retries 19, action 1)
...
W/CryptfsUT( 1962): Failed to unmount /data (Device or resource busy, retries 0, action 2)
E/CryptfsUT( 1962): Giving up on unmount /data (Device or resource busy)
I/dumpstate( 7205): begin
I/dumpstate( 7205): done
E/CryptfsEE( 1962): Error (null) after framework is shutdown, no data changed, restarting system

Still nothing...
 
Last edited:
T

trenolltre

Guest
I had huge problems getting encryption to work after stock 4.4 + cf_auto_root with the logcat telling me /data was busy. What finally did it was to boot in Safe Mode (hold volume down during boot), over adb shell unmounting everything down to and including /data manually and then issuing a vdc cryptfs enablecrypto. This way I can now also enjoy pin lockscreen and device encryption while on stock rom.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Solved

    I solved this issue on my Samsung Galaxy S4 2014 (P600).

    I was able to encrypt the device after disabling SuperSU (which came with the auto-root rom) and rebooting.
    4
    For what it's worth, this worked for me as well. This should be tried before anything else since it changes absolutely no settings or files.

    1. Turn off SuperSU (Settings -> More - > Application manager -> All -> SuperSU -> Turn Off)
    2. Reboot into Safe Mode (How to)
    3. Run encryption (Settings -> More -> Security -> Encrypt Device)
    4. Turn on SuperSU after complete (Settings -> More - > Application manager -> Turned Off -> SuperSU -> Turn On)
    1
    I think I've got a fix!

    I think I've found a way to do this!

    I was having the same problem, press encrypt (or run the terminal command) and the phone would just reboot, still not encrypted.

    I tried to unmount /data without luck, I tried airplane mode, I tried force-quitting and turing off as many services and apps as I could find, no luck.

    Then I tried SAFE MODE. So if you LONG PRESS the power off button you'll get a window that pops up and asks...

    Reboot to Safe Mode
    Do you want to reboot into safe mode? This will disable all third party applications you have installed. They will be restored when you reboot again. Ok/Cancel.

    So I rebooted into safe mode, went through the normal settings menu to engage encryption (did not have access to terminal anymore since all the apps were locked out) and now it's going strong.

    So, to sum up, rebooting into safe mode may allow you to encrypt your device when it is otherwise failing. Enjoy.
    1
    As far as I know Samsung's proprietary KNOX system has nothing to do with Android's standard file system encryption that has been around past three years, since Android 3.0 Honeycomb, and is device independent. There is a whole thread dedicated to KNOX elsewhere in this forum.

    Sorry but it is not independent after introduction of KNOX whole KNOX was designed to improve security you can read many post that people are facing problems in encryption after rooting there device if it has KNOX and even Samsung stated it so no other guy needed to confirm it.
    1
    I solved this issue on my Samsung Galaxy S4 2014 (P600).

    I was able to encrypt the device after disabling SuperSU (which came with the auto-root rom) and rebooting.

    Thanks, it works for me too (disable SuperSu, reboot and then try the encryption).