Unable to encrypt device after flashing TWRP & 4.3 GE - Galaxy S 4 Q&A, Help & Troubleshooting

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?

avah said:
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?
Click to expand...
Click to collapse
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?

thx1200 said:
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?
Click to expand...
Click to collapse
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.

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?

Arjan Mels said:
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?
Click to expand...
Click to collapse
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.

Reverting to stock firmware seems only way to enable encryption
chris19000 said:
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.
Click to expand...
Click to collapse
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.

it seems do be really deep in android...
Because volks badadroid and Tigrouzen android images also have this issue...

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.

Solved?
jsda said:
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.
Click to expand...
Click to collapse
Sounds promising, but were you also able to enable root again after the encryption?

jsda said:
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.
Click to expand...
Click to collapse
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.

Maybe Encryption was considered as a bloatware and been removed
Sent from dish washer

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

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.
"
avah said:
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?
Click to expand...
Click to collapse

xdascrat said:
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.
"
Click to expand...
Click to collapse
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.

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.

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:
[email protected]:/ # 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!

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.
Click to expand...
Click to collapse
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.

ncotton said:
So, to sum up, rebooting into safe mode may allow you to encrypt your device when it is otherwise failing. Enjoy.
Click to expand...
Click to collapse
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:
avah said:
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>
...
Click to expand...
Click to collapse
Thanks for the suggestion anyway!

A slightly different issue
This is what keeps my encryption from starting (using vdc from the command line of ADB):
E/ProcessKiller( 1961): [email protected] tmp-mksh (6996) has open file /data/data/eu.chainfire.supersu/logs/L13935954020000.GRANTED.ADB shell (deleted)
W/ProcessKiller( 1961): [email protected] 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...

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.

Related

Crippled G1 (Not Bricked) **SOLVED**

