android adb 通过adb连接制定设备
来源:互联网 发布:介数中心性算法 编辑:程序博客网 时间:2024/05/21 17:02
(移植android OS 到 openwrt)
确保linux能够识别adb命令,请自行添加环境变量。
root@Ray:/home/floyd/adt-bundle-linux/sdk/platform-tools# ./adb devices -lList of devices attached 02a0251d device usb:2-1.1
注,确保adb运行权限为root,否则
floyd@Ray:~/adt-bundle-linux/sdk/platform-tools$ ./adb devices -lList of devices attached ???????????? no permissions usb:2-1.1
且无法使用adb -s device_id shell连接设备。
root@Ray:/home/floyd/adt-bundle-linux/sdk/platform-tools# ./adb -s 02a0251d shell$ lsacct init.goldfish.rc sbincache init.qcom.rc sd-extconfig init.qcom.sh sdcardd init.rc sysdata init.target.rc systemdefault.prop mnt ueventd.goldfish.rcdev persist ueventd.rcetc proc vendorinit root
如何连接开发板
adb connect 192.168.1.2:5555 #端口5555,192.168.1.2为开发板IPadb shell #进入终端模式
adb的关闭与启动
root@Ray:/home/floyd/adt-bundle-linux/sdk/platform-tools# ./adb kill-serverroot@Ray:/home/floyd/adt-bundle-linux/sdk/platform-tools# ./adb start-server
与设备之间文件的传输
adb push <本机文件目录> <设备文件目录>
adb pull <本机文件目录> <设备文件目录>
安装APK程序到设备
adb install <APK文件路径>
连接到Android设备后请求root权限,su,如果手机的话,注意在手机上允许root权限请求。
默认下apk软件安装到/data/app
adb命令启动Android程序
adb shell am start -n breakan.test/breakan.test.TestActivity
其中"breakan.test/breakan.test.TestActivity"中的"breakan.test"是程序的包名,"TestActivity"是程序Activity类的类名。
usage: am [subcommand] [options] start an Activity: am start [-D] [-W] <INTENT> -D: enable debugging -W: wait for launch to complete start a Service: am startservice <INTENT> send a broadcast Intent: am broadcast <INTENT> start an Instrumentation: am instrument [flags] <COMPONENT> -r: print raw results (otherwise decode REPORT_KEY_STREAMRESULT) -e <NAME> <VALUE>: set argument <NAME> to <VALUE> -p <FILE>: write profiling data to <FILE> -w: wait for instrumentation to finish before returning start profiling: am profile <PROCESS> start <FILE> stop profiling: am profile <PROCESS> stop <INTENT> specifications include these flags: [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>] [-c <CATEGORY> [-c <CATEGORY>] ...] [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...] [--esn <EXTRA_KEY> ...] [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...] [-e|--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...] [-n <COMPONENT>] [-f <FLAGS>] [--grant-read-uri-permission] [--grant-write-uri-permission] [--debug-log-resolution] [--activity-brought-to-front] [--activity-clear-top] [--activity-clear-when-task-reset] [--activity-exclude-from-recents] [--activity-launched-from-history] [--activity-multiple-task] [--activity-no-animation] [--activity-no-history] [--activity-no-user-action] [--activity-previous-is-top] [--activity-reorder-to-front] [--activity-reset-task-if-needed] [--activity-single-top] [--receiver-registered-only] [--receiver-replace-pending] [<URI>]
0 0
- android adb 通过adb连接制定设备
- Android设备通过wifi连接adb调试
- adb通过wifi连接android设备
- adb通过wifi连接android设备
- ADB通过WIFI连接Android设备
- adb通过wifi连接android设备
- PC通过以太网使用adb shell 连接到Android设备
- adb通过wifi连接pc端与android设备
- adb通过wifi连接android设备的方法
- Android设备免root无线通过adb连接PC
- 如何通过PC端连接Android设备进行adb调试
- adb通过wifi连接android设备(魅族note3)
- PC通过WIFI连接Android设备,使用ADB
- adb wifi连接android设备
- UBUNTU adb连接android设备
- Android 通过WiFi连接adb
- 通过ip连接android adb
- ADB 通过网络连接设备进行调试
- Java中Split函数的用法技巧
- 会声会影x5注册机怎么用?
- iOS地图坐标系转换
- 什么是MVC
- rz和sz
- android adb 通过adb连接制定设备
- apache Kafka简介
- Mysql批量删除相同前缀或后缀的表
- 继承Thread类和实现Runnable接口的对比
- Android Intent.FLAG_NEW_TASK详解,包括其他的标记的一些解释
- Suse linux 下mysql忘记root密码
- mysql 二进制安装
- Struts1与Struts2的区别
- 初级JAVA程序员感悟分享。