Minimal ADB and Fastboot

Minimal ADB and Fastboot is a lightweight software for writing command-line that lets you interact with an emulator or a connected Android device. These commands are used to do specific operating system tasks from a command-line. How to use it is almost the same as Windows Command Prompt.

ADB provides Unix shell access that you can use to run various commands on the emulator or connected device. You can give powers for many tasks such as install an app, file transfer, check bootloader, anti-rollback, reboot, emergency download mode, firmware update, rooting, debugging, set up port forwarding, and much more.

How adb works

It is a client-server program that includes three components:

  • A client, which sends commands. The client runs on your development machine. You can invoke a client from a command-line terminal by issuing an adb command.
  • A daemon (adbd), which runs commands on a device. The daemon runs as a background process on each device.
  • A server, which manages communication between the client and the daemon. The server runs as a background process on your development machine.

When you start an adb client, the client first checks whether there is an adb server process already running. If there isn't, it starts the server process. When the server starts, it binds to local TCP port 5037 and listens for commands sent from adb clients—all adb clients use port 5037 to communicate with the adb server.

The server then sets up connections to all running devices. It locates emulators by scanning odd-numbered ports in the range 5555 to 5585, the range used by the first 16 emulators. Where the server finds an adb daemon (adbd), it sets up a connection to that port. Note that each emulator uses a pair of sequential ports — an even-numbered port for console connections and an odd-numbered port for adb connections. For example:

Emulator 1, console: 5554
Emulator 1, adb: 5555
Emulator 2, console: 5556
Emulator 2, adb: 5557
and so on...

As shown, the emulator connected to adb on port 5555 is the same as the emulator whose console listens on port 5554.

Once the server has set up connections to all devices, you can use adb commands to access those devices. Because the server manages connections to devices and handles commands from multiple adb clients, you can control any device from any client (or from a script).

How to install ADB

Download and install like a typical Windows app then add the app launcher to the desktop computer to make it easier to run.

Download Minimal ADB and Fastboot

Minimal ADB and Fastboot v1.4.2


Related Posts