赞
踩
adb 帮助
adb --help
#启动adb 服务
adb start-server
#关闭adb服务
adb kill-server
#获取设备号
adb devices
#获取系统版本号
adb shell getprop ro.build.version.release
#发送PC文件到手机端
adb push C:\Users\XXX\Desktop\xx.png /sdcard
#手机端拉取到PC
adb pull /sdcard/xx.png C:\Users\XXX\Desktop
#进入终端命令行
adb shell
adb -s 192.168.11.102:5555 shell # 进入指定的设备
#主动连接设备,设备名
adb connect 设备名
adb connect 127.0.0.1:62001 # 4.1版本
#主动断开连接
adb disconnect 设备名
#安装卸载app
adb install 路径/xx.apk
adb uninstall 包名
#获取包名启动名
adb shell dumpsys window windows | findstr mFocusedApp
aapt dump badging 安装包路径 【只有安装包获取包名与启动】
#获取手机运行日志
adb logcat
ADB命令启动WiFi
初始操作:
insmod /system/lib/modules/wlan.ko //加载驱动模块
start wpa_supplicant //启动wpa_supplicant
扫描热点:
wpa_cli -iwlan0 scan
wpa_cli -iwlan0 scan_results
添加热点:
wpa_cli -iwlan0 add_network 0
wpa_cli -iwlan0 set_network 0 ssid “360wifi”
wpa_cli -iwlan0 set_network 0 psk “123456”
wpa_cli -iwlan0 save_config
wpa_cli -iwlan0 add_network 1
wpa_cli -iwlan0 set_network 1 ssid “360wifi2”
wpa_cli -iwlan0 set_network 1 psk “000000”
wpa_cli -iwlan0 save_config
连接wifi:
wpa_cli -iwlan0 list_network //列出可用wifi
wpa_cli -iwlan0 select_network 0 //选择第0个热点
wpa_cli -iwlan0 enable_network 0 //使能第0个热点
dhcptool wlan0 //启用动态地址分配
断开wifi:
ifconfig wlan0 down
killall wpa_supplicant
删除已保存热点:
wpa_cli -iwlan0 list_network
wpa_cli -iwlan0 remove_network 0 //删除第0个热点
wpa_cli -iwlan0 save_config
其他:
保存的热点信号存储在路径/data/misc/wifi/wpa_supplicant.conf
start wpa_supplicant启动的服务在如下:
device/qcom/common/rootdir/etc/init.qcom.rc
service wpa_supplicant /system/bin/wpa_supplicant
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
-I/system/etc/wifi/wpa_supplicant_overlay.conf
-O/data/misc/wifi/sockets -dd
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。