[Galaxy Note 10.1 Q&A, Help & Troubleshooting] gnuuser:
Encryption fails on N8010

Hello,

I just switched to BlissPop. It seems to be very nice and stable. But when I try to encrypt my tablet via the menu (Options->Security->Tablet Encryption) it shows the encryption screen for a second and than restarts.

I tried to catch a log:

08-01 15:15:59.060 V/JNIHelp (23703): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 227 native methods...
08-01 15:16:06.465 W/art (23941): Long monitor contention event with owner method=java.security.cert.TrustAnchor com.android.org.conscrypt.TrustedCertificateIndex.findByIssuerAndSignature(java.security.cert.X509Certificate) from TrustedCertificateIndex.java:91 waiters=0 for 107ms
08-01 15:16:19.605 W/art (23941): Long monitor contention event with owner method=int com.android.org.conscrypt.NativeCrypto.SSL_read(long, java.io.FileDescriptor, com.android.org.conscrypt.NativeCrypto$SSLHandshakeCallbacks, byte[], int, int, int) from NativeCrypto.java:4294967294 waiters=0 for 195ms
08-01 15:16:19.675 W/art (23941): Long monitor contention event with owner method=void com.android.org.conscrypt.NativeCrypto.SSL_write(long, java.io.FileDescriptor, com.android.org.conscrypt.NativeCrypto$SSLHandshakeCallbacks, byte[], int, int, int) from NativeCrypto.java:4294967294 waiters=5 for 170ms
08-01 15:16:19.705 W/art (23941): Long monitor contention event with owner method=void com.android.org.conscrypt.NativeCrypto.SSL_write(long, java.io.FileDescriptor, com.android.org.conscrypt.NativeCrypto$SSLHandshakeCallbacks, byte[], int, int, int) from NativeCrypto.java:4294967294 waiters=6 for 201ms
08-01 15:37:51.516 V/JNIHelp (25306): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 227 native methods...
08-01 15:40:19.996 D/SubSettings(22406): Launching fragment com.android.settings.CryptKeeperSettings
08-01 15:40:22.166 D/SubSettings(22406): Launching fragment com.android.settings.CryptKeeperConfirm
08-01 15:40:24.036 I/ActivityManager(21718): START u0 {cmp=com.android.settings/.CryptKeeperConfirm$Blank (has extras)} from uid 1000 on display 0
08-01 15:40:24.041 V/WindowManager(21718): addAppToken: AppWindowToken{1206d8f3 token=Token{13ed4f62 ActivityRecord{2ac8ee2d u0 com.android.settings/.CryptKeeperConfirm$Blank t109}}} to stack=1 task=109 at 4
08-01 15:40:24.151 V/WindowManager(21718): Adding window Window{1bd4ffae u0 com.android.settings/com.android.settings.CryptKeeperConfirm$Blank} at 8 of 15 (after Window{237d357b u0 com.android.settings/com.android.settings.SubSettings})
08-01 15:40:24.416 I/ActivityManager(21718): Displayed com.android.settings/.CryptKeeperConfirm$Blank: +336ms
08-01 15:40:24.716 I/Timeline(21718): Timeline: Activity_windows_visible id: ActivityRecord{2ac8ee2d u0 com.android.settings/.CryptKeeperConfirm$Blank t109} time:41878878
08-01 15:40:24.846 E/Cryptfs (1848): Bad magic for real block device /dev/block/mmcblk0p12
08-01 15:40:24.846 E/Cryptfs (1848): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.
08-01 15:40:25.016 E/Cryptfs (1848): Bad magic for real block device /dev/block/mmcblk0p12
08-01 15:40:25.016 E/Cryptfs (1848): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.
08-01 15:40:59.196 V/JNIHelp (26931): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 227 native methods...
08-01 15:41:00.586 V/JNIHelp (26993): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 227 native methods...
08-01 15:41:01.101 D/VoldCmdListener(1848): cryptfs getpw
08-01 15:41:01.106 D/VoldCmdListener(1848): cryptfs clearpw
08-01 15:41:01.796 V/JNIHelp (27031): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 227 native methods...
08-01 15:41:03.216 V/JNIHelp (26859): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 227 native methods...
08-01 15:41:05.266 V/JNIHelp (27208): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 227 native methods...
08-01 15:41:19.973 V/JNIHelp (27961): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 227 native methods...
08-01 15:41:40.168 W/art (28189): Long monitor contention event with owner method=int com.android.org.conscrypt.NativeCrypto.SSL_read(long, java.io.FileDescriptor, com.android.org.conscrypt.NativeCrypto$SSLHandshakeCallbacks, byte[], int, int, int) from NativeCrypto.java:4294967294 waiters=0 for 118ms
08-01 15:41:40.643 W/art (28189): Long monitor contention event with owner method=int com.android.org.conscrypt.NativeCrypto.SSL_read(long, java.io.FileDescriptor, com.android.org.conscrypt.NativeCrypto$SSLHandshakeCallbacks, byte[], int, int, int) from NativeCrypto.java:4294967294 waiters=0 for 428ms

I think the problem has something to do with »Bad magic for real block device /dev/block/mmcblk0p12« and »Orig filesystem overlaps crypto footer region. Cannot encrypt in place«.

I factory reseted the whole tablet including that block device (data), because I came from omnirom 4.4.x and they used an encryption, that cannot be handled by twrp or cwm. It seems as if google had changed the encryption handling somewhere around 4.4.x and I used the one method not compatible with twrp on n8010. So the data just has a new formating in ext4 via twrp.

Is it a bug in the rom or has something gone wrong on my side? Do you've got a workaround?

wkr