Mình bug lỗi này lâu quá không tìm ra được nguyên nhân, nhờ mọi người có kinh nghiệm xin chỉ giáo.
mình sử dụng board tiny4412 bản 1208, và build lại source code trong đĩa dvd đi kèm board gồm
+system.img : "android-4.2.2_r1-fs-20131222.tar.gz"
+zImage : "linux-3.5-20140109.tgz"
+uboot : uboot_tiny4412-20130729.tgz
dùng sdcard để load uboot, zImage, system.img nhưng đến đoạn start zygote thì bị fail
check thấy đến đoạn startVm>JNI_CreateJavaVM>dvmStartup()> dvmClassStartup() > processClassPath ()->while loop prepareCpe() thì bị fail ở chỗ này.
tại đây vòng lặp while loop load các file core.jar, core-junit.jar,... thì thấy trong log debug thông báo: " mmc1: Card removed during transfer!"
sau thông báo này quá trình load file *.jar của dalvik bị fail.
Đoạn thông báo đó được gọi từ kernel trong hàm sdhci_tasklet_card() file :linux-3.5_tiny4412\drivers\mmc\host\sdhci.c
Tại sao dalvik load file *jar lại bị lỗi này? làm sao để fix lỗi này cho dalvik khởi động bình thường?
còn đây là logcat :
====
mình sử dụng board tiny4412 bản 1208, và build lại source code trong đĩa dvd đi kèm board gồm
+system.img : "android-4.2.2_r1-fs-20131222.tar.gz"
+zImage : "linux-3.5-20140109.tgz"
+uboot : uboot_tiny4412-20130729.tgz
dùng sdcard để load uboot, zImage, system.img nhưng đến đoạn start zygote thì bị fail
check thấy đến đoạn startVm>JNI_CreateJavaVM>dvmStartup()> dvmClassStartup() > processClassPath ()->while loop prepareCpe() thì bị fail ở chỗ này.
tại đây vòng lặp while loop load các file core.jar, core-junit.jar,... thì thấy trong log debug thông báo: " mmc1: Card removed during transfer!"
sau thông báo này quá trình load file *.jar của dalvik bị fail.
Đoạn thông báo đó được gọi từ kernel trong hàm sdhci_tasklet_card() file :linux-3.5_tiny4412\drivers\mmc\host\sdhci.c
Code:
if (host->mrq && !(host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) && !(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT)) { pr_err("%s: Card removed during transfer!\n", mmc_hostname(host->mmc)); pr_err("%s: Resetting controller.\n", mmc_hostname(host->mmc)); sdhci_reset(host, SDHCI_RESET_CMD); sdhci_reset(host, SDHCI_RESET_DATA); host->mrq->cmd->error = -ENOMEDIUM; tasklet_schedule(&host->finish_tasklet); }
còn đây là logcat :
====
Code:
D/AndroidRuntime( 105): D/AndroidRuntime( 105): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<< D/AndroidRuntime( 105): AndroidRuntime:start: startVm D/AndroidRuntime( 105): CheckJNI is ON D/AndroidRuntime( 105): startVm: threshold D/AndroidRuntime( 105): startVm: jitOpBuf D/AndroidRuntime( 105): startVm: jitMethodBug D/AndroidRuntime( 105): startVm: portable D/AndroidRuntime( 105): startVm: checkDexSum D/AndroidRuntime( 105): startVm: AssertBuf D/AndroidRuntime( 105): startVm: parseExtraOpts D/AndroidRuntime( 105): startVm: JNI_CreateJavaVM D/dalvikvm( 105): JNI_CreateJavaVM: D/dalvikvm( 105): JNI_CreateJavaVM: dvmUseCheckedJniVm D/dalvikvm( 105): JNI_CreateJavaVM: dvmCreateJNIEnv D/dalvikvm( 105): JNI_CreateJavaVM: dvmStartup() D/dalvikvm( 105): dvmOptimizeDexFile D/dalvikvm( 105): DexOpt: --- BEGIN 'core.jar' (bootstrap=1) --- D/dalvikvm( 105): dvmOptimizeDexFile: optimizing D/dalvikvm( 105): dvmOptimizeDexFile: fork D/dalvikvm( 105): DexOpt: waiting for verify+opt, pid=278 D/dalvikvm( 105): dvmOptimizeDexFile: dvmChangeStatus D/dalvikvm( 278): dvmOptimizeDexFile: pid == 0 D/dalvikvm( 278): dvmOptimizeDexFile: getenv D/dalvikvm( 278): dvmOptimizeDexFile: execv D/dalvikvm( 278): dvmOptimizeDexFile: curArg: /system/bin/dexopt D/dalvikvm( 278): dvmOptimizeDexFile: curArg: --dex D/dalvikvm( 278): dvmOptimizeDexFile: curArg: 27 D/dalvikvm( 278): dvmOptimizeDexFile: curArg: 13 D/dalvikvm( 278): dvmOptimizeDexFile: curArg: 40 D/dalvikvm( 278): dvmOptimizeDexFile: curArg: 3041940 D/dalvikvm( 278): dvmOptimizeDexFile: curArg: /system/framework/core.jar D/dalvikvm( 278): dvmOptimizeDexFile: curArg: 1165724474 D/dalvikvm( 278): dvmOptimizeDexFile: curArg: 1789422968 D/dalvikvm( 278): dvmOptimizeDexFile: curArg: 61 D/dalvikvm( 278): dvmOptimizeDexFile: execv->execFile : /system/bin/dexopt D/dalvikvm( 278): fromDex: vmBuildVersion D/dalvikvm( 278): fromDex : vmBuildVersion D/dalvikvm( 278): fromDex : vmBuildVersion D/dalvikvm( 278): fromDex : vmBuildVersion D/dalvikvm( 278): fromDex : vmBuildVersion D/dalvikvm( 278): fromDex : vmBuildVersion D/dalvikvm( 278): fromDex : vmBuildVersion D/dalvikvm( 278): Args: fd=13 off=40 len=3041940 name='/system/framework/core.jar' mod=0x457b8b3a crc=0x6aa86d78 flg=61 (argc=1) D/dalvikvm( 278): bootclasspath is '' D/dalvikvm( 278): fromDex: dvmPrepForDexOpt D/dalvikvm( 278): dvmPrepForDexOpt: blockSignals D/dalvikvm( 278): dvmPrepForDexOpt: setCommandLineDefaults D/dalvikvm( 278): dvmPrepForDexOpt: free D/dalvikvm( 278): dvmPrepForDexOpt: strdup D/dalvikvm( 278): dvmPrepForDexOpt: dvmGcStartup D/dalvikvm( 278): dvmPrepForDexOpt: dvmThreadStartup D/dalvikvm( 278): dvmPrepForDexOpt: dvmInlineNativeStartup D/dalvikvm( 278): dvmPrepForDexOpt: dvmRegisterMapStartup D/dalvikvm( 278): dvmPrepForDexOpt: dvmInstanceofStartup D/dalvikvm( 278): dvmPrepForDexOpt: dvmClassStartup D/dalvikvm( 278): fromDex: dvmContinueOptimization D/dalvikvm( 278): Continuing optimization (/system/framework/core.jar, isb=1) D/dalvikvm( 278): dvmContinueOptimization: mmap D/dalvikvm( 278): dvmContinueOptimization: rewriteDex E/BandwidthController( 102): runIptablesCmd(): failed /system/bin/iptables -A bw_INPUT -m owner --socket-exists res=256 E/BandwidthController( 102): runIptablesCmd(): failed /system/bin/ip6tables -A bw_INPUT -m owner --socket-exists res=256 D/MDnsDS ( 102): MDnsSdListener::Hander starting up D/MDnsDS ( 102): MDnsSdListener starting to monitor D/MDnsDS ( 102): Going to poll with pollCount 1 D/dalvikvm( 278): Ignoring duplicate verify attempt on Ljava/lang/Object; D/dalvikvm( 278): Ignoring duplicate verify attempt on Ljava/lang/Class; D/dalvikvm( 278): Ignoring duplicate verify attempt on Ljava/lang/ref/Reference; D/dalvikvm( 278): Ignoring duplicate verify attempt on Ljava/lang/ref/ReferenceQueue; D/dalvikvm( 278): Ignoring duplicate verify attempt on Ljava/lang/ref/FinalizerReference; D/dalvikvm( 278): DexOpt: load 41ms, verify+opt 619ms, 1615380 bytes D/dalvikvm( 278): dvmContinueOptimization: dvmDexFileOpenPartial D/dalvikvm( 278): dvmContinueOptimization: dvmGenerateRegisterMaps D/dalvikvm( 278): dvmContinueOptimization: updateChecksum D/dalvikvm( 278): dvmContinueOptimization: dvmDexFileFree [ 15.365000] mmc1: Card removed during transfer! [ 15.365000] mmc1: Resetting controller. [ 15.365000] mmcblk0: unknown error -123 sending read/write command, card status 0xc00 [ 15.365000] end_request: I/O error, dev mmcblk0, sector 1060460 [ 15.370000] Buffer I/O error on device mmcblk0p3, logical block 33280 … [ 16.270000] Mali: mali_dvfs[3].vol = 1050000 D/dalvikvm( 278): dvmContinueOptimization: msync [ 16.355000] mmc1: Card removed during transfer! [ 16.355000] mmc1: Resetting controller. [ 16.355000] mmcblk0: unknown error -123 sending read/write command, card status 0xc00
Comment