[Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe] schaarda:
Hi,

when I start the data encryption, the green droid appears for a second, then the UI restarts and everything is like before - unencrypted.

I've got this output in logcat:

07-10 23:24:55.200 5357 6475 I ActivityTaskManager: START u0 {cmp=com.android.settings/.CryptKeeperConfirm$Blank (has extras)} from uid 1000
07-10 23:24:55.201 5039 5082 W ANDR-PERF-LM: FeatureState: readState() 149: warning: appName is NULL, returning default State
07-10 23:24:55.201 5039 5082 I chatty : uid=0(root) lmCoreThread identical 1 line
07-10 23:24:55.201 5039 5082 W ANDR-PERF-LM: FeatureState: readState() 149: warning: appName is NULL, returning default State
07-10 23:24:55.206 6014 6014 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@2917ac8
07-10 23:24:55.211 5734 5734 D StatusBar: disable<E!I!A!S!B!H!R!c S!> disable2<q i n >
07-10 23:24:55.211 5734 5734 V StatusBar: mStatusBarWindow: com.android.systemui.statusbar.phone.StatusBarWindowView{2395e09 V.E...... ........ 0,0-1080,96} canPanelBeCollapsed(): false
07-10 23:24:55.211 5734 5734 D InterruptionStateProvider: heads up is disabled
07-10 23:24:55.211 5734 5734 D InterruptionStateProvider: dismissing any existing heads up notification on disable event
07-10 23:24:55.234 5152 7579 D audio_hw_primary: start_output_stream: pcm_prepare
07-10 23:24:55.234 5152 7579 D audio_hw_primary: start_output_stream: exit
07-10 23:24:55.234 5152 7579 D audio_hw_primary: check_and_set_karaok_parameters: is karaok rx device 0, is karaok tx device 0
07-10 23:24:55.234 5152 7579 D msm8974_platform: platform_split_snd_device: snd_device(2) num devices(0) new_snd_devices(0)
07-10 23:24:55.234 5152 7579 I msm8974_platform: platform_get_custom_mtmx_params: no matching param with id 0 ip_ch 2 op_ch 2 uc_id 12 snd_dev 2
07-10 23:24:55.234 5152 7579 W qc_adm : margin check: adm_request_focus_v2_1(p) failed diff -1296
07-10 23:24:55.234 5152 7579 W qc_adm : margin check: adm_abandon_focus(p) failed diff -1296
07-10 23:24:55.402 5039 5039 W /vendor/bin/hw/vendor.qti.hardware.perf@2.0-serviceFr: type=1400 audit(0.0:806): avc: denied { search } for comm=41646170744C61756E636820566D name="5385" dev="proc" ino=76201 scontext=u:r:hal_perf_default:s0 tcontext=u:r:system_server:s0 tclass=dir permissive=0
07-10 23:24:55.402 5039 5039 W /vendor/bin/hw/vendor.qti.hardware.perf@2.0-serviceFr: type=1400 audit(0.0:807): avc: denied { search } for comm=41646170744C61756E636820566D name="5384" dev="proc" ino=76199 scontext=u:r:hal_perf_default:s0 tcontext=u:r:system_server:s0 tclass=dir permissive=0
07-10 23:24:55.913 634 2525 D vold : fdeEnable(3, *, 0)
07-10 23:24:55.914 634 2525 D vold : !fscrypt_is_native, spawning fdeEnableInternal
07-10 23:24:55.915 634 8102 E Cryptfs : Unexpected value for crypto key location
07-10 23:24:55.915 634 8102 E Cryptfs : Cannot get size of block device

I tried several roms (AICP, OmniRom, BlissRom), all of them crash with the same error from cryptfs.

Before installing the first rom (coming from Stock MIUI 11.0.6 European) I deleted the data partition (not just wipe) using twrp-3.4.0-0-raphael-mauronofrio.img. After that I had to flash a new vendor image fw-vendor_raphael_miui_RAPHAELEEAGlobal_V12.0.1.0.QFKEUXM_68e06ebeaa_10.0.zip in order to be able to install AICP.

All three roms seem to be working so far, but all three of them without encryption.

Because I read somewhere that there have been error with the correct size of the data partition, maybe someone with working encryption can get me his block count with tune2fs from sda31. Mine is 29136891.

Any suggestions on how to fix this problem are highly welcome.

Regards,

Daniel