Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 801
Kamen Stoykov Avatar asked Sep 12 '17 17:09

Kamen Stoykov


1 Answers

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

like image 163
Zach Riggle Avatar answered Sep 26 '22 09:09

Zach Riggle