如何在JNI和库中找到引用.so?

时间:2014-01-22 06:13:05

标签: java android c++ java-native-interface

错误:

01-02 04:34:10.405 V/drmagent-jni( 8994): jni/drmagent-oai/linux/src/OAI_Android.c:562 Set Secure Time Callback entered
01-02 04:34:10.405 W/dalvikvm( 8994): JNI WARNING: 0x41bd4510 is not a valid JNI reference
01-02 04:34:10.405 W/dalvikvm( 8994):              in Lcom/safenet/drmagent/DRMManager;.nativeInitializeAgent:(Ljava/lang/String;Ljava/lang/String;)I (GetObjectClass)
01-02 04:34:10.405 I/dalvikvm( 8994): "main" prio=5 tid=1 RUNNABLE
01-02 04:34:10.405 I/dalvikvm( 8994):   | group="main" sCount=0 dsCount=0 obj=0x4153e710 self=0x41528610
01-02 04:34:10.405 I/dalvikvm( 8994):   | sysTid=8994 nice=0 sched=0/0 cgrp=apps handle=1073881084
01-02 04:34:10.405 I/dalvikvm( 8994):   | state=R schedstat=( 213615626 73237189 353 ) utm=16 stm=5 core=0
01-02 04:34:10.405 I/dalvikvm( 8994):   at com.safenet.drmagent.DRMManager.nativeInitializeAgent(Native Method)
01-02 04:34:10.405 I/dalvikvm( 8994):   at com.safenet.drmagent.DRMManager.initialize(DRMManager.java:257)
01-02 04:34:10.405 I/dalvikvm( 8994):   at com.safenet.drmagent.DRMManager.DRMinitNoCallBack(DRMManager.java:166)
01-02 04:34:10.405 I/dalvikvm( 8994):   at com.fet.eBookTown.MainAct$1.handleMessage(MainAct.java:67)
01-02 04:34:10.405 I/dalvikvm( 8994):   at android.os.Handler.dispatchMessage(Handler.java:99)
01-02 04:34:10.405 I/dalvikvm( 8994):   at android.os.Looper.loop(Looper.java:137)
01-02 04:34:10.405 I/dalvikvm( 8994):   at android.app.ActivityThread.main(ActivityThread.java:5136)
01-02 04:34:10.405 I/dalvikvm( 8994):   at java.lang.reflect.Method.invokeNative(Native Method)
01-02 04:34:10.405 I/dalvikvm( 8994):   at java.lang.reflect.Method.invoke(Method.java:525)
01-02 04:34:10.405 I/dalvikvm( 8994):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
01-02 04:34:10.405 I/dalvikvm( 8994):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
01-02 04:34:10.405 I/dalvikvm( 8994):   at dalvik.system.NativeStart.main(Native Method)
01-02 04:34:10.405 I/dalvikvm( 8994): 
01-02 04:34:10.405 E/dalvikvm( 8994): VM aborting
01-02 04:34:10.415 F/libc    ( 8994): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 8994

