2012-10-26 68 views
0

我想在我的android設備上啓用checkjni。但是,我無法設置在stackoverflow中給出的屬性,因爲它們使用「su」或「root」。是否可以在無根據的普通Android設備上啓用checkjni?

無法在設備上啓用無root權限的checkjni?當我使用設備時,我想在logcat上看到「checkJNI ON」

更新:當我解鎖音軌播放應用程序的屏幕時,我從設備中獲得了這些信息。我如何擴展細節?我想啓用每個checkjni選項。這個街區沒有告訴我,或者沒有?

10-26 20:47:16.720: A/libc(18272): Fatal signal 11 (SIGSEGV) at 0x00000078 (code=1) 



10-26 20:47:17.145: W/SurfaceView(2094): CHECK surface infomation creating=false formatChanged=false sizeChanged=false visible=false visibleChanged=true surfaceChanged=true realSizeChanged=false redrawNeeded=false left=false top=false 
10-26 20:47:17.145: I/SurfaceFlinger(1903): id=1615 Removed SurfaceView idx=4 Map Size=6 
10-26 20:47:17.145: D/KeyguardViewMediator(2094): setHidden false 
10-26 20:47:17.145: I/SurfaceFlinger(1903): id=1615 Removed SurfaceView idx=-2 Map Size=6 
10-26 20:47:17.150: D/WallpaperWidget(2094): cleanUp() 
10-26 20:47:17.150: I/DEBUG(17071):   #00 pc 0007831e /system/lib/libdvm.so (_Z13dvmImplementsPK11ClassObjectS1_) 
10-26 20:47:17.150: I/DEBUG(17071):   #01 pc 000783fa /system/lib/libdvm.so 
10-26 20:47:17.150: I/DEBUG(17071):   #02 pc 00078390 /system/lib/libdvm.so (dvmInstanceofNonTrivial) 
10-26 20:47:17.155: D/KeyguardUpdateMonitor(2094): handleClockVisibilityChanged() 
10-26 20:47:17.155: I/DEBUG(17071):   #03 pc 00026fcc /system/lib/libdvm.so (dvmAsmSisterStart) 
10-26 20:47:17.155: D/KeyguardViewMediator(2094): adjustStatusBarLocked: mShowing=false mHidden=false isSecure=true --> flags=0x0 
10-26 20:47:17.155: I/DEBUG(17071):   #04 pc 000343b0 /system/lib/libdvm.so (_Z12dvmInterpretP6ThreadPK6MethodP6JValue) 
10-26 20:47:17.155: I/DEBUG(17071):   #05 pc 0006c8c6 /system/lib/libdvm.so (_Z15dvmInvokeMethodP6ObjectPK6MethodP11ArrayObjectS5_P11ClassObjectb) 
10-26 20:47:17.155: I/DEBUG(17071):   #06 pc 00073eba /system/lib/libdvm.so 
10-26 20:47:17.155: I/DEBUG(17071):   #07 pc 00030bcc /system/lib/libdvm.so 
10-26 20:47:17.155: I/DEBUG(17071):   #08 pc 000343b0 /system/lib/libdvm.so (_Z12dvmInterpretP6ThreadPK6MethodP6JValue) 
10-26 20:47:17.155: I/DEBUG(17071):   #09 pc 0006cb96 /system/lib/libdvm.so (_Z14dvmCallMethodVP6ThreadPK6MethodP6ObjectbP6JValueSt9__va_list) 
10-26 20:47:17.155: D/KeyguardViewMediator(2094): setHidden false 
10-26 20:47:17.155: I/DEBUG(17071):   #10 pc 00054ff6 /system/lib/libdvm.so 
10-26 20:47:17.155: D/STATUSBAR-StatusBarManagerService(2094): manageDisableList what=0x0 pkg=android 
10-26 20:47:17.160: I/DEBUG(17071):   #11 pc 00049a7a /system/lib/libandroid_runtime.so 
10-26 20:47:17.160: I/DEBUG(17071):   #12 pc 0004b362 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime5startEPKcS2_) 
10-26 20:47:17.160: I/DEBUG(17071):   #13 pc 00008f0a /system/bin/app_process 
10-26 20:47:17.160: I/DEBUG(17071):   #14 pc 0001684c /system/lib/libc.so (__libc_init) 
10-26 20:47:17.160: I/DEBUG(17071): code around pc: 
10-26 20:47:17.160: I/DEBUG(17071): 409a32fc e8bd4648 f1b883fe d1050f02 f8d9e7ee HF.............. 
10-26 20:47:17.160: I/DEBUG(17071): 409a330c 6ad93000 d1f32907 f8406938 e7ef9026 .0.j.)[email protected]&... 
10-26 20:47:17.160: I/DEBUG(17071): 409a331c 6f82b510 e0072300 f8546fc4 428c4033 ...o.#[email protected] 
10-26 20:47:17.160: I/DEBUG(17071): 409a332c 2001d101 3301e003 dbf54293 bd102000 ... ...3.B... .. 
10-26 20:47:17.160: I/DEBUG(17071): 409a333c e92d4b1b 447b41f3 460e681b ea864607 .K-..A{D.h.F.F.. 
10-26 20:47:17.160: I/DEBUG(17071): code around lr: 
10-26 20:47:17.160: I/DEBUG(17071): 409a33dc 6c93e004 bf144299 20012000 bf00bd10 ...l.B... . .... 
10-26 20:47:17.160: I/DEBUG(17071): 409a33ec 6a09460a 0589b510 d5034603 f7ff4611 .F.j.....F...F.. 
10-26 20:47:17.160: I/DEBUG(17071): 409a33fc e01cff8f 78086981 d110285b f8906990 .....i.x[(...i.. 
10-26 20:47:17.160: I/DEBUG(17071): 409a340c f1bcc000 d0050f5b 428a6c99 2000bf14 ....[....l.B... 
10-26 20:47:17.160: I/DEBUG(17071): 409a341c e00c2001 6c196bd8 ffc4f7ff 4293e007 . ...k.l.......B 
10-26 20:47:17.160: I/DEBUG(17071): stack: 
10-26 20:47:17.160: I/DEBUG(17071):  bede46f8 bede4701 [stack] 
10-26 20:47:17.160: I/DEBUG(17071):  bede46fc 409a2b5f /system/lib/libdvm.so 
10-26 20:47:17.160: I/DEBUG(17071):  bede4700 40fa0b80 /dev/ashmem/dalvik-heap (deleted) 
10-26 20:47:17.160: I/DEBUG(17071):  bede4704 000000c2 
10-26 20:47:17.160: I/DEBUG(17071):  bede4708 57099d68 /dev/ashmem/dalvik-LinearAlloc (deleted) 
10-26 20:47:17.160: I/DEBUG(17071):  bede470c 583a91d4 /system/framework/framework.odex 
10-26 20:47:17.160: I/DEBUG(17071):  bede4710 00000000 
10-26 20:47:17.160: I/DEBUG(17071):  bede4714 00000000 
10-26 20:47:17.160: I/DEBUG(17071):  bede4718 01b31468 [heap] 
10-26 20:47:17.160: I/DEBUG(17071):  bede471c 01aed2e0 [heap] 
10-26 20:47:17.160: I/DEBUG(17071):  bede4720 409def9c /system/lib/libdvm.so 
10-26 20:47:17.160: I/DEBUG(17071):  bede4724 586591ec /system/framework/framework.odex 
10-26 20:47:17.160: I/DEBUG(17071):  bede4728 fffffe4c 
10-26 20:47:17.160: I/DEBUG(17071):  bede472c 4095f740 /system/lib/libdvm.so 
10-26 20:47:17.160: I/DEBUG(17071):  bede4730 df0027ad 
10-26 20:47:17.160: I/DEBUG(17071):  bede4734 00000000 
10-26 20:47:17.160: I/DEBUG(17071): #00 bede4738 34000000 
10-26 20:47:17.160: I/DEBUG(17071):  bede473c 409a33ff /system/lib/libdvm.so 
10-26 20:47:17.160: I/DEBUG(17071): #01 bede4740 34000000 
10-26 20:47:17.160: I/DEBUG(17071):  bede4744 409a3395 /system/lib/libdvm.so 

回答

0

您應該可以在未連接的設備上執行adb shell setprop debug.checkjni 1。它會影響在該點之後啓動的所有應用程序,並且您在啓動應用程序時應該在日誌中看到D Late-enabling CheckJNI

+0

我已經更新了問題與我在你的答案中設置行後得到的輸出。是否還有其他參數可以設置爲從碰撞中獲取最詳細的信息?目前,輸出沒有告訴我什麼,或者它? – frankish

+0

@frankish checkjni的任何行都應該在sigsegv之前打印,並且確保在設置debug.checkjni之後重新啓動您的應用程序。 – auselen

+0

它不會打印除此之外的任何內容。它說CheckJNI已關閉,但它隨後會多次顯示「延遲啓用CheckJNI」。但是在開始時沒有「D」,例如「D Late-Enable CheckJNI」。所以即使我用你在這裏分享的命令打開CheckJNI,我無法得到更多細節。我在這裏可能做錯了什麼? – frankish

相關問題