Here are some helpful scripts to flash bare-metal .HEX files from your computer to an Arduino UNO Q board that is connected either via Android Debug Bridge (adb) or via SSH.
adb is useful for when you want to connect the Arduino UNO Q directly to your computer without a monitor or keyboard.
You can install the adb command line tool for your platform here:
https://developer.android.com/tools/releases/platform-tools
./flash_arduino_unoq_adb.sh build/firmware.hex
.\flash_arduino_unoq_adb.ps1 -LocalHexFile "build\firmware.hex"
ssh is useful for when you want to connect to an Arduino UNO Q that is already on a network.
Make sure to edit TARGET_HOST="192.168.1.100" to match your device's IP.
If you haven't set up SSH keys, this script will prompt you for the arduino user's password multiple times (once for every ssh and scp command). To avoid this, set up SSH keys by running ssh-copy-id arduino@<target_ip> on your local machine first.
./flash_arduino_unoq_ssh.sh build/firmware.hex
./flash_arduino_unoq_ssh.sh build/firmware.hex