Building aircrack-ng binaries (and friends) for Android.

Here is what I had todo to make aircrack-ng compile and run under Android using ndk-build.
I am also publishing the patch needed (previous patches has already been accepted in git) with the hope it will assist others as well.

1. Download and build iw (and libnl – this repo bundles the two):

git clone https://github.com/imlinhao/android-iw-libnl3.git
cd android-iw-libnl3/android_toolchain/
ndk-build
cd -

2. Save the following patch as android-aircrack.patch

diff -Naur android-aircrack/external/aircrack-ng/Android.mk android-aircrack.patched/external/aircrack-ng/Android.mk
--- android-aircrack/external/aircrack-ng/Android.mk	1970-01-01 00:00:00.000000000 +0000
+++ android-aircrack.patched/external/aircrack-ng/Android.mk	2014-03-28 15:51:23.795858371 +0000
@@ -0,0 +1,136 @@
+#
+# aircrack-ng for Android NDK
+#
+# by ziggy @ ZIMPERIUM.com
+#
+
+LOCAL_PATH:=$(call my-dir)
+
+include_aircrack_file:= \
+	$(LOCAL_PATH)/src/osdep          \
+	$(LOCAL_PATH)/src/include        \
+	$(LOCAL_PATH)/src/osdep/radiotap \
+	$(LOCAL_PATH)/src                \
+	$(NDK_PROJECT_PATH)/external/libpcap/ \
+	$(NDK_PROJECT_PATH)/external/openssl/include
+
+#
+# building static libraries
+#
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:= src/osdep/osdep.c src/osdep/airpcap.c src/osdep/file.c src/osdep/common.c src/osdep/network.c src/osdep/linux.c src/osdep/linux_tap.c src/osdep/radiotap/radiotap.c
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+LOCAL_MODULE:=libosdep
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/aircrack-ptw-lib.c src/sha1-sse2.S src/uniqueiv.c src/common.c src/crypto.c
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+LOCAL_SHARED_LIBRARIES:=libcrypto libssl
+LOCAL_MODULE:=libaircrack-ptw
+include $(BUILD_STATIC_LIBRARY)
+
+#
+# building executables
+#
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/aircrack-ng.c
+LOCAL_MODULE:=aircrack-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libaircrack-ptw
+LOCAL_SHARED_LIBRARIES:=libcrypto
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/aireplay-ng.c src/common.c src/crypto.c
+LOCAL_MODULE:=aireplay-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/airodump-ng.c src/uniqueiv.c src/common.c src/crypto.c           
+LOCAL_MODULE:=airodump-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/besside-ng-crawler.c
+LOCAL_MODULE:=besside-ng-crawler
+LOCAL_C_INCLUDES:=$(NDK_PROJECT_PATH)/libpcap/ $(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep
+LOCAL_SHARED_LIBRARIES:=libpcap
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/buddy-ng.c src/common.c
+LOCAL_MODULE:=buddy-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/airtun-ng.c src/common.c src/crypto.c
+LOCAL_MODULE:=airtun-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep
+LOCAL_SHARED_LIBRARIES:=libcrypto
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/besside-ng.c
+LOCAL_MODULE:=besside-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep libaircrack-ptw
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/wesside-ng.c
+LOCAL_MODULE:=wesside-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep libaircrack-ptw
+LOCAL_SHARED_LIBRARIES:=libcrypto
+LOCAL_LDLIBS := -lz
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/easside-ng.c
+LOCAL_MODULE:=easside-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep libaircrack-ptw
+LOCAL_LDLIBS := -lz
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/airdecap-ng.c
+LOCAL_MODULE:=airdecap-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep libaircrack-ptw
+LOCAL_SHARED_LIBRARIES:=libcrypto
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=src/airbase-ng.c
+LOCAL_MODULE:=airbase-ng
+LOCAL_C_INCLUDES:=$(include_aircrack_file)
+LOCAL_STATIC_LIBRARIES:=libosdep libaircrack-ptw
+LOCAL_SHARED_LIBRARIES:=libcrypto
+LOCAL_CFLAGS += -D_REVISION=0 -DRADIOTAP_SUPPORT_OVERRIDES
+include $(BUILD_EXECUTABLE)
+
+
diff -Naur android-aircrack/external/aircrack-ng/src/aircrack-ng.c android-aircrack.patched/external/aircrack-ng/src/aircrack-ng.c
--- android-aircrack/external/aircrack-ng/src/aircrack-ng.c	2014-03-28 15:58:55.119858371 +0000
+++ android-aircrack.patched/external/aircrack-ng/src/aircrack-ng.c	2014-03-28 15:41:08.135858371 +0000
@@ -40,7 +40,7 @@
 #define _GNU_SOURCE
 
 #include <sys/types.h>
-#include <sys/termios.h>
+#include <termios.h>
 #include <sys/ioctl.h>
 #include <sys/wait.h>
 #include <sys/stat.h>
diff -Naur android-aircrack/external/aircrack-ng/src/besside-ng.c android-aircrack.patched/external/aircrack-ng/src/besside-ng.c
--- android-aircrack/external/aircrack-ng/src/besside-ng.c	2014-03-28 15:58:55.123858371 +0000
+++ android-aircrack.patched/external/aircrack-ng/src/besside-ng.c	2014-03-28 15:41:08.135858371 +0000
@@ -51,6 +51,7 @@
 #include <errno.h>
 #include <netdb.h>
 #include <unistd.h>
+#include <pthread.h>
 
 #include "aircrack-ng.h"
 #include "version.h"
diff -Naur android-aircrack/external/aircrack-ng/src/besside-ng-crawler.c android-aircrack.patched/external/aircrack-ng/src/besside-ng-crawler.c
--- android-aircrack/external/aircrack-ng/src/besside-ng-crawler.c	2014-03-28 15:58:55.123858371 +0000
+++ android-aircrack.patched/external/aircrack-ng/src/besside-ng-crawler.c	2014-03-28 15:41:08.135858371 +0000
@@ -41,7 +41,7 @@
 #include <errno.h>
 #include <sys/stat.h>
 
-#include <pcap.h>
+#include <pcap/pcap.h>
 
 // Statistics
 uint32_t stats_files = 0;
@@ -350,4 +350,4 @@
   printf("WPA Network count:  %12d\n", stats_networks);
   
   return 0;
-}
\ No newline at end of file
+}
diff -Naur android-aircrack/external/aircrack-ng/src/osdep/radiotap/radiotap.c android-aircrack.patched/external/aircrack-ng/src/osdep/radiotap/radiotap.c
--- android-aircrack/external/aircrack-ng/src/osdep/radiotap/radiotap.c	2014-03-28 15:58:55.127858370 +0000
+++ android-aircrack.patched/external/aircrack-ng/src/osdep/radiotap/radiotap.c	2014-03-28 15:41:08.135858371 +0000
@@ -15,6 +15,7 @@
  */
 #include "radiotap_iter.h"
 #include "platform.h"
+#include "byteorder.h"
 
 /* function prototypes and related defs are in radiotap_iter.h */
 
diff -Naur android-aircrack/external/aircrack-ng/src/wesside-ng.c android-aircrack.patched/external/aircrack-ng/src/wesside-ng.c
--- android-aircrack/external/aircrack-ng/src/wesside-ng.c	2014-03-28 15:58:55.131858370 +0000
+++ android-aircrack.patched/external/aircrack-ng/src/wesside-ng.c	2014-03-28 15:41:08.135858371 +0000
@@ -33,7 +33,7 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/termios.h>
+#include <termios.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
diff -Naur android-aircrack/external/Android.mk android-aircrack.patched/external/Android.mk
--- android-aircrack/external/Android.mk	1970-01-01 00:00:00.000000000 +0000
+++ android-aircrack.patched/external/Android.mk	2014-03-28 15:41:08.139858371 +0000
@@ -0,0 +1 @@
+include $(call all-subdir-makefiles)
diff -Naur android-aircrack/external/libpcap/Android.mk android-aircrack.patched/external/libpcap/Android.mk
--- android-aircrack/external/libpcap/Android.mk	2014-03-28 15:58:56.695858370 +0000
+++ android-aircrack.patched/external/libpcap/Android.mk	2014-03-28 15:47:11.063858371 +0000
@@ -20,7 +20,6 @@
         pcap.c\
         pcap-common.c\
         pcap-linux.c\
-        pcap-netfilter-linux.c\
 	savefile.c\
 	scanner.c\
         sf-pcap.c\
