android分析手機喚醒源

2021-07-11 01:12:38 字數 2314 閱讀 6945

我們可以先從kernel的log看喚醒源:

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000 

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000 utc 02:55:43

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000 02:56:00

exit comip suspend by modem 0x00000000|0x00000000|0x00010000|0x00000000

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000 02:56:32

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000 02:57:36

exit comip suspend by gpio99 10:57:41

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000 02:57:41

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000 02:59:43

exit comip suspend by gpio99 11:01:33

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000

exit comip suspend by modem 0x00000004|0x00000000|0x00000000|0x00000000

exit comip suspend by gpio99 11:04:40 按power鍵

時間的話可以根據utc時間+8小時算出

像gpio99這種是ap側的喚醒,

既然ap側喚醒我們再去看對應的framework的log

10:57:41.018415   889  1086 v alarmmanager: sending alarm alarm ...

11:01:33.022557 889 1086 v alarmmanager: sending alarm alarm...

11:04:40.023738 889 1093 i windowmanager: powerkey down, interactive = false

...04-07 11:04:40.031768 889 1093 i powermanagerservice: waking up from sleep (uid 1000)...

04-07 11:04:40.033560 889 889 i windowmanager: started waking up...

果然在10:57:41、11:01:33有兩個alarm喚醒,alarm喚醒主要搜sending,但是一定要注意type為0,2才是喚醒的alarm。

另外11:04:40是power按鍵喚醒

而modem的喚醒,ap側這邊能分析什麼呢?因為modem一般是有網路資料過來,才把ap側喚醒,因此我們可以看tcp的資料報,對照時間來看這個喚醒的點,有哪些伺服器的資料報傳送過來。

我們可以使用wireshark這個軟體分析資料報。

步驟如下:



Android休眠喚醒驅動流程分析 三

接上一節 static int suspend enter suspend state t state endif arch suspend disable irqs bug on irqs disabled if error device power down pmsg suspend error...

Android保持裝置喚醒

contents 保持裝置喚醒.1 使用wakelock之外的選擇.1 保持螢幕亮.1 保持cpu執行.2 用broadcastreceiver保持裝置喚醒.2 為了避免電量流失,android裝置進入閒置狀態後很快就會睡眠。然而,有時應用需要裝置保持螢幕或者cpu處於喚醒狀態一直到完成某項工作。應...

Android系統手機幾種執行模式分析

作為一款智慧型作業系統,android和windows mobile以及symbian系統一樣具備多個系統模式,本文將詳細講解各種系統模式的功能和進入方法。android系統中具備6個模式,分別為一般啟動模式 normal mode 安全模式 safe mode 恢復模式 recovery mode...