Monitors and records the CPU and memory usage of Android devices

Overview

AnotherMonitor

.

AnotherMonitor monitors and records the CPU and memory usage of Android devices.

ANOTHERMONITOR IS IN LOW DEVELOPMENT STATUS

But not dead by any means. April 2020 update: since Android 7.0 the app functionality has been seriously hampered. But it can still be useful for some folks out there. I'm planning to maintain the app in the long term. I also reply to issues and welcome pull requests. 😃

Download ready-to-use app

The app is released on Google Play: https://play.google.com/store/apps/details?id=org.anothermonitor.

IMPORTANT NOTICE for Android 7.0+ users

Due to undocumented changes made by Google, on Android 7.0 CPU usage information for processes others than the own AnotherMonitor one will not be available (not even with root access). Rest of the app will work normally. For devices with Android 8.0 AnotherMonitor will not even show the CPU usage of the own app process. Read the below Retriving processes info since Android 7.0 for more info.

Details

AnotherMonitor shows the device CPU and memory status in real time.

It has two main options:

  • It shows a chart and several labels wherein the values of the CPU and memory usage are updated every 0.5, 1, 2 or 4 seconds.
  • It can record on a CSV file the read values for a later usage on a spreadsheet program.

When AnotherMonitor is running on the background it consumes little resources. Then it can monitor and record the CPU and memory usage of other applications on the foreground.

AnotherMonitor adds a Record and Close button to the AnotherMonitor entry on the notification drawer.

How CPU and memory usage are obtained

In order to get the CPU usage the app does NOT make use of the top command from Linux but instead it parses /proc/stat and rest of process folders from the procfs file system and work out the calculations with the user and system time. This is implemented on ServiceReader.class. Find more information about this on Calculating CPU usage of a process in Linux - Stack Overflow.

About multi-core devices

The app does not support showing values for a specific core in multi-core devices. It will show an average of all the device's cores.

Retrieving processes info since Android Lollipop 5.1 (API 22, March 2015)

For devices running Android 5.1.1 it is not possible any more to retrieve the processes list with ActivityManager.getRunningAppProcesses(). This change has not been documented anywhere on the official documentation nor an alternative way to retrieve the list has been provided. Thankfully the community at Stack Overflow came out with some satisfying solution. For devices with Android 5.1 AnotherMonitor now uses the unofficial AndroidProcesses library to retrieve the processes list. The drawback of this is that for some processes there is no way to retrieve the app name nor the icon and instead only the long package name is shown.

Retrieving processes info since Android Nougat 7.0 (API 24, August 2016)

In Android 7.0 Google once again has made undocumented changes and has significantly restricted access to the proc file system. This means that since this new API level it is not possible anymore to retrieve processes info. AnotherMonitor running on devices with Android 7.0 will only show total CPU usage, AnotherMonitor CPU usage and memory usage, but not CPU usage for other processes. Running the app on a rooted device does not make difference. More info on File system changes in Android Nougat - Stack Overflow. Star this Android issue to push Google to implement an alternative API.

Retrieving processes info since Android Oreo 8.0 (API 26, August 2017)

In Android 8.0 Google has further restricted access to the proc file system. Until now it was possible to at least get process info of the process running AnotherMonitor and total CPU usage. This does not work any more. AnotherMonitor running on devices with Android 8.0 will only show memory usage, but not total CPU usage or CPU usage for any process, including the own app process. Running the app on a rooted device does not make difference.

Resolving dependencies

AnotherMonitor only has one external dependency, AndroidProcesses. It is used to retrieve the device processes list and populate the 'Processes' screen.

See the Gradle file for more details.

Contribute!

If you have an awesome pull request no matter whether it's a big or small change, send it over! Your link to your GitHub account will be added below.

License

AnotherMonitor makes use of the GNU GPL v3.0 license. Remember to make public your project source code when reusing AnotherMonitor code.

