The Most Valuable Lesson I Learned at Peak Games: ADB
- What is ADB?
- Main Uses of ADB:
- 1. Device Connection and Management:
- 2. App Installation and Testing:
- 3. Debugging:
- 4. File Transfer:
- 5. Command-Line Device Management:
- 6. Running and Stopping Apps:
- How to Use ADB?
- How to Setup ADB:
- Enabling Developer Mode and USB Debugging:
- Using ADB Commands:
- General Use Cases of ADB:
- ADB Commands I Used:
- 1. Monitoring CPU Usage:
- 2. Monitoring GPU Usage:
- 3. Memory Usage:
- 4. Battery Performance:
- 5. Network Performance:
- 6. Profiling Commands (Systrace):
Contents
- What is ADB?
- Main Uses of ADB:
- 1. Device Connection and Management:
- 2. App Installation and Testing:
- 3. Debugging:
- 4. File Transfer:
- 5. Command-Line Device Management:
- 6. Running and Stopping Apps:
- How to Use ADB?
- How to Setup ADB:
- Enabling Developer Mode and USB Debugging:
- Using ADB Commands:
- General Use Cases of ADB:
- ADB Commands I Used:
- 1. Monitoring CPU Usage:
- 2. Monitoring GPU Usage:
- 3. Memory Usage:
- 4. Battery Performance:
- 5. Network Performance:
- 6. Profiling Commands (Systrace):

Image generated by ChatGPT
In late February 2019, I had just finished my military service. I was staying temporarily at a relative’s house in Istanbul and was looking for a job; it was a tough time. I was constantly attending interviews, trying to fit in 2–3 interviews per day with HR or technical positions. ADB is one of the questions.
Peak Games had just aired a famous commercial on all TV channels at the same time. You probably remember it; it was talked about a lot. In March, I had an interview with Peak, a company I really wanted to work for. The position was not related to game development; it was for an “Android Developer” role. They were planning to work on a different project, but it was confidential, so I can’t share details.
For the evaluation project they gave me, I used Kotlin, RxJava, Data Binding, LiveData, and Navigation. I chose a Modular MVVM structure. I successfully passed this stage with a nice project, and they invited me to the office for a live coding session. Unfortunately, I failed the interview. At that time, I didn’t even know idiomatic Kotlin, and I wasn’t at the level they required.
However, I received the most valuable feedback of my career, which helped me improve significantly. I’ve interviewed with many large e-commerce platforms, but I never learned as much as I did from this experience. One of the key pieces of feedback I got was about ADB.
They mentioned in their email, “We expected an Android developer to know ADB.” At first, I thought, “Why would I need ADB when Android Studio is so good?” But after they asked about it in such an important interview, I learned what it was, and later, it became a tool I used frequently. You will be surprised to see how versatile ADB is.
What is ADB?
ADB is a command-line tool that allows you to run commands on Android devices. It enables developers to interact with Android devices or emulators and is used for various development and debugging tasks. You can connect your Android device to your computer via USB or over the network to execute commands on the device.
Main Uses of ADB:
1. Device Connection and Management:
Check if a device is connected and its status.
Example command: adb devices lists connected Android devices.
2. App Installation and Testing:
Install APK files directly onto an Android device and run them.
Example command: adb install myapp.apk installs the APK file.
3. Debugging:
Get logcat output from the device to watch for app errors and system messages.
Example command: adb logcat shows logs from the device.
4. File Transfer:
Transfer files between your computer and the Android device.
Example command: adb push local_file /sdcard/ transfers a file from your computer to the Android device.
5. Command-Line Device Management:
Run shell commands on the device. This allows you to execute commands directly on the device.
Example command: adb shell gives you access to the device's command line.
6. Running and Stopping Apps:
Start or stop installed apps, change system settings, and more.
Example command: adb shell am start -n com.example/.MainActivity starts a specific app.
How to Use ADB?

