8种机械键盘轴体对比
本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选?
Android Debug Bridge,我们一般简称为adb,主要存放在sdk安装目录下的platform-tools文件夹中,它是一个非常强大的命令行工具,通过这个工具你能够与你的android设备进行交互。
adb常用命令
adb命令的使用格式:
adb [-d|-e|-s ]
adb是必须的,接下来方括号[]里面的内容不是必须的,最后才是我们需要执行的命令操作,例如 adb -s 6e712dda install xxx.apk (这是安装某应用的意思)
下面先介绍下,前面几个参数的含义吧:-d: 让唯一连接到该PC端的真实安卓设备执行命令,如果发现USB中连接有多部设备,将会报错
-e: 让唯一连接到该PC端的模拟器执行命令,如果发现开启了多个模拟器,将会报错
-s:通过设备的序列号进行指定设备执行命令
如果设备只连接有一个设备或者一个模拟器的时候,可以不用声明这三个参数,adb默认会让这部唯一连接到的设备进行命令执行
1.查看当前PC端链接有多少设备
adb devices
2.查看adb的版本
adb version
3.给设备进行软件的安装
adb -s install
adb -s shell pm install -r 表示本次安装是重新安装,会保留用户数据
4.卸载设备中已经安装的软件
adb -s uninstall
adb -s uninstall -k 表示卸载软件后依然保留用户数据
5.将数据从设备复制到PC中
adb -s pull
eg: adb -s 6e712dda pull /sdcard/baidu D://
6.讲数据从PC端复制到设备中
adb -s push
eg: adb -s 6e712dda push d://baidu /sdcard/
7.获取连接到的手机的序列号
adb get-serialno
8.获取设备的连接状态
adb -s get-state
9.等待设备连接成功
adb wait-for-device
10.adb-server的开启与关闭
adb kill-server
adb start-server
adb 执行shell命令
Android的内核本身是Linux,所以Android本身也支持Linux命令
1.adb shell来进行命令的发送与执行
adb shell
2.adb shell打开某一个APP
adb shell am start com.tencent.mm/com.tencent.mm.ui.LauncherUI
3.查看一个apk所在路径
adb shell pm path
4.查看手机中安装的所有的包
pm list package
查看手机中某一应用的包名a.清除logcat内容,使用命令adb logcat -c
b.启动logcat,使用命令adb logcat ActivityManager:I *:s
c.启动要查看的程序
5.清空数据
adb shell pm clear
adb shell pm clear com.mobile.security
其他常用的adb命令
1.屏幕截图
adb shell screencap /sdcard/screen.png
2.屏幕录制
adb shell screenrecord /sdcard/demo.mp4
3.关闭设备请求,开启设备
adb shell stop
adb shell start
4.设备关机以及重启
adb reboot
adb shutdown
4.adb shell input
4.1模拟输入文本
adb shell input text 'hello,world'
4.2模拟键盘的输入
adb shell input keyevent 67
4.3模拟屏幕滑动(swipe)
adb shell input swipe 0 20 300 500 #意思从屏幕(0,20)滑动到(300,500)
4.4模拟屏幕轻触(tap)
adb shell input tap 100 400