From 39b0a00abadaadfbab0d03b9995b0f23f6aaea28 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 6 Dec 2019 21:34:44 +0100 Subject: [PATCH] Detect whether vendor has an hostapd by checking manifest --- rw-system.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/rw-system.sh b/rw-system.sh index 85ed58d..8fb61e9 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -438,3 +438,21 @@ if [ -c /dev/dsm ];then chcon u:object_r:teecd_data_file_system:s0 /data/sec_storage_data mount /data/sec_storage_data /sec_storage fi + +#Try to detect DT2W +for ev in $(cd /sys/class/input;echo event*);do + if [ -f "/sys/class/input/$ev/device/device/gesture_mask" ];then + setprop persist.sys.phh.dt2w_evnode /dev/input/$ev + fi +done + +has_hostapd=false +for i in odm oem vendor product;do + if grep -qF android.hardware.wifi.hostapd /$i/etc/vintf/manifest.xml;then + has_hostapd=true + fi +done + +if [ "$has_hostapd" = false ];then + setprop persist.sys.phh.system_hostapd true +fi