Skip to content

Instantly share code, notes, and snippets.

@Deflaktor
Forked from stevecheckoway/notes.md
Last active October 26, 2021 18:22
Show Gist options
  • Save Deflaktor/771986f94507751f850d25d13fa8385e to your computer and use it in GitHub Desktop.
Save Deflaktor/771986f94507751f850d25d13fa8385e to your computer and use it in GitHub Desktop.
Installing Ghidra Server on Linux odroid 4.14.180-176 armv7l

Installation on Linux odroid 4.14.180-176 armv7l

1. Install the jdk

$ sudo apt update
$ sudo apt install default-jdk

Edit /etc/environment. Append the following line.

JAVA_HOME=/usr/lib/jvm/default-java

Source the /etc/environment file to apply this environment variable.

$ source /etc/environment

2. Create a new user

$ sudo adduser --system --home /home/ghidra --group --disabled-password --disabled-login ghidra

3. Create a new directory for repositories

$ sudo mkdir /home/ghidra/repositories
$ sudo chown ghidra:ghidra /home/ghidra/repositories

4. Unzip ghidra_version.zip in /home/ghidra

$ cd /home/ghidra
$ sudo unzip /path/to/ghidra_version.zip
$ chown -R ghidra:ghidra ghidra_version

5. Set server config

Edit /home/ghidra/ghidra_version/server/server.conf. Set the following values.

wrapper.app.account=ghidra
ghidra.repositories.dir=/home/ghidra/repositories

6. Remove 64-bit jvm check

Ghidra checks if the jvm version installed is a 64bit version. Since the odroid does not support 64-bit, this check needs to be disabled.

In file /home/ghidra/ghidra_current/server/ghidraSvr comment the line which starts with JAVA_HOME.

...
# Get the java that will be used to launch GhidraServer
### Comment this Line ### JAVA_HOME=$($JAVA_CMD -cp "${LS_CPATH}" LaunchSupport "${GHIDRA_HOME}" -java_home)
if [ ! $? -eq 0 ]; then
    reportError "Failed to find a supported Java runtime.  Please refer to the Ghidra Installation Guide's Troubleshooting section."
fi
...

In file /home/ghidra/ghidra_current/support/launch.sh comment the line which starts with JAVA_HOME.

...
# Get the JDK that will be used to launch Ghidra
### Comment this Line ### JAVA_HOME="$(java -cp "${LS_CPATH}" LaunchSupport "${INSTALL_DIR}" -jdk_home -save)"
if [ ! $? -eq 0 ]; then
    # No JDK has been setup yet.  Let the user choose one.
    java -cp "${LS_CPATH}" LaunchSupport "${INSTALL_DIR}" -jdk_home -ask
...

7. Install the server

$ sudo /home/ghidra/ghidra_version/server/svrInstall

8. Add a user

$ sudo server/svrAdmin -add steve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment