installing-and-managing-apps

Installation
SKILL.md

Installing and Managing Apps — adb install and pm

App lifecycle from the host. adb install ships an APK; pm is the on-device PackageManager front-end that lists, paths, clears, enables/disables, and grants permissions. The most common subtle bug in test scaffolding is using am force-stop to "reset" an app between tests — that command kills the process but leaves SharedPreferences, the Room DB, and files on disk. The hermetic equivalent is pm clear.

When to use this skill

  • The user wants to install an APK from the host or push a debug build between every test run.
  • The user asks "how do I reset the app's state between tests?" or sees stale data carry over from one test to the next.
  • The user hits INSTALL_FAILED_VERSION_DOWNGRADE, INSTALL_FAILED_USER_RESTRICTED, or signature mismatch errors.
  • The user wants to grant all runtime permissions at install (-g), or grant/revoke a single permission post-install.
  • The user wants to list only third-party packages, find an APK on disk, or dump a Baseline Profile.

When NOT to use this skill

  • The user wants to actually run instrumented tests against the installed app — use ../../tests/running-instrumented-tests-via-adb/SKILL.md.
  • The user wants to choose a device or wait for boot — use ../../devices/connecting-to-devices/SKILL.md.
  • The user wants the architecture / environment / authentication picture — use ../../architecture/understanding-adb-architecture/SKILL.md.

Prerequisites

Installs
41
GitHub Stars
319
First Seen
May 16, 2026
installing-and-managing-apps — skydoves/android-testing-skills