I want to open the file "/proc/self/net/dev" with a FileReader. In the Android 10 there comes a java.io.FileNotFoundException: /proc/self/net/dev: open failed: EACCES (Permission denied) In older versions it's no problem to open this file. What can I do?
Asked
Active
Viewed 4,455 times
8
-
1On an unrooted device, most likely there is nothing that you can do. You no longer have filesystem rights to arbitrary locations. In the case of `/proc`, I thought they locked that down a release or two ago. – CommonsWare Aug 26 '19 at 11:55
1 Answers
28
As per Android developer document, they have make change for Android Q scope storage. If your app is targeting Android Q, you should define android:requestLegacyExternalStorage="true" in manifest file
<manifest ... >
<!-- This attribute is "false" by default on apps targeting Android Q. -->
<application android:requestLegacyExternalStorage="true" ... >
...
</application>
</manifest>
Referral link : https://developer.android.com/preview/privacy/scoped-storage

apurv thakkar
- 8,608
- 3
- 14
- 19
-
-
Please check that if you can access any other .mp3 or .pdf file or not. That way we can identify you are getting issue for this particular file only or not.. – apurv thakkar Aug 27 '19 at 05:35
-
Also trying to access /proc/self/.. and this flag in manifest is not working – SandroProxy support Oct 13 '19 at 09:41