Taking ADB remount as an example
Run the command first:
ADB remount
And then
ADB Shell Dmesg-c | grep AVC
<36>[113.241627]<0> (0) [281:logd.auditd]type=1400 Audit (1438851627.212:214): avc:denied {IOCTL} for pid= 5684 comm= "adbd" path= "/dev/block/mmcblk0p20" dev= "Tmpfs" ino=317 scontext=u:r:adbd:s0 tcontext=u:object_r: Platformblk_device:s0 Tclass=blk_file permissive=0
<36>[113.242282]<0> (0) [281:logd.auditd]type=1400 Audit (1438851627.212:215): avc:denied {remount } for pid=5684 comm= "adbd" scontext=u:r:adbd:s0 tcontext=u:object_r:labeledfs: S0 tclass= FileSystem Permissive=0
<36>[113.242551]<0> (0) [281:logd.auditd]type=1400 Audit (1438851627.212:216): avc:denied {sys_admin} for pid=5684 comm= "adbd" capability=21 scontext=u:r:adbd:s0 tcontext=u:r:adbd:s0 tclass=capability permissive=0
From the log, we find that the type is Labeledfs and the permissions are missing remount
So to configure in the policy
Allow ADBD Labeledfs:filesystem remount;
Two other similar
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
How to find the permissions restricted issue with SELinux in Android