0

I own a Samsung Galaxy S4 (GT-I9515L "jfvelte") running Lineage OS 16. It has a broken touchscreen which register random "ghost" touches.

I'm able to use it with the help of a USB mouse. To disable the touchscreen I use adb to open a shell on /dev/input and remove event3, which disables the touchscreen (renaming or moving the file doesn't work, only removing it) - until reboot.

How do I keep it disabled even after reboot? Preferably, I'd like a way that I can enable it later if I ever want to.

0

Turn's out there's init.sh support on Lineage (content of /etc/init.d/90userinit):

#!/system/bin/sh
# call userinit.sh if present in /data/local

if [ -e /data/local/userinit.sh ];
then
   log -p i -t userinit "Executing /data/local/userinit.sh";
   /system/bin/sh /data/local/userinit.sh;
   setprop lineage.userinit.active 1;
fi;

So I wrote a bash script that removes the /dev/input/event3 on boot, thus It disabling touch input on boot time:

/data/local/userinit.sh:

#!/system/bin/sh
rm /dev/input/event3

If I ever need to re-enable touch input, I can simply remove the bash script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.