Skip to content

Installation and Build Guide

Atharva-AV edited this page Mar 21, 2026 · 2 revisions

🛠️ Comprehensive Installation & Build Guide

This document is a step-by-step master guide for setting up your complete development environment to build Input Leaf from source code on Windows, macOS, and Linux.


1. Windows Setup 🪟

Step 1.1: Install JDK 17

You must install the Java Development Kit (JDK) version 17. The easiest approach is using Winget (built into modern Windows 10/11). Open PowerShell as Administrator and run:

winget install Microsoft.OpenJDK.17

Verify it installed correctly by reopening PowerShell and typing:

java -version

Step 1.2: Install Git

You will need Git to clone the repository to your computer.

winget install Git.Git

Step 1.3: Install Gradle (Optional)

This project uses the embedded Gradle Wrapper (gradlew), so you technically never need Gradle installed locally. However, if you wish to configure it globally for other projects:

winget install Gradle.Gradle

Step 1.4: Install ADB (Android Platform Tools)

You need ADB (Android Debug Bridge) to install the compiled app onto your phone.

winget install Google.PlatformTools

(You may need to manually add the platform tools directory to your System PATH variables so you can type adb anywhere in your terminal).


2. macOS Setup 🍏

Step 2.1: Install Homebrew

If you don't have Homebrew, open the Terminal and install it by pasting this standard script:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 2.2: Install JDK 17

Use Homebrew to install the OpenJDK:

brew install openjdk@17

(You may need to follow the terminal prompts to symlink the JDK into your system wrappers so your system correctly recognizes it).

Step 2.3: Install Gradle (Optional)

To install Gradle globally:

brew install gradle

Step 2.4: Install ADB

Install the Android SDK platform tools to get access to ADB:

brew install --cask android-platform-tools

3. Linux Setup 🐧 (Ubuntu, Fedora, Arch)

Step 3.1: Install JDK 17

  • Ubuntu/Debian:
    sudo apt update
    sudo apt install openjdk-17-jdk -y
  • Fedora:
    sudo dnf install java-17-openjdk-devel
  • Arch Linux:
    sudo pacman -S jre17-openjdk jdk17-openjdk

Step 3.2: Install Gradle (Optional)

We highly recommend using SDKMAN! to easily manage Gradle on Linux:

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install gradle

Step 3.3: Install ADB

  • Ubuntu/Debian: sudo apt install adb -y
  • Fedora: sudo dnf install android-tools
  • Arch Linux: sudo pacman -S android-tools

4. Cloning & Building the Application

Regardless of your operating system, compiling the application follows the same flow:

  1. Clone the Source Code Open your terminal/command prompt and clone the repository:

    git clone https://github.com/anasvhora284/input-leaf.git
    cd input-leaf
  2. Assemble the Debug APK Use the included Gradle wrapper to compile the app.

    On Linux / macOS:

    chmod +x gradlew
    ./gradlew clean assembleDebug

    On Windows (PowerShell):

    .\gradlew.bat clean assembleDebug

    Note: The very first build will take several minutes as it downloads the Android SDK and required dependencies over the internet.

  3. Locate the Compiled App Once the build output prints "BUILD SUCCESSFUL", your brand new installable APK file will be located at: app/build/outputs/apk/debug/app-debug.apk


5. Installing the Application via USB

To get the app working on your physical Android device:

  1. Enable USB Debugging On your Android phone, navigate to Settings -> About phone. Tap the Build Number 7 times to unlock Developer Options. Go back, open Developer Options, and enable USB Debugging.

  2. Test Device Connection Plug your phone into your computer via a known-good USB cable. In your computer terminal, type:

    adb devices

    Your phone should trigger a popup asking to "Allow USB debugging". Tap Allow. The command should output your device hash ID.

  3. Install the APK While inside the cloned repository folder, tell your computer to install the app via ADB:

    adb install app/build/outputs/apk/debug/app-debug.apk

Pro-tip: If your device is plugged in, you can compile and install simultaneously in a single command by typing ./gradlew installDebug !


🎉 You're Done! Proceed immediately to the Shizuku Setup guide to get the elevated device permissions functioning.