Image created by Tom
How to Setup ADB:
You don’t need to install Android Studio to use ADB. It comes with Android SDK Platform Tools, which you can download separately from the Android Developer website.
Enabling Developer Mode and USB Debugging:
To use ADB with a real Android device, you need to enable USB debugging in the developer options on the device. Don’t worry, your phone and data will be safe. Here’s how to do it:
Go to Settings > About Phone on your Android device.
Tap on Build Number 7 times to enable developer mode.
Then, go to Settings > Developer Options and enable USB Debugging.
Using ADB Commands:
ADB is run from the terminal or command line. Let’s try running the command that lists connected Android devices:
adb devicesGeneral Use Cases of ADB:
App Development and Testing: Developers use ADB to test apps on real devices and view app logs. Personally, I used it in this scenario the most: After generating the APK file with
gradlew cleanandgradlew assembleRelease, I would navigate to the pathandroid\app\releaseusing thecdcommand, find the APK, and uninstall the app from my device. Then, I would use theadb installcommand to install the APK and do a final test on my personal device before submitting it to the Google Play Store.System Modification: ADB allows users to make customizations to Android systems or access deeper parts of the device. For instance, developers can change the default animation speeds on Android devices. This is useful when developers want to see how the device performs faster during tests by lowering or disabling animation speeds. With the following commands, all animations on the device can be disabled, making the transitions in the user interface faster. This modification lets you see the device’s real speed, independent of animations. Here are the commands:
adb shell settings put global window_animation_scale 0
adb shell settings put global transition_animation_scale 0
adb shell settings put global animator_duration_scale 0Root Operations: On rooted devices, ADB can be used to access system files and perform various operations. I’ve never used ADB for root operations as I don’t prefer rooting devices, but I’m curious about it.
ADB Commands I Used:
So, where did my ADB knowledge come in handy? While working at ING Turkey, performance and memory were our top priorities when we were building a banking app from scratch. We used ADB to monitor performance, as Android Profiler was still very new back then. Here are some of the commands we used:
1. Monitoring CPU Usage:
To track CPU usage in real-time, use this command:
adb shell topThis command shows you the current CPU usage and which apps are consuming CPU resources.
2. Monitoring GPU Usage:
You can enable the GPU visual indicator in Android to track graphic performance. This feature shows frame rates and delays for specific apps and visualizes GPU usage.
adb shell dumpsys gfxinfo <uygulama_paketi_adı> framestats3. Memory Usage:
To check memory usage for running apps, use this command:
adb shell dumpsys meminfoThis command shows memory usage for all apps on the device. You can also specify an app package to see memory usage for just that app.
4. Battery Performance:
To see the device’s battery status and usage, use this command:
adb shell dumpsys batteryThis shows information like battery level, temperature, voltage, and charging status.
5. Network Performance:
To monitor network data usage and performance, use these commands:
adb shell dumpsys netstatsThis gives you information about the device’s network data usage, both for Wi-Fi and mobile data.
6. Profiling Commands (Systrace):
For more detailed performance analysis, you can use the Systrace tool. This tool tracks CPU, GPU, I/O, memory, and more. Run it with this command:
adb shell atrace --categories gfx,view,wm,am,sm --buffer-size=100000 --duration=10This command captures a 10-second trace and gives you the results. For deeper performance analysis, Systrace is very effective in optimizing Android performance.
ADB was a tool I initially overlooked, but it ended up being an invaluable resource in my Android development journey. The feedback I received from my interview with Peak Games played a major role in improving both my technical knowledge and problem-solving skills. After learning ADB, I was able to test my apps more effectively and perform deeper operations on devices. If you’re an Android developer, I highly recommend learning ADB; it’s a skill that will take your work to the next level!
Frequently Asked Questions
▸What is ADB in Android development?
ADB stands for Android Debug Bridge. It is a command-line tool that allows developers to communicate with Android devices or emulators to install apps, debug issues, transfer files, and run device management commands.
▸What are the main uses of ADB?
ADB is used for device connection and management, app installation and testing, debugging, file transfer, command-line device management, and running or stopping apps. It covers most tasks a developer needs when working with an Android device.
▸How do you set up ADB on your computer?
To set up ADB, you need to install the ADB tools on your computer and enable Developer Mode on your Android device. Once Developer Mode is on, you enable USB Debugging so your device can accept ADB commands over a USB connection.
▸How do you enable Developer Mode and USB Debugging on Android?
Developer Mode is typically enabled by tapping the Build Number in your device's About Phone settings multiple times. After that, USB Debugging can be turned on inside the Developer Options menu.
▸How can ADB be used to monitor CPU usage on Android?
ADB provides command-line commands that let developers monitor real-time CPU usage on a connected Android device. This helps identify performance bottlenecks and CPU-intensive processes in an app.
▸Can ADB monitor GPU usage on an Android device?
Yes, ADB includes commands for monitoring GPU usage on Android devices. This is useful for developers optimizing graphics-heavy apps or games to ensure smooth rendering performance.
▸How do you check memory usage with ADB?
ADB provides commands to query memory usage on a connected device, allowing developers to track how much RAM their app consumes and detect potential memory leaks.
▸Can ADB be used to monitor battery performance?
Yes, ADB has commands to monitor battery performance, helping developers understand how much battery their app drains under different usage conditions.
▸How is ADB used for network performance monitoring?
ADB commands can be used to track network activity and performance on an Android device, which helps developers diagnose slow network calls or excessive data usage in their apps.
▸What is Systrace and how does it relate to ADB?
Systrace is a profiling tool that can be triggered through ADB commands. It captures detailed system-level data about app and device performance, helping developers identify rendering delays and other bottlenecks.
▸Can you install apps on an Android device using ADB?
Yes, ADB allows developers to install APK files directly onto a connected Android device or emulator using a simple command. This is useful for testing builds without going through the Play Store.
▸How do you transfer files to an Android device with ADB?
ADB includes push and pull commands that let developers transfer files between a computer and a connected Android device. This is helpful for loading test assets or retrieving log files from the device.


