Skip to content
Go to file


Failed to load latest commit information.
Latest commit message
Commit time

I2P Android

Build process


  • Java SDK (preferably Oracle/Sun or OpenJDK) 1.6.0 or higher
  • Apache Ant 1.8.0 or higher
  • I2P source
  • Android SDK for API 28 or higher
  • Android Build Tools 28.0.0 or higher
  • Android Support Repository
  • Gradle 2.2.1


The build system is based on Gradle. There are several methods for setting Gradle up:

  • It can be downloaded from the Gradle website.

  • Most distributions will have Gradle packages. Be careful to check the provided version; Debian and Ubuntu have old versions in their main repositories. There is a PPA for Ubuntu with the latest version of Gradle.

  • A Gradle wrapper is provided in the codebase. It takes all the same commands as the regular gradle command. The first time that any command is run, it will automatically download, cache and use the correct version of Gradle. This is the simplest way to get started with the codebase. To use it, replace gradle with ./gradlew (or ./gradlew.bat on Windows) in the commands below.

Gradle will pull dependencies over the clearnet by default. To send all Gradle connections from your user over Tor, create a file in ~/.gradle/ containing:



  1. Download the Android SDK. The simplest method is to download Android Studio.
  • If you are using an existing Android SDK, install the Android Support Repository via the SDK Manager.
  1. Check out the i2p.i2p repository.

  2. Create a file in containing:

  3. Create a file in containing:


Building from the command line

  1. Create a file in containing:


1a. For building with a local router development build: cd ../i2p.i2p installer/resources/ x // x is the build number, e.g. 6 cd back here edit, add the build number x to I2P_PROPERTIES=0.9.xx-x

  1. gradle assembleDebug

  2. The APK files will be placed in subdirectories.

  3. Install debug build on phone in USB debugging mode adb install app/build/outputs/apk/free/debug/app-free-debug.apk

Building with Android Studio

  1. Import into Android Studio. (This creates the file automatically).

  2. Build and run the app (Shift+F10).

Signing release builds

  1. Create a file in containing:

  2. gradle assembleRelease

Client library

"Uploading" to the local Maven repository (to use a local build of the library in a project)

  1. gradle :client:installArchives

  2. Add the local Maven repository to your project. For Gradle projects, add the following above any existing repositories (so it is checked first):

    repositories {

Uploading to Maven Central via Sonatype OSSRH

  1. Add the following lines to your ~/.gradle/ (filling in the blanks):

  2. gradle :client:uploadArchives

Commands from the old build instructions that might be useful

# Create the android 4.4 (API 19) virtual device
# (don't make a custom hardware profile)
../android-sdk-linux/tools/android create avd --name i2p --target android-19

# then run the emulator:
#  This may take a LONG time the first time (half an hour or more)...
#  Run the debugger to ensure it is making progress
#   -no-boot-anim for faster boot
#   -dns-server if the router can't reseed
#     ../android-sdk-linux/tools/emulator -avd i2p -no-boot-anim -dns-server &
../android-sdk-linux/tools/emulator -avd i2p &

# or to talk to a real device in debug mode:
# You have to do this if you get a permission error -
# Stop ddms, unplug the device, do the following,
# then plug in the device, then start ddms
adb kill-server
sudo adb start-server
adb devices

# Anyway, with I2P installed, click on the I2P icon on your device and enjoy!

#other helpful commands
../android-sdk-linux/platform-tools/adb shell
../android-sdk-linux/platform-tools/adb pull /some/file/on/emulator some-local-dir/

# copy the Dev Tools app from the emulator to your device
adb -e pull /system/app/Development.apk ./Development.apk
adb -d install Development.apk

# reinstall an existing apk onto the emulator
adb -e install -r bin/I2PAndroid-debug.apk
You can’t perform that action at this time.