Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

connect to Raspberry Pi 3 using adb

How do I connect w/ adb to the Raspberry Pi 3 running Android Things?

like image 357
proppy Avatar asked Dec 13 '16 17:12

proppy


People also ask

Does adb work on Raspberry Pi?

So lets compile adb on the Raspberry Pi itself - without any cross-compiling madness. It was actually easier than you'd think. All you should need is git and gcc (and the package libssl-dev, which is installed by the bash script). Run the first bash script directly on your Raspberry Pi.


1 Answers

Android Things for Raspberry Pi only support connecting to adb using adb-over-ip with the following command: adb connect `<raspberry-pi-ip-address>`

You have multiple options to find your IP address depending on your Pi setup:

  • If your Pi is connected to Ethernet and a screen: it should show you its IP address on the Android Things launcher screen.
  • If you have a headless Pi connected to Ethernet: you can directly ping Android.local if you have mDNS/Bonjour support, or see https://learn.pimoroni.com/tutorial/raspberry-pi/finding-your-raspberry-pi for info on how to find your Pi IP address using third-party tools.
  • If you don't have any screen or Ethernet connection, you can connect a USB to TTL serial cable on the UART0 connector (see pinout and type the following command to connect to a WiFi network and get the Pi IP address:

    am startservice -n com.google.wifisetup/.WifiSetupService \
        -a WifiSetupService.Connect \
        -e ssid '<NETWORK_SSID>' -e passphrase '<NETWORK PASSPHRASE>'
    ifconfig
    
like image 74
proppy Avatar answered Oct 13 '22 12:10

proppy