Page 1 of 1

avc: denied on RILD for ttyUSB2

Posted: Sun Jul 23, 2017 7:34 am
by v8dave
I have almost gotten GPRS modem support to work. At least as far as seeing AT commands from it. Still need to get the correct RIL for the modem but progress has been made to show a phone and SMS messaging etc. I'll post this on my blog later when the final system works.

I have an issue with policies and get the following output on the debug port. There are no AT commands in the logcat for radio.

[ 205.132000] type=1400 audit(1451635401.612:22): avc: denied { read write } for pid=1914 comm="rild" name="ttyUSB2" dev="tmpfs" ino=4245 scontext=u:r:rild:s0 tcontext=u:object_r:device:s0 tclass=chr_file

I've checked and there are policies in place for RILD included in the build. ttyUSB2 is set with chmod 0777 for system:system

If I use setenforce 0 via the debug port as su, everything bursts into life and I now get AT commands from the logcat.

Does anyone know how to configure policy.conf to allow the above to work? I can't seem to find anything on how this all works.

Re: avc: denied on RILD for ttyUSB2

Posted: Sun Jul 23, 2017 2:05 pm
by davef
Could the setenforce 0 command be placed in /etc/rc.local or does the modem have to be up and running before you can issue that command?

Re: avc: denied on RILD for ttyUSB2

Posted: Sun Jul 23, 2017 11:19 pm
by v8dave
I'd prefer not to use that command as it opens up a can of worms.

I've noticed that the Samsung rild.te fileI found online for 5.1 has tmpfs settings and I have tried these and still get avc denied.

Even tried to set chown on ttyUSB2 as radio:radio and still nothing.

If i could get the right policy to work I should be able to get the modem working. Just now I still get errors in the AT commands but that is possible to fix as I am only using the referenceril for the time being.