Kismet Wireless

Kismet Forums

 

Posted by:micmo
Subject:Building & Debugging Android-Pcap failes - pcap library missing
Date:11:36:11 16/01/2013

Hi,

I have cloned the source from git, created a new project from the source using Androids ADT bundle with Eclipse, and then tried to run/debug the project. I tried doing this using a virtual device (Galaxy Nexus AVD) as well as using an actual Galaxy Nexus via usb with usb debugging enabled.

Both times, the application starts, but then fails when it comes to loading the pcap library (PcapLogger.java:11) with the following error message:

01-16 11:25:01.455: E/AndroidRuntime(3562): FATAL EXCEPTION: main
01-16 11:25:01.455: E/AndroidRuntime(3562): java.lang.ExceptionInInitializerError
01-16 11:25:01.455: E/AndroidRuntime(3562): at net.kismetwireless.android.pcapcapture.PcapService.onStartCommand(PcapService.java:254)
01-16 11:25:01.455: E/AndroidRuntime(3562): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2656)
01-16 11:25:01.455: E/AndroidRuntime(3562): at android.app.ActivityThread.access$1900(ActivityThread.java:141)
01-16 11:25:01.455: E/AndroidRuntime(3562): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1331)
01-16 11:25:01.455: E/AndroidRuntime(3562): at android.os.Handler.dispatchMessage(Handler.java:99)
01-16 11:25:01.455: E/AndroidRuntime(3562): at android.os.Looper.loop(Looper.java:137)
01-16 11:25:01.455: E/AndroidRuntime(3562): at android.app.ActivityThread.main(ActivityThread.java:5039)
01-16 11:25:01.455: E/AndroidRuntime(3562): at java.lang.reflect.Method.invokeNative(Native Method)
01-16 11:25:01.455: E/AndroidRuntime(3562): at java.lang.reflect.Method.invoke(Method.java:511)
01-16 11:25:01.455: E/AndroidRuntime(3562): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-16 11:25:01.455: E/AndroidRuntime(3562): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-16 11:25:01.455: E/AndroidRuntime(3562): at dalvik.system.NativeStart.main(Native Method)
01-16 11:25:01.455: E/AndroidRuntime(3562): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load pcap from loader dalvik.system.PathClassLoader[dexPath=/data/app/net.kismetwireless.android.pcapcapture-1.apk,libraryPath=/data/app-lib/net.kismetwireless.android.pcapcapture-1]: findLibrary returned null
01-16 11:25:01.455: E/AndroidRuntime(3562): at java.lang.Runtime.loadLibrary(Runtime.java:365)
01-16 11:25:01.455: E/AndroidRuntime(3562): at java.lang.System.loadLibrary(System.java:535)
01-16 11:25:01.455: E/AndroidRuntime(3562): at net.kismetwireless.android.pcapcapture.PcapLogger.<clinit>(PcapLogger.java:11)
01-16 11:25:01.455: E/AndroidRuntime(3562): ... 12 more

Is there anything I need to do to the project to make it work? I can see that the pcap source etc is in the jni folder, but for some reason it is not being used when running on the AVD/device.

I've tried in both Windows and Linux development environments but no luck.

Any ideas?

Many Thanks,
Mike


Reply to this message