Use Android Debug Bridge

Android Debug Bridge (ADB) is a command-line debugging tool that enables a variety of functions, such as tracking system logs, uploading files and downloading files. It can be used on Windows, Linux and macOS.

The section below will help you use ADB with Mixtile Blade 3.

Preparing tools

Please prepare the following tools:

  • a PC (Windows, Linux or macOS)

  • a USB-A to USB-C cable

  • a power adapter with a USB-C connector at one end that supports USB PD 2.0

Connecting hardware

Please follow the steps below for hardware connection.

  1. Take the USB-A to USB-C cable, and connect one end to the USB-C port of your Mixtile Blade 3 that is farther from the corner and the other end to the PC.

  2. Take the power adapter, and connect the USB-C connector to the USB-C port of your Mixtile Blade 3 that is nearer to the corner.

Installing ADB

You need to install ADB according to the operating system of the PC you’re using.

Installing ADB on Windows

To install ADB on Windows, follow the steps below:

  1. Download ADB and unzip the file to a custom installation directory, such as C:\adb\platform-tools.

  2. Press Windows + R to open Run. Then enter sysdm.cpl and press Enter.

  3. Click Advanced > Environment Variables > System Variables > Path.

  4. Create a new C:\adb\platform-toolsdirectory under Path.

Installing ADB on Linux

To install ADB on Ubuntu, refer to the following command:

sudo apt-get update
sudo apt-get install android-tools-adb

Installing ADB on macOS

To install ADB on macOS, refer to the following command:

brew cask install android-platform-tools

Note: You need to install the Homebrew tool before using the above command. You can use the following demand to install Homebrew.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Verifying ADB connection status

Windows

If you’re using a Windows PC, you can refer to the following ADB command to verify whether the ADB connection is successful.

C:\Users\user> adb devices
List of devices attached
I002TDRJNA    device

C:\Users\user> adb shell
root@blade3:/#
root@blade3:/#

Linux and macOS

If you’re using a Ubuntu or macOS PC, you can refer to the following ADB commands to verify whether the ADB connection is successful.

$ adb devices
List of devices attached
I002TDRJNA    device

$ adb shell
root@blade3:/#
root@blade3:/#

Appendix: Common ADB commands

This section presents some ADB commands that are commonly used for your reference.

Commands for managing connection

To display related devices and their serial numbers, refer to the following command:

adb devices

If there are multiple connected devices, you need to use the serial number to tell them apart with the following command:

export ANDROID_SERIAL=<SerialNumber>
adb shell ls

To connect to a specific device under multiple devices, refer to the following command:

adb -s SerialNumber shell

Commands for debugging

Via ADB, you can obtain the debugging information.

  • Getting system logs via ADB logcat
adb logcat [Options] [Label]

For example:

# View all logs.
adb logcat
# Show only parts of the logs.
adb logcat -s WifiStateMachine StateMachine
  • Running command adb shell

adb bugreport is used for bug reports, which contain a lot of useful detailed operation information.

For example:

adb bugreport
# Save to host, then open it with text editor to view ADB
adb bugreport >bugreport.txt
  • Getting root permission

If TARGET_BUILD_VARIANT is in user debug mode, you need to run it to get root permission:

adb root

Switch the device side of ADB to root mode for commands that require root access, such as ADB remount.

For more ADB commands, you can use the following command for help:

adb --help