Comments
  • Update repo with latest library versions

    Update repo with latest library versions

    I've made some changes regarding these issues:

    1. Create a notification channel for devices>=Oreo
    2. Remove version related deprecated code from manifest and gradle files
    3. Migrate to androidx
    4. Update gradle distribution to 5.4.1
    5. Update gradle build to 3.5.3
    6. Make TargetSdkVersion to 29(android 10)
    7. Make source compatibility to JAVA 1.8
    8. Update version-name and version-code
    opened by nowshad-hasan 10
  • Copyright violation

    Copyright violation

    Hi @AntonioRedondo

    I found this app on the Google Play Store. This guy just took your source code and put it on the Store, without warning this is free software...

    As you are the owner of the source code, feel free to open a request to google here to remove the false app from the Store, if it's your wish ;)

    Don't forget to tell Google that:

    • The app is licensed under GNU GPL v3 license and this guy is violating it;
    • He is falsely claiming he made the app.

    Maybe add a screenshot, a link to this repo...

    help wanted 
    opened by Poussinou 7
  • Should processes be shown on Android 7 when root access is available?

    Should processes be shown on Android 7 when root access is available?

    I'm not sure if I understood the documentation correct, but should the process list work on android 7.1.2 if root access is available for apps? I installed AnotherMonitor on my Nexus 5 using LineageOS 14.1 (Android 7.1.2) and activated root but I can not see the list of processes. I confirmed that root access is working by su on a terminal and ls /proc works fine.

    question 
    opened by reox 3
  • Fixed the blocked app name

    Fixed the blocked app name

    Dear developer:

    Hello! I am the creator of issue #19, and I have fixed the blocked app name. I would appreciate it if you could kindly revise my code and leave me some advice. Thank you so much for your precious time!

    Here are screenshots after my changes:

    in the largest font and display size: copy

    in the smallest display size: copy

    Thanks again! Have a nice day! :)

    opened by EasyVector 2
  • The title (app name) is blocked by its border

    The title (app name) is blocked by its border

    Describe the bug

    Dear developer! In the process of using, I found a bug in layout / display. As shown in the figure below, the title (app name) is blocked by its border. This may be an adaptation problem. I suspect it is because display and font size are set to large (mainly due to display size). Because of some problems with my eyesight, I often use the largest font and display. 103165857-dbaf8580-4857-11eb-9e22-120ae1901389

    App version is 3.1.1, my mobile phone is Google Pixel 2, and the screen resolution setting is 1920* 1080. And my font size and display size are the largest ! ! ! Also, my Android system version is 10.0. The above is a description of the problem. The overall experience of the software is good. You can see that the design is very attentive. Thank you very much for the efforts of the developers all the time. I hope to receive a reply. Thank you so much!!

    Expected behavior

    I hope that I can see the title fully instead of being blocked.

    Steps to reproduce the behavior:

    1.use the largest font and display in the display setting 2.open this app 3.this error could be seen

    Screenshot

    (The blocked part is marked in red)

    copy

    Environment

    1. Version of AnotherMonitor: 3.1.1
    2. Device : Google Pixel 2,
    3. OS version : Android 10.0
    opened by EasyVector 1
  • App Install Location

    App Install Location

    The internal memory of my device is quite small, this PR should allow users to easily move the app to the microSD.

    To allow the system to install your application on the external storage, modify your manifest file to include the android:installLocation attribute in the element, with a value of either "preferExternal" or "auto". (source: https://developer.android.com/guide/topics/data/install-location.html)

    opened by SweetLion 1
  • Crowdsourced Translations (e. g. with Transifex)

    Crowdsourced Translations (e. g. with Transifex)

    Hey Antonio, thank you very much for your awesome app! What do you think of using Transifex ( https://www.transifex.com/ ) for translations? Because AnotherMonitor is open source, setting up Transifex is for free.

    question 
    opened by SweetLion 1
  • EPERM when trying to create CSV on Android 11

    EPERM when trying to create CSV on Android 11

    Trying to start a recording on Android 11 (LineageOS 18.1) results in an EPERM error. According to logcat it seems that Android, with the existing permissions requested and granted, only allows access to Downloads and Documents.

    04-09 22:54:14.094  3098  3341 W MediaProvider: Forgot to handle a top level directory in getContentUriForFile?
    04-09 22:54:14.096  3098  3341 E MediaProvider: insertFileIfNecessary failed
    04-09 22:54:14.096  3098  3341 E MediaProvider: java.lang.IllegalArgumentException: Primary directory AnotherMonitor not allowed for content://media/external_primary/file; allowed directories are [Download, Documents]
    04-09 22:54:14.096  3098  3341 E MediaProvider: 	at com.android.providers.media.MediaProvider.ensureFileColumns(MediaProvider.java:2707)
    04-09 22:54:14.096  3098  3341 E MediaProvider: 	at com.android.providers.media.MediaProvider.ensureUniqueFileColumns(MediaProvider.java:2372)
    04-09 22:54:14.096  3098  3341 E MediaProvider: 	at com.android.providers.media.MediaProvider.insertFile(MediaProvider.java:2981)
    04-09 22:54:14.096  3098  3341 E MediaProvider: 	at com.android.providers.media.MediaProvider.insertInternal(MediaProvider.java:3533)
    04-09 22:54:14.096  3098  3341 E MediaProvider: 	at com.android.providers.media.MediaProvider.insert(MediaProvider.java:3249)
    04-09 22:54:14.096  3098  3341 E MediaProvider: 	at com.android.providers.media.MediaProvider.insertFileForFuse(MediaProvider.java:6717)
    04-09 22:54:14.096  3098  3341 E MediaProvider: 	at com.android.providers.media.MediaProvider.insertFileIfNecessaryForFuse(MediaProvider.java:6804)
    04-09 22:54:14.097  5975  6002 W System.err: java.io.FileNotFoundException: /storage/emulated/0/AnotherMonitor/AnotherMonitorRecord-2022-04-09-22-54-14.csv: open failed: EPERM (Operation not permitted)
    04-09 22:54:14.097  5975  6002 W System.err: 	at libcore.io.IoBridge.open(IoBridge.java:492)
    04-09 22:54:14.097  5975  6002 W System.err: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:236)
    04-09 22:54:14.097  5975  6002 W System.err: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:186)
    04-09 22:54:14.097  5975  6002 W System.err: 	at java.io.FileWriter.<init>(FileWriter.java:90)
    04-09 22:54:14.097  5975  6002 W System.err: 	at org.anothermonitor.ServiceReader.record(ServiceReader.java:479)
    04-09 22:54:14.098  5975  6002 W System.err: 	at org.anothermonitor.ServiceReader.read(ServiceReader.java:449)
    04-09 22:54:14.098  5975  6002 W System.err: 	at org.anothermonitor.ServiceReader.access$100(ServiceReader.java:53)
    04-09 22:54:14.098  5975  6002 W System.err: 	at org.anothermonitor.ServiceReader$1.run(ServiceReader.java:85)
    04-09 22:54:14.098  5975  6002 W System.err: 	at java.lang.Thread.run(Thread.java:923)
    04-09 22:54:14.098  5975  6002 W System.err: Caused by: android.system.ErrnoException: open failed: EPERM (Operation not permitted)
    04-09 22:54:14.098  5975  6002 W System.err: 	at libcore.io.Linux.open(Native Method)
    04-09 22:54:14.098  5975  6002 W System.err: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
    04-09 22:54:14.098  5975  6002 W System.err: 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
    04-09 22:54:14.099  5975  6002 W System.err: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
    04-09 22:54:14.099  5975  6002 W System.err: 	at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7550)
    04-09 22:54:14.099  5975  6002 W System.err: 	at libcore.io.IoBridge.open(IoBridge.java:478)
    04-09 22:54:14.099  5975  6002 W System.err: 	... 8 more
    

    Manually creating /storage/emulated/0/AnotherMonitor/ doesn't seem to change anything.

    I don't have an Android dev environment set up, so I can't test changing the directory to one of the allowed ones to test, but I assume that'd enable it to create the CSV.

    Running the latest version of the app from F-Droid.

    opened by tatokis 0
  • Defect when clicking the ”Recording“ button several times quickly.

    Defect when clicking the ”Recording“ button several times quickly.

    Environment Info: APK Version: 3.1.1 (10) Android simulator version: 6.0.1 Repro Steps: 1.Grant the storage permission. 2.Click the ”Recording“ button several times quickly,and then an error happens when saving the CSV file.

    Monitor1

    Do you confirm this bug? Thank you.

    opened by YYYSSSHHH 0
  • can we get cpu usage on high api level device by add native binder service to service manager?

    can we get cpu usage on high api level device by add native binder service to service manager?

    Hello!If we add binder native service to aosp source tree,modify sepolicy and add the service into service manager.Can we get cpu usage info by service's code?For example,use popen to exec "top -m 1 -n 1" to get the cpu usage.

    update: android removed popen on bionic libc🥲

    question 
    opened by jsrdzhk 2
  • Other processes with root?

    Other processes with root?

    Hello, I am awear that android removed this functionality from normal apps, but have just noticed SystemPanel 2 is able to gather per app CPU usage using root. Is this something that might be doable in Another monitor?

    enhancement 
    opened by RichyHBM 6
