As a student, I have a project where I must analyze the CPU load of every core in multi-core and Big.little architectures. I execute some applications on recent Android devices (Oreo 8.0). From what I've seen on the internet, it seems that the CPU load (average and detailled for each core) is not available anymore to developers. Therefore, it is impossible for me to analyze it, unless I try to root all my devices to unlock features.
I currently have 3 devices: a Samsung A5 (2017), a Samsung A7 (2018) and a LG Nexus 5X. I can't access the CPU load for any of those devices.
I've tried the following code to access the data related to the CPU utilization.
RandomAccessFile reader = new RandomAccessFile("/proc/stat", "r");
This should give me information about the CPU, and it only gives me an exception.
java.io.FileNotFoundException: /proc/stat: open failed: EACCES (Permission denied)
Is there any other way to access this information (average CPU load and the detailled load for each core)? Or do I have to root my devices and hope it solves my problem?
I currently have 3 devices: a Samsung A5 (2017), a Samsung A7 (2018) and a LG Nexus 5X. I can't access the CPU load for any of those devices.
I've tried the following code to access the data related to the CPU utilization.
RandomAccessFile reader = new RandomAccessFile("/proc/stat", "r");
This should give me information about the CPU, and it only gives me an exception.
java.io.FileNotFoundException: /proc/stat: open failed: EACCES (Permission denied)
Is there any other way to access this information (average CPU load and the detailled load for each core)? Or do I have to root my devices and hope it solves my problem?