adb

windows-android-appium环境搭建

╄→гoц情女王★ 提交于 2020-01-04 03:43:58
一、安装jdk 安装jdk1.7以上版本,会生成一个jdk目录,和单独的jre目录(注意:不是jdk里面的jre,时安装过程中设置的那个jre路径)安装完成后并配置环境变量 在系统环境变量中,新建:JAVA_HOME的值时jdk目录 然后在path目录中增加jdk的bin目录和jre的bin目录 完成后,在cmd窗口输入java -version能够出现jdk版本,即成功 二、安装Android SDK 下载地址: http://tools.android-studio.org/index.php/sdk/ (直接下载zip版本,解压至任意目录即可) 下载完以后解压,。然后双击运行SDK Manager.exe 因为我们这里用不到android自带的虚拟机。只勾选一些必要的选项安装。 如图,只勾选这三个,其他的都取消勾选等最终安装完成以后,会发现当前目录多了几个文件夹,如下 配置环境变量: 在系统变量中新建ANDROID_HOME,值是刚解压的那个文件夹路径 然后在path中,加入ANDROID_HOME、tools、platform-tools、build-tools目录 注意这里build-tools目录下还有一级 全部配置完以后,检查:在cmd中输入adb,出现以下信息说明sdk安装成功了 adb devices在获取连接的安卓手机时,如果获取不了可以参考以下下步骤: 1

搭建app自动化测试环境(一)

↘锁芯ラ 提交于 2020-01-04 03:43:34
①:想实现自动化,第一步先安装 python 然后第二步安装 selenium , 第三步安装JDK,然后J配置好JDK环境变量 JAVA_HOME C:\Program Files\Java\jdk1.7.0_13 CLASSPATH %JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar Path: %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin; 第四步:到 Node.js 网站下载Node安装 下载好后,傻瓜式默认安装,安装完后,输入:npm version ,出现以下信息,表示安装成功。 第五步:安装 appium ,下载好之后,傻瓜式的安装即可,你也不一定要跟我一样选择1.12.1,你可以选择其他版本的 第五步:安装Android SDK 环境安装, 环境变量配置 变量名:ANDROID_HOME 变量值:E:\ruanjian\android\adt\sdk (根据你自己磁盘来给路径) 变量名:PATH 变量值:;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools; 第六步:安装Appium-Python-Client pip install Appium-Python-Client 表示成功 第七步:然后你的adb命令就可以用啦 表示成功 第八步

Nexus 7 tablet not recognized by adb

与世无争的帅哥 提交于 2020-01-04 02:49:32
问题 I am having some strange behavior with the android sdk and my tablet. I am attempting to get my tablet recognized with: adb devices -l command. Each time I plug the tablet in, a window on my computer pops up for a brief moment asking me recognizing the tablet as a camera and asking me what application do I want to open it with. Then it disappears before I click anything. On the tablet, it will say "allow usb debugging from such and such computer?". Some times that will disappear before I can

Nexus 7 tablet not recognized by adb

你说的曾经没有我的故事 提交于 2020-01-04 02:49:07
问题 I am having some strange behavior with the android sdk and my tablet. I am attempting to get my tablet recognized with: adb devices -l command. Each time I plug the tablet in, a window on my computer pops up for a brief moment asking me recognizing the tablet as a camera and asking me what application do I want to open it with. Then it disappears before I click anything. On the tablet, it will say "allow usb debugging from such and such computer?". Some times that will disappear before I can

when “am start” a activity,what the “total time” mean?

房东的猫 提交于 2020-01-04 02:15:27
问题 I launch a activity use: am start -W -n The console output: tangbincheng@tangbinchengdeMacBook-Pro:~$ adb shell shell@hwp6-t00:/ $ su root@hwp6-t00:/ # am start -W -n com.book2345.reader/com.book2345.reader.MainA> Starting: Intent { cmp=com.book2345.reader/.MainActivity } Status: ok Activity: com.book2345.reader/.MainActivity ThisTime: 1554 TotalTime: 42815 Complete what the ThisTime and the TotalTime mean? 回答1: search in android source code: You can find "thisTime/totalTime" " thisTime ":

when “am start” a activity,what the “total time” mean?

偶尔善良 提交于 2020-01-04 02:15:08
问题 I launch a activity use: am start -W -n The console output: tangbincheng@tangbinchengdeMacBook-Pro:~$ adb shell shell@hwp6-t00:/ $ su root@hwp6-t00:/ # am start -W -n com.book2345.reader/com.book2345.reader.MainA> Starting: Intent { cmp=com.book2345.reader/.MainActivity } Status: ok Activity: com.book2345.reader/.MainActivity ThisTime: 1554 TotalTime: 42815 Complete what the ThisTime and the TotalTime mean? 回答1: search in android source code: You can find "thisTime/totalTime" " thisTime ":

adb.exe start server failed-run manually if neccessary

两盒软妹~` 提交于 2020-01-04 01:56:08
问题 When I started running my app in Android, I got a message saying that "adb.exe start server failed-run manually if neccessary". I tried many commands shown on Stack Overflow in the command prompt, but the problem is not rectified. This is the error I get, I even reinstalled Android Studio, but in vain. And my adb.exe is not found in the Task Manager. How can I solve this problem? 回答1: first close android studio then press alt + ctrl + delete to open task manager then search for adb.exe ,

How to get screenshot of Application on Android Things device in Android Studio or via ADB?

£可爱£侵袭症+ 提交于 2020-01-04 00:04:07
问题 Is there any way to get screenshot in Android Studio (or via ADB ) for Raspberry Pi 3 Model B with Android Things Developer Preview on it? (any other way not via Android Studio / ADB also accepted). 回答1: It's not a "screenshot", but how about mp4 movie instead? adb shell screenrecord --verbose /sdcard/screen.mp4 --time-limit 1 Though the recorded movie is not correctly recorded, it's still like a "screenshot". (I cannot get a frame out of it using QuickTime Player, but any other tool might be

Error while trying to push/install .apk using adb

爱⌒轻易说出口 提交于 2020-01-03 17:26:13
问题 I've recently started encountering problems while trying to run my application from Android Studio on my MacOS machine. I tried to run the command from adb myself but I still can't get it to work, although the error appears different. The errors I get are as follows; Android Studio 10/02 09:54:53: Launching app $ adb push /Users/{username}/{path-to-apk}.apk /data/local/tmp/{package} java.io.IOException: Broken pipe Error while Installing APK adb (via Terminal.app) $ adb push /Users/{username}

How to copy some text to android system clipboard using ADB?

こ雲淡風輕ζ 提交于 2020-01-03 11:02:31
问题 I want to automate some stuff on my rooted android Oreo and can't seem to find a way to copy some text to clipboard. I can paste the copied text adb shell input keyevent 279 so hoping to get some way to copy text also. P.S: not looking for answers suggesting adb shell input text [text] cause it's slow. 回答1: It seems there are 2 ways to copy a text into android clipboard using adb shell . Using service call clipboard 2 i32 1 i32 0 s16 "text" (Deprecated and doesn't work on android 8) Using an