Skip to content

Commit 87f155c

Browse files
authored
Merge dc9b1f4 into a6085f6
2 parents a6085f6 + dc9b1f4 commit 87f155c

File tree

4 files changed

+98
-54
lines changed

4 files changed

+98
-54
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Connect to UNO Q via ADB
3+
description: Learn how to connect to the UNO Q's shell via ADB.
4+
author: Karl Söderby
5+
tags: [UNO Q, ADB, Linux]
6+
---
7+
8+
The Linux OS running on the [Arduino UNO Q](https://store.arduino.cc/products/uno-q) can be accessed over USB, using a tool called Android Debug Bridge (ADB).
9+
10+
ADB is a tool that you install on your computer, where you can access the board's shell and run operations on the system.
11+
12+
## Requirements
13+
14+
The following hardware is required:
15+
- [Arduino UNO Q](https://store.arduino.cc/products/uno-q)
16+
- [USB-C® type cable](https://store.arduino.cc/products/usb-cable2in1-type-c)
17+
18+
You will also need to have the following software installed on your OS:
19+
- [Android Debug Bridge](https://developer.android.com/tools/releases/platform-tools)
20+
21+
## Installing ADB (Host Computer)
22+
23+
The ADB command line tool is supported on MacOS, Windows & Linux. For more specific instructions for your OS, see the sections below.
24+
25+
***You can find more information and download the latest version for the tool for all operating systems directly from the [Android SDK Platform Tools](https://developer.android.com/tools/releases/platform-tools#downloads) page.***
26+
27+
### MacOS
28+
29+
To install the ADB tools on **MacOS**, we can use `homebrew`. Open the terminal and run the following command:
30+
31+
```
32+
brew install android-platform-tools
33+
```
34+
35+
To verify the tool is installed, run `adb version`.
36+
37+
### Windows
38+
39+
To install the ADB tools on **Windows**, we can use `winget`, supported on Windows 11 and on some earlier Windows 10 versions.
40+
41+
Open a terminal and run the following:
42+
43+
```
44+
winget install Google.PlatformTools
45+
```
46+
47+
To verify the tool is installed, run `adb version`.
48+
49+
### Linux
50+
51+
To install ADB tools on a **Debian/Ubuntu Linux distribution**, open a terminal and run the following command:
52+
53+
```
54+
sudo apt-get install android-sdk-platform-tools
55+
```
56+
57+
To verify the tool is installed, run `adb version`.
58+
59+
## Connect via ADB
60+
61+
1. Connect the UNO Q board to your computer via USB-C®.
62+
2. Run `adb devices` in the terminal. This should list the connected devices.
63+
64+
![Connected devices](assets/connected-devices.png)
65+
66+
>Note that it may take up to a minute for the device to appear after connecting it.
67+
68+
3. Run `adb shell`. If you have not set up your board prior to this via the Arduino App Lab, you may be required to provide a password, which is `arduino`.
69+
4. You should now be inside your board's terminal.
70+
71+
![Terminal on the board.](assets/board-terminal.png)
72+
73+
5. You are now able to run commands via the terminal on your board! To exit from the terminal, simply type `exit`.
74+
75+
## Summary
76+
77+
Connecting via ADB is an easy way to gain access to your board's shell, allowing you to perform actions such as installing packages, editing files and running scripts.
78+
79+
The `arduino-app-cli` can also be used directly via the shell, allowing you to launch Apps directly from the command line. You can read more about that in the link below:
80+
- [Arduino App CLI: Manage Apps from the Command Line](/software/app-lab/tutorials/cli/)
87.4 KB
Loading
84.2 KB
Loading

content/software/app-lab/tutorials/03.cli/apps-lab-cli.md

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,15 @@ The following hardware is required:
1515
- [Arduino UNO Q](https://store.arduino.cc/products/uno-q)
1616
- [USB-C® type cable](https://store.arduino.cc/products/usb-cable2in1-type-c)
1717

18-
You will also need to have the following software installed:
18+
To access the board via `adb` (over USB), you will also need to have the following software installed:
1919
- [Android Debug Bridge](https://developer.android.com/tools/releases/platform-tools)
2020

21-
## Installing ADB (Host Computer)
22-
23-
***Note: if you are using the board as a Single Board Computer (SBC Mode (Preview) without a host computer), you do not need to install ADB. You can run `arduino-app-cli` directly from the terminal.***
24-
25-
The ADB command line tool is supported on MacOS, Windows & Linux. For more specific instructions for your OS, see the sections below.
26-
27-
***You can find more information and download the latest version for the tool for all operating systems directly from the [Android SDK Platform Tools](https://developer.android.com/tools/releases/platform-tools#downloads) page.***
28-
29-
### MacOS
30-
31-
To install the ADB tools on **MacOS**, we can use `homebrew`. Open the terminal and run the following command:
32-
33-
```sh
34-
brew install android-platform-tools
35-
```
36-
37-
To verify the tool is installed, run `adb version`.
38-
39-
### Windows
40-
41-
To install the ADB tools on **Windows**, we can use `winget`, supported on Windows 11 and on some earlier Windows 10 versions.
42-
43-
Open a terminal and run the following:
44-
45-
```sh
46-
winget install Google.PlatformTools
47-
```
48-
49-
To verify the tool is installed, run `adb version`.
50-
51-
### Linux
52-
53-
To install ADB tools on a **Debian/Ubuntu Linux distribution**, open a terminal and run the following command:
54-
55-
```sh
56-
sudo apt-get install android-sdk-platform-tools
57-
```
58-
59-
To verify the tool is installed, run `adb version`.
21+
You can also access the board via SSH, which is typically installed on your system by default.
6022

6123
## Connect via ADB
6224

25+
***To learn more about setting up `adb`, check out the [Connect to UNO Q via ADB](/tutorials/uno-q/adb/) tutorial. This guide will walk you through the installation steps.***
26+
6327
1. Connect the UNO Q board to your computer via USB-C.
6428
2. Run `adb devices` in the terminal. This should list the connected devices.
6529

@@ -104,7 +68,7 @@ To manage Apps, we use the `app` command.
10468

10569
To create an app, we can use:
10670

107-
```sh
71+
```
10872
arduino-app-cli app new "test"
10973
```
11074

@@ -118,13 +82,13 @@ If you are accessing the board via `adb`, you can **pull** and **push** the file
11882

11983
To pull the file, use:
12084

121-
```sh
85+
```
12286
adb pull /home/arduino/ArduinoApps /path/to/localfolder
12387
```
12488

12589
And to push it, use:
12690

127-
```sh
91+
```
12892
adb push /path/to/localfolder /home/arduino/ArduinoApps
12993
```
13094

@@ -134,23 +98,23 @@ adb push /path/to/localfolder /home/arduino/ArduinoApps
13498

13599
Once an App is created and edited, it can be launched through the following command:
136100

137-
```sh
101+
```
138102
arduino-app-cli app start "/home/arduino/ArduinoApps/test"
139103
```
140104

141105
This will launch the App on your UNO Q board.
142106

143107
To stop the App, use:
144108

145-
```sh
109+
```
146110
arduino-app-cli app stop "/home/arduino/ArduinoApps/test"
147111
```
148112

149113
### Read App Logs
150114

151115
To monitor the logs of a running App, use the `logs` command:
152116

153-
```sh
117+
```
154118
arduino-app-cli app logs /home/arduino/ArduinoApps/test --all
155119
```
156120

@@ -163,7 +127,7 @@ This will list the logs of the App:
163127

164128
To run built-in examples and Apps that we create, we can use the `user` and `examples` shortcut (instead of specifying path).
165129

166-
```sh
130+
```
167131
# run your own app
168132
arduino-app-cli app start user:my-app
169133
@@ -175,7 +139,7 @@ arduino-app-cli app start examples:blink
175139

176140
To list available Apps, use the `app list` command.
177141

178-
```sh
142+
```
179143
arduino-app-cli app list
180144
```
181145

@@ -187,8 +151,8 @@ This will list all available Apps (including examples), and their status:
187151

188152
To set a board name using the `arduino-app-cli`, we can use the `set-name` command.
189153

190-
```sh
191-
arduino-app-cli board set-name "my-board"
154+
```
155+
arduino-app-cli system set-name "my-board"
192156
```
193157

194158
This will change the name of the board, which will take effect after resetting the board.
@@ -199,22 +163,22 @@ The `system` command allows you to manage system configurations and updates on y
199163

200164
To check for updates, run:
201165

202-
```sh
166+
```
203167
arduino-app-cli system update
204168
```
205169
This will prompt you to install any available updates.
206170

207171
To enable or disable the network mode, use:
208172

209-
```sh
173+
```
210174
arduino-app-cli system network enable/disable
211175
```
212176

213177
Network mode will enable SSH and allows clients to connect to the board over a local network.
214178

215179
Finally, you can gain back some storage space by cleaning up unused containers and images by running:
216180

217-
```sh
181+
```
218182
arduino-app-cli system cleanup
219183
```
220184

@@ -224,7 +188,7 @@ Currently, it is only possible to list available Bricks and specific details for
224188

225189
This is done by running:
226190

227-
```sh
191+
```
228192
# List out Bricks installed on the board
229193
arduino-app-cli brick list
230194
# Details for a specific Brick

0 commit comments

Comments
 (0)