From a8a5fbbf0d4f846b1afe2529d881fa5b3bc5dc12 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Wed, 5 Aug 2015 20:04:03 +0200 Subject: [PATCH] Second attempt at PIE binary for new android Github PR #14 --- CHANGELOG | 1 + Makefile | 4 ++-- README-android.txt | 4 ++-- src/Android.mk | 9 --------- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 894ceaa..731df84 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,7 @@ master: - Add support for IPv6 in the server. Raw mode will be with same protocol as used for login. Traffic inside tunnel is still IPv4. + - Update android build to support 5.0 (Lollipop) and newer. 2014-06-16: 0.7.0 "Kryoptonite" - Partial IPv6 support (#107) diff --git a/Makefile b/Makefile index 6dd964a..4be98d1 100644 --- a/Makefile +++ b/Makefile @@ -59,12 +59,12 @@ iodine-latest: #non-PIE build for old android cross-android-old: @(cd src; $(MAKE) base64u.c base64u.h) - @(cd src; ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk MY_PLATFORM=old) + @(cd src; ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_PLATFORM=android-3) #Position-indepedent build for modern android cross-android: @(cd src; $(MAKE) base64u.c base64u.h) - @(cd src; ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk MY_PLATFORM=kitkat) + @(cd src; ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_PLATFORM=android-16) iodine-latest-android.zip: iodine-latest @mv iodine-latest iodine-latest-android diff --git a/README-android.txt b/README-android.txt index b7e73bb..8d4a15d 100644 --- a/README-android.txt +++ b/README-android.txt @@ -37,13 +37,13 @@ For more information: http://blog.bokhorst.biz/5123 3. Build: cd src make base64u.h base64u.c - ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk MY_PLATFORM=kitkat + ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_PLATFORM=android-16 or run "make cross-android" in the iodine root directory. To build for other archs, specify TARGET_ARCH_ABI: "make cross-android TARGET_ARCH_ABI=x86" For older android versions (pre-kitkat), build with "make cross-android" in the - root directory, or manually like above but without the MY_PLATFORM part. + root directory, or manually like above but with APP_PLATFORM=android-3 The iodine binary ends up in src/libs//iodine diff --git a/src/Android.mk b/src/Android.mk index 3767ab6..81136e5 100644 --- a/src/Android.mk +++ b/src/Android.mk @@ -20,14 +20,5 @@ LOCAL_SRC_FILES := tun.c dns.c read.c encoding.c login.c base32.c base64.c base6 LOCAL_CFLAGS := -c -DANDROID -DLINUX -DIFCONFIGPATH=\"/system/bin/\" -Wall -DGITREVISION=\"$(HEAD_COMMIT)\" LOCAL_LDLIBS := -lz -#Choose platform level (for PIE support) -ifeq (kitkat, $(strip $(MY_PLATFORM))) -APP_PLATFORM := android-16 -LOCAL_CFLAGS += -fPIE -LOCAL_LDFLAGS += -fPIE -pie -else -APP_PLATFORM := android-3 -endif - include $(BUILD_EXECUTABLE)