Here is the procedure-
1. Download the zip file(link below)
2. Flash it using TWRP Recovery.
No need to clear any cache
1. Flash the Magisk Module using Magisk Manager
Tested on Redmi Note 4(Mido) running the latest Stable MIUI V184.108.40.206.NCFMIEK (MIUI9) and Developer Rom 8.2.8 (MIUI9) MIUI 220.127.116.11 and 18.104.22.168 or
Redmi Note 4 (Nikel) Running on 22.214.171.124
Update- Working on these devices as well-
1. Mi Max Prime running 126.96.36.199
For Redmi 4/4x i'have made another port, here
Test on your devices at your own risk.
oc01 & Siemens92 on 4pda.ru
rkmadotra on XDA for helping in Magisk Module.
1- Works on MIUI8?
It doesn't work on MIUI8, Kindly update it to the latest firmware and flash this.
2- On custom roms?
For custom roms either this function is already there( if it's not why are you still on it, come back to stock guys, it's quite nice here.) or you can use the Trusted Face Unlock from google( For near vanilla roms).
3- On other Devices?
Regarding any other device, I really don't know.
4- Trouble after flashing this?
If you are facing problem after flashing this, kindly dirty flash the rom again and try this, most likely your earlier mods to firmware are causing trouble.
Rollback for TWRP(Restore the default files)-
Magisk Module- 188.8.131.52
or you can download the latest version from Magisk manager.
For Nikel MIUI 184.108.40.206 (Redmi note 4 Meditek) Here
Thanks would be appreciated. Hit if it was useful.