This article was accepted into the corpus but its outbound wikilinks were never NER-processed — typical at the deepest BFS hop or when the run's entity cap was reached. No expansion funnel to show.
| Activity Manager (am) | |
|---|---|
| Name | Activity Manager (am) |
| Developer | Android Open Source Project |
| Initial release | 2010 |
| Latest release | Android 14 |
| Written in | Java, C++ |
| Operating system | Android |
| License | Apache License 2.0 |
Activity Manager (am) Activity Manager (am) is a command-line tool and service component within the Android platform used to manage and introspect activities, tasks, services, and broadcasts on devices and emulators. It provides a programmatic and interactive interface for launching components, manipulating task state, profiling performance, and querying runtime information, often used by developers, testers, and system integrators. Commonly invoked via Android Debug Bridge shells on devices running Android builds, the tool interacts with core platform components and debugging frameworks.
Activity Manager sits alongside other platform services such as WindowManagerService, PackageManagerService, InputManagerService, and ActivityTaskManager in the Android system server process. It exposes commands for component lifecycle control, task and back stack manipulation, and debugging hooks related to Dalvik and Android Runtime. The tool is distributed with the Android Open Source Project and integrated into SDK tooling alongside adb and Android Studio utilities.
The am client is typically invoked through Android Debug Bridge with syntaxes like am start, am broadcast, am force-stop, and am instrument. Common commands interact with intent-driven components represented by entries in the AndroidManifest.xml of packages such as those signed by Google LLC or device OEMs (e.g., Samsung, OnePlus, Xiaomi). Commands can specify action, category, data URIs, component names, and extras compatible with intents used by applications like Chrome for Android, WhatsApp Messenger, Gmail (app) or system services like Settings (Android). For profiling and testing, am can trigger instrumentation tests using runners from projects like JUnit and frameworks such as Espresso (testing), and integrate with continuous integration servers like Jenkins or GitLab CI.
am supports launching activities with flags related to task affinity and launch modes used by components in manifests authored by developers working with Android Jetpack libraries and Google Play Services integrations. It enables sending ordered or sticky broadcasts observed by receivers in applications such as Facebook (app), Twitter, and enterprise suites like Microsoft Exchange ActiveSync. am can clear application data and force-stop packages obtained from distribution platforms like Google Play Store or manual sideloads via adb install. Advanced capabilities include starting services (foreground or background) similar to those in Firebase Cloud Messaging integrations, initiating instrumentation for profiling with tools akin to Traceview and Systrace, and manipulating processes in concert with the Linux kernel cgroups used by Android for resource management.
The am command is a thin client that sends shell commands to the platform's Activity Manager service, which is implemented inside the system server in Java and native components interacting with Binder (IPC), libc, and low-level services. The service cooperates with Zygote for process spawning, ART/Dalvik for runtime execution, and SurfaceFlinger for composing UI surfaces created by activities. Component lifecycle transitions follow sequences defined by the Android framework’s Activity and Service classes, and the task scheduler coordinates with kernel-level process priority mechanisms provided by Linux and device-specific HAL implementations. The architecture is reflected in source trees hosted in repositories related to the Android Open Source Project and mirrored in vendor trees maintained by companies such as Qualcomm and MediaTek.
am operations respect Android’s permission model enforced by PackageManagerService and the platform’s permission constants declared in frameworks like android.Manifest. Many am commands require elevated shell privileges or root access on devices; on production devices, carrier or OEM restrictions may limit capabilities, as seen in enterprise deployments by Samsung Knox or Android Enterprise. Instrumentation and debugging commands must adhere to signature and permission constraints—launching components from packages signed with keys like those used by Google LLC or device OEMs may be restricted without appropriate permissions. Security auditing tools such as those from CVE databases and vendors like NIST inform mitigations for vulnerabilities related to IPC and component exposure.
Activity Manager’s evolution traces to the early Android releases led by Andy Rubin and the original Android team, with major redesigns aligning with platform milestones like Android 4.0 Ice Cream Sandwich and Android 8.0 Oreo where background execution limits and changes to task management were introduced. Contributions come from the Android Open Source Project, corporate engineers from Google LLC, and community contributors in AOSP downstream projects and device manufacturers. Tooling improvements correlate with the expansion of SDK capabilities in Android Studio and the adoption of modern testing frameworks such as AndroidX Test and build tooling like Gradle (software).
Common use cases include starting an activity to reproduce bug reports for applications like YouTube (app) or Maps (application), invoking instrumentation to run automated tests in Firebase Test Lab, clearing app state during QA for apps deployed via Google Play Console, and sending broadcasts to simulate system events affecting components like MediaPlayer or TelephonyManager. Developers use am in conjunction with profiling tools such as Android Profiler and command-line utilities like logcat to capture lifecycle traces and performance metrics, while OEM engineers use it for automated device certification and recovery scenarios integrated with Android Compatibility Test Suite.
Category:Android tools