Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
354 views
in Technique[技术] by (71.8m points)

ADB over Bluetooth Android

I have no WIFI, I have no cable connection available.

Is there hope for me to connect my device to ADB?

question from:https://stackoverflow.com/questions/11129817/adb-over-bluetooth-android

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

With the latest releases of Cyanogenmod (7.2 and 9) and presumably some other roms the option of adb over network has arrived.

Similar to ADB over WIFI which has been available for a while, it pretty much does the same.

  • Enable Bluetooth on your laptop and device
  • Pair them
  • Connect from your laptop to your device via Bluetooth PAN (Personal Area Network)
  • Enable the ADB over Network setting (Settings/Applications/Development)
  • Find out your IP address from the terminal (busybox ifconfig should do)
    • Non-root: check the default gateway on your computer, it should be your device's IP
  • Connect your device from your computer via adb connect xxx.xxx.xxx.xxx
  • Enjoy.

Make sure to disable the ADB over Network setting after your done with it to avoid Mobile Internet ADB stuff. Just disable the Bluetooth when your done and it should be fine.

Bonus part is, that while your paired and developing for this, you are able to use the devices mobile internet as well. (if you have coverage, of course)

This is only a partial solution since it needs the device to be both rooted and running a rom that offers that particular setting. I can only assume that it can be done some other way from the terminal, but I'm not savvy enough to manage it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...