Sunday, June 17, 2018

finger print scanner - Completely disable the fingerprint sensor


I don't really like all the hype about the fingerprint sensor, I'd rather like to have it killed down, so that it doesn't register any fingerprints.



On a desktop Linux I'd simply modprobe -r the relevant kernel module. Can I do something like that on Android? I don't want to simply disable it in the settings - then I have to trust the system that nothing really uses it.



Answer



On Linux (and Android) it is possible to disconnect a device from its driver[1]. The fingerprint driver (denoted as fpc) on my LG G5 has the name fpc1020. Searching in the /sys path gave me the folder /sys/bus/spi/drivers/fpc1020/. This folder has four files: bind, unbind, uevent AND spi8.1. What we do is to unbind the device spi8.1 from the driver fpc1020.


Now how to disable the sensor:




  1. we need to find the driver name:
    Try this command: find /sys/bus -name 'fpc*'
    For me it's: /sys/bus/spi/drivers/fpc1020/





  2. we need to find the device name:
    The device name is the fourth file in this folder.
    ls /sys/bus/spi/drivers/fpc1020/ (depends on your result from 1.)
    For me it's: spi8.1




  3. unbind this device:
    echo spi8.1 > /sys/bus/spi/drivers/fpc1020/unbind (depends on your result from 1. & 2.)
    Now you are not able to use the fingerprint sensor until the next restart.





  4. unbind on every system boot:
    We want/need to execute this command on every boot. Currently I'm not sure what's the best way to do it.




Requirements:



  • Root Access

  • Terminal App (or adb shell from PC)



References:
1. https://lwn.net/Articles/143397/


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...