[GUIDE] Enable Fingerprint Selfie in Redmi 3S Prime

Devil7DK

Senior Member
Sep 22, 2015
642
1,351
0
21
Coimbatore
Here is a tweak for enabling "Fingerprint Selfie".

Warning :
This guide includes some steps which will modify system behavior. I'm not responsible for any consequences. Do it in your own risk. Take Nandroid Backup Before trying this. :p

Prerequisites :
1. Redmi 3S Prime with unlocked bootloader (You can also use Redmi 3S if it has fingerprint sensor :D)
2. Rooted ROM
3. Good File Explorer to Browse Root Files. I recommend ES File Explorer.
4. Good Text Editor Which can edit root files. Try QuickEdit for this.

How-to :
1. Goto /system/usr/keylayout folder
2. Find a file called Generic.kl
3. Open Generic.kl with text editor (QuickEdit)
4. Search for key 353
5. If you find any line starts with key 353, comment it with # i.e. add # symbol before that line
6. Add a new line with following
Code:
key 353 CAMERA
Note: You can add this line anywhere in that file but its advised to follow the file structure. i.e. key numbers is in ascending order... just follow it add 353 after 352.
7. Save the file and Reboot.
8. Enjoy Fingerprint Selfie... :fingers-crossed:

Explanation :
Some users may experienced unwanted clicks or touches in screen when they touch fingerprint sensor while the phone is unlocked. That was caused by "key 353 DPAD_CENTER" line in Generic.kl. Here we used that for assigning that key for CAMERA (which will trigger the camera and take picture).

WhatsApp Group : https://chat.whatsapp.com/EnJsSukWafaLuD9cMg6NYn
Telegram : Devil7DK

Note : I'm tested this in Redmi 3S Prime 3GB with Lineage ROM and its working perfectly without any problem.
 
Last edited:

Devil7DK

Senior Member
Sep 22, 2015
642
1,351
0
21
Coimbatore
Troubleshooting :
For those who are reporting that This Tweak is Not Working. Try this....

1. Install KeyEvent Display App
2. Open it & Give Root Permission
3. Then Touch Fingerprint Sensor. You should see something like this,


Code:
^*KeyDown:******action=0 code=27 repeat=0 meta=0 scancode=353 mFlags=8 label='' chars='null' number='' 
^*KeyUp:********action=1 code=27 repeat=0 meta=0 scancode=353 mFlags=8 label='' chars='null' number=''
4. If it shows something like this when touching fingerprint sensor... it means your fingerprint sensor is working as button. So, Make sure the scancode is 353.
5. If there is something Else i.e. any other number... use that number instead of 353.

If you cant see anything when touching the fingerprint sensor. Then it means this won't work at all for you.:p
 
Last edited:
  • Like
Reactions: DK0990

Devil7DK

Senior Member
Sep 22, 2015
642
1,351
0
21
Coimbatore
Troubleshooting : Part 2
Some ROM Dev's has disabled FP Button on their ROM... Like VIPER, AEX, etc.... For those who can't get this working on their ROM. Here is the fix :

Run the following command in Terminal :
Code:
grep -rn '/system/usr/keylayout' -e '353'
(If your keycode for fp is different use that code instead of 353)

This command will list out the files that has defined FP key. All you need to do with those files is
  • Make sure that no files has defined FP key more than 1 time. If any files has FP key defined more than one time Delete all except one.
  • The line should'nt start with #

Then if there is any .kl file that named as something like uinput-fpc.kl, Delete it...
 
Last edited:

sidS6

Senior Member
Feb 11, 2017
306
105
0
Your fp is working well as button... So just follow the guide... Even it didn't work.. sent me the Generic.kl file edited by you.... In WhatsApp or telegram...
Thanks ... The fp selfie is working great now. But one thing.. whenever i long press on fp.. the camera app opens up out of nowhere even when i am on other apps. How to disable this?
 

Devil7DK

Senior Member
Sep 22, 2015
642
1,351
0
21
Coimbatore
Thanks ... The fp selfie is working great now. But one thing.. whenever i long press on fp.. the camera app opens up out of nowhere even when i am on other apps. How to disable this?
Sorry... You can't for now... I'm working on seperate app which can be used without this tweak... Wait for it. :p