測試的過程中 經常遇到手機待機情況下耗電依然很嚴重,
抓去電池的日誌資訊,發現下面的日誌:
15m35s828ms (2) 078 +wake_lock=1001:"rilj"
+15m35s849ms (1) 078 -wake_lock
+15m35s851ms (2) 078 +wake_lock=1001:"rilj"
+15m35s872ms (1) 078 -wake_lock
+15m35s873ms (2) 078 +wake_lock=1001:"rilj"
+15m35s894ms (1) 078 -wake_lock
+15m35s895ms (2) 078 +wake_lock=1001:"rilj"
+15m35s915ms (1) 078 -wake_lock
+15m35s916ms (2) 078 +wake_lock=1001:"rilj"
+15m35s936ms (1) 078 -wake_lock
+15m35s937ms (2) 078 +wake_lock=1001:"rilj"
+15m35s958ms (1) 078 -wake_lock
+15m35s959ms (2) 078 +wake_lock=1001:"rilj"
+15m35s982ms (1) 078 -wake_lock
+15m36s005ms (2) 078 +wake_lock=1001:"rilj"
+15m36s038ms (1) 078 -wake_lock
+15m36s041ms (2) 078 +wake_lock=1001:"rilj"
+15m36s063ms (1) 078 -wake_lock
+15m36s065ms (2) 078 +wake_lock=1001:"rilj"
+15m36s087ms (1) 078 -wake_lock
+15m36s087ms (2) 078 +wake_lock=1001:"rilj"
+15m36s107ms (1) 078 -wake_lock
+15m36s108ms (2) 078 +wake_lock=1001:"rilj"
+15m36s130ms (1) 078 -wake_lock
+15m36s131ms (2) 078 +wake_lock=1001:"rilj"
+15m36s154ms (1) 078 -wake_lock
+15m36s156ms (2) 078 +wake_lock=1001:"rilj"
+15m36s176ms (1) 078 -wake_lock
+15m36s177ms (2) 078 +wake_lock=1001:"rilj"
+15m36s198ms (1) 078 -wake_lock
+15m36s198ms (2) 078 +wake_lock=1001:"rilj"
+15m36s219ms (1) 078 -wake_lock
+15m36s220ms (2) 078 +wake_lock=1001:"rilj"
+15m36s243ms (1) 078 -wake_lock
+15m36s246ms (2) 078 +wake_lock=1001:"rilj"
+15m36s266ms (1) 078 -wake_lock
+15m36s266ms (2) 078 +wake_lock=1001:"rilj"
+15m36s286ms (1) 078 -wake_lock
+15m36s287ms (2) 078 +wake_lock=1001:"rilj"
+15m36s314ms (1) 078 -wake_lock
+15m36s317ms (2) 078 +wake_lock=1001:"rilj"
+15m36s337ms (1) 078 -wake_lock
+15m36s338ms (2) 078 +wake_lock=1001:"rilj"
+15m36s358ms (1) 078 -wake_lock
+15m36s359ms (2) 078 +wake_lock=1001:"rilj"
+15m36s379ms (1) 078 -wake_lock
+15m36s380ms (2) 078 +wake_lock=1001:"rilj"
+15m36s401ms (1) 078 -wake_lock
+15m36s402ms (2) 078 +wake_lock=1001:"rilj"
+15m36s423ms (1) 078 -wake_lock
+15m36s424ms (2) 078 +wake_lock=1001:"rilj"
+15m36s480ms (1) 078 -wake_lock
+15m36s481ms (2) 078 +wake_lock=1001:"rilj"
+15m36s505ms (1) 078 -wake_lock
+15m36s506ms (2) 078 +wake_lock=1001:"rilj"
+15m36s529ms (1) 078 -wake_lock
+15m36s530ms (2) 078 +wake_lock=1001:"rilj"
+15m36s552ms (1) 078 -wake_lock
+15m36s553ms (2) 078 +wake_lock=1001:"rilj"
+15m36s575ms (1) 078 -wake_lock
+15m36s576ms (2) 078 +wake_lock=1001:"rilj"
+15m36s600ms (1) 078 -wake_lock
+15m36s601ms (2) 078 +wake_lock=1001:"rilj"
+15m36s658ms (1) 078 -wake_lock
+15m36s658ms (2) 078 +wake_lock=1001:"rilj"
+15m36s681ms (1) 078 -wake_lock
+15m36s682ms (2) 078 +wake_lock=1001:"rilj"
+15m36s707ms (1) 078 -wake_lock
+15m36s708ms (2) 078 +wake_lock=1001:"rilj"
+15m36s730ms (1) 078 -wake_lock
+15m36s731ms (2) 078 +wake_lock=1001:"rilj"
+15m36s753ms (1) 078 -wake_lock
+15m36s755ms (2) 078 +wake_lock=1001:"rilj"
+15m36s781ms (1) 078 -wake_lock
+15m36s787ms (2) 078 +wake_lock=1001:"rilj"
+15m36s840ms (1) 078 -wake_lock
+15m36s841ms (2) 078 +wake_lock=1001:"rilj"
+15m36s870ms (1) 078 -wake_lock
+15m36s871ms (2) 078 +wake_lock=1001:"rilj"
+15m36s895ms (1) 078 -wake_lock
+15m36s896ms (2) 078 +wake_lock=1001:"rilj"
+15m36s923ms (1) 078 -wake_lock
+15m36s924ms (2) 078 +wake_lock=1001:"rilj"
+15m36s948ms (1) 078 -wake_lock
+15m36s950ms (2) 078 +wake_lock=1001:"rilj"
+15m37s012ms (1) 078 -wake_lock
+15m37s013ms (2) 078 +wake_lock=1001:"rilj"
+15m37s039ms (1) 078 -wake_lock
+15m37s040ms (2) 078 +wake_lock=1001:"rilj"
+15m37s064ms (1) 078 -wake_lock
+15m37s065ms (2) 078 +wake_lock=1001:"rilj"
+15m37s093ms (1) 078 -wake_lock
+15m37s094ms (2) 078 +wake_lock=1001:"rilj"
+15m37s121ms (1) 078 -wake_lock
+15m37s123ms (2) 078 +wake_lock=1001:"rilj"
+15m37s182ms (1) 078 -wake_lock
+15m37s183ms (2) 078 +wake_lock=1001:"rilj"
+15m37s208ms (1) 078 -wake_lock
+15m37s209ms (2) 078 +wake_lock=1001:"rilj"
+15m37s233ms (1) 078 -wake_lock
+15m37s234ms (2) 078 +wake_lock=1001:"rilj"
+15m37s257ms (1) 078 -wake_lock
+15m37s259ms (2) 078 +wake_lock=1001:"rilj"
+15m37s282ms (1) 078 -wake_lock
+15m37s284ms (2) 078 +wake_lock=1001:"rilj"
+15m37s339ms (1) 078 -wake_lock
+15m37s340ms (2) 078 +wake_lock=1001:"rilj"
通過上面的問題發現 rilj ( 一直 調起wake_lock 造成費電。
wake lock 的使用方法
今天有用到用ec43 gpio的中斷來喚醒系統,將系統從深度休眠中喚醒並保證系統wakup 一段時間用過了,方法如下,有同樣使用的童鞋可以參考一下!1.定義一人區域性靜態變數 ec43 wlock static struct wake lock ec43 wlock 2.初始化 wake lock ...
android 如何使用Wake Lock來節電?
出處 一樓 二樓 如果一開始就對android手機的硬體架構有一定的了解,設計出的應用程式通常不會成為待機電池殺手,而要設計出正確的通訊機制與通訊協議也並不困難。但如果不去了解而盲目設計,可就沒準了。android為了確保應用程式中關鍵 的正確執行,提供了wake lock的api,使得應用程式有許...
Android卡住的部分wakelock
部分wakelock是powermanager api給使用者提供的允許使用者在黑屏後 不管是系統超時還是使用者按下電源鍵 保持cpu執行的機制。應用通過呼叫acquire 和引數partial wake lock獲得部分wakelock。如果你的應用獲得了乙個部分wakelock,一直在後台執行 ...