My friend got a G1 and he really love it. he hacked it and load it up with the 2.1. One day, the phone just crashed. and the lovely T-mobile logo appears on the bootup screen and never disappear. then he comes to me for any hints about the crash.
the first thing, I want to check the stacktace, or the logcat.
then I run “Adb Shell Logcat “ , Get some interesting Loops. basically, the runtime cant start zygote which is the system library process owner.
the stack looks like this.
I/Zygote ( 764): Preloading classes... |
a typical memory access error. how it comes?
then run the strace, see any hints
/system/bin/strace –ff –f –t –s 100 –o /dev/null /init
get IO error
strace -ff -F -tt -s 200 -o /dev/null /init |
I/O error is also a typical error. either caused by physical malfunction, either by code logic.
try switched one new SD card and format it, No luck. that might mean physical disk is good.
then how the code logic.
from the first stacktrace, the jar has been compied and cached to .dex. /data/dalvik-cache/system@framework@core.jar@classes.dex
can I just ask the runtime to recompile the dex.
wipe out those cache.
run “rm –rf /data/dalvik-cache/*.dex”
then “reboot”
error gone, everything works. Applause!
to be safe, I change the acl of thos dex to 111, noboday can override the existing correct dex file.