This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id: Portfile 51955 2009-06-07 10:04:10Z arthurk@macports.org $ | |
PortSystem 1.0 | |
PortGroup python26 1.0 | |
name umit | |
version 1.0 | |
revision 1 | |
epoch 1 | |
categories net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LOCAL_PATH := $(call my-dir) | |
LOCAL_PATH := ./jni | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := libpcap-t | |
LOCAL_SRC_FILES := libpcap-native.c | |
LOCAL_C_INCLUDES := $(NDK_ROOT)/external/libpcap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
. | |
. | |
. | |
D/dalvikvm( 9630): GC_EXPLICIT freed 39 objects / 1936 bytes in 1004ms | |
D/dalvikvm( 102): GC_EXPLICIT freed 14083 objects / 797472 bytes in 347ms | |
I/installd( 74): unlink /data/dalvik-cache/data@app@com.umit.android.libpcap-1.apk@classes.dex | |
D/AndroidRuntime(10099): Shutting down VM | |
I/AndroidRuntime(10099): NOTE: attach of thread 'Binder Thread #3' failed | |
D/dalvikvm(10099): Debugger has detached; object registry had 1 entries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <jni.h> | |
#include <string.h> | |
#include <android/log.h> | |
#include <pcap.h> | |
#define DEBUG_TAG "Sample_LIBPCAP_DEBUGGING" | |
void Java_com_umit_android_libpcap_libpcap_testLog(JNIEnv * env, jobject this, jstring logThis) | |
{ | |
jboolean isCopy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Angad-Singhs-MacBook:libpcaptest angadsg$ ~/android-ndk-r5b/ndk-build | |
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver | |
Gdbsetup : libs/armeabi/gdb.setup | |
Compile thumb : pcaptest <= libpcap-native.c | |
Compile thumb : pcap <= bpf_dump.c | |
Compile thumb : pcap <= bpf_filter.c | |
Compile thumb : pcap <= bpf_image.c | |
Compile thumb : pcap <= etherent.c | |
Compile thumb : pcap <= fad-gifc.c | |
Compile thumb : pcap <= gencode.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I/ActivityManager( 102): Start proc org.umit.android.libpcaptest for activity org.umit.android.libpcaptest/.libpcaptest: pid=24234 uid=10134 gids={} | |
W/ResourceType( 223): getEntry failing because entryIndex 638 is beyond type entryCount 112 | |
W/ResourceType( 223): Failure getting entry for 0x7f02027e (t=1 e=638) in package 0: 0x80000001 | |
W/ResourceType( 102): Skipping entry 0x7f040007 in package table 0 because it is not complex! | |
W/ResourceType( 102): Skipping entry 0x7f040008 in package table 0 because it is not complex! | |
W/ResourceType( 223): getEntry failing because entryIndex 335 is beyond type entryCount 112 | |
W/ResourceType( 223): Failure getting entry for 0x7f02014f (t=1 e=335) in package 0: 0x80000001 | |
W/dalvikvm(24234): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lorg/umit/android/libpcaptest/libpcaptest;.<clinit> | |
W/dalvikvm(24234): Class init failed in newInstance call (Lorg/umit/android/libpcaptest/libpcaptest;) | |
D/AndroidRuntime(24234): Shutting down VM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D/AndroidRuntime( 574): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< | |
D/AndroidRuntime( 574): CheckJNI is ON | |
D/AndroidRuntime( 574): --- registering native functions --- | |
D/AndroidRuntime( 574): Shutting down VM | |
D/dalvikvm( 574): Debugger has detached; object registry had 1 entries | |
I/AndroidRuntime( 574): NOTE: attach of thread 'Binder Thread #3' failed | |
D/AndroidRuntime( 582): | |
D/AndroidRuntime( 582): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< | |
D/AndroidRuntime( 582): CheckJNI is ON | |
D/AndroidRuntime( 582): --- registering native functions --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USER PID PPID VSIZE RSS WCHAN PC NAME | |
root 1 0 296 204 c009b74c 0000ca4c S /init | |
root 2 0 0 0 c004e72c 00000000 S kthreadd | |
root 3 2 0 0 c003fdc8 00000000 S ksoftirqd/0 | |
root 4 2 0 0 c004b2c4 00000000 S events/0 | |
root 5 2 0 0 c004b2c4 00000000 S khelper | |
root 6 2 0 0 c004b2c4 00000000 S suspend | |
root 7 2 0 0 c004b2c4 00000000 S kblockd/0 | |
root 8 2 0 0 c004b2c4 00000000 S cqueue | |
root 9 2 0 0 c018179c 00000000 S kseriod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D/AndroidRuntime( 345): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< | |
D/AndroidRuntime( 345): CheckJNI is ON | |
D/AndroidRuntime( 345): --- registering native functions --- | |
D/dalvikvm( 177): GC_EXPLICIT freed 339 objects / 19944 bytes in 95ms | |
D/PackageParser( 71): Scanning package: /data/app/vmdl35976.tmp | |
I/PackageManager( 71): Removing non-system package:org.umit.android.libpcaptest | |
I/ActivityManager( 71): Force stopping package org.umit.android.libpcaptest uid=10036 | |
D/PackageManager( 71): Scanning package org.umit.android.libpcaptest | |
I/PackageManager( 71): Package org.umit.android.libpcaptest codePath changed from /data/app/org.umit.android.libpcaptest-1.apk to /data/app/org.umit.android.libpcaptest-2.apk; Retaining data and using new | |
I/PackageManager( 71): /data/app/org.umit.android.libpcaptest-2.apk changed; unpacking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process p; | |
try { | |
p = Runtime.getRuntime().exec("su"); | |
try { | |
p.waitFor(); | |
if (p.exitValue() != 255) { | |
// TODO Code to run on success | |
Log.v("Sample_LIBPCAP_DEBUGGING", "ROOT"); | |
} | |
else { |
OlderNewer