Skip to content
New issue

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

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

Already on GitHub? # to your account

[Android O] /proc/stat is no longer accessible in Android O #11

Closed
Manabu-GT opened this issue Aug 29, 2017 · 2 comments
Closed

[Android O] /proc/stat is no longer accessible in Android O #11

Manabu-GT opened this issue Aug 29, 2017 · 2 comments
Assignees
Milestone

Comments

@Manabu-GT
Copy link
Owner

Manabu-GT commented Aug 29, 2017

https://issuetracker.google.com/issues/37140047 confirms that /proc/stat was removed from Android O as intended. Well, makes sense from the security perspective.

Note: /proc/self/stat seems to still work.

@Manabu-GT Manabu-GT changed the title /proc/stat is no longer accessible in Android O [Android O] /proc/stat is no longer accessible in Android O Aug 29, 2017
@Manabu-GT Manabu-GT added this to the v1.1.0 milestone Aug 29, 2017
@Manabu-GT
Copy link
Owner Author

Manabu-GT commented Aug 29, 2017

https://developer.android.com/reference/android/os/HardwarePropertiesManager.html might be useful, but need to check what it could return.
->It turns out that accessing it requires being a device owner or holding the DEVICE_POWER permission which is only for system apps.

Looks like CpuUsageModule needs to be deprecated and will be just a no-op for O and above.

@Manabu-GT
Copy link
Owner Author

Similary, /sys/devices/system/cpu/cpu[num]/cpufreq/scaling_cur_freqand/sys/devices/system/cpu/cpu[num]/cpufreq/cpuinfo_max_freq` are not accessible, too.

@Manabu-GT Manabu-GT self-assigned this Sep 2, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant