aboutsummaryrefslogtreecommitdiff
path: root/docs/README.Android.md
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2019-07-19 12:46:37 +0200
committerRechi <Rechi@users.noreply.github.com>2019-07-19 12:46:37 +0200
commit798a31ca0a941cc264c555a9e5e83915fefadb5a (patch)
treeb7b2f5a25485f30edd5d03a4ce381e845b7ec780 /docs/README.Android.md
parent80bb7cda417491fa6b7adda4bd4d73bdb0ab6808 (diff)
[android] use ndk 20
Diffstat (limited to 'docs/README.Android.md')
-rw-r--r--docs/README.Android.md41
1 files changed, 8 insertions, 33 deletions
diff --git a/docs/README.Android.md b/docs/README.Android.md
index a2d4d14ea7..f124b611c5 100644
--- a/docs/README.Android.md
+++ b/docs/README.Android.md
@@ -65,7 +65,7 @@ sudo apt install autoconf build-essential curl default-jdk gawk git gperf lib32s
**[back to top](#table-of-contents)**
## 3. Prerequisites
-Building Kodi for Android requires Android NDK revision 18. For the SDK just use the latest available.
+Building Kodi for Android requires Android NDK revision 20. For the SDK just use the latest available.
* **[Android SDK](https://developer.android.com/studio/index.html)** (Look for `Get just the command line tools`)
* **[Android NDK](https://developer.android.com/ndk/downloads/index.html)**
@@ -85,7 +85,7 @@ unzip $HOME/Downloads/sdk-tools-linux-4333796.zip -d $HOME/android-tools/android
Extract Android NDK:
```
-unzip $HOME/Downloads/android-ndk-r18-linux-x86_64.zip -d $HOME/android-tools
+unzip $HOME/Downloads/android-ndk-r20-linux-x86_64.zip -d $HOME/android-tools
```
### 3.2. Configure Android SDK
@@ -98,46 +98,21 @@ cd $HOME/android-tools/android-sdk-linux/tools/bin
./sdkmanager "build-tools;25.0.3"
```
-### 3.3. Set up the Android toolchain
-To be able to build Kodi and the libraries it depends on for the Android platform you first need to set up an Android toolchain using the Android NDK.
-
-Change to Android NDK tools directory:
-```
-cd $HOME/android-tools/android-ndk-r18/build/tools
-```
-
-Set up the aarch64 toolchain:
-```
-./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/aarch64-linux-android-vanilla/android-21 --platform=android-21 --toolchain=aarch64-linux-android
-```
-
-Set up the arm toolchain:
-```
-./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/arm-linux-androideabi-vanilla/android-21 --platform=android-21 --toolchain=arm-linux-androideabi
-```
-
-Set up the x86 toolchain:
-```
-./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/x86-linux-android-vanilla/android-21 --platform=android-21 --toolchain=x86-linux-android
-```
-
-**NOTE:** You only need the toolchain for your target architecture but toolchains are installed in different directories and will not interfere with each other.
-
-### 3.4. Create a key to sign debug APKs
+### 3.3. Create a key to sign debug APKs
All packages must be signed. The following command will generate a self-signed debug key. If the result is a cryptic error, it probably just means a debug key already existed.
```
keytool -genkey -keystore ~/.android/debug.keystore -v -alias androiddebugkey -dname "CN=Android Debug,O=Android,C=US" -keypass android -storepass android -keyalg RSA -keysize 2048 -validity 10000
```
-### 3.5. macOS specific prerequisites
+### 3.4. macOS specific prerequisites
* **[Java Development Kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)** installed.
* Normal macOS installations filesystem is case insensitive but compiling for Android requires a case sensitive filesystem. Generate a writeable hdd image and format it with hfs+ (case sensitive) issuing
* `hdiutil create -type UDIF -fs 'Case-sensitive Journaled HFS+' -size 20g -volname android-dev $HOME/android-dev.dmg`
* Whenever you want to compile/develop you need to mount the image
* `open ~/android-dev.dmg`
* Once you have your hdd image with case sensitive hfs+ file system execute all the steps inside of this filesystem. You need to adapt all paths in this guide so that they match your local environment. As an example here is a configure line that demonstrates possible paths:
- * `./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=arm-linux-androideabi --with-sdk-path=/Volumes/android-dev/android/android-sdk-macosx --with-ndk-path=/Volumes/android-dev/android/android-ndk-r18 --with-toolchain=/Volumes/android-dev/android/android-toolchain-arm/android-21 --prefix=/Volumes/android-dev/android/xbmc-depends`
+ * `./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=arm-linux-androideabi --with-sdk-path=/Volumes/android-dev/android/android-sdk-macosx --with-ndk-path=/Volumes/android-dev/android/android-ndk-r20 --prefix=/Volumes/android-dev/android/xbmc-depends`
**[back to top](#table-of-contents)** | **[back to section top](#3-prerequisites)**
@@ -163,17 +138,17 @@ cd $HOME/kodi/tools/depends
Configure build for aarch64:
```
-./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/aarch64-linux-android-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends
+./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends
```
Or configure build for arm:
```
-./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/arm-linux-androideabi-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends
+./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends
```
Or configure build for x86:
```
-./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/x86-linux-android-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends
+./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends
```
Build tools and dependencies: