Posto un thread che ho iniziato su xda-developers ma che non ha avuto molto successo. Spero che qualcuno qui su Androidiani sia più interessato ...
Hello,
I'm trying to cross-compile aircrack-ng 1.1 for a Toshiba AC100 in Ubuntu 12.04 x86_64 .
Android version:
4.1.2
CyanogenMod Version:
10-20121202-UNOFFICIAL-ac100
Kernel Version:
3.1.10+
zombah@gilgamesh #1
Sun Dec 2 15:23:02 MSK 2012
GCC version:
arm-linux-androideabi-gcc (GCC) 4.6 20120106 (prerelease)
Copyright (C) 2011 Free Software Foundation, Inc.
OPENSSL
I cross-compiled openssl 1.0.1c using the arm compiler found in ndk-r8d. The compiling process went smooth using this sources:
openssl.org/source/openssl-1.0.1c.tar.gz
The commands I typed to compile openssl were:
codice:
export TOOL_PREFIX=~/android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-
export SYSROOT=~/android/android-ndk-r8d/platforms/android-14/arch-arm
export CC="$TOOL_PREFIX-gcc -march=armv7-a -mfloat-abi=softfp --sysroot=$SYSROOT"
./Configure android-armv7 shared no-asm
make
AIRCRACK-NG
Then I compiled aircrack-ng-1.1 from sources (the previous exports need to be recast):
I also changed the aircrack-ng-1.1/src/Makefile to suite my needs:
line 7 replaced with
CFLAGS += -Iinclude -I~/android/openssl-1.0.1c/include
line 99 replaced with
LIBSSL = -L~/android/openssl-1.0.1c -l:libssl.so -l:libcrypto.so $(LDFLAGS)
"
-lpthread" replaced with "
-lc" allover the Makefile
in file common.mak
line 70 replaced with
CFLAGS ?= -g -W -Wall -O3
line 59-61 replaced with
else
ifndef CC
CC = $(TOOL_PREFIX)gcc
endif
endif
<termios.h> substituted to <sys/termios.h> in ./src/aircrack-ng.c, ./src/airodump-ng.c and ./src/wesside-ng.c
I moved the bins and libraries to the Toshiba using adb and set right permissions:
codice:
make sqlite=false
make install
I've checked aircrack-ng with a test .cap file and it does work.
To use airmon-ng I installed busybox and compiled iwpriv and iw since they are needed.
I tested it with busybox 5.2 and it does work. (airmon-ng script first line must be replaced with "#!/system/bin/sh")
airodump-ng starts correctly in the emulator but, when I try to run it onto the Toshiba AC100, it fails:
codice:
$ airodump-ng
Illegal instruction
Through DDMS I retrieved this log:
codice:
01-16 00:01:50.129: A/libc(1419): Fatal signal 4 (SIGILL) at 0x00013938 (code=1), thread 1419 (airodump-ng)
01-16 00:01:50.230: I/DEBUG(109): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-16 00:01:50.230: I/DEBUG(109): Build fingerprint: 'motorola/tervigon/wingray:4.0.4/IMM76/292727:user/release-keys'
01-16 00:01:50.230: I/DEBUG(109): pid: 1419, tid: 1419, name: airodump-ng >>> airodump-ng <<<
01-16 00:01:50.230: I/DEBUG(109): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 00013938
What can I try now? I' not able to figure out which operation is the illegal one ...