Tweak 5.0 L decrypt
Mount the vendor partition if it exists so we can use any
proprietary files we may need.
Relocate auto decrypt when default_password is in use to after all
partitions are added so that we can mount the vendor partition.
Change-Id: I93455a35695779f53ef57a82d3d45c7216c13639
diff --git a/crypto/lollipop/cryptfs.c b/crypto/lollipop/cryptfs.c
index 630fb0e..0277c78 100644
--- a/crypto/lollipop/cryptfs.c
+++ b/crypto/lollipop/cryptfs.c
@@ -1224,7 +1224,7 @@
unsigned char* master_key = convert_hex_ascii_to_key(passwd, &key_size);
if (!master_key) {
- printf("Failed to convert passwd from hex");
+ printf("Failed to convert passwd from hex\n");
return -1;
}
@@ -1234,13 +1234,13 @@
free(master_key);
if (rc) {
- printf("scrypt failed");
+ printf("scrypt failed\n");
return -1;
}
if (keymaster_sign_object(ftr, ikey, KEY_LEN_BYTES + IV_LEN_BYTES,
&signature, &signature_size)) {
- printf("Signing failed");
+ printf("Signing failed\n");
return -1;
}
@@ -1249,7 +1249,7 @@
free(signature);
if (rc) {
- printf("scrypt failed");
+ printf("scrypt failed\n");
return -1;
}
@@ -1929,12 +1929,12 @@
property_get("ro.crypto.state", encrypted_state, "");
if ( master_key_saved || strcmp(encrypted_state, "encrypted") ) {
printf("encrypted fs already validated or not running with encryption,"
- " aborting");
- return -1;
+ " aborting\n");
+ //return -1;
}
if (get_crypt_ftr_and_key(crypt_ftr)) {
- printf("Error getting crypt footer and key");
+ printf("Error getting crypt footer and key\n");
return -1;
}