diff -Naur android-aircrack/external/libpcap/config.h android-aircrack.patched/external/libpcap/config.h
--- android-aircrack/external/libpcap/config.h	2014-03-28 15:58:56.699858370 +0000
+++ android-aircrack.patched/external/libpcap/config.h	2014-03-28 16:16:43.687858370 +0000
@@ -66,7 +66,7 @@
 /* #undef HAVE_LINUX_COMPILER_H */
 
 /* Define to 1 if you have the <linux/ethtool.h> header file. */
-#define HAVE_LINUX_ETHTOOL_H 1
+/* #undef HAVE_LINUX_ETHTOOL_H */
 
 /* Define to 1 if you have the <linux/if_packet.h> header file. */
 #define HAVE_LINUX_IF_PACKET_H 1
diff -Naur android-aircrack/external/openssl/Apps.mk android-aircrack.patched/external/openssl/Apps.mk
--- android-aircrack/external/openssl/Apps.mk	2014-03-28 15:58:56.227858371 +0000
+++ android-aircrack.patched/external/openssl/Apps.mk	2014-03-28 15:41:16.511858370 +0000
@@ -24,13 +24,3 @@
 include $(LOCAL_PATH)/android-config.mk
 include $(BUILD_EXECUTABLE)
 
-include $(CLEAR_VARS)
-LOCAL_MODULE:= openssl
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := $(host_src_files)
-LOCAL_SHARED_LIBRARIES := $(local_shared_libraries)
-LOCAL_C_INCLUDES := $(host_c_includes)
-LOCAL_CFLAGS := $(host_c_flags)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
-include $(LOCAL_PATH)/android-config.mk
-include $(BUILD_HOST_EXECUTABLE)
diff -Naur android-aircrack/external/openssl/Crypto.mk android-aircrack.patched/external/openssl/Crypto.mk
--- android-aircrack/external/openssl/Crypto.mk	2014-03-28 15:58:56.227858371 +0000
+++ android-aircrack.patched/external/openssl/Crypto.mk	2014-03-28 15:41:16.511858370 +0000
@@ -45,31 +45,3 @@
 LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
 include $(BUILD_SHARED_LIBRARY)
 
-#######################################
-# host shared library
-include $(CLEAR_VARS)
-include $(LOCAL_PATH)/android-config.mk
-LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
-LOCAL_SRC_FILES += $(host_src_files)
-LOCAL_CFLAGS += $(host_c_flags) -DPURIFY
-LOCAL_C_INCLUDES += $(host_c_includes)
-LOCAL_LDLIBS += -ldl
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE:= libcrypto
-LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
-include $(BUILD_HOST_SHARED_LIBRARY)
-
-########################################
-# host static library, which is used by some SDK tools.
-
-include $(CLEAR_VARS)
-include $(LOCAL_PATH)/android-config.mk
-LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
-LOCAL_SRC_FILES += $(host_src_files)
-LOCAL_CFLAGS += $(host_c_flags) -DPURIFY
-LOCAL_C_INCLUDES += $(host_c_includes)
-LOCAL_LDLIBS += -ldl
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE:= libcrypto_static
-LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
-include $(BUILD_HOST_STATIC_LIBRARY)
diff -Naur android-aircrack/external/openssl/Ssl.mk android-aircrack.patched/external/openssl/Ssl.mk
--- android-aircrack/external/openssl/Ssl.mk	2014-03-28 15:58:56.227858371 +0000
+++ android-aircrack.patched/external/openssl/Ssl.mk	2014-03-28 15:41:16.511858370 +0000
@@ -42,27 +42,3 @@
 LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
 include $(BUILD_SHARED_LIBRARY)
 
-#######################################
-# host shared library
-include $(CLEAR_VARS)
-include $(LOCAL_PATH)/android-config.mk
-LOCAL_SRC_FILES += $(host_src_files)
-LOCAL_CFLAGS += $(host_c_flags)
-LOCAL_C_INCLUDES += $(host_c_includes)
-LOCAL_SHARED_LIBRARIES += libcrypto $(log_shared_libraries)
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE:= libssl
-LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
-include $(BUILD_HOST_SHARED_LIBRARY)
-
-#######################################
-# ssltest
-include $(CLEAR_VARS)
-include $(LOCAL_PATH)/android-config.mk
-LOCAL_SRC_FILES:= ssl/ssltest.c
-LOCAL_C_INCLUDES += $(host_c_includes)
-LOCAL_SHARED_LIBRARIES := libssl libcrypto $(log_shared_libraries)
-LOCAL_MODULE:= ssltest
-LOCAL_MODULE_TAGS := optional
-LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
-include $(BUILD_EXECUTABLE)
diff -Naur android-aircrack/external/wireless-tools/Android.mk android-aircrack.patched/external/wireless-tools/Android.mk
--- android-aircrack/external/wireless-tools/Android.mk	2014-03-28 15:58:57.039858371 +0000
+++ android-aircrack.patched/external/wireless-tools/Android.mk	2014-03-28 15:41:16.511858370 +0000
@@ -14,9 +14,6 @@
 # limitations under the License.
 #
 
