Power & Source of Big Ideas

avc: denied on RILD for ttyUSB2

Moderators: chensy, FATechsupport

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.
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?
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.

Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 16 guests