adb

Ubuntu 配置 Android开发 adb调试

让人想犯罪 __ 提交于 2020-01-10 11:07:23
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Ubuntu/Linux setup device/android for adb 参考官方说明 在Ubntu下开发Android开发调试JNI比Windows下用Cygwin方便,现总结下简单配置 In the AndroidManifest.xml file, add android:debuggable="true" to the <application> element. Enable USB debugging on your device Set up your system to detect your device 添加一个相应规则 create this file: /etc/udev/rules.d/51-android.rules 从官方查 USB Vendor IDs ,比如华为是 12d1 SUBSYSTEM=="usb", ATTR{idVendor}=="<USB Vendor ID>", MODE="0666", GROUP="plugdev" Now execute: chmod a+r /etc/udev/rules.d/51-android.rules restart adb adb kill-server adb devices # start and list

adb命令对安卓apk的测试

为君一笑 提交于 2020-01-10 08:09:57
adb命令对安卓apk测试 adb的全称为Android Debug Bridge,就是起到调试桥的作用,是客户端测试常用的辅助工具。借助adb工具,我们可以管理设备或手机模拟器的状态。还可以进行很多终端操作,如安装软件、卸载软件、系统升级、运行shell命令等。adb就是Android终端(如手机/机顶盒)与PC端的桥梁,可以让用户在电脑上对手机进行全面的操作、记录终端操作日志。同时还可以使用adb命令在真机上对安卓包进行压测、崩溃日志查看等。 1 环境安装及配置 1.1 安装sdk环境 直接复制压缩包并解压到电脑本地后,包含以下文件 1.2 path环境配置 选中计算机–>点击右键–>选择【属性】–>【高级系统设置】–>【环境变量】,新建/修改变量 添加以下系统变量信息 ANDROID_HOME:E:\AppAuto\Sdk(sdk的安装目录) path:;%ANDROID_HOME%;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools; 1.3 验证android环境 运行cmd 输入“android -h”,出现下图即环境搭建成功 1.4 验证adb运行环境 步骤1.1中的压缩包是包含adb的运行程序的,先在cmd中运行adb检查是否可用,出现下图即环境搭建成功 如果运行不成功,单独复制adb的运行程序到C:\Windows

HBuilderX连接夜神模拟器

孤街醉人 提交于 2020-01-10 06:53:36
首先您的电脑上需要安装 HBuilderX 与 夜神模拟器; 第一步:找到HBuilderX的adbs.exe路径配置环境变量(新建一个路径HBuilderXPath,单独存放) 第二步:在系统变量中找到 Path 将上面新建的HBuilderX的路径配置名称(%HBuilderXPath%) 拼接在path 内容中 第三部:找到模拟器bin下debugReport.but运行查看模拟器端口号 第四部:检验环境变量 ,查看 adb 的版本测试是否能使用;使用 adb命令 查看 连接的设备( adb devices )(List of devices attached 设备列表);使用adb命令 让模拟器连接上电脑 ( adb connect ) 第五部:到HBuilderX编辑器点击运行 -> 运行到手机或模拟器 -> ADB路径设置(A) 第六部: 重启夜神模拟器和HBuilderX编辑器 来源: CSDN 作者: 花_街 链接: https://blog.csdn.net/qq_39251440/article/details/103818112

Android ADB Server启动失败

早过忘川 提交于 2020-01-10 04:59:49
启动Android Stdio的时候报如下错误: Unable to create Debug Bridge: Unable to start adb server: error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: 閫氬父姣忎釜濂楁帴瀛楀湴鍧�(鍗忚/缃戠粶鍦板潃/绔彛)鍙厑璁镐娇鐢ㄤ竴娆°�� (10048) could not read ok from ADB Server * failed to start daemon * error: cannot connect to daemon 'D:\adt-bundle-windows-x86_64-20140624\sdk\platform-tools\adb.exe,start-server' failed -- run manually if necessary   然后模拟器列表为空了,找不到先前建立的模拟器了。然后百度查询了下方法,记录下。 原因是5037端口被占用了。 解决方法:就是找到谁占用了一个端口,然后把该程序关掉。 1、打开cmd窗口,进入adb.exe所在的文件夹目录 如 cd D:\adt-bundle-windows-x86_64-20140624\sdk\platform-tools

