From 423cbec41d28fd6eff2e74b29867955b611b137b Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sun, 5 Feb 2012 00:36:15 +0100 Subject: [PATCH] Added android specific readme file, along with new make targets Also updated changelog. --- CHANGELOG | 2 ++ Makefile | 26 ++++++++++++++++++++++---- README-android.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/Makefile | 1 + 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 README-android.txt diff --git a/CHANGELOG b/CHANGELOG index 2dd30b1..c9dfdcc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -35,6 +35,8 @@ CHANGES: Patch by Hagar. - Add -R option to set OpenBSD routing domain for the DNS socket. Patch by laurent at gouloum fr, fixes #95. + - Add android patches and makefile, from Marcel Bokhorst, fixes #105. + - Added missing break in iodine.c, by Pavel Pergamenshchik, #108. 2009-06-01: 0.5.2 "WifiFree" - Fixed client segfault on OS X, #57 diff --git a/Makefile b/Makefile index b5e9888..2857b9d 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,24 @@ TARGETOS = `uname` all: @(cd src; $(MAKE) TARGETOS=$(TARGETOS) all) +cross-android: + @(cd src; $(MAKE) base64u.c base64u.h) + @(cd src; ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk) + +cross-android-dist: + @rm -rf iodine-latest-android* + @mkdir -p iodine-latest-android/armeabi iodine-latest-android/x86 + @$(MAKE) cross-android TARGET_ARCH_ABI=armeabi + @cp src/libs/armeabi/* iodine-latest-android/armeabi + @$(MAKE) cross-android TARGET_ARCH_ABI=x86 + @cp src/libs/x86/* iodine-latest-android/x86 + @cp README README-android.txt CH* TO* iodine-latest-android + @echo "Create date: " > iodine-latest-android/VERSION + @date >> iodine-latest-android/VERSION + @echo "Git version: " >> iodine-latest-android/VERSION + @git rev-parse HEAD >> iodine-latest-android/VERSION + @zip -r iodine-latest-android.zip iodine-latest-android + cross-mingw: @(cd src; $(MAKE) TARGETOS=windows32 CC=i686-mingw32-gcc all) @@ -27,11 +45,11 @@ cross-mingw-dist: cross-mingw @mkdir -p iodine-latest-win32/bin @for i in `ls bin`; do cp bin/$$i iodine-latest-win32/bin/$$i.exe; done @cp /usr/i686-mingw32/usr/bin/zlib1.dll iodine-latest-win32/bin - @cp README* CH* TO* iodine-latest-win32 + @cp README README-win32.txt CH* TO* iodine-latest-win32 @echo "Create date: " > iodine-latest-win32/VERSION @date >> iodine-latest-win32/VERSION - @echo "SVN version: " >> iodine-latest-win32/VERSION - @svnversion >> iodine-latest-win32/VERSION + @echo "Git version: " >> iodine-latest-win32/VERSION + @git rev-parse HEAD >> iodine-latest-win32/VERSION @zip -r iodine-latest-win32.zip iodine-latest-win32 install: all @@ -58,5 +76,5 @@ clean: @echo "Cleaning..." @(cd src; $(MAKE) clean) @(cd tests; $(MAKE) clean) - @rm -rf bin iodine-latest-win32* + @rm -rf bin iodine-latest-win32* iodine-latest-android* diff --git a/README-android.txt b/README-android.txt new file mode 100644 index 0000000..f08c6cf --- /dev/null +++ b/README-android.txt @@ -0,0 +1,45 @@ + + +iodine - http://code.kryo.se/iodine + +*********************************** + +Extra README file for Android + + +== Running iodine on Android: +1. Get root access on your android device + +2. Find/build a compatible tun.ko for your specific Android kernel + +3. Copy tun.ko and the iodine binary to your device: + (Almost all devices need the armeabi binary. Only Intel powered + ones need the x86 build.) + + adb push tun.ko /data/local/tmp + adb push iodine /data/local/tmp + adb shell + su + cd /data/local/tmp + chmod 777 iodine + +4. Run iodine (see the man page for parameters) + + ./iodine ... + +For more information: http://blog.bokhorst.biz/5123 + +== Building iodine for Android: +1. Download and install the Android SDK and NDK + +2. Download and unpack the iodine sources + +3. Build: + cd src + make base64u.h base64u.c + ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk + + 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" + diff --git a/src/Makefile b/src/Makefile index a5b9838..e568375 100644 --- a/src/Makefile +++ b/src/Makefile @@ -43,4 +43,5 @@ base64u.h: base64.h clean: @echo "Cleaning src/" @rm -f $(CLIENT){,.exe} $(SERVER){,.exe} *~ *.o *.core base64u.* + @rm -rf obj libs #android stuff