The premise
- Need root phone
- MTK platform for Android9.0 only
The launch step
- Check whether wpa_supplicant is enabled
ps -A | grep wpa
Wpa_supplicant: wPA_supplicant: WPA_supplicant: Wpa_supplicant: Wpa_supplicant
#Wpa_supplicant Process information
wifi 1364 1 13208 8664 poll_schedule_timeout 0 S wpa_supplicant
#Start the wpa_suplicant process command
#Android O/vendor/bin/hw/wpa_supplicant -d -b -- iwlan0 -- Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -c/data/misc/wifi/ sockets#Android P/ vendor/bin/hw/wpa_supplicant - d - B - iwlan0 - Dnl80211 - c/data/vendor/wifi/wpa/wpa_supplicant. Conf -C/data/vendor/wifi/wpa/socketsCopy the code
- Start wpa_cli in any directory
wpa_cli
We have to do is
The problem
The most common is Could not connect to wpa_supplicant: Wlan0 – re – trying, first is to look at the/data/vendor/wifi/wpa/sockets wlan0 file, if not then ctrl_interface setting is not correct, Go to /data/vendor/wifi/wpa and pull out wpa_supplicant.conf. The content of the file is as follows
ctrl_interface=wlan0 update_config=1 manufacturer=MediaTek Inc. device_name=Wireless Client model_name=MTK Wireless Model model_number=1.0 serial_number=2.0 device_type=10-0050F204-5 OS_version =01020300 CONFIG_methods =display push_button keypad p2p_no_group_iface=1 driver_param=use_p2p_group_interface=1 hs20=1Copy the code
Modify ctrl_interface = / data/vendor/wifi/wpa/sockets, in/vendor/etc/wifi/directory. There is also a wpa_supplicant file, If /data/vendor/wifi/wpa/ does not take effect, you can try this file, and then restart wpa_cli, if still does not work, you can use strace wpa_cli -i wlan0 debugging
Reference article: Android Oreo8.0 uses wpa_supplicant and wpa_CLI (update AndroidPie9.0) Why is Wpa_CLI produces error “Could not connect to” Wpa_supplicant: wlan0 – re – trying “?