Native registration unable to find class 'com/android/server/Watchdog'问题

    今天编译完android4.0系统之后,烧写进去,启动一直停留在“android”字样,查看logcat,信息如下:

adb logcat

--------- beginning of /dev/log/system
I/Vold    ( 1028): Vold 2.1 (the revenge) firing up
D/Vold    ( 1028): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold    ( 1028): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/Vold    ( 1028): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
--------- beginning of /dev/log/main
I/DEBUG   ( 1033): 400d8670 f04f2006 94015380 94029303 ebc8f7f5  . O..S..........
I/DEBUG   ( 1033): 400d8680 4622a905 f7f52002 f7f4ebd2 2106ef5c  .."F. ......\..!
I/DEBUG   ( 1033):
I/DEBUG   ( 1033): code around lr:
I/DEBUG   ( 1033): 400dbee0 41f0e92d 46804c0c 447c2600 68a56824  -..A.L.F.&|D$h.h
I/DEBUG   ( 1033): 400dbef0 e0076867 300cf9b5 dd022b00 47c04628  gh.....0.+..(F.G
I/DEBUG   ( 1033): 400dbf00 35544306 37fff117 6824d5f4 d1ee2c00  .CT5...7..$h.,..
I/DEBUG   ( 1033): 400dbf10 e8bd4630 bf0081f0 000285fa 41f0e92d  0F..........-..A
I/DEBUG   ( 1033): 400dbf20 fb01b086 9004f602 461f4815 4615460c  .........H.F.F.F
I/DEBUG   ( 1033):
I/DEBUG   ( 1033): memory map around addr deadbaad:
I/DEBUG   ( 1033): bee7d000-bee9e000 [stack]
I/DEBUG   ( 1033): (no map for address)
I/DEBUG   ( 1033): ffff0000-ffff1000 [vectors]
I/DEBUG   ( 1033):
I/DEBUG   ( 1033): stack:
I/DEBUG   ( 1033):     bee9da50  01a2a830  [heap]
I/DEBUG   ( 1033):     bee9da54  577d682c  /data/dalvik-cache/system@[email protected]@classes.dex
I/DEBUG   ( 1033):     bee9da58  40b603e8  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   ( 1033):     bee9da5c  bee9da94  [stack]
I/DEBUG   ( 1033):     bee9da60  40104720  /system/lib/libc.so
I/DEBUG   ( 1033):     bee9da64  401046b0  /system/lib/libc.so
I/DEBUG   ( 1033):     bee9da68  00000000  
I/DEBUG   ( 1033):     bee9da6c  400dbf01  /system/lib/libc.so
I/DEBUG   ( 1033):     bee9da70  00000000  
I/DEBUG   ( 1033):     bee9da74  bee9daa4  [stack]
I/DEBUG   ( 1033):     bee9da78  01a272c8  [heap]
I/DEBUG   ( 1033):     bee9da7c  00000001  
I/DEBUG   ( 1033):     bee9da80  40255678  /system/lib/libandroid_runtime.so
I/DEBUG   ( 1033):     bee9da84  400db06d  /system/lib/libc.so
I/DEBUG   ( 1033):     bee9da88  df0027ad  
I/DEBUG   ( 1033):     bee9da8c  00000000  
I/DEBUG   ( 1033): #00 bee9da90  409bfcca  /system/lib/libdvm.so
I/DEBUG   ( 1033):     bee9da94  577d682c  /data/dalvik-cache/system@[email protected]@classes.dex
I/DEBUG   ( 1033):     bee9da98  409c0df6  /system/lib/libdvm.so
I/DEBUG   ( 1033):     bee9da9c  01a272c8  [heap]
I/DEBUG   ( 1033):     bee9daa0  4024f0a1  /system/lib/libandroid_runtime.so
I/DEBUG   ( 1033):     bee9daa4  fffffbdf  
I/DEBUG   ( 1033):     bee9daa8  00000001  
I/DEBUG   ( 1033):     bee9daac  01a272c8  [heap]
I/DEBUG   ( 1033):     bee9dab0  4024f0a1  /system/lib/libandroid_runtime.so
I/DEBUG   ( 1033):     bee9dab4  4006e285  /system/lib/libnativehelper.so
I/DEBUG   ( 1033): #01 bee9dab8  01a272c8  [heap]
I/DEBUG   ( 1033):     bee9dabc  00000000  
I/DEBUG   ( 1033):     bee9dac0  40255974  /system/lib/libandroid_runtime.so
I/DEBUG   ( 1033):     bee9dac4  402559d8  /system/lib/libandroid_runtime.so
I/DEBUG   ( 1033):     bee9dac8  01a272c8  [heap]
I/DEBUG   ( 1033):     bee9dacc  bee9dbc4  [stack]
I/DEBUG   ( 1033):     bee9dad0  0000907e  /system/bin/app_process
I/DEBUG   ( 1033):     bee9dad4  401fe553  /system/lib/libandroid_runtime.so
I/ServiceManager( 1027): service 'media.audio_flinger' died
I/ServiceManager( 1027): service 'media.player' died
I/ServiceManager( 1027): service 'media.camera' died
I/ServiceManager( 1027): service 'media.audio_policy' died
I/Netd    ( 4795): Netd 1.0 starting
I/        ( 4794): ServiceManager: 0x16e5958
E/AudioHardware( 4794): Can't load libsecril-client.so
I/AudioFlinger( 4794): Loaded primary audio interface from LEGACY Audio HW HAL (audio)
I/AudioFlinger( 4794): Using 'LEGACY Audio HW HAL' (audio.primary) as the primary audio interface
I/AudioFlinger( 4794): Loaded a2dp audio interface from A2DP Audio HW HAL (audio)
D/AudioHardwareInterface( 4794): setMode(NORMAL)
E/AudioHardware( 4794): setMode  mode=0 !!!!
I/CameraService( 4794): CameraService started (pid=4794)
V/CameraHardwareSec( 4794): int android::HAL_getNumberOfCameras()
E/AudioHardware( 4794): Opening outPutStream !!!!
I/AudioFlinger( 4794): AudioFlinger's thread 0x16e65a0 ready to run
W/AudioFlinger( 4794): Thread AudioOut_1 cannot connect to the power manager service
D/AudioHardware( 4794): AudioStreamOutALSA::setParameters() routing=2
E/AudioHardware( 4794): write_to_sub buff[0]=1
D/AudioHardware( 4794): ### setVoiceVolume_l
I/AudioPolicyService( 4794): Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)
D/AndroidRuntime( 4822):
D/AndroidRuntime( 4822): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime( 4822): CheckJNI is ON
D/dalvikvm( 4822): DexOpt: incorrect opt magic number (0xff ff ff ff)
D/dalvikvm( 4822): ODEX file is stale or bad; removing and retrying (/data/dalvik-cache/system@[email protected]@classes.dex)
W/dalvikvm( 4822): Zip: inflate zerr=-3 (nIn=0x153b66b aIn=1229 nOut=0x153c4d4 aOut=30316)
E/dalvikvm( 4822): Unable to extract+optimize DEX from '/system/framework/services.jar'
D/dalvikvm( 4822): Unable to process classpath element '/system/framework/services.jar'
E/JNIHelp ( 4822): Native registration unable to find class 'com/android/server/Watchdog', aborting
F/libc    ( 4822): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
I/DEBUG   ( 1033): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 1033): Build fingerprint: 'Android/full_smdkv210/smdkv210:4.0.3/IML77/eng.hm.20140117.094917:eng/test-keys'
I/DEBUG   ( 1033): pid: 4822, tid: 4822  >>> zygote <<<
I/DEBUG   ( 1033): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I/DEBUG   ( 1033):  r0 deadbaad  r1 00000001  r2 a0000000  r3 00000000
I/DEBUG   ( 1033):  r4 00000000  r5 00000027  r6 014de2c8  r7 00000001
I/DEBUG   ( 1033):  r8 4020d678  r9 401f3cc6  10 0000904c  fp 00009062
I/DEBUG   ( 1033):  ip ffffffff  sp becdfa90  lr 400f1f01  pc 400ee660  cpsr 60000030
I/DEBUG   ( 1033):  d0  74726f6261202c27  d1  7265767265732f64
I/DEBUG   ( 1033):  d2  56e1c20856e1c173  d3  56e1c27856e1c273
I/DEBUG   ( 1033):  d4  56eb82e856eb82b0  d5  56eb835856eb8320
I/DEBUG   ( 1033):  d6  56eb83c856eb8390  d7  56eb843856eb8400
I/DEBUG   ( 1033):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   ( 1033):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   ( 1033):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   ( 1033):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   ( 1033):  d16 0000000040b7f608  d17 0000000000000000
I/DEBUG   ( 1033):  d18 41ba2bb76e000000  d19 0000000000000000
I/DEBUG   ( 1033):  d20 0000000000000000  d21 0000000000000000
I/DEBUG   ( 1033):  d22 0000000000000000  d23 0000000000000000
I/DEBUG   ( 1033):  d24 0000000000000000  d25 0000000000000000
I/DEBUG   ( 1033):  d26 0000000000000000  d27 0000000000000000
I/DEBUG   ( 1033):  d28 0000000000000000  d29 0000000000000000
I/DEBUG   ( 1033):  d30 0000000000000000  d31 0000000000000000
I/DEBUG   ( 1033):  scr 60000010
I/DEBUG   ( 1033):
I/DEBUG   ( 1033):          #00  pc 00017660  /system/lib/libc.so
I/DEBUG   ( 1033):          #01  pc 0000c282  /system/lib/libnativehelper.so (jniRegisterNativeMethods)
I/DEBUG   ( 1033):          #02  pc 00046550  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime21registerNativeMethodsEP7_JNIEnvPKcPK15JNINativeMethodi)
I/DEBUG   ( 1033):          #03  pc 0007e41c  /system/lib/libandroid_runtime.so (_ZN7android32register_android_server_WatchdogEP7_JNIEnv)
I/DEBUG   ( 1033):          #04  pc 0004665c  /system/lib/libandroid_runtime.so
I/DEBUG   ( 1033):          #05  pc 0004668e  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime8startRegEP7_JNIEnv)
I/DEBUG   ( 1033):          #06  pc 00046784  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime5startEPKcS2_)

        刚开始认为是找不到“com/android/server/WatchDog”这个文件造成的,结果是因为services.jar这个jar包的问题,重新push这个/system/framework/services.jar到/system/framework/目录下即可,重启启动就可以正常启动机器了。

        之前编译完的系统都是可以正常启动的,不知道是不是编译完,打包的时候出了问题,有待考证。

           这种解决方法还是不能解决根本问题,打包好的img烧进去还是起不来,说什么不能从.jar文件解压DEX,这个原因是因为在打包.img文件时出错了,我最后删掉/system/app/下面几个没用apk,再重新打包烧进去就可以正常启动了。

你可能感兴趣的:(Native registration unable to find class 'com/android/server/Watchdog'问题)