How to show soft keyboard on Android Things?

强颜欢笑 提交于 2020-01-09 10:07:19
问题 I'm trying to show soft keyboard on Android Things , Raspberry Pi 3 . I tried the methods below, but not succeeded so far: <activity ... android:windowSoftInputMode="stateAlwaysVisible"> and <EditText ... android:inputType="numberDecimal"/> Does Android Things 7.0 support soft keyboard, or am I missing something? 回答1: Update II : there is a bug with Dev Preview 5.1 when Google's soft keyboard doesn't show up at all. Update : starting with Dev Preview 4 the Android Things image is shipped with

How to show soft keyboard on Android Things?

六眼飞鱼酱① 提交于 2020-01-09 10:07:09
问题 I'm trying to show soft keyboard on Android Things , Raspberry Pi 3 . I tried the methods below, but not succeeded so far: <activity ... android:windowSoftInputMode="stateAlwaysVisible"> and <EditText ... android:inputType="numberDecimal"/> Does Android Things 7.0 support soft keyboard, or am I missing something? 回答1: Update II : there is a bug with Dev Preview 5.1 when Google's soft keyboard doesn't show up at all. Update : starting with Dev Preview 4 the Android Things image is shipped with

ADB Receive broadcast BOOT_COMPLETE

妖精的绣舞 提交于 2020-01-09 05:03:46
问题 I want to wait until the android mobile phone has started and the MediaScanner is done. Afterwards I want to perform an action using adb. adb wait-for-device will finish much before the boot sequence of the cell phone is done. How to capture e.g. BOOT_COMPLETE Broadcast via ADB? Something like: wait-for-boot-complete. I don know whether this is possible? 回答1: You can keep polling for sys.boot_completed or dev.bootcomplete system properties. As for the code, I do not know what environment and

Android: adb pull file on desktop

半腔热情 提交于 2020-01-09 04:16:33
问题 Trying to copy file from device to desktop, here is a command: adb pull sdcard/log.txt Users/admin/Desktop But this command creates a folder Users/admin/Desktop inside platform-tools folder where adb is located. How to pull file to my desktop ? 回答1: Use a fully-qualified path to the desktop (e.g., /home/mmurphy/Desktop ). 回答2: Judging by the desktop folder location you are using Windows. The command in Windows would be: adb pull /sdcard/log.txt %USERPROFILE%\Desktop\ 回答3: do adb pull \sdcard

adb connection by wifi getting killed when a new USB attached/detached

浪尽此生 提交于 2020-01-08 17:20:11
问题 I develop on my tablet using android studio . The tablet is connected to the computer by wifi using adb connect <ip_andress>:5555 My application contains listeners for USB devices attached/detached . But unfourtunately, when I connect/disconnect usb device to/from the tablet, the adb connection is getting killed , and I can no longer see the device under "adb devices". 回答1: It is not a adb-connection-by-wifi what gets killed. It is just that USB enumerations affect the sys.usb.* system

安卓机自动肝手游脚本

早过忘川 提交于 2020-01-08 14:03:06
1.adb驱动安装 adb驱动下载地址: https://adb.clockworkmod.com/ 下载完后 将adb 命令 添加到系统环境变量里面(不会的百度) 打开CMD控制台,输入adb,出现如下界面,即为配置成功。如图: 2.手机和电脑用usb数据线连接,手机在设置中打开“开发者模式”,不同手机开启的方式不同。然后在开发者模式中启用usb调试   如果以上操作没有任何错误,那么在CMD控制台,执行命令 adb devices可显示当前手机连接的端口号。 3.开启指针位置显示,这个会告诉你手机各个位置的坐标。 在写脚本之前需要熟悉adb的一些命令: 可以通过如下ADB命令实现PC对Android手机的模拟输入,点击,滑动等事件,进而对Android手机的操作与控制。 1:adb input keyevent <event_code> 这条命令模拟Android手机按下了event_code对应的按键。 event_code表如下: 0 --> "KEYCODE_UNKNOWN" 1 --> "KEYCODE_MENU" 2 --> "KEYCODE_SOFT_RIGHT" 3 --> "KEYCODE_HOME" 4 --> "KEYCODE_BACK" 5 --> "KEYCODE_CALL" 6 --> "KEYCODE_ENDCALL" 7 --> "KEYCODE