Complete guide to set up the GhidraApple extension development environment.
| Tool | Version | Notes |
|---|---|---|
| Java (Temurin) | 21 | Required — other distributions may cause issues |
| Gradle | 8.10 | Via Gradle Wrapper (./gradlew) |
| Ghidra | 12.0.3 | |
| IntelliJ IDEA | Any recent | Community Edition is sufficient |
Install SDKMAN if you don't have it:
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"Install and set Java 21 Temurin:
sdk install java 21.0.5-tem
sdk use java 21.0.5-temVerify:
java -version
# Expected: openjdk version "21.x.x" ... TemurinGradle needs to know where Ghidra is installed. Add to your ~/.zshrc or ~/.bashrc:
export GHIDRA_INSTALL_DIR=/path/to/ghidra_12.0.3_PUBLICReload and confirm:
source ~/.zshrc
echo $GHIDRA_INSTALL_DIR
ls $GHIDRA_INSTALL_DIR/Ghidra # should list Ghidra's internal foldersgit clone https://github.com/ReverseApple/GhidraApple.git
cd GhidraApple
# Build the extension (generates a .zip in dist/)
./gradlew buildExtensionThe output artifact will be at:
dist/ghidra_12.0.3_PUBLIC_<date>_GhidraApple.zip
- Open Ghidra
File > Install Extensions- Click
+and select the.zipfrom thedist/folder - Restart Ghidra
# Remove previous version
rm -rf $GHIDRA_INSTALL_DIR/Ghidra/Extensions/GhidraApple
# Copy the build output directly, no .zip needed
cp -r build/extension $GHIDRA_INSTALL_DIR/Ghidra/Extensions/GhidraAppleThe project already includes run configurations under .idea/runConfigurations/ to launch and debug Ghidra directly from IntelliJ.
./gradlew ideaOpen the project root in IntelliJ. The Ghidra classpath will be resolved automatically via GHIDRA_INSTALL_DIR.
File > Project Structure > SDK- Add the Java 21 Temurin installed in step 1
- Confirm the
Project SDKis pointing to it
./gradlew testSome tests require an actual binary to analyze and are skipped by default. To run them, pass the binary path via environment variable:
PATH_TO_BINARY_WITH_BLOCKS=/path/to/your-macho ./gradlew testOr set it permanently in IntelliJ via Run > Edit Configurations > Environment Variables.
Tests that depend on external binaries use JUnit's assumeTrue — if the required environment variable is not set, the test is skipped (shown as ignored), not failed. This is expected behavior.
GHIDRA_INSTALL_DIR not found during build
Make sure the variable was exported in the current shell, not just assigned without export.
Analyzers not showing up in Ghidra
Check that the GhidraApple folder exists under $GHIDRA_INSTALL_DIR/Ghidra/Extensions/ and that Ghidra was restarted after installation.
Java version error
Confirm with java -version that you're running Temurin 21. Other distributions (Oracle JDK, GraalVM) may cause incompatibilities.
Build fails with Gradle error
Always use the wrapper ./gradlew — never a globally installed Gradle — to ensure version 8.10 is used.