Android Quick Tip - ADB over WiFi

http://stuffandtech.blogspot.jp/2012/03/android-quick-tip-adb-over-wifi.html

MAR

26

Android Quick Tip - ADB over WiFi

Someone I had the pleasure of working with recently showed me something extremely cool for Android development. It is simply that it is possible to use the ADB (Android Debug Bridge) over TCP/IP or more practically speaking over WiFi. This means that you don‘t have to tether you‘r Android device(s) to you‘r computer when you are developing, you can just connect it to a charger or someone elses computer. This is quite handy if you have more Android devices then USB ports and very very handy if you are working with multiple people on the same LAN that are testing you‘r latest builds. Here is a quick tutorial (requires Android SDK and ADB installed):

Step 1.
Connect you‘r Android device to you‘r computer and have USB debugging enabled. Also you have to have added the Android tools to you‘r path or else you have to go to the SDK folder first. Open up you‘r terminal/cmd and type:

adb tcpip 5555

This should give the output:

restarting in TCP mode port: 5555

You have now enabled ADB over TCP/IP using the port 5555 (use another port if that one is taken)

Step 2.
Now knowing the IP of you‘r Android device (Settings->About->Status) type the following into the terminal:

adb connect <you‘r devices IP adress>

you should now get the output:

connected to <you‘r devices IP adress>

Step 3.
You should now be able to debug against you‘r device as usual as long as it is connected to the same WiFi as you‘r computer. A simple test:

adb devices

Should give the output:

List of devices attached:
<you‘r devices IP adress>    device

Or something similar. Go ahead and try to read the Logcat using DDMS or simply deploying to you‘r device using you‘r favourite IDE IntelliJ IDEA. I have tested the following to work over WiFi ADB:

  • Logcat output
  • Deploy dev app
  • Debug dev app
  • Screenshots over ADB

I have been using my Nexus S so this may not work on all Android devices, but do give it a try and post here if you are sucessfull (with the name of you‘r device). A huge thanks to Håvard for showing me this!

Update
Sorry for not checking the comments here, a minor typo is probably causing problems as the first line was with 555 and then the following are with 5555, fixed now, sorry guys.

时间: 2024-10-29 19:10:59

Android Quick Tip - ADB over WiFi的相关文章

Android通过tcpdump抓包(wifi, 2g, 3g都可以)

http://blog.csdn.net/deng529828/article/details/20646197 1. 手机要有root权限 2. 下载tcpdump   http://www.strazzere.com/android/tcpdump 3. adb push c:\wherever_you_put\tcpdump /data/local/tcpdump 如果这一步真机无法push,可以用adb push c:\where_you_put\tcpdump /sdcard,即先将文

android调试之adb

其实大部分的PC开发机与Android设备的操作都是通过adb(android debug bridge)技术完成的,这是一个C/S架构的命令行工具,主要由三个部分组成 运行在PC开发机上的命令行客户端:可以通过它安装.卸载并调试应用 运行在PC开发机上的服务器:它管理客户端到Android设备上adb后台进程的链接 运行在Android设备上的在后台执行的adb 后台进程 1.adb命令参考 子命令 说明 devices 列出所有运行的Android设备 logcat 答应Android系统的

Libgdx: android单机斗地主支持局域网wifi联网的网络模块核心代码

这个作品是我最近写的,结合我的毕业设计的通信模块和之前的单机版斗地主.我已经上架到豌豆荚了,贴了点广告,看看能不能赚点茶钱.可是一点也不乐观.因此我想分享给大家源码.只要不用于商业. 下面先贴网络模块的核心代码,第一次写这种逻辑用的udp, 经验不够,没有写的那么好看. 这里是我上架的apk,大家下载来试试也无妨: 地址 http://www.wandoujia.com/apps/com.hj.joker package com.hj.net; import java.io.ByteArrayI

无废话Android之常见adb指令、电话拨号器、点击事件的4种写法、短信发送器、Android 中各种布局(1)

1.Android是什么 手机设备的软件栈,包括一个完整的操作系统.中间件.关键的应用程序,底层是linux内核,安全管理.内存管理.进程管理.电源管理.硬件驱动 2.Dalvik VM 和 JVM 的比较 3.常见adb指令 platform-tools/adb.exe adb.exe : android debug bridge android调试桥 adb devices:列出所以连接的设备 adb kill-server :杀死adb调试桥 adb start-server :启动adb

android下使用adb启动程序或者服务

使用 adb install hello.apk可以安装一个apk但并不能启动它,启动它要使用adb shell am的方法 启动Activity: adb shell am start -n 包名/包名+类名(-n 类名,-a action,-d date,-m MIME-TYPE,-c category,-e 扩展数据,等). 比如 adb shell am start -n AndroidExport.com/AndroidExport.com.AndroidExportActivity

VS2015 Could not locate the Android Debug Bridge (adb.exe).

VS2015 corvoda出现"Could not locate the Android Debug Bridge (adb.exe)." 是由于找不到adb.exe引起,Android sdk环境变量的问题 VS中Android sdk是在注册表中指定的,位置HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools  键-Path 修改Path值为Android sdk路径,问题解决 注意:sdk路径下要有  \platfo

Android开发中adb命令

作用: adb是SDK提供的一个常用的命令行工具,全称为Android Debug Bridge就是调试桥的作用,用于在调试时连接本机和手机设备. 借助这个工具,我们可以管理设备或手机模拟器的状态. 还可以进行以下的操作:  1.快速更新设备或手机模拟器中的代码,如应用或Android 系统升级: 2.在设备上运行shell命令: 3.管理设备或手机模拟器上的预定端口: 4.在设备或手机模拟器上复制或粘贴文件: 详解: 没开启一个Android 模拟器, 就相当于开启了一个新的单独系统,这个系统

Android recovery支持adb shell

近期开发过程注意到recovery不支持adb shell.为了便于调试方便,决定添加此功能. 刚開始我们採用的是user版本号系统,进入recovery后,输入adb shell命令.提示"error: no devices/emulators found".我们先确认recovery.img是否包括有adb,看out\debug\target\product\xxx\recovery\root\sbin是否有adb文件(源码\system\core\adb),然后检查\bootab

Android开发执行adb 命令行命令

1.在Android开发中调用adb命令进行应用安装,将应用安装到 /system/app目录下 /** * install the app in use adb command,this style is silent * */ private void adbInstallTheAPP(){ //adb push core code String command = "cp" + "the android apk file path" + "/syst