美文网首页
使用adb通过wifi连接手机

使用adb通过wifi连接手机

作者: 夏树的宝马 | 来源:发表于2017-06-08 12:35 被阅读34次

由于公司的破电脑使得无法通过usb连接手机,然后百度了一下,
1.确保手机root 才行,根据百度经验, 我是用的是完美root
2.然后安装Wireless ADB
3.最后就可以使用adb connect ip:端口
4.需要 adb shell input keyevent 26 唤醒手机 但需要在root才行
5.adb shell input swipe 200 50 200 500 滑动解锁 貌似不行
6.如果有多台设备,可以加参数-s,例如:
adb -s 127.0.0.1:26944 shell am start -n ranorex.android.services/ranorex.android.services.activity.MainActivity

7.获取屏幕分辨率 adb shell dumpsys window displays
windows 下 adb shell dumpsys window displays |findstr cur
或者 adb shell wm size

为了测试方便 我们可以新建一个文档".bat",然后双击就可以截图了,代码如下,又是一个装逼的利器

adb connect 172.16.100.155:5555 

adb shell /system/bin/screencap -p /sdcard/screenshot.png
adb pull /sdcard/screenshot.png  C:\Users\Administrator\Desktop\image\1

相关文章

网友评论

      本文标题:使用adb通过wifi连接手机

      本文链接:https://www.haomeiwen.com/subject/rawlxxtx.html