Skip to content

Instantly share code, notes, and snippets.

@munchycool
munchycool / gist:b46ffee5fffd3928a022e0a7b165d820
Created June 21, 2018 15:54 — forked from msfjarvis/sepolicy.md
How to write sepolicy to fix a denial

Denial in question

avc: denied { read write } for pid=29059 comm="i.tetherservice" name="ipa" dev="tmpfs" ino=11991 scontext=u:r:system_app:s0 tcontext=u:object_r:ipa_dev:s0 tclass=chr_file permissive=0

sepolicy fix

allow system_app ipa_dev:chr_file {read write};
@munchycool
munchycool / gist:4a28eece9ef350c3d651af27cc4c00f6
Created May 27, 2018 16:23 — forked from DD3Boh/gist:6c51fd3c5f91b1042e956771483714de
How to merge a newer CAF tag in an android kernel
First go here:
https://wiki.codeaurora.org/xwiki/bin/QAEP/release
This site gives information about all msm soc release details with tag + android version
Search your msm here.. Check the latest one and look for correct android version and mark that tag.
Now open one of the following links (dependent on your linux kernel version)
@munchycool
munchycool / audit2allow-sepolicy-android
Last active June 20, 2018 21:43 — forked from Nihhaar/audit2allow-sepolicy-android
Addressing selinux denials using audit2allow for android using logcat
# Goto android source code root and then execute following commands
# Keep the logcat.log in the root
export ANDROID_BUILD_TOP=$(pwd)
./external/selinux/prebuilts/bin/audit2allow -p out/target/product/{devicename}/root/sepolicy < logcat.log
# Copy the generated rules in respective files in the device tree