adb

记一次在termux上部署python+uiautomator2实现手机上直接跑代码

旧时模样 提交于 2020-01-30 12:34:01
termux的安装 参考Termux 入门与实践 - 简书 https://www.jianshu.com/p/6fd84cc74a5e 一定记得执行termux-setup-storage给访问内部存储权限 安装Python及其相关依赖库 pkg upgrade pkg install python pip install cython pkg install libxml2 libxslt pkg install -y python ndk-sysroot clang make libjpeg-turbo pkg install clang pip install lxml pip install --pre uiautomator2 没有报错既安装成功 termux里安装adb 1.下载adb文件解压 链接: https://pan.baidu.com/s/1FjS67MuALc2NuRfR3IsWug 提取码:lppk 2.mv storage/xxxx/arm/adb $PREFIX/bin xxxx代表你的具体路径;$PREFIX/bin为固定值 3.chmod +x $PREFIX/bin/adb 给adb可执行权限 4.在termux里面输入adb,弹出相关参数即正常 运行基于uiautomator2编写的代码 1.手机数据线开usb调式连上安装termux的手机

usb debugging with micromax unit a092 in ubuntu 12.04

让人想犯罪 __ 提交于 2020-01-30 12:21:16
问题 I am using Micromax Unite A092, for USB debugging in Ubuntu 12.04. I enabled "USB debugging" from developer options and "connected as a media device". But ./adb devices does not show it. I tried SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="7f10", MODE="0666" writing in /etc/udev/rules.d/51-android.rules but no luck. The output of lsusb is- Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate

usb debugging with micromax unit a092 in ubuntu 12.04

六月ゝ 毕业季﹏ 提交于 2020-01-30 12:21:07
问题 I am using Micromax Unite A092, for USB debugging in Ubuntu 12.04. I enabled "USB debugging" from developer options and "connected as a media device". But ./adb devices does not show it. I tried SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="7f10", MODE="0666" writing in /etc/udev/rules.d/51-android.rules but no luck. The output of lsusb is- Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate

Is it possible to install APK through adb if the file is on the android device?

北城余情 提交于 2020-01-30 08:37:27
问题 Usually if the apk is on my desktop, I would use adb install <path> to get it on my Android device. Somehow I like to know if it is also possible if the apk is on the device. I imagine adb shell would be a start, sadly tho, install <path> afterward doesn't seem to work. 回答1: adb shell pm install /location/apk.apk // if you want to remove the installation package rm /location/apk.apk 来源: https://stackoverflow.com/questions/45412622/is-it-possible-to-install-apk-through-adb-if-the-file-is-on

Android studio: Unable to detect adb version, exit value 0xc0000135

☆樱花仙子☆ 提交于 2020-01-30 08:09:26
问题 When I connect my mobile with PC, android studio says Unable to detect adb version, exit value 0xc0000135. what to do? 回答1: Windows adb binaries included with the latest Google official platform-tools package require Universal C Runtime v1.1.0 libraries. The easiest way to get them is to install Visual C++ Redistributable Package for Visual Studio 2015. 来源: https://stackoverflow.com/questions/58629191/android-studio-unable-to-detect-adb-version-exit-value-0xc0000135

Android studio: Unable to detect adb version, exit value 0xc0000135

一笑奈何 提交于 2020-01-30 08:09:24
问题 When I connect my mobile with PC, android studio says Unable to detect adb version, exit value 0xc0000135. what to do? 回答1: Windows adb binaries included with the latest Google official platform-tools package require Universal C Runtime v1.1.0 libraries. The easiest way to get them is to install Visual C++ Redistributable Package for Visual Studio 2015. 来源: https://stackoverflow.com/questions/58629191/android-studio-unable-to-detect-adb-version-exit-value-0xc0000135

Android Debug Bridge 服务详解

