Using ADB to Install, Uninstall, List, Start, and Stop Android Apps
This guide explains how to use Android Debug Bridge (ADB) commands to install and uninstall APKs, list installed packages, and start or stop applications on a connected device, providing essential tools for mobile developers and testers.
ADB (Android Debug Bridge) provides command‑line tools to manage Android applications directly from a connected device.
Install APK : Use adb install followed by the APK path, e.g., adb install C:\Users\YourUsername\Desktop\app-debug.apk . Optional flags include -r (re‑install while keeping data), -t (allow test packages), and -d (allow downgrade).
Uninstall APK : Remove an app with adb uninstall and the package name, e.g., adb uninstall com.example.myapp .
List installed packages : adb shell pm list packages [options] lists all packages. Use adb shell pm list packages for all, adb shell pm list packages -3 for third‑party apps, or adb shell pm list packages example to filter by a keyword.
Start and stop apps : Launch an activity with adb shell am start -n com.example.myapp/.MainActivity and force‑stop it with adb shell am force-stop com.example.myapp . These commands are useful for testing app behavior without a UI.
The tutorial concludes by encouraging further exploration of ADB for debugging and performance analysis.
Test Development Learning Exchange
Test Development Learning Exchange
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.