Skip to content

Instantly share code, notes, and snippets.

@interference-security
Last active June 22, 2022 18:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save interference-security/8aa2e71f16467ecdc743ea4fcc64c1d6 to your computer and use it in GitHub Desktop.
Save interference-security/8aa2e71f16467ecdc743ea4fcc64c1d6 to your computer and use it in GitHub Desktop.
Run Frida and Magisk together

#Source: https://serializethoughts.wordpress.com/2018/07/23/frida-magisk-and-selinux/

Error when MagiskHide is running and we try to run Frida:

avc: denied { sigchld } for scontext=u:r:zygote:s0 tcontext=u:r:magisk:s0 tclass=process permissive=0

Solution 1: Run the below commands from ADB

magiskpolicy --live "allow zygote magisk process *"
magiskpolicy --live "allow system_server magisk process *"
magiskpolicy --live "allow radio magisk process *"

Solution 2: Set SELinux to permissive mode and run frida-server as root. But this might cause some apps to not work then use the above solution.

su
getenforce
setenforce 0
getenforce

Solution 3: Use MagiskFrida

https://github.com/ViRb3/magisk-frida

https://github.com/AeonLucid/MagiskFrida

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