Skip to content

Instantly share code, notes, and snippets.

@Nihhaar
Created August 22, 2017 20:50
Show Gist options
  • Save Nihhaar/c39a1ca3429b12b75d4dac1a04fcb7cd to your computer and use it in GitHub Desktop.
Save Nihhaar/c39a1ca3429b12b75d4dac1a04fcb7cd to your computer and use it in GitHub Desktop.
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
@giper45
Copy link

giper45 commented Jan 28, 2021

Hi, great gist ;-)
Just remember to add lunch <target> before run, otherwise it returns:

ANDROID_HOST_OUT not set. Have you run lunch? 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment