Files
BYZYB f2da427e60 wakeup: Use procfs when debugfs is unavailable
Android BatteryStats service needs to read wakelock status (from either procfs or debugfs) to analyze energy usage.
Otherwise, there will be errors in logcat about BatteryStats failure.
As a solution, create "/proc/wakelocks" instead of "/sys/kernel/debug/wakeup_sources" if debugfs is not enabled.

In my test on Android 10 (Mi-4c), everything works fine when debugfs was disabled.
This new file in procfs will provide the same data just as the old one in debugfs, the only thing changed is their paths.

Change-Id: I4194c3df7a25040759b802c9c0753fd1b3486b0c
Signed-off-by: GhostMaster69-dev <rathore6375@gmail.com>
2024-02-16 04:03:29 +00:00
..