Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Lazy12316 opened this issue Sep 2, 2019 · 0 comments
Open

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

Lazy12316 opened this issue Sep 2, 2019 · 0 comments

Comments

@Lazy12316
Copy link

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

@Lazy12316 Lazy12316 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+ Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant