Every Android user eventually notices an app that feels sluggish, drains battery, or behaves erratically. While the average user may rely on reviews or app updates, developers and power users have a more direct way to understand what’s happening under the hood: the Developer Options built into Android. These hidden settings expose real‑time metrics such as CPU usage, GPU rendering time, memory allocation, and network activity. By learning how to turn them on and read the data, you can pinpoint bottlenecks, verify that an app follows best‑practice patterns, and make informed decisions to improve performance.
Developer Options is a collection of advanced system settings intended for app developers, testers, and enthusiasts. They are disabled by default to keep the everyday user experience clean and to avoid accidental changes that could affect battery life or stability. The menu includes tools for:
All of these can be accessed without a computer, making them ideal for on‑device troubleshooting.
Before you can profile anything, you need to unlock the hidden menu. The process is the same on virtually every Android version from 4.2 onward.
7 times in quick succession.Note: On some OEM skins (e.g., Samsung One UI, Xiaomi MIUI) the path may vary slightly, but the “tap Build number seven times” rule still applies.
Not every option is a performance profiler, but a handful are directly useful for measuring app speed and efficiency. Below is a quick overview of the most relevant settings.
This visual overlay shows how long each frame takes to render on the GPU. It can be displayed as:
Frames that take longer than 16 ms (the threshold for 60 fps) appear in red, indicating a potential bottleneck.
When enabled, a small floating window displays the current CPU usage for each core, plus the total usage of the foreground app. This is handy for spotting spikes caused by heavy computations or background services.
Activating this draws a colored rectangle around every view element on the screen. Overdraw (when the same pixel is painted multiple times) becomes obvious, allowing you to simplify layouts.
Similar to Layout Bounds, this option colors each pixel based on how many times it has been drawn in a single frame. Green means drawn once, yellow twice, red three or more times.
When turned on, Android destroys every activity as soon as you leave it. This is a stress test for apps that rely on proper state restoration and can reveal memory‑leak issues.
Provides a more detailed overdraw visualization than the simple “Show Overdraw” option, useful for developers targeting Android 6.0 and above.
Strict Mode flashes the screen or logs a warning whenever an app performs a long‑running operation on the main thread. It must be enabled through adb shell setprop debug.strictmode.visual 1, but it’s worth mentioning for completeness.
Below is a practical workflow you can follow on any Android device. The steps assume you have already enabled Developer Options.
Navigate to the app you want to test. Observe the floating CPU meter. If the total usage spikes above 30 % while the UI feels laggy, the app is likely doing heavy work on the main thread.
Launch the target app. You’ll see a series of vertical bars at the top of the display. Each bar’s height equals the time (in milliseconds) the GPU spent rendering a frame. Aim for bars under 16 ms. Anything consistently above that indicates dropped frames.
Open the app again. The screen will be tinted with green, yellow, and red. Red areas are the most problematic; consider flattening the layout hierarchy or removing unnecessary background images.
The UI now displays rectangles around every view. Overlapping or excessively nested views become apparent, which can cause extra layout passes and CPU work.
If the app crashes or behaves oddly, it may be leaking resources or failing to restore state properly. Combine this with adb logcat to catch OutOfMemoryError messages.
While on‑device overlays are great for quick checks, the Android Debug Bridge (ADB) lets you capture detailed traces that you can later analyze in Android Studio’s Profiler. This requires a computer, a USB cable, and developer‑mode USB debugging enabled.
adb shell am profile start <package_name> /sdcard/trace.trace
# Interact with the app for the period you want to profile
adb shell am profile stop <package_name>
adb pull /sdcard/trace.trace .
This creates a .trace file containing method‑level execution data. Open the file in Android Studio (File → Open…) to view a timeline of method calls, CPU usage, and thread activity.
adb shell dumpsys gfxinfo <package_name> reset
# Perform the actions you want to analyze
adb shell dumpsys gfxinfo <package_name> > gfxinfo.txt
The resulting gfxinfo.txt lists each frame’s draw, process, and execute times. Look for values that exceed 16 ms; those frames are the ones that caused jank.
adb shell tcpdump -i any -s 0 -w /sdcard/network.pcap
# After reproducing the network activity, stop with Ctrl+C
adb pull /sdcard/network.pcap .
Open the .pcap file in Wireshark to see which endpoints the app contacts and how much data is transferred. Excessive traffic can explain battery drain.
Collecting numbers is only half the battle; you need to translate them into actionable changes.
AsyncTask, WorkManager, or Kotlin coroutines).android:background only where needed.close() calls on resources.OkHttp with compression), and respect the user’s Data Saver setting.Most Developer Options are safe to enable, but a few have side effects:
All the tools described are available on Android 7.0 (Nougat) and newer, though the exact wording of menu items may differ on manufacturer skins. If a particular option is missing, check the device’s Android version and look for similarly named settings.
By repeating this loop, you can systematically shrink frame times, lower CPU load, and reduce battery impact.
Android’s built‑in Developer Options give you a powerful, zero‑cost toolbox for profiling app performance directly on the device. Whether you’re a hobbyist tweaking a personal project or a professional developer polishing a release, the visual overlays and ADB tracing commands let you see exactly where time and resources are being spent. Use them responsibly—remember that some options increase power draw—and you’ll be able to deliver smoother, more responsive Android experiences.









