[Xiaomi Redmi Note 3 [Snapdragon] ROMs, Kernels, Re] napoleonthecake:
Encryption.

Greetings!

Huge thanks for your work.

However, one big problem I've faced is encryption. It's not working due to keymaster error (OS-side?).

I've tried clean flash. Encrypted via settings and via adb:

vdc cryptfs enablecrypto wipe password 66666666

and here is logcat output:

01-17 17:02:34.306 361 8776 I Cryptfs : keymaster module name is Keymaster QTI HAL
01-17 17:02:34.306 361 8776 I Cryptfs : keymaster version is 256
01-17 17:02:34.306 361 8776 I Cryptfs : Found keymaster1 module, using keymaster1 API.
01-17 17:02:34.306 361 8776 D QSEECOMAPI: : QSEECom_get_handle sb_length = 0xa000
01-17 17:02:34.306 361 8776 D QSEECOMAPI: : App is already loaded QSEE and app id = 3
01-17 17:02:34.314 361 8776 E keymaster1_device: TA API Major Verion: 1
01-17 17:02:34.314 361 8776 E keymaster1_device: TA API Minor Verion: 0
01-17 17:02:34.314 361 8776 E keymaster1_device: TA Major Verion: 1
01-17 17:02:34.314 361 8776 E keymaster1_device: TA Minor Verion: 10
01-17 17:02:34.314 361 8776 E keymaster1_device: HwKmClose
01-17 17:02:34.314 361 8776 D QSEECOMAPI: : QSEECom_dealloc_memory
01-17 17:02:34.314 361 8776 D QSEECOMAPI: : QSEECom_shutdown_app, app_id = 3
01-17 17:02:34.315 361 8776 I Cryptfs : keymaster module name is Keymaster QTI HAL
01-17 17:02:34.315 361 8776 I Cryptfs : keymaster version is 256
01-17 17:02:34.315 361 8776 I Cryptfs : Found keymaster1 module, using keymaster1 API.
01-17 17:02:34.315 361 8776 D QSEECOMAPI: : QSEECom_get_handle sb_length = 0xa000
01-17 17:02:34.315 361 8776 D QSEECOMAPI: : App is already loaded QSEE and app id = 3
01-17 17:02:34.316 361 8776 E keymaster1_device: TA API Major Verion: 1
01-17 17:02:34.316 361 8776 E keymaster1_device: TA API Minor Verion: 0
01-17 17:02:34.316 361 8776 E keymaster1_device: TA Major Verion: 1
01-17 17:02:34.316 361 8776 E keymaster1_device: TA Minor Verion: 10
01-17 17:02:34.407 361 366 E FrameworkListener: read() failed (Connection reset by peer)
01-17 17:02:35.053 600 614 D DrmLibTime: got the req here! ret=0
01-17 17:02:35.053 600 614 D DrmLibTime: command id, time_cmd_id = 770
01-17 17:02:35.053 600 614 D DrmLibTime: time_getutcsec starts!
01-17 17:02:35.053 600 614 D DrmLibTime: QSEE Time Listener: time_getutcsec
01-17 17:02:35.053 600 614 D DrmLibTime: QSEE Time Listener: get_utc_seconds
01-17 17:02:35.053 600 614 D DrmLibTime: QSEE Time Listener: time_get_modem_time
01-17 17:02:35.053 600 614 D DrmLibTime: QSEE Time Listener: Checking if ATS_MODEM is set or not.
01-17 17:02:35.053 600 614 D QC-time-services: Lib:time_genoff_operation: pargs->base = 13
01-17 17:02:35.053 600 614 D QC-time-services: Lib:time_genoff_operation: pargs->operation = 2
01-17 17:02:35.054 600 614 D QC-time-services: Lib:time_genoff_operation: pargs->ts_val = 0
01-17 17:02:35.054 600 614 E QC-time-services: Lib:time_genoff_operation: Connection failed !!
01-17 17:02:35.054 600 614 D DrmLibTime: QSEE Time Listener: ATS_MODEM is not set. Fallback to Android system time.
01-17 17:02:35.054 600 614 D DrmLibTime: QSEE Time Listener: Retrieved Android system time: 1484665355
01-17 17:02:35.054 600 614 D DrmLibTime: time_getutcsec returns 0, sec = 1484665355; nsec = 0
01-17 17:02:35.054 600 614 D DrmLibTime: time_getutcsec finished!
01-17 17:02:35.054 600 614 D DrmLibTime: iotcl_continue_command finished! and return 0
01-17 17:02:35.054 600 614 D DrmLibTime: before calling ioctl to read the next time_cmd
01-17 17:02:35.056 361 8776 E keymaster1_device: Generate key send cmd failed
01-17 17:02:35.056 361 8776 E keymaster1_device: ret: 0
01-17 17:02:35.056 361 8776 E keymaster1_device: resp->status: -30
01-17 17:02:35.056 361 8776 E Cryptfs : Failed to generate keymaster1 key, error -30
01-17 17:02:35.056 361 8776 E keymaster1_device: HwKmClose
01-17 17:02:35.056 361 8776 D QSEECOMAPI: : QSEECom_dealloc_memory
01-17 17:02:35.056 361 8776 D QSEECOMAPI: : QSEECom_shutdown_app, app_id = 3
01-17 17:02:35.056 361 8776 E Cryptfs : keymaster_create_key failed
01-17 17:02:35.056 361 8776 E Cryptfs : Cannot create encrypted master key
01-17 17:02:35.056 361 8776 E Cryptfs : Error enabling encryption after framework is shutdown, no data changed, restarting system

I am ready for any support for you to get this work. Thanks in advance. I'll wait for your respond.