#!/usr/bin/python
import atx
d = atx.connect() print('CellPhone serial number:',d.serial)
运行结果
已经解决了,结果是因为自己电脑上有安装了 ansicon 工具,这个工具会影响 utf-8 的编码,删掉之后就正常了
init 一下就好了
可能 adb 太多
使用 python -m uiautomator2 init init 的时候出现:subprocess.CalledProcessError: Command 'adb -s 127.0.0.1:7555 shell getprop ro.build.version.sdk' returned non-zero exit status 1 但是单独使用 adb -s 127.0.0.1:7555 shell getprop ro.build.version.sdk 可以正常获取系统 api 版本,这个又是怎么回事呢?
确定只有一个 adb.exe,还是这样
你这是模拟器呀,换个真机试试?
真机也试过,一样的,用的华为 mate7
大佬,我手动 init 了,但是 weditor 还是连接不上设备,请问这个报错又是什么意思呢?
你是不是忘记点 connect 了
connect 连接不上,提示 Device(192.168.4.157:7912) not attached。 手动 init 使用的这种方法,是对的吗? 用手机下载 app-uiautomator.apk 和 app-uiautomator-test.apk 下载对应架构 atx-agent 包(https://github.com/openatx/atx-agent/releases) 下载的是:atx-agent_0.2.1_linux_armv7.tar.gz 可以终端运行 adb shell cat /proc/cpuinfo 查看手机架构
解压后,在 atx-agent 文件目录运行下面的代码 adb push atx-agent /data/local/tmp adb shell chmod 755 /data/local/tmp/atx-agent adb shell /data/local/tmp/atx-agent -d 以上运行完之后手机屏幕闪了一下 “hello world”,这样是成功了吗?
你加下 qq 群问吧 497460177