markzhai / markzhai/AndroidPerformanceMonitor
/proc/stat (Permission denied)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 6.7k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Android 系统 9.0
报错:
java.io.FileNotFoundException: /proc/stat (Permission denied)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:231)
at java.io.FileInputStream.(FileInputStream.java:165)
at java.io.FileInputStream.(FileInputStream.java:112)
at com.github.moduth.blockcanary.CpuSampler.doSample(CpuSampler.java:108)
at com.github.moduth.blockcanary.AbstractSampler$1.run(AbstractSampler.java:33)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.os.HandlerThread.run(HandlerThread.java:65)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CpuSampler.java at doSample line 108, where the /proc/stat access fails on Android 9.0, and reproduce the FileNotFoundException on that platform. Review how this sampling failure is handled and define completion as a behavior that no longer produces the reported permission error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100