device_google_zuma/disable_contaminant_detection.sh
Jimmy Hu 3d72a5b29f Disable USB contaminant detection when the disable flag is true
(ported from 6b1106498e1164f46b9a895ed2258a20a0c7a7b5)

Bug: 263916675
Bug: 264231895
Test: setprop vendor.usb.contaminantdisable true
Change-Id: I57ea8280e4af3720dce9d9174b1cc24066c5324e
Signed-off-by: Jimmy Hu <hhhuuu@google.com>
2023-05-23 07:01:33 +00:00

7 lines
151 B
Bash

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