adb

appium实现adb命令 截图和清空EditText

大城市里の小女人 提交于 2020-02-19 07:33:07
原文地址http://www.cnblogs.com/tobecrazy/p/4592405.html 原文地址http://www.cnblogs.com/tobecrazy/ 该博主有很多干货,可以多去研究研究 adb基本命令总结(Android Debug Bridge) adb 是PC和设备连接的桥梁,可以通过adb对devices进行相关操作 adb devices 列出你的devices adb kill-server 杀掉adb服务(如果设备连接出问题,可尝试) adb start-server 重启adb服务 adb shell 进入默认device的Linux shell,可以直接执行Linux命令 adb shell screenrecord /sdcard/runCase.mp4 录制视频保存,默认3min,也可以加--time-limit 60限制时间 adb install jd.apk 向设备安装app adb pull /sdcard/runCase.mp4 c:// 把手机中文件copy到电脑 adb push C://runCase.mp4 /sdcard/ 把电脑中文件放到手机 以上就是一些基本的adb 命令 利用adb命令先切换为自己的输入法,按了搜索再切换为appium的输入法 查看当前手机的输入法 cmd执行下面的的代码 adb shell

android - format json string in adb logcat output

不羁岁月 提交于 2020-02-18 05:45:52
问题 For logging purpose, I print out json response string and can see them in android "adb logcat" command. Is there a way to nicely format the json string in adb logcat output so that it looks like this? { "code" : "0", "text" : "hello world" } 回答1: You can use the JSONObject.toString() method to pretty print the JSON on logcat. Log.d("tag", jsonObject.toString(4)); Output (29124): { (29124): "text": "hello world", (29124): "code": "0" (29124): } 回答2: I don't pretty print the JSON message in

android - format json string in adb logcat output

微笑、不失礼 提交于 2020-02-18 05:44:28
问题 For logging purpose, I print out json response string and can see them in android "adb logcat" command. Is there a way to nicely format the json string in adb logcat output so that it looks like this? { "code" : "0", "text" : "hello world" } 回答1: You can use the JSONObject.toString() method to pretty print the JSON on logcat. Log.d("tag", jsonObject.toString(4)); Output (29124): { (29124): "text": "hello world", (29124): "code": "0" (29124): } 回答2: I don't pretty print the JSON message in

ubuntu16.04更新adb到最新版本

老子叫甜甜 提交于 2020-02-17 19:07:51
下载SDK工具包 https://developer.android.com/studio/releases/platform-tools.html?hl=zh-cn 下载后解压工具包 里面有adb 和fastboot 系统的adb和fastboot原本装在/usr/bin 先把系统中的adb和fastboot删除 sudo rm adb sudo rm fastboot 把工具包中的adb和fastboot复制到/usr/bin/下 进入工具包目录 cd /home/mi/Downloads/platform-tools sudo cp adb /usr/bin sudo cp fastboot /usr/bin 再命令行输入adb时,adb已经替换为最新版本,目前时1.0.41 来源: CSDN 作者: XingTina 链接: https://blog.csdn.net/XingTina/article/details/104358399

macOS下通过adb安装apk到android手机

岁酱吖の 提交于 2020-02-16 21:29:39
homebrew是macOS的一个包管理工具 1、安装homebrew ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” 2、安装adb brew cask install android-platform-tools 3、运行adb adb devices 指令安装apk到android手机 (1)手机连接usb,并打开USB调试 (2)下载apk到mac上 (3)终端安装 安装指令如下: 首次安装:adb install xxx/xxx/xxx(apk路径)【拖动apk至终端即可获取apk路径】 覆盖安装:adb install -r xxx/xxx/xxx(apk路径) 参考 https://www.jianshu.com/p/69ba21b2996c https://www.cnblogs.com/mini-monkey/p/11556506.html 来源: CSDN 作者: weixin_g632637774 链接: https://blog.csdn.net/glw0223/article/details/104343462

Android 调试桥介绍 (adb)

左心房为你撑大大i 提交于 2020-02-15 15:12:08
Android 调试桥 adb ( Android Debug Bridge)是一个通用命令行工具,其允许您与模拟器实例或连接的 Android 设备进行通信。它可为各种设备操作提供便利,如安装和调试应用。 Tips: 在 android_sdk/platform-tools/ 中找到 adb 工具,然后根据其具体的路径配置好环境变量。然后启动cmd 输入‘adb’即可查看是否配置成功。 adb 的工作原理 启动一个 adb 客户端时,此客户端首先检查是否有已运行的 adb 服务器进程。如果没有,它将启动服务器进程。当服务器启动时,它与本地 TCP 端口 5037 绑定,并侦听从 adb 客户端发送的命令—所有 adb 客户端均使用端口 5037 与 adb 服务器通信。 启用 adb 调试 要在通过 USB 连接的设备上使用 adb,您必须在设备系统设置中启用 USB debugging(位于 Developer options 下)。 在运行 Android 4.2 及更高版本的设备上,Developer options 屏幕默认情况下处于隐藏状态。如需将其显示出来,请转到 Settings > About phone 并点按 Build number 七次。返回上一屏幕,在底部可以找到 Developer options。 注:当您连接运行 Android 4.2.2

