Magisk Command-Line Tools & Binaries
Exhaustive developer and power-user reference documentation for all 4 native Magisk command-line binaries: magiskboot, resetprop, magiskpolicy, and su.
Native Binary Architecture & Invocation
Magisk's command-line utilities are implemented in high-performance C++ and compiled with the Android NDK for all target architectures (arm64-v8a, armeabi-v7a, x86_64, x86). When Magisk is installed, these binaries reside in /data/adb/magisk/ and are symlinked into the global root $PATH as well as accessible as standalone tools.
Native Tool Modules
magiskboot
Boot Image ToolUnpack, repack, CPIO patch, DTB edit, decompress, and hex-patch Android boot headers (v0–v4) and ramdisk archives.
resetprop
Properties Engine
Modify, set, and delete read-only (ro.*) Android system properties directly in memory without rebooting.
magiskpolicy
SELinux CompilerReal-time binary SELinux policy editor and compiler. Injects permissive rules into running kernels without audit violations.
MagiskSU (su)
Superuser Client
Isolated multi-user Superuser CLI client with mount namespace control (--mount-master), UID switching, and socket IPC.
Master Tools Comparison & Invocation Matrix
| Tool Name | Primary Function | Invocation Layer | Typical Developer Use Case |
|---|---|---|---|
| magiskboot | Boot image unpack / repack & CPIO ramdisk patcher | Offline / Pre-boot / Recovery | Modifying boot partitions, injecting binaries into root cpio |
| resetprop | Live in-memory system property manipulation | Runtime OS / Root Shell | Spoofing device fingerprints, bypassing Play Integrity checks |
| magiskpolicy | Real-time SELinux policy compiler and rule injector | Early Boot / Live Kernel | Granting specific SELinux permissions to custom root daemons |
| MagiskSU (su) | Multi-user Superuser client and mount namespace manager | User-Space Shell | Executing elevated commands and accessing global mount namespaces |
Last Reviewed: August 19, 2026 • Verified With: Magisk v30.7 • Primary upstream: topjohnwu/Magisk. Primary reference: topjohnwu/Magisk on GitHub.