01-02 04:34:10.515 I/DEBUG   (  233): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
01-02 04:34:10.665 I/DEBUG   (  233):     r0 00000000  r1 00000000  r2 00000000  r3 40936c70
01-02 04:34:10.665 I/DEBUG   (  233):     r4 deadd00d  r5 0000020c  r6 40913c11  r7 40913bce
01-02 04:34:10.665 I/DEBUG   (  233):     r8 40912e7e  r9 40913bda  sl 40936c70  fp 40913c10
01-02 04:34:10.665 I/DEBUG   (  233):     ip 23224001  sp bede8dd8  lr 00000001  pc 408bd890  cpsr 60000030
01-02 04:34:10.665 I/DEBUG   (  233):     d0  0000000000000000  d1  0000000000000000
01-02 04:34:10.665 I/DEBUG   (  233):     d2  0000000000000000  d3  0000000000000000
01-02 04:34:10.665 I/DEBUG   (  233):     d4  ff00df64df64df64  d5  000a000a000a000a
01-02 04:34:10.665 I/DEBUG   (  233):     d6  05fa053a053a053a  d7  000000003f800000
01-02 04:34:10.665 I/DEBUG   (  233):     d8  0000000000000000  d9  0000000000000000
01-02 04:34:10.665 I/DEBUG   (  233):     d10 0000000000000000  d11 0000000000000000
01-02 04:34:10.665 I/DEBUG   (  233):     d12 0000000000000000  d13 0000000000000000
01-02 04:34:10.665 I/DEBUG   (  233):     d14 0000000000000000  d15 0000000000000000
01-02 04:34:10.675 I/DEBUG   (  233):     d16 2065766974614e28  d17 0a29646f6874654d
01-02 04:34:10.675 I/DEBUG   (  233):     d18 002e00640069006f  d19 00650074006e0069
01-02 04:34:10.675 I/DEBUG   (  233):     d20 006c0061006e0072  d21 006c00650074002e
01-02 04:34:10.675 I/DEBUG   (  233):     d22 006f006800700065  d23 0049002e0079006e
01-02 04:34:10.675 I/DEBUG   (  233):     d24 0000031700000315  d25 0000031a00000318
01-02 04:34:10.675 I/DEBUG   (  233):     d26 000003100000030e  d27 0000031300000312
01-02 04:34:10.675 I/DEBUG   (  233):     d28 0c5943170c528315  d29 0c66831a0c5fc318
01-02 04:34:10.675 I/DEBUG   (  233):     d30 0c5940000c528000  d31 0c6680000c5fc000
01-02 04:34:10.675 I/DEBUG   (  233):     scr 60000010
01-02 04:34:10.675 I/DEBUG   (  233): 
01-02 04:34:10.675 I/DEBUG   (  233): backtrace:
01-02 04:34:10.675 I/DEBUG   (  233):     #00  pc 00048890  /system/lib/libdvm.so (dvmAbort+67)
01-02 04:34:10.675 I/DEBUG   (  233):     #01  pc 0003b837  /system/lib/libdvm.so
01-02 04:34:10.675 I/DEBUG   (  233):     #02  pc 0003c6bf  /system/lib/libdvm.so
01-02 04:34:10.675 I/DEBUG   (  233):     #03  pc 00043961  /system/lib/libdvm.so
01-02 04:34:10.685 I/DEBUG   (  233):     #04  pc 0004a91d  /data/app-lib/com.fet.eBookTown-1/libdrmagent_jni.so
01-02 04:34:10.685 I/DEBUG   (  233):     #05  pc 0004c61d  /data/app-lib/com.fet.eBookTown-1/libdrmagent_jni.so
01-02 04:34:10.685 I/DEBUG   (  233):     #06  pc 0004e969  /data/app-lib/com.fet.eBookTown-1/libdrmagent_jni.so (OSD_STime_GetSecureTime+52)
01-02 04:34:10.685 I/DEBUG   (  233):     #07  pc 0004e723  /data/app-lib/com.fet.eBookTown-1/libdrmagent_jni.so (DrmAgent_LogStart+26)
01-02 04:34:10.685 I/DEBUG   (  233):     #08  pc 0004d807  /data/app-lib/com.fet.eBookTown-1/libdrmagent_jni.so (DrmAgent_CreateContext+38)
01-02 04:34:10.685 I/DEBUG   (  233):     #09  pc 0004c595  /data/app-lib/com.fet.eBookTown-1/libdrmagent_jni.so (drm_wrapper_initialize+164)
01-02 04:34:10.685 I/DEBUG   (  233):     #10  pc 0004b4d3  /data/app-lib/com.fet.eBookTown-1/libdrmagent_jni.so (Java_com_safenet_drmagent_DRMManager_nativeInitializeAgent+166)
01-02 04:34:10.685 I/DEBUG   (  233):     #11  pc 000203cc  /system/lib/libdvm.so (dvmPlatformInvoke+112)
01-02 04:34:10.685 I/DEBUG   (  233):     #12  pc 00050d8f  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
01-02 04:34:10.685 I/DEBUG   (  233):     #13  pc 0003b481  /system/lib/libdvm.so (dvmCheckCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+8)
01-02 04:34:10.685 I/DEBUG   (  233):     #14  pc 0005277d  /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+184)
01-02 04:34:10.685 I/DEBUG   (  233):     #15  pc 00029860  /system/lib/libdvm.so
01-02 04:34:10.685 I/DEBUG   (  233):     #16  pc 0002e218  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
01-02 04:34:10.685 I/DEBUG   (  233):     #17  pc 000630a7  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+350)
01-02 04:34:10.685 I/DEBUG   (  233):     #18  pc 0006accb  /system/lib/libdvm.so
01-02 04:34:10.685 I/DEBUG   (  233):     #19  pc 00029860  /system/lib/libdvm.so
01-02 04:34:10.685 I/DEBUG   (  233):     #20  pc 0002e218  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
01-02 04:34:10.685 I/DEBUG   (  233):     #21  pc 00062de9  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+292)
01-02 04:34:10.685 I/DEBUG   (  233):     #22  pc 0004c973  /system/lib/libdvm.so
01-02 04:34:10.685 I/DEBUG   (  233):     #23  pc 0003f9dd  /system/lib/libdvm.so
01-02 04:34:10.685 I/DEBUG   (  233):     #24  pc 0004eedb  /system/lib/libandroid_runtime.so
01-02 04:34:10.685 I/DEBUG   (  233):     #25  pc 0004fb6b  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+378)
01-02 04:34:10.685 I/DEBUG   (  233):     #26  pc 0000105b  /system/bin/app_process
01-02 04:34:10.685 I/DEBUG   (  233):     #27  pc 0000dcf7  /system/lib/libc.so (__libc_init+50)
01-02 04:34:10.685 I/DEBUG   (  233):     #28  pc 00000d7c  /system/bin/app_process
01-02 04:34:10.685 I/DEBUG   (  233): 
01-02 04:34:10.685 I/DEBUG   (  233): stack:
01-02 04:34:10.685 I/DEBUG   (  233):          bede8d98  400711c4  /system/lib/libc.so
01-02 04:34:10.695 I/DEBUG   (  233):          bede8d9c  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8da0  400711c4  /system/lib/libc.so
01-02 04:34:10.695 I/DEBUG   (  233):          bede8da4  40074da0  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8da8  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dac  40049191  /system/lib/libc.so (__sflush_locked+40)
01-02 04:34:10.695 I/DEBUG   (  233):          bede8db0  40071264  /system/lib/libc.so
01-02 04:34:10.695 I/DEBUG   (  233):          bede8db4  400711c4  /system/lib/libc.so
01-02 04:34:10.695 I/DEBUG   (  233):          bede8db8  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dbc  4004a16b  /system/lib/libc.so (_fwalk+34)
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dc0  bede8ddc  [stack]
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dc4  0000020c  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dc8  40913c11  /system/lib/libdvm.so
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dcc  40913bce  /system/lib/libdvm.so
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dd0  df0027ad  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dd4  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):     #00  bede8dd8  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8ddc  6c756e28  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8de0  0000296c  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8de4  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8de8  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dec  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8df0  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8df4  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8df8  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8dfc  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8e00  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8e04  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8e08  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8e0c  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8e10  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          bede8e14  00000000  
01-02 04:34:10.695 I/DEBUG   (  233):          ........  ........
01-02 04:34:10.695 I/DEBUG   (  233):     #01  bede8ff0  bede90f4  [stack]
01-02 04:34:10.695 I/DEBUG   (  233):          bede8ff4  41bd4510  /dev/ashmem/dalvik-heap (deleted)
01-02 04:34:10.695 I/DEBUG   (  233):          bede8ff8  bede90e8  [stack]
01-02 04:34:10.695 I/DEBUG   (  233):          bede8ffc  40913bd8  /system/lib/libdvm.so
01-02 04:34:10.695 I/DEBUG   (  233):          bede9000  bede90e8  [stack]
01-02 04:34:10.695 I/DEBUG   (  233):          bede9004  bede90f4  [stack]
01-02 04:34:10.695 I/DEBUG   (  233):          bede9008  40913c11  /system/lib/libdvm.so
01-02 04:34:10.695 I/DEBUG   (  233):          bede900c  408b16c3  /system/lib/libdvm.so
01-02 04:34:10.695 I/DEBUG   (  233):     #02  bede9010  00000076  
01-02 04:34:10.695 I/DEBUG   (  233):          bede9014  408b185d  /system/lib/libdvm.so
01-02 04:34:10.695 I/DEBUG   (  233):          bede9018  74655320  
01-02 04:34:10.695 I/DEBUG   (  233):          bede901c  63655320  
01-02 04:34:10.695 I/DEBUG   (  233):          bede9020  20657275  
01-02 04:34:10.695 I/DEBUG   (  233):          bede9024  656d6954  
01-02 04:34:10.695 I/DEBUG   (  233):          bede9028  40074208  
01-02 04:34:10.695 I/DEBUG   (  233):          bede902c  6361626c  
01-02 04:34:10.695 I/DEBUG   (  233):          bede9030  40074208  
01-02 04:34:10.695 I/DEBUG   (  233):          bede9034  65726574  
01-02 04:34:10.695 I/DEBUG   (  233):          bede9038  bede90ec  [stack]
01-02 04:34:10.695 I/DEBUG   (  233):          bede903c  546b6f6f  /dev/ashmem/dalvik-mark-stack (deleted)
01-02 04:34:10.695 I/DEBUG   (  233):          bede9040  bede90f0  [stack]
01-02 04:34:10.695 I/DEBUG   (  233):          bede9044  50202f00  /dev/ashmem/dalvik-heap (deleted)
01-02 04:34:10.695 I/DEBUG   (  233):          bede9048  383d4449  
01-02 04:34:10.695 I/DEBUG   (  233):          bede904c  00343939  
01-02 04:34:10.695 I/DEBUG   (  233):          ........  ........
01-02 04:34:10.715 I/DEBUG   (  233): 


01-02 04:34:10.775 I/DEBUG   (  233): memory map around fault addr deadd00d:
01-02 04:34:10.775 I/DEBUG   (  233):     bedc9000-bedea000 rw- [stack]
01-02 04:34:10.775 I/DEBUG   (  233):     (no map for address)
01-02 04:34:10.775 I/DEBUG   (  233):     ffff0000-ffff1000 r-x [vectors]

我找到了“JNI WARNING: 0x41bd4510 is not a valid JNI reference”,现在我想找到0x41bd4510的位置,怎么做?

0 个答案:

没有答案