Search code examples
androidsystem-callsandroid-permissionsandroid-8.0-oreo

Get CPU usage of a device running Android 8 Oreo


I'm really confused. I have just noticed that starting from Android 8 all system calls like /proc/stat will be disabled. Ok, but what is work around to get CPU Usage in Android 8? No system calls at all. Is there some API that I'm not familiar with?

I really hope that there is solution which I can't see now.


Solution

  • No, all of /proc/stat has been disabled for non-System apps, as a side-channel.

    More information, with an official response from Google here: https://issuetracker.google.com/issues/37140047