flutter环境搭建

我的未来我决定 提交于 2020-02-13 08:08:25
1、下载flutter sdk,放置到正常的路径中 2、AS版本用的是3.2.x,2.2的版本不行 3、AS安装插件 4、adb经常异常停止 调试报错Error retrieving device properties for ro.product.cpu.abi:,升级sdk tool 参见 https://www.cnblogs.com/gavin1024/p/11004750.html 来源: https://www.cnblogs.com/ynhi/p/12302165.html

使用电脑adb给Essential Phone刷机 —(官方篇)

假装没事ソ 提交于 2020-02-11 02:41:25
用ADB给Essential Phone线刷升级 重要:请确保在刷机前已经解锁,关于解锁教程群里有! 准备 原版boot Twrp boot Magisk卡刷包 到官网下载OTA包 准备好Essential Phone的adb环境或到群里下载紫妈工具箱 (已准备好的话跳过下面这两步) 获取资源 获取原版boot 解压官方fastboot包,找到解压出来的文件夹,找到boot.img 获取twrp boot 点击 提取码:asp2 下载Twrp, 将下载好的文件改名为 twrp 下载Magisk 点击 Magisk V18.0 密码:85pq 下载Magisk V18.0 下载OTA包 使用ssr等工具进入官网 EP官网 找到Community菜单,进入该菜单项的Developer选项 到左边找到Go to page标题,选择Android Builds for Essential Phone进入 滚轮滑到最下面,选择Current Builds单选项并按Submit Form (省略前三部请单击 这里 ) (到这里会出现所有的刷机包) 点击Download(OTA)或者点击Download(Fastboot) 准备ADB环境 在"下载OTA包"第四步那里点击Click here to download current Windows Drivers for Essential

Android (Android Studio)adb启动失败 无法启动adb 解决方案

五迷三道 提交于 2020-02-10 14:29:16
Android (Andorid Studio)adb启动失败 无法启动adb 解决方案 ↑出错截图↑ 下面是解决方案: 打开cmd--------------------------------------------------- 输入: netstat -aon|findstr "5037" 回车 5037 这是adb要的端口,有时候会被其他进程(程序)占用了(一般是会连接手机的软件) 所以要查询是谁占用了,然后就可以Kill(停止)它; 根据上图然后输入 taskkill /pid 1156 /f (1156就是占用此端口的进程id) 需要注意的是 有时候会查询到很多的进程(我一般选第一个,不行的话全部试一次,暂时没有准确的方法,后续更新!!) 现在就可以使用adb了 原文链接: https://blog.csdn.net/Sky_851601746/article/details/43155933 来源: https://www.cnblogs.com/qiantao/p/12290636.html

运用adb调试Android Apk

僤鯓⒐⒋嵵緔 提交于 2020-02-10 07:46:20
1.安装ADB https://pan.baidu.com/s/13MX3NIF4-0Sgs_HaK_doUw 提取码:aapz 将解压后的platform-tools文件夹放在一个合适目录内,为了方便我直接放在了C:\Users\Admin目录内,并且配置 ANDROID_SDK_HOME环境变量,路径到platform-tools目录 2.cmd跳转到adb.exe上层目录,输入adb查看是否运行成功adb 3.打开手机开发者选项,打开USB调试 4.输入: adb devices 查看以连接的设备 (device表示已连接, unauthorized 表示未授权) 未授权请查看手机权限弹窗(勾选一律允许使用这台计算机进行调试) 或者 检查USB调试和开发者选项是否打开 如果还不行参考第7步 5.输入:add install -r apk包路径(或者直接拖拽) 等待片刻出现success表示安装完成,手机已成功安装该应用 6.输入: adb logcat :打印Android所有Log adb logcat -s Unity :过滤Unity的Log 运行应用,可以查看unity输出的Log ps:若没打开unity应用而输出unity相关Log可能为以前调试文件留下的日志,请留意 7.未授权,无弹框解决方法 参考 https://jingyan.baidu.com