device_google_zumapro/disable_contaminant_detection.sh
Kuen-Han Tsai 453a29320a usb: add disable_contanimant_detection
This patch adds the disable_contaminant_detection script, providing a
command-based method to bypass moisture detection.

Bug: 295127978
Test: disable moisture detection by 'setprop vendor.usb.contaminantdisable true'
Change-Id: I035d656401aedf11a9a5390504bec46b3c4e2634
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
2024-02-02 17:54:52 +08:00

7 lines
151 B
Bash

#!/vendor/bin/sh
for f in /sys/devices/platform/108d0000.hsi2c/i2c-*/*-0025; do
if [ -d $f ]; then
echo 0 > $f/contaminant_detection;
fi
done