I was not able to find here solution to read/write problem on Android File manager application I am trying to create. When running on real device, I am not able to delete a file from SD card.
Could anyone guide me, what am I doing wrong and how to fix the permissions?
I have added read/write permissions to AndroidManifest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
but anyway, I am getting this error message:
avc: denied { read } for name="/" dev="rootfs" ino=1 scontext=u:r:untrusted_app
for dependencies I am using:
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
Full LogCat:
02-28 10:59:49.740 12067-12067/? W/art: Unexpected CPU variant for X86 using defaults: x86_64
02-28 10:59:49.765 12067-12067/? W/System: ClassLoader referenced unknown path: /data/app/com.example.filemanager-1/lib/x86_64
02-28 10:59:49.770 12067-12067/? I/InstantRun: Instant Run Runtime started. Android package is com.example.filemanager, real application class is com.example.filemanager.FileManager.
02-28 10:59:49.797 12067-12074/? E/art: Failed writing handshake bytes (-1 of 14): Broken pipe
02-28 10:59:49.797 12067-12074/? I/art: Debugger is no longer active
02-28 10:59:49.797 12067-12074/? I/art: Starting a blocking GC Instrumentation
02-28 10:59:50.284 12067-12067/? W/System: ClassLoader referenced unknown path: /data/app/com.example.filemanager-1/lib/x86_64
02-28 10:59:50.337 12067-12067/? W/ini.filemanager: type=1400 audit(0.0:27): avc: denied { read } for name="/" dev="rootfs" ino=1 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0
[ 02-28 10:59:50.356 12067:12067 W/ ]
Process pipe failed
02-28 10:59:50.376 12067-12089/? I/OpenGLRenderer: Initialized EGL, version 1.4
02-28 10:59:50.376 12067-12089/? D/OpenGLRenderer: Swap behavior 1
02-28 10:59:50.390 12067-12089/? E/EGL_emulation: tid 12089: eglSurfaceAttrib(1174): error 0x3009 (EGL_BAD_MATCH)
02-28 10:59:50.390 12067-12089/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x76656d668840, error=EGL_BAD_MATCH