Skip to content

Devices, Emulators & Debugging

List my connected Android devices

Shows all physical devices and running emulators with their serial numbers and status.

Get info about my connected device

Returns model, manufacturer, Android version, API level, screen density, resolution, and more.

Run “getprop ro.build.version.release” on my device

Run “df -h /data” to check available storage

Run “cat /proc/meminfo” to see memory info


Create an Android 35 emulator called TestDevice

Start the TestDevice emulator

Stop the running emulator

Stop emulator-5554

  1. Create two emulators for different API levels

    Create an Android 28 emulator called API28_Test

    Create an Android 35 emulator called API35_Test

  2. Start the first one and test

    Start the API28_Test emulator

  3. After testing, stop and switch

    Stop the running emulator

    Start the API35_Test emulator


Install my debug APK on the device

Install the APK at ./app/build/outputs/apk/debug/app-debug.apk

Reinstall the APK keeping existing data

Useful for testing upgrades without losing app state.

Launch com.example.myapp

Launch the DetailActivity of com.example.myapp

Force stop com.example.myapp

Clear all data for com.example.myapp

This is equivalent to “Clear Storage” in Android Settings.

  1. Build the project

    Build my Android project

  2. Install the APK

    Install my debug APK

  3. Launch the app

    Launch com.example.myapp

  4. Take a screenshot to verify

    Take a screenshot of my device


List all permissions for com.example.myapp

Shows every permission with its granted/denied status.

Grant camera permission to com.example.myapp

Grant android.permission.ACCESS_FINE_LOCATION to com.example.myapp

Grant android.permission.RECORD_AUDIO to com.example.myapp

Grant android.permission.READ_EXTERNAL_STORAGE to com.example.myapp

Revoke camera permission from com.example.myapp

Revoke all location permissions from com.example.myapp

  1. Revoke the permission

    Revoke camera permission from com.example.myapp

  2. Clear the app data to reset “Don’t ask again” state

    Clear all data for com.example.myapp

  3. Launch the app

    Launch com.example.myapp

  4. Take a screenshot to verify the permission dialog

    Take a screenshot


Show the last 100 logcat lines

Show the last 500 log lines

PriorityPrompt
Errors only”Show error logs from my device”
Warnings and above”Show logcat with Warning priority”
Info and above”Show logcat with Info priority”
Everything”Show verbose logcat”

Show logcat for tag MyApp

Show logcat for tag CrashReporter with Error priority

Search logcat for NullPointerException

Search logcat for OutOfMemoryError

Search logcat for ANR

Search logcat for FATAL

Search logcat for “Unable to start activity”

Show logs since 2025-01-15 10:30:00

Show error logs since 2025-01-15 14:00:00.000

Show the last 200 error logs for tag CrashHandler containing “fatal”

Show warning logs for tag NetworkClient containing “timeout” since 10:00:00

Clear the logcat buffer

Then reproduce the bug:

Show error logs from my device


Take a screenshot of my device

Capture a screenshot and save to ~/Desktop/bug-report.png

Take a screenshot and save to ./screenshots/login-screen.png

Record my device screen for 10 seconds

Record my device screen for 30 seconds and save to ~/Desktop/demo.mp4

Record a 60-second video of my device

Dump the UI hierarchy of the current screen

Returns XML with every view element, its bounds, text content, content description, and click/focus state. Invaluable for:

  • Finding views that aren’t visible
  • Debugging layout overlap issues
  • Verifying accessibility labels
  • Understanding third-party UI components
  1. Screenshot the current state

    Take a screenshot

  2. Dump the UI tree

    Dump the UI hierarchy

  3. Check logcat for errors

    Show error logs from my device

  4. Get memory info

    Run “dumpsys meminfo com.example.myapp” on the device


Run “pm list packages” on my device

Run “pm list packages -3” to show third-party apps only

Run “pm path com.example.myapp” to find the APK path

Run “df -h” to check disk space

Run “cat /proc/meminfo” for memory info

Run “getprop ro.build.version.release” for Android version

Run “ip addr show wlan0” to get device IP address

Run “dumpsys meminfo com.example.myapp” on the device

Run “dumpsys cpuinfo” to check CPU usage

Run “dumpsys battery” to check battery stats

Run “dumpsys activity top” to see the current foreground activity

Run “dumpsys gfxinfo com.example.myapp” for frame rendering stats

Run “am send-trim-memory com.example.myapp COMPLETE” on the device


  1. Connect your device via USB
  2. Switch to WiFi mode

    Connect to my device over WiFi ADB

  3. Unplug the USB cable — the device stays connected wirelessly
  4. When done:

    Disconnect WiFi ADB

Push test-data.json to /sdcard/Download/ on the device

Push config.xml to /sdcard/Android/data/com.example.myapp/files/

Pull /data/data/com.example.myapp/databases/app.db from the device

Pull /sdcard/Download/crash-log.txt to ./debug/

Pull /data/data/com.example.myapp/shared_prefs/ from the device

PathContents
/sdcard/Download/Downloads folder
/sdcard/DCIM/Camera photos
/sdcard/Pictures/Screenshots/Device screenshots
/data/data/<package>/databases/App databases
/data/data/<package>/shared_prefs/SharedPreferences XML
/data/data/<package>/files/Internal file storage
/data/data/<package>/cache/App cache