summaryrefslogtreecommitdiff
path: root/android/buildapk.sh
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-03-09 18:08:06 +0100
committerThomas Martitz <kugel@rockbox.org>2014-03-09 18:11:35 +0100
commit6499ce3e445e1acc5f5707fd164ad5e3c5ab0a43 (patch)
tree3e1cb19678e5ce9bfd5681d944193ede902805b6 /android/buildapk.sh
parent2a71c0853304b68835fcf87d2bae8295d64abd6c (diff)
downloadrockbox-6499ce3e445e1acc5f5707fd164ad5e3c5ab0a43.tar.gz
rockbox-6499ce3e445e1acc5f5707fd164ad5e3c5ab0a43.zip
android: Get the port up and running again
The build system needed fixes because the tools paths changed and one tool that we used (apkbuilder) was removed entirely. Recent NDKs don't ship gcc 4.4.3 anymore, therefore switch to 4.6. The code itself needed a fix for a jni reference bug that was uncovered by KitKat. The port now builds with latest sdk (r22) and ndk (r9d). Change-Id: Id74fa54ba93bbb0ee30373fbe79e92c5ff03201d
Diffstat (limited to 'android/buildapk.sh')
-rwxr-xr-xandroid/buildapk.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/android/buildapk.sh b/android/buildapk.sh
new file mode 100755
index 0000000000..340438721a
--- /dev/null
+++ b/android/buildapk.sh
@@ -0,0 +1,19 @@
1#!/bin/sh
2
3BUILDDIR=$1
4APK=$2
5SDKV=$3
6
7[ -z $ANDROID_SDK_PATH ] && exit 1
8[ -z $BUILDDIR ] && exit 1
9[ -d $BUILDDIR ] || exit 1
10
11# need to cd into the bin dir and create a symlink to the libraries
12# so that aapt puts the libraries with the correct prefix into the apk
13cd $BUILDDIR/bin
14ln -nfs $BUILDDIR/libs lib
15cp resources.ap_ $APK
16$ANDROID_SDK_PATH/build-tools/$SDKV/aapt add $APK classes.dex > /dev/null
17$ANDROID_SDK_PATH/build-tools/$SDKV/aapt add $APK lib/*/* > /dev/null
18
19exit 0