Exception 'open failed: EACCES (Permission denied)' on Android

前端 未结 30 1588
[愿得一人]
[愿得一人] 2020-11-22 00:59

I am getting

open failed: EACCES (Permission denied)

on the line OutputStream myOutput = new FileOutputStream

30条回答
  •  时光说笑
    2020-11-22 01:32

    The post 6.0 enforcement of storage permissions can be bypassed if you have a rooted device via these adb commands:

    root@msm8996:/ # getenforce
    getenforce
    Enforcing
    root@msm8996:/ # setenforce 0
    setenforce 0
    root@msm8996:/ # getenforce
    getenforce
    Permissive
    

提交回复
热议问题