Skip to content

How to get the CPU usage details of an app for Android 8+  #369

Open

Description

@Lazy12316

Hi all,

I am trying to get the amount of CPU being utilized by my app. I have searched for solutions online and all the answers suggest getting the details from /proc/stat which holds the details for all CPU numbers. I have tried the following solution posted on stackoverflow link and the following link.
However, It throws error java.io.FileNotFoundException: /proc/stat: open failed: EACCES (Permission denied)

On further searching of solution for this issue, I found out that the file /proc/stat/ has been disabled since Android 8.

So I request you kindly help me on getting the CPU usage details by this method or any alternate method.

Thank you

Activity

  1. changed the title [-]How to get the CPU usage details for an app for Android 8+ [/-] [+]How to get the CPU usage details of an app for Android 8+ [/+] on Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions