現象:啓動後,可以進入主界面。但是過幾分鐘自動重啓。以後不斷重複此現象。
分析:
1、手機如果重啓,會在/data/system/dropbox 留下開機信息,可以查看次類文件生成的時間標來了解手機重啓的時間情況。另外,系統會自動記錄最後一次開機/重啓的原因到 /proc/bootinfo。
2、查看bootinfo,可以確定重啓原因爲SW_AP_RESET,即軟件原因重啓。
C:\>adb shell cat /proc/bootinfo
POWERUPREASON : 0x00004000
MBM_VERSION : 0x00000a64
MBM_LOADER_VERSION : 0x00000a64
FLAT_DEV_TREE_ADDRESS : 0xffffffff
BATTERY_STATUS_AT_BOOT : 0x0001
CID_RECOVER_BOOT : 0x00
POWERUPREASON 的相關解釋如下
* Powerup Reason definition */
#define TIME_OF_DAY_ALARM 0x00000008 /* Bit 3 */
#define USB_CABLE 0x00000010 /* Bit 4 */
#define FACTORY_CABLE 0x00000020 /* Bit 5 */
#define AIRPLANE_MODE 0x00000040 /* Bit 6 */
#define PWR_KEY_PRESS 0x00000080 /* Bit 7 */
#define CHARGER 0x00000100 /* Bit 8 */
#define POWER_CUT 0x00000200 /* Bit 9 */
#define REGRESSION_CABLE 0x00000400 /* Bit 10 */
#define SYSTEM_RESTART 0x00000800 /* Bit 11 */
#define MODEL_ASSEMBLY 0x00001000 /* Bit 12 */
#define MODEL_ASSEMBLY_VOL 0x00002000 /* Bit 13 */
#define SW_AP_RESET 0x00004000 /* Bit 14 */
#define WDOG_AP_RESET 0x00008000 /* Bit 15 */
#define CLKMON_CKIH_RESET 0x00010000 /* Bit 16 */
#define AP_KERNEL_PANIC 0x00020000 /* Bit 17 */
#define CPCAP_WDOG 0x00040000 /* Bit 18 */
3、查看/data/system/dropbox
Hardware: xxx
Bootloader: 0x0000
Radio: unknown
Kernel: Linux version 2.6.35.7-eng-g953b5f6 x(gcc version 4.4.3 (GCC) ) #1 SMP PREEMPT Thu Sep 22 13:50:58 CST 2011
...
Hardware : mapphone_CDMA
Revision : 0000
Serial : 0000000000000000
Reboot@ ModemStateControl.cpp : Line 1550
分析ModemStateControl.cpp第155行,處於函數handleWakeLockTimeout()中,表明BP panic已發生。
由此可見,BP panic問題。
4、查看Log
adb shell ls /sdcard/Logger/
09-27 10:47:44.164 320 324 D RIL-MCTRL: file /sys/bus/usb/devices/usb1/power/control, buff = auto
09-27 10:47:44.164 320 324 D RIL-MCTRL: file /sys/bus/usb/devices/usb1/power/control opened in write only mode
09-27 10:47:44.171 320 324 F RIL-RLOG: Reboot@ ModemStateControl.cpp : Line 1550
09-27 10:47:44.171 320 324 F RIL-RLOG: Panic or IPC, Rebooting
進一步證實由於BP panic問題導致重啓。5.最終分析
seems the BP is not installed,that should be the cause:
Setting -> Phone -> about tablet -> Baseband version:Unknown
解決辦法:
辦法1.重燒BP
辦法2.在handleWakeLockTimeout中,註釋RIL_REBOOT_DEVICE("Panic or IPC,Rebooting"); ,此法保證在BP出現超時時不重啓。使用後,發現Wifi連接無異常,其他均工作