-ifneq ($(TARGET_SIMULATOR),true)
-ifeq ($(BOARD_WPA_SUPPLICANT_DRIVER),WEXT)
-
 LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 
@@ -59,5 +56,3 @@
 ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
     $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS)
 
-endif
-endif
diff -Naur android-aircrack/jni/Android.mk android-aircrack.patched/jni/Android.mk
--- android-aircrack/jni/Android.mk	1970-01-01 00:00:00.000000000 +0000
+++ android-aircrack.patched/jni/Android.mk	2014-03-28 15:41:16.511858370 +0000
@@ -0,0 +1,2 @@
+LOCAL_PATH:=$(call my-dir)
+include $(LOCAL_PATH)/external/Android.mk
diff -Naur android-aircrack/jni/Application.mk android-aircrack.patched/jni/Application.mk
--- android-aircrack/jni/Application.mk	1970-01-01 00:00:00.000000000 +0000
+++ android-aircrack.patched/jni/Application.mk	2014-03-28 15:41:16.511858370 +0000
@@ -0,0 +1,5 @@
+APP_ABI          := armeabi
+APP_PLATFORM     := android-9
+APP_PROJECT_PATH := $(shell pwd)
+APP_BUILD_SCRIPT := $(APP_PROJECT_PATH)/external/Android.mk
+

3. Download, patch, and build aircrack-ng & wireless_tools (openssl & libpcap are dependencies):

git clone https://github.com/aircrack-ng/aircrack-ng                         external/aircrack-ng
git clone https://github.com/CyanogenMod/android_external_openssl            external/openssl
git clone https://github.com/CobraDroid/android_external_libpcap.git         external/libpcap
git clone https://github.com/CyanogenMod/android_external_wireless-tools.git external/wireless-tools
patch -p1 -i android-aircrack.patch
ndk-build

4. Enjoy

ls -l android-iw-libnl3/android_toolchain/libs/armeabi libs/armeabi/
Advertisements

