使用adb连接到Raspberry Pi 3

问题描述:

我如何将带有 adb 的Raspberry Pi 3连接到运行Android Things ?

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

Raspberry Pi的Android Things仅支持使用adb-over-ip和以下命令连接到adb:adb connect`< raspberry-pi-ip-address>``

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

根据您的Pi设置,您有多种选择来查找IP地址:

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

  • 如果您的Pi已连接到以太网和一个屏幕:它将在Android Things启动器屏幕上显示您的IP地址.
  • 如果您将无头Pi连接到以太网:如果您具有mDNS/Bonjour支持,则可以直接ping Android.local ,或参阅查看引出线,然后键入以下命令以连接到WiFi网络并获取Pi IP地址:
  • 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