2

I am doing a project using Android things,I have downloaded image and flashed in memory card ,n I got Android things os screen.... Until this is all fine..

Now I want develop app..how to connect to raspberry pi from Android studio so that the device should visible in deployment target of Android studio...so that I can debug ,put break point n see logcat...etc..I am using WINDOWS 7 OS For development system...I have installed Google USB driver from sdk manager,puTTy I have downloaded serial debug IP configuration did,..now adb is not detecting raspberry pi 3 .....but if I connect my mobile phone I can easily see the device in deployment target of Android studio....I have ref many sites ... But not working....if anybody have worked on Android thing with Windows Os plz provide me a full solutions right from scratch....n also suggest me site and books for Android things

  • 1
    For RPi only the [Ethernet / Wifi can be used for debugging](https://developer.android.com/things/hardware/raspberrypi#step_2_connect_the_hardware). It is [not possible via micro USB](https://stackoverflow.com/q/44241668/3290339) as for regular phones / tablets. – Onik Dec 01 '19 at 19:02

2 Answers2

2

The USB port of the Raspberry Pi is for charging only, it does not support data transmissions. You need to use adb over the network (either WiFi or wired). First make sure to get the Raspberry Pi on the same network as your laptop. If you have access to a screen, you should also be able to see the IP under settings.

Once you know that, you can just use:

adb connect [Raspberry Pi]

And then you will be able to use it from Android Studio.

In theory you can also use:

adb connect Android.local

But that will not work if you have more than one android device on your network.

shalafi
  • 3,926
  • 2
  • 23
  • 27
  • If the USB port is only for charging, how do you connect a keyboard to your PI 3? Last I checked there are 1 or 4 standard USB 2.0 ports on a Pi3 + the micro usb for power supply. – fredrik Nov 30 '19 at 22:41
  • @fredrik, you're talking about different USB ports when referring to a keyboard, while shalafi and the OP meant the micro USB that a developer usually uses for charging and debugging a regular phone/tablet. In case of RPi, the micro USB [cannot be used for the last](https://stackoverflow.com/a/44249334/3290339). – Onik Dec 01 '19 at 18:56
  • 1
    Yes @onik, thanks for the clarification. I was referring to the micro USB – shalafi Dec 01 '19 at 23:05
1

You cannot use the USB port from the Raspberry Pi for debugging. You need to connect its Ethernet port to your computer and debug over Ethernet.

See Android Things on Raspberry Pi.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35