Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

exempt a disk read from StrictMode as stetho is strictly a debug orie… #713

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jijichen
Copy link

Violation:

StrictMode policy violation; ~duration=5 ms: android.os.strictmode.DiskReadViolation
    at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1596)
    at libcore.io.BlockGuardOs.fstat(BlockGuardOs.java:174)
    at libcore.io.ForwardingOs.fstat(ForwardingOs.java:106)
    at libcore.io.IoBridge.open(IoBridge.java:481)
    at java.io.FileInputStream.<init>(FileInputStream.java:160)
    at java.io.FileInputStream.<init>(FileInputStream.java:115)
    at com.facebook.stetho.common.ProcessUtil.readProcessName(ProcessUtil.java:49)
    at com.facebook.stetho.common.ProcessUtil.getProcessName(ProcessUtil.java:38)
    at com.facebook.stetho.server.AddressNameHelper.createCustomAddress(AddressNameHelper.java:20)
    at com.facebook.stetho.Stetho$Initializer.start(Stetho.java:449)
    at com.facebook.stetho.Stetho.initialize(Stetho.java:134)

But "/proc/self/cmdline is a memory file and won't actually hit disk"
thus it can be exempted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants