From 140161d453ff31eccc67938f1850e3716d65dea1 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Sat, 29 Jan 2022 17:51:20 +0300 Subject: [PATCH] Update README.md --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 92ece1b..7212fab 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,55 @@ +[![GitHub release](https://img.shields.io/github/release/PurpleI2P/i2pd-android.svg?label=latest%20release)](https://github.com/PurpleI2P/i2pd-android/releases/latest) +[![License](https://img.shields.io/github/license/PurpleI2P/i2pd-android.svg)](https://github.com/PurpleI2P/i2pd-android/blob/openssl/LICENSE) +[![Android CI](https://github.com/PurpleI2P/i2pd-android/actions/workflows/android.yml/badge.svg)](https://github.com/PurpleI2P/i2pd-android/actions/workflows/android.yml) + # i2pd android -### Install OpenJDK, gradle 5.1+ (6.8.3 has been tested and is working ok), download Android SDK and NDK r21e -https://gradle.org/install/ +This repository contains Android application sources of i2pd + +## How to build + +### Install OpenJDK, g++, rename (used for building modules), gradle 5.1+, download Android SDK + +```bash +sudo apt-get install g++ rename gradle +``` + +Android SDK Available here: https://developer.android.com/studio#downloads -https://developer.android.com/ndk/ +If your system provides gradle with version < 5.1, download it from gradle homepage: + +https://gradle.org/install/ + +### Prepare Android SDK for building +Download Android SDK, unpack it to any directory (`/opt/anrdoid-sdk` for example) and install required packages +```bash +mkdir /opt/android-sdk +cd /opt/android-sdk +wget https://dl.google.com/android/repository/commandlinetools-linux-8092744_latest.zip +unzip commandlinetools-linux-8092744_latest.zip +# install required tools +./cmdline-tools/bin/sdkmanager --sdk_root=/opt/android-sdk "build-tools;29.0.3" "cmake;3.10.2.4988404" "ndk;23.1.7779620" +``` ### Clone repository with submodules - git clone --recurse-submodules https://github.com/PurpleI2P/i2pd-android.git +```bash +git clone --recurse-submodules https://github.com/PurpleI2P/i2pd-android.git +``` ### Compile application - export ANDROID_SDK_ROOT=/opt/android-sdk - export ANDROID_NDK_HOME=/opt/android-ndk-r21e - - gradle clean assembleDebug +```bash +export ANDROID_SDK_ROOT=/opt/android-sdk +export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/23.1.7779620 + +pushd app/jni +./build_boost.sh +./build_openssl.sh +./build_miniupnpc.sh +popd + +gradle clean assembleDebug +``` You will find APKs in `app/build/outputs/apk`