{"id":20206038,"url":"https://github.com/jaredrummler/androidprocesses","last_synced_at":"2025-05-15T07:05:28.334Z","repository":{"id":43019265,"uuid":"44607868","full_name":"jaredrummler/AndroidProcesses","owner":"jaredrummler","description":"DEPRECATED","archived":false,"fork":false,"pushed_at":"2022-03-02T01:56:05.000Z","size":536,"stargazers_count":1808,"open_issues_count":3,"forks_count":371,"subscribers_count":90,"default_branch":"master","last_synced_at":"2025-05-15T07:05:20.229Z","etag":null,"topics":["android","android-library","androidprocesses","process-monitor","processes","usagestatsmanager"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaredrummler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-20T13:24:30.000Z","updated_at":"2025-04-19T11:28:10.000Z","dependencies_parsed_at":"2022-08-12T10:11:03.023Z","dependency_job_id":null,"html_url":"https://github.com/jaredrummler/AndroidProcesses","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredrummler%2FAndroidProcesses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredrummler%2FAndroidProcesses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredrummler%2FAndroidProcesses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredrummler%2FAndroidProcesses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredrummler","download_url":"https://codeload.github.com/jaredrummler/AndroidProcesses/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292040,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","androidprocesses","process-monitor","processes","usagestatsmanager"],"created_at":"2024-11-14T05:20:54.495Z","updated_at":"2025-05-15T07:05:23.291Z","avatar_url":"https://github.com/jaredrummler.png","language":"Java","readme":"\u003ch1 align=\"center\"\u003eAndroidProcesses\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eA small Android library to get the current running processes\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#DONUT\"\u003e\u003cimg src=\"https://img.shields.io/badge/API-4%2B-blue.svg?style=flat\" alt=\"API\" /\u003e\u003c/a\u003e\n  \u003ca target=\"_blank\" href=\"LICENSE.txt\"\u003e\u003cimg src=\"http://img.shields.io/:license-apache-blue.svg\" alt=\"License\" /\u003e\u003c/a\u003e\n  \u003ca target=\"_blank\" href=\"https://maven-badges.herokuapp.com/maven-central/com.jaredrummler/android-processes\"\u003e\u003cimg src=\"https://maven-badges.herokuapp.com/maven-central/com.jaredrummler/android-processes/badge.svg\" alt=\"Maven Central\" /\u003e\u003c/a\u003e\n  \u003ca target=\"_blank\" href=\"http://www.methodscount.com/?lib=com.jaredrummler%3Aandroid-processes%3A1.1.1\"\u003e\u003cimg src=\"https://img.shields.io/badge/methods-236-e91e63.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://twitter.com/jaredrummler\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/jaredrummler.svg?style=social\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n___\n\n# PLEASE NOTE, THIS PROJECT IS NO LONGER BEING MAINTAINED\n\nGoogle has significantly restricted access to `/proc` in Android Nougat. This library will not work on Android 7.0. Please [star this issue](https://code.google.com/p/android/issues/detail?id=205565).\n\nMore details can be found at:\n\n* https://jaredrummler.com/2017/09/13/android-processes/\n* https://code.google.com/p/android/issues/detail?id=205565\n\n---\n\n# DONATIONS\n\nGive back to the author of the library: bc1qm33s8s0hh5dqffpvv5ahmgyte2sy7g7pjftl43 🖖\n\nWhat is this library for?\n-------------------------\n\nThis small library can get a list of running apps and does not require any permissions.\n\nWhy would I need this?\n----------------------\n\nAndroid 5.0+ killed [`getRunningTasks(int)`](http://developer.android.com/intl/zh-cn/reference/android/app/ActivityManager.html#getRunningTasks(int)) and [`getRunningAppProcesses()`](http://developer.android.com/intl/zh-cn/reference/android/app/ActivityManager.html#getRunningAppProcesses()). Both of these methods are now deprecated and only return the caller’s application process.\n\nAndroid 5.0 introduced [UsageStatsManager](https://developer.android.com/reference/android/app/usage/UsageStatsManager.html) which provides access to device usage history and statistics. This API requires the permission `android.permission.PACKAGE_USAGE_STATS`, which is a system-level permission and will not be granted to third-party apps. However, declaring the permission implies intention to use the API and the user of the device can grant permission through the Settings application.\n\nUsage\n-----\n\n**Get a list of running apps:**\n\n```java\n// Get a list of running apps\nList\u003cAndroidAppProcess\u003e processes = AndroidProcesses.getRunningAppProcesses();\n\nfor (AndroidAppProcess process : processes) {\n  // Get some information about the process\n  String processName = process.name;\n\n  Stat stat = process.stat();\n  int pid = stat.getPid();\n  int parentProcessId = stat.ppid();\n  long startTime = stat.stime();\n  int policy = stat.policy();\n  char state = stat.state();\n\n  Statm statm = process.statm();\n  long totalSizeOfProcess = statm.getSize();\n  long residentSetSize = statm.getResidentSetSize();\n\n  PackageInfo packageInfo = process.getPackageInfo(context, 0);\n  String appName = packageInfo.applicationInfo.loadLabel(pm).toString();\n}\n```\n\nLimitations\n-----------\n\n* System apps will not be included on some Android versions because they have a higher SELinux context.\n* This is not a full replacement of [getRunningAppProcesses()](http://developer.android.com/intl/zh-cn/reference/android/app/ActivityManager.html#getRunningAppProcesses()). The library does not provide a processes' [pkgList](http://developer.android.com/reference/android/app/ActivityManager.RunningAppProcessInfo.html#pkgList), [lru](http://developer.android.com/intl/zh-cn/reference/android/app/ActivityManager.RunningAppProcessInfo.html#lru), or [importance](http://developer.android.com/intl/zh-cn/reference/android/app/ActivityManager.RunningAppProcessInfo.html#importance).\n* This is currently not working on the N developer preview.\n\nDownload\n--------\n\nDownload [the latest AAR](https://repo1.maven.org/maven2/com/jaredrummler/android-processes/1.1.1/android-processes-1.1.1.aar) or grab via Gradle:\n\n```groovy\ncompile 'com.jaredrummler:android-processes:1.1.1'\n```\nor Maven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.jaredrummler\u003c/groupId\u003e\n  \u003cartifactId\u003eandroid-processes\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.1\u003c/version\u003e\n  \u003ctype\u003eaar\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\nAdoption\n--------\n\nIn 2017 I decompiled the top 150 free apps on Google Play and found numerous apps using this library. Companies using the library include Cheetah Mobile and Baidu. Apps using this library include [ES File Explorer](https://play.google.com/store/apps/details?id=com.estrongs.android.pop\u0026hl=en), [Clean Master](https://play.google.com/store/apps/details?id=com.cleanmaster.mguard\u0026hl=en), [Security Master](https://play.google.com/store/apps/details?id=com.cleanmaster.security\u0026hl=en), [CM Launcher 3D](https://play.google.com/store/apps/details?id=com.ksmobile.launcher\u0026hl=en), [Virus Cleaner](https://play.google.com/store/apps/details?id=com.ehawk.antivirus.applock.wifi\u0026hl=en) by Hi Security, and [Super Cleaner](https://play.google.com/store/apps/details?id=com.apps.go.clean.boost.master\u0026hl=en). Combined, these apps have at least **1.2 billion downloads**!\n\nLicense\n--------\n\n    Copyright (C) 2015 Jared Rummler\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredrummler%2Fandroidprocesses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredrummler%2Fandroidprocesses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredrummler%2Fandroidprocesses/lists"}