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?
Just turn off USB storage, and with the correct permissions, you'll have the problem solved. Save this answer.
MANAGE_EXTERNAL_STORAGE"/> in the manifest file and try to get the file access permission in the android 11 phones. Then you will open and read the file from the storage. if you are working with android 11 and working on a file then you have to use MANAGE_EXTERNAL_STORAGE permission.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With