Skip to content

Commit

Permalink
doc: Move Android dependencies guide into build-android.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Nov 10, 2021
1 parent ac323a7 commit 6393bdc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
14 changes: 1 addition & 13 deletions depends/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Common `host-platform-triplet`s for cross compilation are:
- `i686-linux-android` for Android x86 32 bit
- `x86_64-linux-android` for Android x86 64 bit

The paths are automatically configured and no other options are needed unless targeting [Android](#Android).
The paths are automatically configured and no other options are needed unless targeting [Android](../doc/build-android.md).

### Install the required dependencies: Ubuntu & Debian

Expand Down Expand Up @@ -133,18 +133,6 @@ options will be passed to bitcoin's configure. In this case, `--disable-wallet`.
download-linux: run 'make download-linux' to fetch all sources needed for linux builds


### Android

Before proceeding with an Android build one needs to get the [Android SDK](https://developer.android.com/studio) and use the "SDK Manager" tool to download the NDK and one or more "Platform packages" (these are Android versions and have a corresponding API level).
In order to build `ANDROID_API_LEVEL` (API level corresponding to the Android version targeted, e.g. Android 9.0 Pie is 28 and its "Platform package" needs to be available) and `ANDROID_TOOLCHAIN_BIN` (path to toolchain binaries depending on the platform the build is being performed on) need to be set.

API levels from 24 to 29 have been tested to work.

If the build includes Qt, environment variables `ANDROID_SDK` and `ANDROID_NDK` need to be set as well but can otherwise be omitted.
This is an example command for a default build with no disabled dependencies:

ANDROID_SDK=/home/user/Android/Sdk ANDROID_NDK=/home/user/Android/Sdk/ndk-bundle make HOST=aarch64-linux-android ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/user/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin

### Other documentation

- [description.md](description.md): General description of the depends system
Expand Down
14 changes: 12 additions & 2 deletions doc/build-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@ ANDROID BUILD NOTES

This guide describes how to build and package the `bitcoin-qt` GUI for Android on Linux and macOS.

## Preparation

You will need to get the Android NDK and build dependencies for Android as described in [depends/README.md](../depends/README.md).
## Dependencies

Before proceeding with an Android build one needs to get the [Android SDK](https://developer.android.com/studio) and use the "SDK Manager" tool to download the NDK and one or more "Platform packages" (these are Android versions and have a corresponding API level).
In order to build `ANDROID_API_LEVEL` (API level corresponding to the Android version targeted, e.g. Android 9.0 Pie is 28 and its "Platform package" needs to be available) and `ANDROID_TOOLCHAIN_BIN` (path to toolchain binaries depending on the platform the build is being performed on) need to be set.

API levels from 24 to 29 have been tested to work.

If the build includes Qt, environment variables `ANDROID_SDK` and `ANDROID_NDK` need to be set as well but can otherwise be omitted.
This is an example command for a default build with no disabled dependencies:

ANDROID_SDK=/home/user/Android/Sdk ANDROID_NDK=/home/user/Android/Sdk/ndk-bundle make HOST=aarch64-linux-android ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/user/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin


## Building and packaging

Expand Down

0 comments on commit 6393bdc

Please sign in to comment.