-
Notifications
You must be signed in to change notification settings - Fork 0
Installation and 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.
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.17Verify it installed correctly by reopening PowerShell and typing:
java -versionYou will need Git to clone the repository to your computer.
winget install Git.GitThis 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.GradleYou 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).
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)"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).
To install Gradle globally:
brew install gradleInstall the Android SDK platform tools to get access to ADB:
brew install --cask android-platform-tools-
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
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-
Ubuntu/Debian:
sudo apt install adb -y -
Fedora:
sudo dnf install android-tools -
Arch Linux:
sudo pacman -S android-tools
Regardless of your operating system, compiling the application follows the same flow:
-
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 -
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.
-
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
To get the app working on your physical Android device:
-
Enable USB Debugging On your Android phone, navigate to
Settings->About phone. Tap the Build Number 7 times to unlock Developer Options. Go back, openDeveloper Options, and enable USB Debugging. -
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.
-
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.