installing-and-managing-apps

Manage Android app lifecycles via adb and package manager commands.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/trancee/MeshLink-template --skill installing-and-managing-apps-trancee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: installing-and-managing-apps
Source: https://github.com/trancee/MeshLink-template/tree/main/.agents/skills/android-testing-skills/adb/apps/installing-and-managing-apps
Command: npx skills add https://github.com/trancee/MeshLink-template --skill installing-and-managing-apps-trancee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill resolves common Android development friction points, such as stale test data, installation failures, and the inability to manage app permissions or states programmatically during automated testing.

Core Features & Use Cases

  • Hermetic State Management: Provides the correct commands to clear app data between tests, ensuring a clean environment without the pitfalls of simply killing processes.
  • Advanced Installation: Handles complex scenarios including split APKs, version downgrades, and automatic permission granting for test builds.
  • Package Inspection: Offers tools to list, inspect, and toggle components or packages, which is essential for debugging environment-specific issues or managing multi-user profiles.

Quick Start

Use the installing and managing apps skill to perform a clean reinstall of the debug application and grant all required runtime permissions.

Frequently Asked Questions about installing-and-managing-apps

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clear Android app data between automated tests using adb?

To clear Android app data between tests, use adb shell package manager commands like pm clear to reset the application state. This ensures a hermetic test environment by wiping runtime data without simply killing the process.

How do I grant runtime permissions automatically when installing an Android test build?

You can grant runtime permissions automatically during installation by using adb shell pm grant commands after deploying the test build. This programmatically assigns required permissions to streamline automated testing workflows.

Can I install split APKs and downgrade Android app versions via adb?

Yes, you can manage advanced installations including split APKs and version downgrades via adb commands. This handles complex deployment scenarios for testing environments where specific application versions are required.

Do I need a connected Android device or emulator to run adb package manager commands?

Yes, executing adb package manager commands requires a connected Android device or emulator with developer options enabled. This provides the shell-based environment necessary to control package states and runtime permissions.

What is the best way to inspect and toggle Android package components for debugging?

The best way to inspect and toggle Android package components is using adb shell pm commands to list, enable, or disable packages. This is essential for debugging environment-specific issues or managing multi-user profiles.

Why should I use pm clear instead of force-stopping an app for hermetic testing?

You should use pm clear instead of force-stopping because simply killing processes leaves stale test data behind. Clearing app data via the package manager ensures a clean environment by resetting the application state completely.