nx: Add Wi-Fi reset script
Change-Id: Ica5129d824253b5a2576b68f290555d90dd31116
This commit is contained in:
1 parent
f5cb972636
commit
ef6a02e5f6
4 files changed
+23
No files matched your search
@@ -74,4 +74,12 @@ LOCAL_MODULE_SUFFIX := .sh
|
||||
LOCAL_INIT_RC := nx_jc.rc
|
||||
LOCAL_MODULE_CLASS := EXECUTABLES
|
||||
LOCAL_VENDOR_MODULE := true
|
||||
|
||||
# Goes on system due to needing `settings` and `svc`
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := wifi_reset
|
||||
LOCAL_SRC_FILES := wifi_reset.sh
|
||||
LOCAL_MODULE_SUFFIX := .sh
|
||||
LOCAL_INIT_RC := wifi_reset.rc
|
||||
LOCAL_MODULE_CLASS := EXECUTABLES
|
||||
include $(BUILD_PREBUILT)
|
||||
@@ -0,0 +1,8 @@
|
||||
service wifi_reset /system/bin/wifi_reset.sh
|
||||
user root
|
||||
group root system
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:wlan.driver.status=unloaded
|
||||
start wifi_reset
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
user_state=$(/system/bin/settings get global wifi_on)
|
||||
if [ $user_state = "1" ]; then
|
||||
svc wifi enable
|
||||
fi
|
||||
Reference in new issue
Block a user