Hey guys.
I ran into some problems the other day installing a theme and after a reboot it was hanging on the Splash Screen T-Mobile G1 Screen. I thought I bricked my phone but I had the ENG SPL and someone suggested to reflash and start over with RC29 and reroot the phone. I did and it booted right up into the home screen like I just bought the phone. Now I was trying to flash the modified recovery partion but I noticed some stuff going wrong. Telnet was not downloading from the market, much less any of the apps. Telnet was neither installing from the browser nor downloading from the market. So i tried forwarding a port from my computer and connecting my G1 to Telnet via ADB from my computer which worked. I then flashed the modified recovery partition and after rebooting twice and going into the recovery utility it reads.
Android system recovery utility
E:Can't mount CACHE:recovery/command
Home+Back - reboot system now
Alt+L - toggle log text display
Alt+S - apply sdcard:update.zip
Alt+W - wipe data/factory reset
E:Can't mount CACHE:recovery/log
E:Can't mount CACHE:recovery/log
E:Can't mount CACHE:recovery/log
From this I cannot tell whether the modified recovery was flashed or not.
Now every time I try one of these options in the recovery utility, it always spit out another
E:Can't mount CACHE:recovery/log
The only thing that works is Alt+L which toggles the text but still gives me an error despite being the only option that works.
Am i screwed here or is there some way I can get my phone back on track and get it rooted and updated from RC29
NOTE: My phone still works but just in a watered down state where my phone doesn't download any apps at all
EDIT: Confirmed that I am now using test keys. It now reads:
Android system recovery utility
Using test keys.
E:Can't mount CACHE:recovery/command
Home+Back - reboot system now
Alt+L - toggle log text display
Alt+S - apply sdcard:update.zip
Alt+W - wipe data/factory reset
E:Can't mount CACHE:recovery/log
E:Can't mount CACHE:recovery/log
E:Can't mount CACHE:recovery/log
EDIT AGAIN: Here is a solution http://forum.xda-developers.com/showthread.php?p=3345258#post3345258
Just preform a whipe. I had the same issues last night.
I tried that I forgot to say too.
I can't do it in the recovery utility since it just pits out the same error everytime and when trying it from the phone itself from SD Card & Phone Storage it says something like "No reset performed because the System Clear service is not available.
Any other way from those two options to wipe my phone???
hmm I havent had this issue
just hang in there I know theres something with info or someone around who can help you. I wish i could though. good luck
I did the same (reflashed RC29) and got the same error. Thought, "Oh crap, now I've really done it." Turns out, I flashed JF 1.42 RC33 and the error went away. Of course, I was still able to download everything so it's not exactly the same issue. But the error message itself was the same. Have a backup from the outstanding Nandroid utility?
Well I do have some nandroid backups but flashing RC29 also restored the original bootloader so that means I'm not really able to flash those backups. I can't update to anything using the recovery utility so I don't know what my next move is.
Have you tried flashing rc29 again?
I hope this solves your problems. This is without the nandroid backup btw. If you dont care about backing up(or don't have astro/appsinstaller) what you have now, just skip to the *
I hope you either have appinstaller or Astro installed.
I would recommend using MyBackup, download it onto your sdcard from ur computer from http://www.mediafire.com/download.php?qmyztn0mndz. Use appinstaller/astro to install it from your SD, backup all your goodies. (for astro, the mybackup apk needs to be in backups/apps folder)
*Go back to RC29 (follow the steps here http://forum.xda-developers.com/showthread.php?t=442480)
Get hard SPL as suggested in that thread.
Install RC33/ADP1.1h (http://forum.xda-developers.com/showthread.php?t=475381)
Don't forget to upgrade your radio too (links in above thread)
Perform a wipe.
Boot to the home screen and check if everything works to your expectations. (Now is when you install Astro/appinstaller from the market)
Now install the engineering SPL.
Try instaling your nandroid backup.
NOTE: Next time you try a theme and find you are stuck at the splash screen, just reinstall the latest/greatest JF/personal image u were using.
Keep in mind themes for RC33 etc use more space so get rid of the ringtones & notifications from the system folder before installing most themes.
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
rm -r /system/media/audio/ringtones
rm -r /system/media/audio/notifications
Click to expand...
Click to collapse
Yes I have tried reflashing RC29 two times to no avail.
And MrBurrito I wish I was able to update my phone with any update.zip. packages but the recovery utility is not able to update with any of the packages. It just spits back out the error
E:Can't mount CACHE:recovery/log
I wish it was that easy to get it working
Any other suggestion for updating my phone without the recovery utility and fastboot?
Is there a partition called CACHE that may be causing the problem?
hey, not sure if this is any help or not but im wondering if you moved your cache to the sdcard so save room on the system memory? if so is your sdcard actually seated properly. I occasionally can't run my apps that i moved onto my sdcard cause the phone is not reading the sdcard. I take out the sdcard and reseat it and that usually does the trick. sometimes i have to reseat it 2 or 3 times before it will read. it's annoying when it happens. Other than that i'm sorry im a minnow in the ocean when it comes to linux stuff.
good luck with your phone.
Well I moved some of my cache's to my sdcard back when I had rooted RC30. Like browser, market, and a few more but I never tried moving my apps to the sdcard.
i moved everything but my cache to my sdcard. im wondering if something in the cache was moved that the phone needs but can't read cause of the sdcard not being seen. just a shot in the dark, but i've been in a place where i couldn't use my old wizard phone cause of a corrupt rom and can understand your frustration. you might try sending a private message to some of the more astute members like jesusfreke. I know he answers private messages as soon as he can and is very patient with newbs like me
I will try doing that but I'm still open to the community's answers.
I can now confirm that I am using the modified recovery.
But it is still giving the error. So it now looks like
Android system recovery utility
Using test keys
E:Can't mount CACHE:recovery/command
Home+Back - reboot system now
Alt+L - toggle log text display
Alt+S - apply sdcard:update.zip
Alt+W - wipe data/factory reset
E:Can't mount CACHE:recovery/log
E:Can't mount CACHE:recovery/log
E:Can't mount CACHE:recovery/log
I am also pretty sure the error given has to do something with the CACHE partition found in /dev/block/mtdblock4.
Every time i try to edit or modify a directory called /cache it tells me its a Read only file system
Well depending on all the signs I think there is something wrong with the cache of my phone. Market apps not downloading, Browser downloads not successfully downloading and the errors about Can't mount CACHE:recovery/log in the recovery utility. It also says says Read only file system whenever trying to do anything with a folder called /cache.
So if somebody has any suggestions on CACHE, I would appreciate it.
My last resort is a cache.img from anybody since mine seems to be corrupt or something since everytime i try to flash it from my NAND backup it keeps tell me there was an error reading the file.
If anybody has a NAND backup of cache.img file or if anybody backed up there /dev/mtd/mtd4 file from either RC29 or RC30. Preferably RC29. Please post. Thank You
the rooted .nbh
id look into flashing the nbh bassiclly treating the phone like a stock RC30, it sounds like your recovery stuff ain't playing well with others and that may reinstall all of the pooched apps and stuff.
I dunno but it don't sound good, but the rooted .nbh that freed the peeps trapped without root, uses the bootloader to re flash everything, im not an android expert but there is a holiday inn express just down the street...
bhang
I tried flashing both of the RC29 and RC30 DREAIMG.nbh to no avail either. I have to say it has to do with something the cache partition (mtdblock4). The only thing that does not get flashed when using the DREAIMG.nbh is the cache. That partition is a read only file system on my phone and I dont know how to change it to a read write so that the recovery and everything else can access it. Anybody knows how to???
i dont know what sort of console you have if any but the mount command if you can execute it will list the mounted filesystems and their current states (ro = read only rw = read/write) thats assuming you can type said command though, if you can through the output on here and i may be able to get cache writable
Here it is.
Code:
$ mount
rootfs / rootfs ro 0 0
tmpfs /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p1 /sdcard vfat rw,dirsync,nosuid,nodev,noexecuid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8 0 0
$
Okay guys i got it fixed. Thanks for all your help, especially DJ_Steve. The thing was having to mount the mtdblock4 partition (cache partition) and restarting in recovery and doing a wipe (which finally worked).
I did:
Code:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /cache
Restart into recovery and wipe.
I think i did this before and it didnt work. O well it worked this time.
Now it shows.
Code:
$ mount
rootfs / rootfs ro 0 0
tmpfs /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p1 /sdcard vfat rw,dirsync,nosuid,nodev,noexecuid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8 0 0
$

[GUIDE] LogStructuredFileSystem SuperThread (nilfs2,f2fs)

Disclaimer, apply the following at your own risk, I plan to test most if not all of what I post but can't guarantee that you will not cause damage or lose data, and if you do I take no responsibility, that being said it is a simple adaption to current installations.
This is in no way (currently) a replacement for ext4 (or NAND), and shouldn't be seen as a replacement for NativeSD (I'm just piggybacking of their installation zips) compatibility across the board just isn't good enough yet.
Mark 1 - Nilfs2
Code:
Nilfs2 should be good as a replacement for lower class cards and may show a speed improvement on class 2/4 cards. If your installing on a fresh card and have the means to use nilfs2 then please try before/after using ext4 and report back your findings. Any requests for things currently using ext4 will be looked at to make them compatible with nilfs2 if possible.
[B]Partition creation[/B]
Currently only via a Linux OS, will try and trick a recovery to create a nilfs2 instead of ext but no promises
[I]Method 1. Terminal[/I][CODE]sudo apt-get install nilfs-tools
sudo mkfs -t nilfs2 /dev/sdc2
Changing sdc2 to the partition thats to be formatted, look in gparted to be sure your formatting the correct one
Method 2. Disk Utility
You can use Disk Utility from within a LinuxOS
Method 3. Gparted live
Partition creation should be possible using a gparted live usb or cd
Method 4. On device
Copy mkfs.nilfs2 binary to /system/xbin
duplicate fstab renaming to mtab
sudo mkfs.nilfs2 /dev/block/mmcblk0p2
ROM Modifications
Currently, starting with a NativeSD zip as a base only need to alter the install.sh and modify a few lines within the init (within /kernel/bootsd/initrd.gz)
INSTALL.SH
Code:
mount -t ext4 /dev/block/mmcblk0p2 /ext4p
change to
mount -t nilfs2 /dev/block/mmcblk0p2 /ext4p
INIT
Code:
mkdir -p /NativeSD
mount -t ext4 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
change to
mkdir -p /NativeSD
mkdir -p /nilfs
mount -t nilfs2 /dev/block/mmcblk0p2 /nilfs
mount -t nilfs2 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
ROM Installation
Installation confirmed working via CWM, and modified 4ext (recoverymod) (will need to test others)
After Install modifications
Download Nilfs2.zip from #2 , using a root browser or adb copy the system folder to / (thus adding the folders /files to /system). Then need to change permissions of /system/xbin/nilfs_cleanerd , /system/etc/nilfs_cleanerd.conf and /system/etc/init.d/04nilfs to 755 (permissions required will probably change at some point)
Backup
Backup of NILFS2 partition can be done by CWM but only if android is also in NAND as it needs to backup the whole system.
REQUEST: Help from any one who has experience with NiLFS2, and ideally people who have gotten the cleaner to run properly, I'm sure it ran correctly several times, but can't as yet recreate how I got it to work. Let me know if you think you can help [/COLOR][/B]
User Experience
Xylograph's user experience and benchmark NAND / EXT4 / NiLFS2
AnTuTu and Androbench benchmarks[/CODE]
F2FS
Code:
[SIZE="2"][B]Partition creation[/B]
[I][B]Linux only[/B][/I]
Download [URL="http://sourceforge.net/projects/f2fs-tools/"]f2fs tools[/URL] and extract,
cd into folder and run the following[CODE]autoreconf --install
sudo chmod +x configure
sudo ./configure
sudo make
sudo make install
Now you can format:
Code:
sudo umount /dev/sdd1
sudo mkfs.f2fs /dev/sdd1
[/SIZE][/CODE]
To do list
Tidy up the Aroma installer to say nilfs2 instead of ext
Modify a recovery (needed still???)
Modify installer to allow NAND/ext4/nilfs2 installation
Optimize init.d script
Optimize init mounts
Possible beneficial references from across the web
NiLFS website
Not sure if ext4 would have the same problem as ext2
Btrfs
Kernel updates??
Credits / Thanks
Unhelpful for the nilfs2 binaries
Xylograph and securecrt for NativeSD Installation method
ROM devs. (Updated as ROM diffs. added)
Xylograph for AOKP, PA, CyanX
Smokin901 for MIUI
Tytung for Nexus-HD2
Rick1995 for BareBones CM7
Kernel devs.
Securert
Tytung
NILFS2 SuperThread
Will fill this out in due course,
New setup, with sdcard partitions being FAT32 / EXT4 / ANY
requirement for different ROMs should be just the initrd and to change rom_name in a few files.
First change build is on post 34
Fyi. it would be relatively simple to change it to FAT32 / ANY / ANY so if you don't want an additional partition using two (fat32/nilfs2) shouldn't be a problem.
Attached is the different installer files, should be self explanitory, really just need the NAND_ANY_ANY one, but there you go.
NAND_ANY_ANY is the only one without included initrd.gz's, will eventually add a readme detailing what you need to change in the zip, for installing other ROMs and attach a list of initrd's for different roms and partition types / locations
ROM diff files attached, edit the files in the relevant NativeSD zips. And install via recovery.
Have modified securecrt's diff file for BBCM7 - although am having some issues wouldn't advise its use (yet) DON'T USE BBCM7
General
The nilfs2 mounts with the general mount script mount and not the mount.nilfs2.
Need reports on any settings that should help the system; for example noop seems to be the best i/o scheduler for me but have no confirmation from others
Attached Files
ROM 7zip files contain the different files from there corresponding NativeSD zip
All bins and .conf that I've found can be found in nilfs.7z
Nilfs2.zip contains the 3 files needed for the cleaner to work, just copy system over using a root browser and give the three file execution permission.
Init.d script
Original - confirmed working - just point to nilfs_cleanerd . If not already present add the following to /system/etc/init.d/ and chmod +x (or chmod 755) it via terminal/root explorer
Code:
#!/system/bin/sh
/system/xbin/nilfs_cleanerd
Currently trying the following - will probably be implemented within ramdisk at some point - adapted from unhelpful's user_init
Code:
#!/system/bin/sh
export PATH=$PATH:/system/xbin
exec >/system/nilfs2_mount.log
exec 2>&1
set -x
umount /nilfs
time mount -t nilfs2 -o noatime /dev/block/mmcblk0p2 /nilfs
nilfs_cleanerd -c /system/etc/nilfs_cleanerd.conf /dev/block/mmcblk0p2 /nilfs
Edit: files attached as ROM_NAME_initrd.gz need to just be renamed as initrd.gz
HypoTurtle said:
Current relevent files can be found here
Click to expand...
Click to collapse
Thx a lot, however would you be so kind to do the same with BareBoneCM7 NativeSD?
You haven't specified in the starting post how exactly lines should be modified in the init (within /kernel/bootsd/initrd.gz) and also install.sh...
Thanks for creating this thread, HypoTurtle!
Let the ideas start to flow
I'm sure nilfs2 will take over ext4 storage as prefered format once all details are ironed out and recoveries are updated to support it.
It's technically superior to other formats for any solid state memory device.
(BTW, I sent you a PM earlier)
I'm now running CyanMobileX with your nilfs2 binaries. It's just runs flawless!, speedy and I feel my data is very safe in case of any abrupt crash or power failure.
can some one make nilfs2 for this rom :victory:
http://forum.xda-developers.com/showthread.php?t=1681906
HypoTurtle said:
After Install modifications (needs clarification in terms of location)
Will tidy this up as they should/can be included in installation/flashable zip; but using adb/root browser copy the bins and .conf file into /system/xbin. And add a script to /system/etc/init.d initiating /system/xbin/nilfs_cleanerd. Then give the files execution permissions.
Click to expand...
Click to collapse
*.conf file into /system/xbin but not into /etc ?
One more notion: why not to put all these files from nilfs.7z into directories already inside ROM installation zip? (You advise to do it only after installation is complete)
ioy said:
*.conf file into /system/xbin but not into /etc ?
Click to expand...
Click to collapse
Yep, the .conf goes under "system/etc"
ioy said:
*.conf file into /system/xbin but not into /etc ?
One more notion: why not to put all these files from nilfs.7z into directories already inside ROM installation zip? (You advise to do it only after installation is complete)
Click to expand...
Click to collapse
Sorry yes, the default install location for the .conf would be in /etc (or /system/etc; same folder).
Integration of the binaries into the ROM is something I did state would be done eventually, but think that would also require digging through the zip to find where permissions are added and change those, and have had a bit of a hit and miss experience with the cleaner at the moment, want to make sure I have the permissions correct and it's working well before integration.
Kwag, could you make a post listing the benefits of nilfs2, as you know a lot more than I do.
HypoTurtle said:
Kwag, could you make a post listing the benefits of nilfs2, as you know a lot more than I do.
Click to expand...
Click to collapse
Already have
http://forum.xda-developers.com/showpost.php?p=31657498&postcount=716
Here's a copy:
Checksums
Immediate recovery after system crash (no fsck needed at all!)
Continuous (tailored) snapshots of the fs.
Those are benefits of nilfs over ext4. Ext4 has none of those!
no way to creat nilfs on ubuntu cause when i open termenal and command
mkfs -t nilfs2 /dev/sdb2
it give me Error: cannot open device: /dev/sdb2
so any ideas.....
seaman2k said:
no way to creat nilfs on ubuntu cause when i open termenal and command
mkfs -t nilfs2 /dev/sdb2
it give me Error: cannot open device: /dev/sdb2
so any ideas.....
Click to expand...
Click to collapse
sorry, might need sudo ; so sudo mkfs -t nilfs2 /dev/sdb2 failling that try formatting it to ext4 in gparted then try again.
Code:
[SIZE="2"]E/PackageManager( 1471): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 1471): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 1471): java.lang.NullPointerException
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.createCopyFile(PackageManagerService.java:5247)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.copyApk(PackageManagerService.java:5255)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$InstallParams.handleStartCopy(PackageManagerService.java:5051)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$HandlerParams.startCopy(PackageManagerService.java:4902)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:516)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:461)
E/AndroidRuntime( 1471): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1471): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1471): at android.os.HandlerThread.run(HandlerThread.java:60)
E/AudioHardwareQSD( 1827): Cannot open /dev/audience_a1026 -1
E/HTC Acoustic( 1827): Update ADIE table ID 0
E/HTC Acoustic( 1827): Update ADIE table ID 2
E/HTC Acoustic( 1827): Update ADIE table ID 5
E/HTC Acoustic( 1827): Update ADIE table ID 7
E/HTC Acoustic( 1827): Update ADIE table ID 8
E/HTC Acoustic( 1827): Update ADIE table ID 10
E/HTC Acoustic( 1827): Update ADIE table ID 51
E/HTC Acoustic( 1827): Update ADIE table ID 53
E/HTC Acoustic( 1827): Fail to open /system/etc/TPA2018.csv -1.
E/SoundPool( 1844): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressReturn.ogg
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/NetworkLocationProvider( 1970): releaseCheckLocationLock: wake lock has already been released
E/WifiStateTracker( 1844): DHCP request failed: Timed out waiting for DHCP to finish
E/ConnectivityService( 1844): Attempt to connect to WIFI failed.[/SIZE]
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
HypoTurtle said:
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
Click to expand...
Click to collapse
Yeah I think I already mentioned it in the NativeSD thread.. it's because securecrt is using a method to share the '/root of your 'ext' partition/app' folder with all NativeSD roms, but that folder doesn't have the right permissions and so the whole system is failing..
This needs proper modifications in the updater script first just like the 'nilfs_cleanerd' stuff..
Xylograph said:
Yeah I think I already mentioned it in the NativeSD thread.. it's because securecrt is using a method to share the '/root of your 'ext' partition/app' folder with all NativeSD roms, but that folder doesn't have the right permissions and so the whole system is failing..
This needs proper modifications in the updater script first just like the 'nilfs_cleanerd' stuff..
Click to expand...
Click to collapse
Thanks just noticed that myself (the app folder in the root of the partition)
HypoTurtle said:
Thanks just noticed that myself (the app folder in the root of the partition)
Click to expand...
Click to collapse
I advise you to use the init script (ramdisk) structure found in my roms and leave the 'sharing data/app' folder aside untill it's properly inplemented
HypoTurtle said:
Code:
[SIZE="2"]E/PackageManager( 1471): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 1471): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 1471): java.lang.NullPointerException
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.createCopyFile(PackageManagerService.java:5247)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.copyApk(PackageManagerService.java:5255)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$InstallParams.handleStartCopy(PackageManagerService.java:5051)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$HandlerParams.startCopy(PackageManagerService.java:4902)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:516)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:461)
E/AndroidRuntime( 1471): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1471): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1471): at android.os.HandlerThread.run(HandlerThread.java:60)
E/AudioHardwareQSD( 1827): Cannot open /dev/audience_a1026 -1
E/HTC Acoustic( 1827): Update ADIE table ID 0
E/HTC Acoustic( 1827): Update ADIE table ID 2
E/HTC Acoustic( 1827): Update ADIE table ID 5
E/HTC Acoustic( 1827): Update ADIE table ID 7
E/HTC Acoustic( 1827): Update ADIE table ID 8
E/HTC Acoustic( 1827): Update ADIE table ID 10
E/HTC Acoustic( 1827): Update ADIE table ID 51
E/HTC Acoustic( 1827): Update ADIE table ID 53
E/HTC Acoustic( 1827): Fail to open /system/etc/TPA2018.csv -1.
E/SoundPool( 1844): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressReturn.ogg
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/NetworkLocationProvider( 1970): releaseCheckLocationLock: wake lock has already been released
E/WifiStateTracker( 1844): DHCP request failed: Timed out waiting for DHCP to finish
E/ConnectivityService( 1844): Attempt to connect to WIFI failed.[/SIZE]
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
Click to expand...
Click to collapse
In the BB7 the same happened on Ext4, it had been reported many times even before NILFS-NativeSD idea arrived.
Xylograph said:
I advise you to use the init script (ramdisk) structure found in my roms and leave the 'sharing data/app' folder aside untill it's properly inplemented
Click to expand...
Click to collapse
Yeah thats the first thing I tried, but still not working correctly.
Other than removing the following from the init is there anything I've overlooked?
Code:
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
if [ ! -d /data/.cache ];then
mkdir -m 0770 /data/.cache
chown 1000:2001 /data/.cache
fi
ln -s /data/.cache /cache
RecoveryMOD seems to run fine (Magldr - android on nand), and installs as expected.
HypoTurtle said:
Yeah thats the first thing I tried, but still not working correctly.
Other than removing the following from the init is there anything I've overlooked?
Code:
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
if [ ! -d /data/.cache ];then
mkdir -m 0770 /data/.cache
chown 1000:2001 /data/.cache
fi
ln -s /data/.cache /cache
RecoveryMOD seems to run fine (Magldr - android on nand), and installs as expected.
Click to expand...
Click to collapse
Hmm.. have you compared the updater-script with for example the CyanMobile one ?
I also made an RecoveryMOD2 that will only mount the fat32, mmcblk0p2 and if available mmcblk0p3...
Xylograph said:
Hmm.. have you compared the updater-script with for example the CyanMobile one ?
I also made an RecoveryMOD2 that will only mount the fat32, mmcblk0p2 and if available mmcblk0p3...
Click to expand...
Click to collapse
Couldn't see anything relevant there, Could it be something in init.htcleo.rc? Have tried commenting everything at on fs, but still not fixed. There's also some mounts for squashfs files in init.rc (for modules and xbin) that seem redundant.

