From 6499ce3e445e1acc5f5707fd164ad5e3c5ab0a43 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 9 Mar 2014 18:08:06 +0100 Subject: 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 --- android/buildapk.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 android/buildapk.sh (limited to 'android/buildapk.sh') 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 @@ +#!/bin/sh + +BUILDDIR=$1 +APK=$2 +SDKV=$3 + +[ -z $ANDROID_SDK_PATH ] && exit 1 +[ -z $BUILDDIR ] && exit 1 +[ -d $BUILDDIR ] || exit 1 + +# need to cd into the bin dir and create a symlink to the libraries +# so that aapt puts the libraries with the correct prefix into the apk +cd $BUILDDIR/bin +ln -nfs $BUILDDIR/libs lib +cp resources.ap_ $APK +$ANDROID_SDK_PATH/build-tools/$SDKV/aapt add $APK classes.dex > /dev/null +$ANDROID_SDK_PATH/build-tools/$SDKV/aapt add $APK lib/*/* > /dev/null + +exit 0 -- cgit v1.2.3