赞
踩
# 电源键 adb shell input keyevent 26 # 菜单键 adb shell input keyevent 82 # HOME 键 adb shell input keyevent 3 # 返回键 adb shell input keyevent 4 # 音量+ adb shell input keyevent 24 # 音量- adb shell input keyevent 25 # 静音 adb shell input keyevent 164
# 播放/暂停 adb shell input keyevent 85 # 停止播放 adb shell input keyevent 86 # 播放下一首 adb shell input keyevent 87 # 播放上一首 adb shell input keyevent 88 # 恢复播放 adb shell input keyevent 126 # 暂停播放 adb shell input keyevent 127
- # 点亮屏幕
- adb shell input keyevent 224
-
- # 熄灭屏幕
- adb shell input keyevent 223
- # x,y为坐标位置
- adb shell input tap <X> <Y>
四个参数:起始点 x 坐标 起始点 y 坐标 结束点 x 坐标 结束点 y 坐标
- # 向上滑动
- adb shell input swipe 300 1000 300 500
-
- # 向下滑动
- adb shell input swipe 300 100 300 1000
-
- # 向左滑动
- adb shell input swipe 1000 500 200 500
-
- # 向右滑动
- adb shell input swipe 200 500 1000 500
adb exec-out screencap -p > sc.pn
截图保存到电脑执行该命令的目录下
如果指定文件名以 .png 结尾时可以省略 -p 参数
如果 adb 版本较老,无法使用 exec-out 命令,建议更新 adb 版本
也可以用下面的步骤来完成
- # 先截图保存到设备里 adb shell screencap -p /sdcard/sc.png
- # 然后将 png 文件导出到电脑 adb pull /sdcard/sc.png
- # 录制屏幕以 mp4 格式保存到 /sdcard adb shell screenrecord /sdcard/filename.mp4
- # 导出到电脑 adb pull /sdcard/filename.mp4
需要停止时按 Ctrl-C,默认录制时间和最长录制时间都是 180 秒
adb shell cat /data/misc/wifi/*.conf
adb shell pm list packages -s
- adb shell pm path 包名
-
- 【如:adb shell pm path com.seewo.rainbow.pro】
adb root adb remount
adb shell rm 包名地址
adb shell rm -r /data/app/com.seewo.rainbow.pro-1
adb reboot
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。