connect to Raspberry Pi 3 using adb

后端 未结 3 2063
闹比i
闹比i 2020-12-31 19:37

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

3条回答
  •  萌比男神i
    2020-12-31 20:01

    Follow the steps :

    it worked with my version of Android [5.0]

    Install ConnectBot Install ConnectBot on your tablet which is an Android terminal emulator available from Google Play. It allows to SSH into the Raspberry Pi.

    Configure the Raspberry Pi You can perform those changes when connected via any method to your Raspberry Pi. Add the following lines into your network configuration:

    vi /etc/network/interfaces
    

    allow-hotplug usb0 iface usb0 inet dhcp

    When you would have already connected all devices, and you do not want to reboot, just restart the network:

    /etc/init.d/networking restart
    

    Connect your devices

    Connect your Android Tablet to a Raspberry Pi USB port via a micro-USB cable. Power your Raspberry Pi with a standard USB power supply. You can use any DC USB power supply. **Enable Android USB tethering Enable USB tethering on your Android tablet.

    *Settings → Connections → Tethering and Wi-Fi hotspot → USB tethering** Now the Raspberry automatically gets an IP address via its USB0 port. The Android tablet behaves like a NAT router. This should work both when your tablet is connected to Wi-Fi or to a mobile 3G/4G network.*

    Initiate an SSH login to the Raspberry Pi

    Start the ConnectBot App on Android

    Login to the Raspberry Pi via SSH

    The only problem is that you have to know the IP address of the Raspberry Pi; it seems to be (always?) 192.168.42.159...

    Network setup This part has to be done by your self using your SSH and local network config.

提交回复
热议问题