Wifi debugging command to debug recording

1, load the driver

insmod /system/lib/modules/wlan.ko

Note: If the / data / misc / wifi or have under / data / misc / wifi / sockets wlan0 delete

2, loading wpa_supplicant (STA mode)

wpa_supplicant -iwlan0 -Dnl80211 -c / etc / wifi / wpa_supplicant.conf -d -B // - B is running in the background

Is there / data misc wifi under View / data / misc / wifi or / / / sockets directory wlan0

3, run wpa_cli

The temporary socket wpa_supplicat created to pass parameters -g Road King behind
wpa_cli -iwlan0 -g / Data / Misc / WiFi / Sockets / wlan0
-> Scan
-> scan_result (display device has been searched)
-> add_network (a return Reference behind set_network and enable_network with this need)
-> set_network 0 SSID "route name" (0 is returned above number)
-> set_network 0 PSK "routing password"
-> enable_network 0
-> status (See state, if the connection can see CONNECTED)

4, if it is the main interface, open wifi, then wpa_supplicant service has been identified with, you can use adb command information check the WIFI.

WIFI accumulation of ADB command:
1, Status to view the current status of WIFI
adb shell wpa_cli -iwlan0 -g @ android: wpa_wlan0 IFNAME = wlan0 status

2、terminate   立即关闭 wpa_supplicant   // 关闭WIFI
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 terminate
list_networks  连接过的WIFI  
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 list_networks

3, select_network provided connected to the corresponding hotspot hotspot hotspot nitid disconnected again connected to NetID
the adb the shell wpa_cli -iwlan0 Android @ -g: 2 wpa_wlan0 IFNAME = wlan0 select_network


Hot 4.select_network provided in connection to the corresponding hotspot hotspot nitid disconnected again connected to NetID
the adb the shell wpa_cli -iwlan0 Android @ -g: 2 wpa_wlan0 IFNAME = wlan0 select_network

5,5.disable_network disconnect hotspot disconnected and then connected to the default
adb shell wpa_cli -iwlan0 -g @ android: wpa_wlan0 IFNAME = wlan0 disable_network 5

6.signal_poll      get signal parameters
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 signal_poll


7.pktcnt_poll  get TX/RX packet counters
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 pktcnt_poll


8. DRIVER MACADDR 获得MAC地址
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 DRIVER MACADDR
Macaddr = 5c:a8:6a:e5:cb:cd

9.reassociate 重连接
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 reassociate 

10.reattach reconnection currently connected the WIFI
the adb the shell wpa_cli -iwlan0 -g @ Android: wpa_wlan0 IFNAME = wlan0 the reattach

11.ifname view the current use of the card
adb shell wpa_cli -iwlan0 -g @ android: wpa_wlan0 IFNAME = wlan0 ifname

12.interface interfaces currently available
adb shell wpa_cli -iwlan0 -g @ android: wpa_wlan0 IFNAME = wlan0 interface

Whether 13.ping detection Supplicant normal
adb shell wpa_cli -iwlan0 -g @ android: IFNAME = wlan0 ping wpa_wlan0

14, add_network save a network (unknown parameters)
the adb the shell wpa_cli -iwlan0 -g @ Android: wpa_wlan0 IFNAME = XXXX wlan0 add_network

15.remove_network
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 remove_network 6

16.disconnect opening paragraph is currently connected
adb shell wpa_cli -iwlan0 -g @ android: wpa_wlan0 IFNAME = wlan0 disconnect

17.reconnect connect again if you have no connection to perform
adb shell wpa_cli -iwlan0 -g @ android: wpa_wlan0 IFNAME = wlan0 reconnect

18.scan 启动扫描
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 scan


19.scan_results get the latest scan results
adb shell wpa_cli -iwlan0 -g @ android: wpa_wlan0 IFNAME = wlan0 scan_results

20.bss view hot details 
adb shell wpa_cli -iwlan0 -g @ android:  wpa_wlan0 IFNAME = wlan0 bss 70: 62: b8: 62: 2e: c4

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 bss cts


21.get_capability  <eap/pairwise/group/key_mgmt/proto/auth_alg/channels/freq/modes> = get capabilies

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 get_capability eap
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 get_capability pairwise
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 get_capability group
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 get_capability proto
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 get_capability auth_alg
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 get_capability channels
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 get_capability freq
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 get_capability mode
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 get_capability

22.relog
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 relog


23.mib
adb shell wpa_cli -iwlan0 -g @ Android: wpa_wlan0 IFNAME = wlan0 MIB (Manager Info Base) underlying database

24.help
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 help 

26.dump 查看变量
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 dump 


27. log_level 
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 log_level 

28.reconfigure 重新配置   reconfigure = force wpa_supplicant to re-read its configuration file

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 reconfigure


29.scan_interval scanning interval setting
adb shell wpa_cli -iwlan0 -g @ android: wpa_wlan0 IFNAME = wlan0 scan_interval 3

30.blacklist 黑名单
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 blacklist

31.DRIVER GET_STA_STATISTICS <MACADDRESS> view the phone STA information

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 DRIVER GET_STA_STATISTICS 5c:a8:6a:e5:cb:cd


32. set set command to set environment variables (dump in the variable)

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0  set passive_scan  1

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0  set oce  1

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0  set okc  1

33: get get command to query the environment variables (dump in the variable)
adb shell wpa_cli -iwlan0 -g @ Android: wpa_wlan0 IFNAME = wlan0 GET passive_scan

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0  get oce

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0  get  okc

========================================================================================

34:pmksa [show PMKSA cache]

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 pmksa_flush  [ok]
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 pmksa

35:preauthenticate [预先认证] 
adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0 preauthenticate 18:64:72:21:86:43

37: log_level [DEBUG | INFO] [level] Set LOG 

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0  log_level

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0  log_level   DEBUG

adb shell wpa_cli -iwlan0 -g@android:wpa_wlan0 IFNAME=wlan0  log_level   INFO

 

Guess you like

Origin blog.csdn.net/jinron10/article/details/92798419
Recommended