我们两清 提交于 2020-01-30 01:46:53
本文尝试列举客户端能够发送给ADB服务器的所有请求。关于adb客户端、adb服务器、adbd守护进程、adb服务的概念,以及这些组件如何相互配合完成ADB工作的细节,请参考之前发的文章《Android Debug Bridge 技术实现》。 ============================== 主机服务 ============================== host:version 请求ADB服务器的内部版本号。作为一个特殊的例外,服务器将用4字节的十六进制字符串回应,返回服务器内部版本号,回应中没有“OKAY”和“FAIL”。 host:kill 请求ADB服务器立即退出。用于ADB客户端检测到在升级之后有废弃的ADB服务器仍在运行的情况。 host:devices 请求返回可用的Android设备及其状态的列表。在“OKAY”之后是4个字节的长度定义,然后是指定长度的表明当前设备状况的字符串,返回之后连接关闭。 host:track-devices “host:devices”的一个变种,它不关闭连接;相反,每次添加或移除设备或者指定设备的状态发生变化,一个新的设备列表描述被发送。这就使得像DDMS这样的工具能够实时跟踪连接设备的状态,而不用重复轮训服务器。 host:emulator:<port> 这是一个特殊的请求,当启动一个新的模拟器时

adb forward remote port to local machine

会有一股神秘感。 提交于 2020-01-28 14:11:37
问题 This is a query regarding the usage of adb on android. Is there a way to forward the remote port i.e. port on the android device/emulator to the local machine to which the device is connected? $ adb forward tcp:port1 tcp:port2 # forwards the local port port1 on the machine to port2 on the device. Thanks in advance! 回答1: Recently google updated ADB service. And added reverse command that should do the job. From reverse documentation: This implements the adb reverse feature, i.e. the ability to

adb logcat 查看日志

妖精的绣舞 提交于 2020-01-28 12:08:12
使用 logcat 命令 查看和跟踪系统日志缓冲区的命令logcat的一般用法是: [adb] logcat [<option>] ... [<filter-spec>] ...    下文介绍过滤器和命令选项,详细内容可参见 Listing of logcat Command Options 。    可以在开发机中通过远程shell的方式使用logcat命令查看日志输出: $ adb logcat    如果是在远程shell中可直接使用命令: # logcat    过滤日志输出 每一条日志消息都有一个标记和优先级与其关联。 标记是一个简短的字符串,用于标识原始消息的来源 (例如"View" 来源于显示系统)。 优先级是下面的字符,顺序是从低到高: V — 明细 (最低优先级) D — 调试 I — 信息 W — 警告 E — 错误 F — 严重错误 S — 无记载 (最高优先级,没有什么会被记载)    通过运行logcat ,可以获得一个系统中使用的标记和优先级的列表,观察列表的前两列,给出的格式是<priority>/<tag>。    这里是一个日志输出的消息,优先级是“I”,标记是“ActivityManager”: I/ActivityManager( 585): Starting activity: Intent { action=android.intent

adb logcat 查看日志

邮差的信 提交于 2020-01-28 00:11:24
使用 logcat 命令 查看和跟踪系统日志缓冲区的命令 logcat 的一般用法是: [adb] logcat [<option>] ... [<filter-spec>] ...     下文介绍过滤器和命令选项,详细内容可参见 Listing of logcat Command Options 。    可以在开发机中通过远程 shell 的方式使用 logcat 命令查看日志输出: $ adb logcat    如果是在远程 shell 中可直接使用命令: # logcat    过滤日志输出 每一条日志消息都有一个标记和优先级与其关联。 标记是一个简短的字符串,用于标识原始消息的来源 ( 例如 "View" 来源于显示系统 ) 。 优先级是下面的字符,顺序是从低到高 : V — 明细 ( 最低优先级 ) D — 调试 I — 信息 W — 警告 E — 错误 F — 严重错误 S — 无记载 ( 最高优先级,没有什么会被记载 )    通过运行 logcat ,可以获得一个系统中使用的标记和优先级的列表,观察列表的前两列,给出的格式是 <priority>/<tag> 。    这里是一个日志输出的消息,优先级是“ I ”,标记是“ ActivityManager ”: I/ActivityManager( 585): Starting activity: Intent