18 Comments

  1. Thank you for this tutor! On last step i have ld error:
    $ ndk-build
    [armeabi] Executable : airbase-ng
    …/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libosdep.a(radiotap.o): in function ieee80211_radiotap_iterator_init:/home/user/dev/airocrack-ng/external/aircrack-ng/src/osdep/radiotap/radiotap.c:104: error: undefined reference to ‘le16toh’
    …/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libosdep.a(radiotap.o): in function ieee80211_radiotap_iterator_init:/home/user/dev/airocrack-ng/external/aircrack-ng/src/osdep/radiotap/radiotap.c:108: error: undefined reference to ‘le16toh’
    …/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libosdep.a(radiotap.o): in function ieee80211_radiotap_iterator_init:/home/user/dev/airocrack-ng/external/aircrack-ng/src/osdep/radiotap/radiotap.c:110: error: undefined reference to ‘le32toh’
    …/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libosdep.a(radiotap.o): in function ieee80211_radiotap_iterator_init:/home/user/dev/airocrack-ng/external/aircrack-ng/src/osdep/radiotap/radiotap.c:130: error: undefined reference to ‘le32toh’
    …/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libosdep.a(radiotap.o): in function ieee80211_radiotap_iterator_next:/home/user/dev/airocrack-ng/external/aircrack-ng/src/osdep/radiotap/radiotap.c:316: error: undefined reference to ‘le16toh’
    …/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libosdep.a(radiotap.o): in function ieee80211_radiotap_iterator_next:/home/user/dev/airocrack-ng/external/aircrack-ng/src/osdep/radiotap/radiotap.c:373: error: undefined reference to ‘le32toh’
    collect2: ld returned 1 exit status
    make: *** [obj/local/armeabi/airbase-ng] Error 1

    1. And I had to comment out further ‘include $(BUILD_HOST_EXECUTABLE)’,’include $(BUILD_HOST_SHARED_LIBRARY)’ and ‘include $(BUILD_HOST_STATIC_LIBRARY)’ in /external/openssl/Crypto.mk and /external/openssl/Apps.mk files

      1. it seems the patch wasn’t applied properly, cause it should have removed all the “BUILD_HOST…” stuff.
        also, regarding to the aircrack-ng fails, iirc its a missing include file (look at the patch – its adding “#include “byteorder.h”” to radiotap.c, which seems to be lacking).

        i recommend you check for *.rej files after applying the patch – perhaps you got some rejections from the patch.
        hth.

  2. Please someone can explain the “right” procedure? What I have to modify in path? From what directory I have to apply patch? Please help me.

    1. Soon I will put patched repositories for the tools, so you won’t need to. Stay tuned for zROM (and thus – aircrack repositories…) updates.

  3. Today, the sources are a bit different and the patch does not work anymore.
    I’m getting:
    external/aircrack-ng/src/airodump-ng.c:4635: error: undefined reference to ‘dprintf’.
    It looks like dprintf() is now called fdprintf().

    external/libpcap/pcap-linux.c:279:27: fatal error: linux/ethtool.h: No such file or directory
    fix:
    #undef HAVE_LINUX_ETHTOOL_H
    in external/libpcap/config.h

  4. Hello
    I tried your tuto, but I’m facing this error :

    [armeabi] Compile thumb : aircrack-ptw <= crypto.c
    [armeabi] StaticLibrary : libaircrack-ptw.a
    [armeabi] Executable : airbase-ng
    /home/android/android-aircrack/external/aircrack-ng/src/crypto.c:90: error: undefined reference to 'RC4_set_key'
    /home/android/android-aircrack/external/aircrack-ng/src/crypto.c:91: error: undefined reference to 'RC4'
    collect2: error: ld returned 1 exit status
    make: *** [obj/local/armeabi/airbase-ng] Error 1

    any idea ?

    1. I havn’t touched in that since, sorry.

      wtbs, looks like its missing RC4 from libcrypto include files. make sure its included when compiling libcrypto.

  5. Thank you for having taken the time to answer Z4ZIGGY, even if you don’t work on it anymore.
    Any suggestion if very helpful for me, since I’m quite new in Linux and NDK building.
    When my ndk-build stops with error, I see a generated libcrypto.so file in the obj/local/armeabi folder of project, but this file is just 5,7kB of size … it seems very small, don’t you think ?
    So the problem could be with libcrypto lib compilation, or after that a linking problem ….
    I’m searching :-p
    Thanks

    1. I agree, the libcrypto fails to built (is a clear marker). Maybe the patch fails or something else goes wrong – I need to take a look but am too busy atm. If I’ll work on it I’ll open a github repo to track changes so its easier to maintain. I’ll update this post if so.

  6. Error is here: Crypto.mk:524:local_c_includes := \
    external/openssl \
    fixing by making soft link: ln -s /root/jni/external /root/jni/external/openssl/
    lost more than 2 days to find error, blame on you! 😀

  7. I have taken the static libs from https://github.com/guardianproject/android-external-openssl-ndk-static/tree/master/jni and resolved the RC4 error. But… next error 😉

    [armeabi] Executable : aircrack-ng
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:507: error: undefined reference to ‘linecount’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:292: error: undefined reference to ‘free_ssecore’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4067: error: undefined reference to ‘init_ssecore’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4089: error: undefined reference to ‘init_atoi’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4096: error: undefined reference to ‘free_ssecore’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4127: error: undefined reference to ‘init_wpapsk’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4177: error: undefined reference to ‘cpuinfo’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4177: error: undefined reference to ‘xpmk1’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4177: error: undefined reference to ‘xpmk2’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4177: error: undefined reference to ‘xpmk3’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4177: error: undefined reference to ‘xpmk4’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4177: error: undefined reference to ‘xpmk5’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4177: error: undefined reference to ‘xpmk6’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4177: error: undefined reference to ‘xpmk7’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4177: error: undefined reference to ‘xpmk8’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4256: error: undefined reference to ‘free_ssecore’
    /home/fabian/Programmierung/android-aircrack/jni/external/aircrack-ng/src/aircrack-ng.c:4325: error: undefined reference to ‘linecount’
    collect2: error: ld returned 1 exit status
    make: *** [obj/local/armeabi/aircrack-ng] Error 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s