Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

How to run/debug the installer in an IDE

Summary

I use IntelliJ to run/debug the installer by executing the run gradle task.

Scripted commands (adb or fastboot) do not work.

The problem

Steps to reproduce

Execute the installer from IDE and continue until the step is reached to detect the phone.

What is the current behavior?

In the console log I see that this command is executed:

Splitted command: /usr/lib64/jvm/java-11-openjdk-11/bin/adb/adb devices -l

What is the expected correct behavior?

The correct path to the bundled adb should be used.

That way the development cycle can be sped up. At the moment I always have to build the distribution package after a change, unzip it, run the installer and see where it fails without an easy possibility to set breakpoints and inspect variables.

Technical informations

On startup I see

OS name: Linux
Java Home: /usr/lib64/jvm/java-11-openjdk-11
Current working dir: /x01/user/ingo/FP3/eelo/easy-installer
ADB folder path: /usr/lib64/jvm/java-11-openjdk-11/bin/adb/

I think the problem comes from the fact that getRootPath() starts at JAVA_HOME which only seems to work when the installer is packaged.