[Folio 100 General] LastStarDust:
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.

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:

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

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

line 99 replaced with

"-lpthread" replaced with "-lc" allover the Makefile​

in file common.mak

line 70 replaced with

line 59-61 replaced with

[/INDENT]

<termios.h> substituted to <sys/termios.h> in ./src/aircrack-ng.c, ./src/airodump-ng.c and ./src/wesside-ng.c

The I moved the bins and libraries to the Toshiba using adb and set right permissions:

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:

$ airodump-ng
Illegal instruction

Through DDMS I retrieved this log:

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
01-16 00:01:50.280: I/DEBUG(109): r0 00000017 r1 40050b04 r2 0c7b2450 r3 00010fc4
01-16 00:01:50.280: I/DEBUG(109): r4 40051854 r5 00045114 r6 007f5008 r7 00000001
01-16 00:01:50.280: I/DEBUG(109): r8 00024810 r9 00045174 sl 00000000 fp be9f2bec
01-16 00:01:50.280: I/DEBUG(109): ip 00000208 sp be9f09d0 lr 00013934 pc 00013938 cpsr 60000010
01-16 00:01:50.280: I/DEBUG(109): d0 0000000000000000 d1 0000000000000000
01-16 00:01:50.280: I/DEBUG(109): d2 0000000000000000 d3 0000000000000000
01-16 00:01:50.280: I/DEBUG(109): d4 0000000000000000 d5 4186191710000000
01-16 00:01:50.280: I/DEBUG(109): d6 0012750000000000 d7 4132750080000000
01-16 00:01:50.280: I/DEBUG(109): d8 0000000000000000 d9 0000000000000000
01-16 00:01:50.280: I/DEBUG(109): d10 0000000000000000 d11 0000000000000000
01-16 00:01:50.280: I/DEBUG(109): d12 0000000000000000 d13 0000000000000000
01-16 00:01:50.280: I/DEBUG(109): d14 0000000000000000 d15 0000000000000000
01-16 00:01:50.280: I/DEBUG(109): scr 00000010
01-16 00:01:50.280: I/DEBUG(109): backtrace:
01-16 00:01:50.280: I/DEBUG(109): #00 pc 0000b938 /system/bin/airodump-ng (dump_initialize+1244)
01-16 00:01:50.280: I/DEBUG(109): #01 pc 0000b930 /system/bin/airodump-ng (dump_initialize+1236)
01-16 00:01:50.280: I/DEBUG(109): stack:
01-16 00:01:50.280: I/DEBUG(109): be9f0990 00045174
01-16 00:01:50.280: I/DEBUG(109): be9f0994 00000000
01-16 00:01:50.280: I/DEBUG(109): be9f0998 be9f2bec [stack]
01-16 00:01:50.280: I/DEBUG(109): be9f099c be9f095c [stack]
01-16 00:01:50.280: I/DEBUG(109): be9f09a0 be9f0a20 [stack]
01-16 00:01:50.280: I/DEBUG(109): be9f09a4 40051854
01-16 00:01:50.280: I/DEBUG(109): be9f09a8 00045114
01-16 00:01:50.280: I/DEBUG(109): be9f09ac 00000001
01-16 00:01:50.280: I/DEBUG(109): be9f09b0 00000001
01-16 00:01:50.280: I/DEBUG(109): be9f09b4 00024810 /system/bin/airodump-ng
01-16 00:01:50.280: I/DEBUG(109): be9f09b8 007f5008 [heap]
01-16 00:01:50.280: I/DEBUG(109): be9f09bc 40051854
01-16 00:01:50.280: I/DEBUG(109): be9f09c0 40051854
01-16 00:01:50.280: I/DEBUG(109): be9f09c4 00013934 /system/bin/airodump-ng (dump_initialize+1240)
01-16 00:01:50.280: I/DEBUG(109): be9f09c8 df0027ad
01-16 00:01:50.280: I/DEBUG(109): be9f09cc 00000000
01-16 00:01:50.280: I/DEBUG(109): #00 be9f09d0 00000010
01-16 00:01:50.280: I/DEBUG(109): ........ ........
01-16 00:01:50.280: I/DEBUG(109): #01 be9f09d0 00000010
01-16 00:01:50.280: I/DEBUG(109): be9f09d4 00000000
01-16 00:01:50.280: I/DEBUG(109): be9f09d8 00000001
01-16 00:01:50.280: I/DEBUG(109): be9f09dc 00000032
01-16 00:01:50.280: I/DEBUG(109): be9f09e0 00000000
01-16 00:01:50.280: I/DEBUG(109): be9f09e4 be9f2bf4 [stack]
01-16 00:01:50.280: I/DEBUG(109): be9f09e8 00023e1c /system/bin/airodump-ng
01-16 00:01:50.280: I/DEBUG(109): be9f09ec 00000000
01-16 00:01:50.280: I/DEBUG(109): be9f09f0 be9f0a20 [stack]
01-16 00:01:50.280: I/DEBUG(109): be9f09f4 00024810 /system/bin/airodump-ng
01-16 00:01:50.280: I/DEBUG(109): be9f09f8 00000000
01-16 00:01:50.280: I/DEBUG(109): be9f09fc 00000000
01-16 00:01:50.280: I/DEBUG(109): be9f0a00 00000000
01-16 00:01:50.280: I/DEBUG(109): be9f0a04 00000000
01-16 00:01:50.280: I/DEBUG(109): be9f0a08 00000000
01-16 00:01:50.280: I/DEBUG(109): be9f0a0c 00000000
01-16 00:01:50.280: I/DEBUG(109): memory near r1:
01-16 00:01:50.280: I/DEBUG(109): 40050ae4 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 40050af4 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 40050b04 0c7b2450 00000000 00000000 00000000 P${.............
01-16 00:01:50.280: I/DEBUG(109): 40050b14 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 40050b24 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): memory near r2:
01-16 00:01:50.280: I/DEBUG(109): 0c7b2430 ffffffff ffffffff ffffffff ffffffff ................
01-16 00:01:50.280: I/DEBUG(109): 0c7b2440 ffffffff ffffffff ffffffff ffffffff ................
01-16 00:01:50.280: I/DEBUG(109): 0c7b2450 ffffffff ffffffff ffffffff ffffffff ................
01-16 00:01:50.280: I/DEBUG(109): 0c7b2460 ffffffff ffffffff ffffffff ffffffff ................
01-16 00:01:50.280: I/DEBUG(109): 0c7b2470 ffffffff ffffffff ffffffff ffffffff ................
01-16 00:01:50.280: I/DEBUG(109): memory near r3:
01-16 00:01:50.280: I/DEBUG(109): 00010fa4 e1a00003 ebffe197 e3a00000 ebffe18f ................
01-16 00:01:50.280: I/DEBUG(109): 00010fb4 e1a04008 e5880008 e3a00000 ebffe18b .@..............
01-16 00:01:50.280: I/DEBUG(109): 00010fc4 e3a03000 e3e02000 e5883020 e5882018 .0... .. 0... ..
01-16 00:01:50.280: I/DEBUG(109): 00010fd4 e588201c e5883024 e5883028 e588302c . ..$0..(0..,0..
01-16 00:01:50.280: I/DEBUG(109): 00010fe4 e5883030 e5883034 e588000c eafff966 00..40......f...
01-16 00:01:50.280: I/DEBUG(109): memory near r4:
01-16 00:01:50.280: I/DEBUG(109): 40051834 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 40051844 00000000 00000000 fffff1f0 00000001 ................
01-16 00:01:50.280: I/DEBUG(109): 40051854 00000032 00000001 00000000 00000010 2...............
01-16 00:01:50.280: I/DEBUG(109): 40051864 00000000 00000071 00000003 0000000f ....q...........
01-16 00:01:50.280: I/DEBUG(109): 40051874 00000000 00000e10 40057485 6f727545 .........t.@Euro
01-16 00:01:50.280: I/DEBUG(109): memory near r5:
01-16 00:01:50.280: I/DEBUG(109): 000450f4 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 00045104 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 00045114 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 00045124 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 00045134 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): memory near r6:
01-16 00:01:50.280: I/DEBUG(109): 007f4fe8 ffffffff ffffffff ffffffff ffffffff ................
01-16 00:01:50.280: I/DEBUG(109): 007f4ff8 ffffffff ffffffff 00000000 0000020b ................
01-16 00:01:50.280: I/DEBUG(109): 007f5008 6f79656b 302d7475 2d363131 31303030 keyout-0116-0001
01-16 00:01:50.280: I/DEBUG(109): 007f5018 6b2e3035 00737965 00000000 00000000 50.keys.........
01-16 00:01:50.280: I/DEBUG(109): 007f5028 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): memory near r8:
01-16 00:01:50.280: I/DEBUG(109): 000247f0 000000c4 000000c8 000000cc 000000d0 ................
01-16 00:01:50.280: I/DEBUG(109): 00024800 000000d4 000000d8 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 00024810 00000001 00000007 0000000d 00000002 ................
01-16 00:01:50.280: I/DEBUG(109): 00024820 00000008 00000003 0000000e 00000009 ................
01-16 00:01:50.280: I/DEBUG(109): 00024830 00000004 0000000a 00000005 0000000b ................
01-16 00:01:50.280: I/DEBUG(109): memory near r9:
01-16 00:01:50.280: I/DEBUG(109): 00045154 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 00045164 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 00045174 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 00045184 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): 00045194 00000000 00000000 00000000 00000000 ................
01-16 00:01:50.280: I/DEBUG(109): memory near fp:
01-16 00:01:50.280: I/DEBUG(109): be9f2bcc 00000000 00000000 00009a74 00023cb8 ........t....<..
01-16 00:01:50.280: I/DEBUG(109): be9f2bdc 00023cb0 00023ca8 00023cc0 00000000 .<...<...<......
01-16 00:01:50.280: I/DEBUG(109): be9f2bec 400b33d5 00000001 be9f2cf0 00000000 .3.@.....,......
01-16 00:01:50.280: I/DEBUG(109): be9f2bfc be9f2cfc be9f2d16 be9f2d3e be9f2e6b .,...-..>-..k...
01-16 00:01:50.280: I/DEBUG(109): be9f2c0c be9f2ea8 be9f2ec1 be9f2ed4 be9f2ee9 ................
01-16 00:01:50.280: I/DEBUG(109): memory near sp:
01-16 00:01:50.280: I/DEBUG(109): be9f09b0 00000001 00024810 007f5008 40051854 .....H...P..T..@
01-16 00:01:50.280: I/DEBUG(109): be9f09c0 40051854 00013934 df0027ad 00000000 T..@49...'......
01-16 00:01:50.280: I/DEBUG(109): be9f09d0 00000010 00000000 00000001 00000032 ............2...
01-16 00:01:50.280: I/DEBUG(109): be9f09e0 00000000 be9f2bf4 00023e1c 00000000 .....+...>......
01-16 00:01:50.280: I/DEBUG(109): be9f09f0 be9f0a20 00024810 00000000 00000000 ....H..........
01-16 00:01:50.280: I/DEBUG(109): code around pc:
01-16 00:01:50.280: I/DEBUG(109): 00013918 e58dc004 e08f2002 e594c004 e58dc008 ..... ..........
01-16 00:01:50.280: I/DEBUG(109): 00013928 e594c000 e58dc00c ebffd6f3 e59f3c84 .............<..
01-16 00:01:50.280: I/DEBUG(109): 00013938 f2c00010 e2850078 e2852dc6 e08f3003 ....x....-...0..
01-16 00:01:50.280: I/DEBUG(109): 00013948 e285c068 e285e070 f440078f e5931000 h...p.....@.....
01-16 00:01:50.280: I/DEBUG(109): 00013958 e30301b0 f3c71e1f e1c5a2b2 e151000a ..............Q.
01-16 00:01:50.280: I/DEBUG(109): code around lr:
01-16 00:01:50.280: I/DEBUG(109): 00013914 e59f2ca0 e58dc004 e08f2002 e594c004 .,....... ......
01-16 00:01:50.280: I/DEBUG(109): 00013924 e58dc008 e594c000 e58dc00c ebffd6f3 ................
01-16 00:01:50.280: I/DEBUG(109): 00013934 e59f3c84 f2c00010 e2850078 e2852dc6 .<......x....-..
01-16 00:01:50.280: I/DEBUG(109): 00013944 e08f3003 e285c068 e285e070 f440078f .0..h...p.....@.
01-16 00:01:50.280: I/DEBUG(109): 00013954 e5931000 e30301b0 f3c71e1f e1c5a2b2 ................
01-16 00:01:50.280: I/DEBUG(109): memory map around fault addr 00013938:
01-16 00:01:50.290: I/DEBUG(109): (no map below)
01-16 00:01:50.290: I/DEBUG(109): 00008000-00023000 /system/bin/airodump-ng
01-16 00:01:50.290: I/DEBUG(109): 00023000-00024000 /system/bin/airodump-ng
01-16 00:01:50.300: I/BootReceiver(279): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)

What can I try now? I' not able to figure out which operation is the illegal one ...