14

I am wondering about avc: denied messages in my logcat.

W/RenderThread: type=1400 audit(0.0:631436): avc: denied { read } for name="perf_ioctl" dev="proc" ino=4026533695 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0

What is the meaning of this?

Alex P.
  • 30,437
  • 17
  • 118
  • 169
anika
  • 153
  • 1
  • 2
  • 6

1 Answers1

12

It's depends of SELinux restrictions. You cannot do so much to avoid it.

In easy words: it means that there is "someone" that has tried to "{read}" something but SELinux stops it because that App wasn't found in the "trusted" list of SELinux. Usually some specific and dangerous locations of the System are restricted from installed Apps, so SELinux stops to read/wrote/execute things in/from that locations.

(1) An Enforcing SELinux writes that Log AND denied the access. (2) A Permissive SELinux writes that Log BUT allow the access. (3) A Disabled SELinux do NOT writes the log AND allow the access.

To avoid it you should rebuild the ROM after changed specific files about SELinux where you have to add your App in the "trusted zone".

You can install a different Kernel with a different SELinux settings.

cod3monk3y
  • 9,508
  • 6
  • 39
  • 54
emandt
  • 2,547
  • 2
  • 16
  • 20
  • the is an apk on xda named selinux switcher https://forum.xda-developers.com/t/app-tool-2-0-official-the-selinux-switch.3656502/ it lets you managed it from android; other wise there is a command native to phones that you can run in terminal but I don't remember the path and name; and it might not ship with all vendors. In both cases you need a rooted device.. – Yvain Feb 14 '21 at 20:16
  • Why would I being seeing this on an emulator running in Windows? No Linux involved... – Karlomanio Jul 15 '22 at 21:04
  • @Karlomanio Logcat shows Android's log and Android runs on Unix platform............ – emandt Jul 17 '22 at 09:59
  • @emandt I thought of that, but how do I fix it in a Windows environment? – Karlomanio Jul 18 '22 at 17:09
  • It's an Android Warning message aboout Unix SELinux context....Windows is not involved there, so there isn't anything you can "fix" in/from Windows. You need to rebuild Android's Kernel/ROM using a different SELinux config files and then you can fix it. – emandt Jul 18 '22 at 20:02