Pulseq is a service for monitoring activity from all your devices.

Pulseq is inspired by technically-functional/heartbeat, which is licensed under the ISC license. The main idea of pulseq is to provide statistics on y

d1snin-dev 5 Sep 8, 2022
A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

Antwan Gaggi 1k Dec 13, 2022
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

About MarkdownView (Markdown For Android) is an Android library that helps you display Markdown text or files (local/remote) as formatted HTML, and st

Feras Alnatsheh 1k Dec 20, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Dec 29, 2022
A nicer-looking, more intuitive and highly customizable alternative for radio buttons and dropdowns for Android.

SwipeSelector Undergoing for some API changes for a 2.0 major version, see example usage in the sample module! What and why? Bored of dull looking rad

Iiro Krankka 1.1k Dec 30, 2022
Android View for displaying and selecting values in a circle-shaped View, with animations and touch gestures.

CircleDisplay Android View for displaying and selecting (by touch) values / percentages in a circle-shaped View, with animations. Features Core featur

Philipp Jahoda 287 Nov 18, 2022
Dynamic Speedometer and Gauge for Android. amazing, powerful, and multi shape :zap:

SpeedView Dynamic Speedometer, Gauge for Android. amazing, powerful, and multi shape ⚡ , you can change (colors, bar width, shape, text, font ...every

Anas Altair 1.2k Jan 3, 2023
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

Pedro Vicente Gómez Sánchez 3k Dec 6, 2022
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Muthuramakrishnan Viswanathan 1.2k Dec 30, 2022
SwipeBack for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swipe gesture

SwipeBack SwipeBack is for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swi

Hannes Dorfmann 697 Dec 14, 2022
A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on Android 2.1+ (Eclair MR1 / level 7).

Android Switch Preference Backport A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on

Benoit Lubek 498 Dec 29, 2022
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)

Wizard Pager Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (ht

Julián Suárez 520 Nov 11, 2022
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.

FancyToast-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... ma

Shashank Singhal 1.2k Dec 26, 2022
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.

FancyAlertDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ..

Shashank Singhal 350 Dec 9, 2022
Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#

Xamarin.Android Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#. Build Status Platform

Xamarin 1.8k Jan 5, 2023
Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Rizki Maulana 118 Dec 14, 2022