tezvyn:

What is ADB? Describe two common commands and what they accomplish.

Curated by the Tezvyn teamSource: developer.android.comintermediate
What is ADB? Describe two common commands and what they accomplish.

This tests command-line debugging fluency. Define ADB as a client-server bridge, then give two commands such as adb install for APK deployment and adb logcat for streaming device logs. Red flag: calling it the Android Studio debugger or omitting the daemon.

WHAT THIS TESTS: The interviewer wants to know if you have real-world debugging experience outside of the IDE GUI. Senior engineers are expected to understand the full communication stack between host and device, automate deployments, and diagnose production issues from logs. This question separates candidates who only click Run from those who can script builds, capture bug reports, and troubleshoot hardware or OS-level problems.

A GOOD ANSWER COVERS: First, define ADB accurately as a command-line tool that is part of the Android SDK Platform Tools. Explain that it is a client-server program made of three components: the client on your development machine, a daemon that runs commands on the device or emulator, and a server on your host that manages communication between the client and daemon. Second, provide two concrete commands with exact syntax and clear outcomes. For example, adb install path_to_apk.apk pushes an Android package to a connected device and installs it, which is essential for QA builds or CI pipelines. Another example is adb logcat, which streams system and application log messages in real time, letting you filter by tag or priority to isolate crashes or memory warnings. Third, mention that ADB works over USB or TCP/IP, so you can debug wirelessly after adb tcpip 5555 and adb connect.

COMMON WRONG ANSWERS: Calling ADB the Android Studio debugger or an IDE plugin. Confusing it with JDWP, which is the protocol used for Java breakpoint debugging. Giving vague descriptions like you use it to fix bugs without naming commands. Listing adb devices as one of your two primary commands without pairing it with a substantive action like install or logcat. Forgetting that the daemon must be running on the device, which is why adb start-server or adb kill-server are sometimes needed.

LIKELY FOLLOW-UPS: How would you debug an app on a device over Wi-Fi without a USB cable? What is the difference between adb install and adb install -r? How do you filter logcat output to show only error-level messages from a specific package? What happens when adb devices shows unauthorized, and how do you resolve it? How would you capture a bug report using adb bugreport for a non-technical stakeholder?

ONE CONCRETE EXAMPLE: Imagine a CI pipeline that builds an APK every night. Instead of manually dragging the file to an emulator, the script runs adb install -r app-release.apk to reinstall the existing build, then immediately runs adb logcat -d -s MyApp:D to dump and filter debug logs for the MyApp tag. If the install fails with INSTALL_FAILED_UPDATE_INCOMPATIBLE, the engineer knows to check signing certificates because ADB surfaced the exact package manager error.

Source: developer.android.com

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

What is ADB? Describe two common commands and what they accomplish. · Tezvyn