[Q] (Q) Failing backups and restore

I apologize if I've overlooked something simple here, but I am unable to restore my backups. I have swapped to PhilZ Advanced Touch CWM Recovery 6.0.3.7 newly posted in the Android Development Sub Forum.
I believe the error lies in that, for some reason, the external sd card is included in the data partition size calculation (I'm shooting in the dark here but when performing a backup it says needed free space is 21401 MB...I have a 16gb external sd card in the phone). The backups complete with CWM and only take up approx. 1500 MB.
When restoring any of the previously created backups, they all fail at the point of the /data partition. Is there some easy fix for this moving forward (maybe something simple I can change in one of the dumped backup files)? Something I need to reformat?
FWIW I had this problem of 21 GB backup size with TWRP 2.5 as well (yet TWRP fails because it does not continue without the necessary free space).
Any insight would be most appreciated!
Are the errors contained the log typical or do they point out something obvious that needs attention?
Thanks,
Joof
Here are the relevant pieces from the log of the backup being performed....not sure how to grab one from the failed restore and would prefer not to as I have to end up re-flashing the phone
------------------------
Starting recovery on Tue Oct 1 23:30:13 2013
(UTC)
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (540 x 960)
CWM Advanced Edition 5
CWM Base version: v6.0.3.7
I:Build version: 5.15.0 - cm_xt907
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot (null) 0
2 /system ext4 /dev/block/platform/msm_sdcc.1/by-name/system (null) 0
3 /cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache (null) 0
4 /data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata (null) -16384
5 /sdcard datamedia /dev/null (null) 0
6 /external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 0
7 /logo emmc /dev/block/platform/msm_sdcc.1/by-name/logo (null) 0
8 /modem ext4 /dev/block/platform/msm_sdcc.1/by-name/modem (null) 0
W:Unable to get recovery.fstab info for /datadata during fstab generation!
W:Unable to get recovery.fstab info for /emmc during fstab generation!
W:Unable to get recovery.fstab info for /preload during fstab generation!
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!
I:Completed outputting fstab.
I:using /data/media/0 for /sdcard
Irocessing arguments.
I:Checking arguments.
Warning: No file_contexts
I:Warning: No file_contexts
I:device_recovery_start()
I:Cannot open /data/philz-touch/philz-touch_5.ini
I:nandroid_compression set to default (fast)
I:Cannot open /data/philz-touch/philz-touch_5.ini
I:nandroid_md5sum set to default (1)
I:Cannot open /data/philz-touch/philz-touch_5.ini
I:show_nandroid_size_progress set to default (1)
Command: "/sbin/recovery"
ro.boot.hardware=qcom
....
....
(REMOVED FOR BREVITY)
I:Checking for extendedcommand & OpenRecoveryScript...
I:Skipping execution of extendedcommand, file not found...
I:Skipping execution of OpenRecoveryScript, file not found...
I:ro.modversion=pa_scorpionmini-3.99-RC2-30SEP2013-084601
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
I:Checking needed space for backup '/external_sd/clockworkmod/backup/2013-10-01.23.30.25_pa_scorpionmini-3.99-RC2-30SEP2'
E:Failed to find partition size '/boot'
I:/system backup size (stat)=430Mb
I:/cache backup size (stat)=105Mb
I:/data: tot size=4784Mb, free=3600Mb, backup size=21401Mb, used=21709Mb, media=308Mb
I:/external_sd/.android_secure backup size=0Mb
>> Free space: 6414Mb (42%)
>> Needed space: 21937Mb
>> Unknown partitions size (1): - /boot
>> Backing up /boot...
Backing up boot image...
Backup of boot image completed.
Volume not found! Skipping backup of /recovery...
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
>> Backing up /system...
(APPS LISTED...REMOVED FOR BREVITY)
Backup of system completed.
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
>> Backing up /data...
(REMOVED FOR BREVITY)
Backup of data completed.
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
>> Backing up /external_sd/.android_secure...
Backup of .android_secure completed.
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
>> Backing up /cache...
(REMOVED FOR BREVITY)
Backup of cache completed.
No sd-ext found. Skipping backup of sd-ext.
Generating md5 sum...
Well fastboot flashing stock recovery and doing factory reset/data/cache wipe fixed it. I guess this is not a common issue but thought I'd share my remedy.
Sent from my XT907 using Tapatalk 2
Glad to hear you got your phone working. Just curious, are you now using Philz recovery?
Sent from my XT901 using Tapatalk 4
Thanks!
And Yes. Official philz touch.
I just got this device last week and unlocked the boot loader. I had some issues loading the AOKP 4.3 (boot loops and such even with doing 3x wipes of everything). I eventually had it running smoothly and decided to try the other offerings which is where I discovered this weird backup file size.
But a random post made today in the pacman ROM thread led me to try stock recovery.
Sent from my XT907 using Tapatalk 2

[Q] Have IMEI, SN, and I can backup /EFS. Still unable to mount /EFS (With CWM log)

Greetings,
Title says all, I'm posting the log from CWM.
I tried flashing lots of fw's. And this fix(http://forum.xda-developers.com/showthread.php?t=2507403)
before and after factory reset, removing battery between. Out of clues
Nothing seems to be working for me. Since I first flashed a ROM I could never get network/lockscreen back
Can anyone help me find whats happening with my device?
Starting recovery on Thu Jan 8 23:58:37 1970
framebuffer: fd 4 (1080 x 1920)
min_x_swipe_px=240,min_y_swipe_px=120
CWM-based Recovery v6.0.4.5
Compiled by Xiaolu(20131122)
rm: can't remove '/system/recovery-from-boot.p': No such file or directory
Swipe up/down to change selections.
Swipe to the right for enter.
Swipe to the left for back.
recovery filesystem table
=========================
0 /boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot 0
1 /recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery 0
2 /system ext4 /dev/block/platform/msm_sdcc.1/by-name/system 0
3 /data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata 0
4 /cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache 0
5 /efs ext4 /dev/block/platform/msm_sdcc.1/by-name/efs 0
6 /sdcard datamedia /dev/null 0
7 /external_sd auto /dev/block/mmcblk1 0
8 /storage/usbdisk1 auto /dev/block/sda 0
9 /storage/usbdisk2 auto /dev/block/sdb 0
10 /tmp ramdisk ramdisk 0
W:Unable to get recovery.fstab info for /datadata during fstab generation!
W:Unable to get recovery.fstab info for /emmc during fstab generation!
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!
W:Unable to get recovery.fstab info for /preload during fstab generation!
I:Completed outputting fstab.
I:Connected to Vold..
I:110 0 sdcard /external_sd 0
I:110 0 sda /storage/usbdisk1 0
I:110 0 sdb /storage/usbdisk2 0
I:200 0 Volumes listed.
Irocessing arguments.
I:Checking arguments.
I:device_recovery_start()
Command: "/sbin/recovery"
...
...
...
I:Checking for extendedcommand...
I:Skipping execution of extendedcommand, file not found...
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/efs on /efs failed: Invalid argument
W:failed to mount /dev/block/platform/msm_sdcc.1/by-name/efs (File exists)
Error mounting /efs!
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/efs on /efs failed: Invalid argument
W:failed to mount /dev/block/platform/msm_sdcc.1/by-name/efs (File exists)
Error mounting /efs!
I:using /data/media/0 for /sdcard.
Any clues?
Install busybox to get EFS back via CWM.
user @brockyneo had the same issue a few days ago, couldn't restore EFS until he installed busybox
http://forum.xda-developers.com/showthread.php?t=2546724&page=3
It may help with the lockscreen issue.
radicalisto said:
Install busybox to get EFS back via CWM.
user @brockyneo had the same issue a few days ago, couldn't restore EFS until he installed busybox
http://forum.xda-developers.com/showthread.php?t=2546724&page=3
It may help with the lockscreen issue.
Click to expand...
Click to collapse
Thanks a lot, I have asked brock for more detailed information about his solution. I hate messing with EFS, before I restore I want to make one more backup via terminal, I don't know exactly if he did the backup via terminal in his case.
I fixed my phone after one sad week of no networks! I'm so happy!
I used the batch script to restore my EFS via ODIN. and in CWM i was able to mouunt /efs.
Then I did a reset flashed clean ROM and it showed the SIM dialog and lockscreen started to work.
Thanks a lot!

Filesystem problems with /system, keeps remounting ro , filesystem errors common ?

Hey all, so I was making some new bootanimations and was about to try them out when I noticed that even after remounting /system rw and performing an operation, I was getting filesystem errors which caused it to remount ro (standard linux procedure to avoid data corruption.)
Here's the output while using adb shell while TWRP is running:
Code:
<2>[01-05 19:55:34.389] [0][51: bdi_writeback_w]EXT4-fs error (device sde13): ext4_mb_generate_buddy:757: group 27, block bitmap and bg descriptor inconsistent: 1 vs 65364 free clusters
<3>[01-05 19:55:34.389] [0][51: bdi_writeback_w]Aborting journal on device sde13-8.
<2>[01-05 19:55:34.389] [0][51: bdi_writeback_w]EXT4-fs (sde13): Remounting filesystem read-only
<2>[01-05 19:55:34.389] [0][51: bdi_writeback_w]EXT4-fs error (device sde13): ext4_mb_generate_buddy:757: group 28, block bitmap and bg descriptor inconsistent: 1 vs 43594 free clusters
<2>[01-05 19:55:34.389] [0][51: bdi_writeback_w]EXT4-fs error (device sde13): ext4_mb_generate_buddy:757: group 29, block bitmap and bg descriptor inconsistent: 16190 vs 49475 free clusters
<2>[01-05 19:55:34.389] [0][51: bdi_writeback_w]EXT4-fs error (device sde13): ext4_mb_generate_buddy:757: group 30, block bitmap and bg descriptor inconsistent: 32258 vs 20790 free clusters
So I rebooted back in to TWRP (it was semi-hung after the fs error) and ran `e2fsck /dev/block/sde13` and it found and fixed a few errors. My question is, has anyone else experienced this ? Is it fairly common or should I be considering a warranty return ?
I know with traditional HDDs and even SDDs, this can be an indication of a failing drive, or also from a power failure during a write operation on /system (I'm sure I've had a few.)
After my e2fsck, I was able to copy the bootanimation.zip in to place and it works fine (I'll post after I polish a bit). Hopefully I won't see it again, but I did want to reach out in case others were seeing this or had more experience about it's implications with this storage medium. Thanks!
EDIT: nevermind, misread issue

Categories

Resources