预置现象:
预装可以做反复重启开关机测试的APK,此APK开始测试时会自动开启MTK log
现象:
MTK6737N平台做反复重启开关机测试卡在开机动画界面不开机
问题分析:
抓取MTKLog,显示如下:
--------- beginning of crash
01-07 16:51:02.033 15646 15646 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
01-07 16:51:02.033 15646 15646 E AndroidRuntime: java.lang.RuntimeException: Failed to boot service com.android.server.devicepolicy.DevicePolicyManagerService$Lifecycle: onBootPhase threw an exception during phase 480
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.SystemServiceManager.startBootPhase(SystemServiceManager.java:164)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.SystemServer.startOtherServices(SystemServer.java:1435)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.SystemServer.run(SystemServer.java:399)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.SystemServer.main(SystemServer.java:271)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: Caused by: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 4874)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:614)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:886)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:874)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:896)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:241)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.LockSettingsStorage.readKeyValue(LockSettingsStorage.java:142)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.LockSettingsService.getStringUnchecked(LockSettingsService.java:709)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.LockSettingsService.getLong(LockSettingsService.java:685)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.internal.widget.LockPatternUtils.getLong(LockPatternUtils.java:1484)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.internal.widget.LockPatternUtils.getKeyguardStoredPasswordQuality(LockPatternUtils.java:1120)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.internal.widget.LockPatternUtils.getActivePasswordQuality(LockPatternUtils.java:571)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.loadSettingsLocked(DevicePolicyManagerService.java:2471)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.getUserData(DevicePolicyManagerService.java:1631)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.onLockSettingsReady(DevicePolicyManagerService.java:2578)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.systemReady(DevicePolicyManagerService.java:2569)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService$Lifecycle.onBootPhase(DevicePolicyManagerService.java:399)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: at com.android.server.SystemServiceManager.startBootPhase(SystemServiceManager.java:155)
01-07 16:51:02.033 15646 15646 E AndroidRuntime: ... 6 more
01-07 16:51:19.158 16021 16021 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
01-07 16:51:19.158 16021 16021 E AndroidRuntime: java.lang.RuntimeException: Failed to boot service com.android.server.devicepolicy.DevicePolicyManagerService$Lifecycle: onBootPhase threw an exception during phase 480
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.SystemServiceManager.startBootPhase(SystemServiceManager.java:164)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.SystemServer.startOtherServices(SystemServer.java:1435)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.SystemServer.run(SystemServer.java:399)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.SystemServer.main(SystemServer.java:271)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: Caused by: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 4874)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:614)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:886)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:874)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:896)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:241)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.LockSettingsStorage.readKeyValue(LockSettingsStorage.java:142)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.LockSettingsService.getStringUnchecked(LockSettingsService.java:709)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.LockSettingsService.getLong(LockSettingsService.java:685)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.internal.widget.LockPatternUtils.getLong(LockPatternUtils.java:1484)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.internal.widget.LockPatternUtils.getKeyguardStoredPasswordQuality(LockPatternUtils.java:1120)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.internal.widget.LockPatternUtils.getActivePasswordQuality(LockPatternUtils.java:571)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.loadSettingsLocked(DevicePolicyManagerService.java:2471)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.getUserData(DevicePolicyManagerService.java:1631)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.onLockSettingsReady(DevicePolicyManagerService.java:2578)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.systemReady(DevicePolicyManagerService.java:2569)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService$Lifecycle.onBootPhase(DevicePolicyManagerService.java:399)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: at com.android.server.SystemServiceManager.startBootPhase(SystemServiceManager.java:155)
01-07 16:51:19.158 16021 16021 E AndroidRuntime: ... 6 more
01-07 16:51:36.311 16389 16389 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
01-07 16:51:36.311 16389 16389 E AndroidRuntime: java.lang.RuntimeException: Failed to boot service com.android.server.devicepolicy.DevicePolicyManagerService$Lifecycle: onBootPhase threw an exception during phase 480
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.SystemServiceManager.startBootPhase(SystemServiceManager.java:164)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.SystemServer.startOtherServices(SystemServer.java:1435)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.SystemServer.run(SystemServer.java:399)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.SystemServer.main(SystemServer.java:271)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: Caused by: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 4874)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:614)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:886)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:874)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:896)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:241)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.LockSettingsStorage.readKeyValue(LockSettingsStorage.java:142)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.LockSettingsService.getStringUnchecked(LockSettingsService.java:709)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.LockSettingsService.getLong(LockSettingsService.java:685)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.internal.widget.LockPatternUtils.getLong(LockPatternUtils.java:1484)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.internal.widget.LockPatternUtils.getKeyguardStoredPasswordQuality(LockPatternUtils.java:1120)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.internal.widget.LockPatternUtils.getActivePasswordQuality(LockPatternUtils.java:571)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.loadSettingsLocked(DevicePolicyManagerService.java:2471)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.getUserData(DevicePolicyManagerService.java:1631)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.onLockSettingsReady(DevicePolicyManagerService.java:2578)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.systemReady(DevicePolicyManagerService.java:2569)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService$Lifecycle.onBootPhase(DevicePolicyManagerService.java:399)
01-07 16:51:36.311 16389 16389 E AndroidRuntime: at com.android.server.SystemServiceManager.startBootPhase(SystemServiceManager.java:155)
一直反复报这样的错误,从log看是操作data分区时出现I/O error,此时怀疑data分区出现了问题,查看data分区,发现data分区已经被填满如下显示,将mtklog删除一部分后手机可以正常开机
M1701A:/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 963464 736 962728 1% /dev
tmpfs 963464 0 963464 0% /mnt
/dev/block/mmcblk0p23 2483744 1974020 509724 80% /system
/dev/block/mmcblk0p25 12149432 12133048 16384 100% /data
/dev/block/mmcblk0p24 237792 160 237632 1% /cache
/dev/block/mmcblk0p3 5968 60 5908 2% /protect_f
/dev/block/mmcblk0p4 5968 56 5912 1% /protect_s
/dev/block/mmcblk0p17 3952 40 3912 2% /bak
/dev/block/mmcblk0p19 3952 40 3912 2% /simlock
/dev/block/mmcblk0p21 28144 2252 25892 9% /nvdata