By default, you can get a remote shell on you smartwatch with the Android Debug Bridge tool and the “adb shell” command. However this shell suffers from a many limitations and you might prefer to get a standard SSH connection. To do so you need to setup a TCP connection with your watch. The procedure is different if you want to do it over USB or Wi-Fi (if your watch supports Wi-Fi)

SSH over USB

To use SSH over USB’s gadget mode you need to tell Connman to setup a manual IP for your watch. First of all, you need to get your usb’s UID thanks to the “get-services” tool which is available in the “connman-tests” package under /usr/lib/connman/test/. The first line of this command’s output should contain something like “gadget_UID_usb”, note this UID and replace it when needed in the commands below.

Create a /var/lib/connman/gadget_UID_usb/ directory and in that directory create a “settings” file containing:


Now from your computer, setup your usb interface with the IP and then you’ll be able to connect to your watch with:

ssh ceres@

/!\ This UID and the gadget’s mac address both seem to be re-generated at every boot so this config isn’t persistent. We should try to find a solution.

SSH over Wi-Fi

Dropbear is already running on the watch so we just need an IP address configured to connect.

Ensure wireless drivers are enabled for the watch.

Build your asteroid-image with iproute2 and wpa-supplicant. In meta-{watch}-hybris/conf/machine/{watch}.conf add iproute2 and wpa-supplicant to IMAGE_INSTALL:

IMAGE_INSTALL += "android-tools android-system msm-fb-refresher brcm-patchram-plus iproute2 wpa-supplicant"

Once your image is installed on the watch, open up an adb shell:

# mkdir /etc/wpa_supplicant
# cp /etc/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
# systemctl enable --now wpa_supplicant@wlan0
# wpa_cli
> scan
> scan_results
> add_network
> set_network X ssid "MYSSID"
> set_network X psk "MYPSK"
> enable_network X
> select_network X
> save_config
# ip a show dev wlan0

The watch should automatically get an IPv6 address from your network or you can set a static IPv4. You can disconnect from adb and connect via SSH.

By default, there is no root or ceres password, and no firewall rules.

About the author: kido