SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
Guide for
Wakelock
detector 1.5.*
UzumApps Copyright 2013
What is wakelock?
Wakelock is the Android feature which can
be used by apps to override deep sleep and
control power management of device:
● Keep CPU awake (at high frequency)
● Turn on the screen
● Keep the screen on
Like in any other portable device when there is no User Interaction,
the device enters into deep sleep mode, in which it uses the minimum
power to prolong battery life.
Usually, before entering into deep sleep mode:
○ First screen dims
○ Then screen turns off
○ Finally, CPU switches to the lowest frequency (sleeps)
Why wakelock is bad?
● Wakelock enables apps to do tasks transparently in the
background, without user's awareness. Which might
waste battery power, network data and other resources.
● Apps can switch on the screen without user's intention.
This can be quite annoying for the users.
● Buggy apps; Whenever the wakelock is acquired, it
must be released, otherwise it can cause sleepless
(insomniac) phone. The phone's CPU keeps running or
the screen won't turn off
Who benefits from
WakeLock Detector(WLD)?
● People who suffer from extreme battery drain, even
when they are not using phone (this is caused by CPU
wakelocks)
● People who are annoyed by random Screen wake-ups
(this one is caused by screen-wakelocks)
● People who don’t know which app is keeping their
screen on continuously (this one caused by unreleased
wakelocks)
Technical Knowledge:
Wakelock Types in Android System
Android PowerManager supports 4 kind of wakelocks
for developers, which are used in acquire/release method :
Wakelock Type CPU Screen Keyboard
PARTIAL_WAKE_LOCK On* Off Off
SCREEN_DIM_WAKE_LOCK On Dim Off
SCREEN_BRIGHT_WAKE_LOCK On Bright Off
FULL_WAKE_LOCK On Bright Bright
Note:
○ PARTIAL_WAKE_LOCK must be released by developer after acquiring, otherwise it
causes sleepless mode
○ Other wakelock types(screen related wakelocks) are released automatically when
the user presses Power Button
○ By using ACQUIRE_CAUSES_WAKE_UP flag developers can turn on the screen
while acquiring one of above wakelock types
Wakelock types in WLD
To simplify the types of wakelocks “Wakelock detector”
combines them into 2 types:
● CPU wakelocks
○ PARTIAL_WAKE_LOCK
● Screen wakelocks
○ SCREEN_DIM_WAKELOCK
○ SCREEN_BRIGHT_WAKELOCK
○ FULL_WAKELOCK
What is “Wakeup triggers”
In Android, there is a feature called “AlarmManager”
which can be used by other apps to schedule periodic tasks
(e.g: Facebook schedules a task that checks for new
events every 5 minutes).
This causes the phone to wake-up from its deep sleep
mode for certain period of time.
“Wakeup triggers” shows those apps which triggered the
periodic tasks. It shows the exact amount of how many times the
phone has been awaken by the app. By reducing these wakeups
the battery life will be prolonged significantly (e.g: Reduce
update(refresh) rate of Weather widgets..)
Since when wakelock statistics
in WLD is shown
The Battery management service of Android resets
(nullifies) accumulated battery statistics (including wakelock
statistics) in two cases:
● while rebooting phone
● when the phone is unplugged with battery level above
90%
In Wakelock detector you can see statistics either since
the time when it was reset or since the time when you
unplugged the cable.
If you choose “since unplug” then you have shorter
duration but more sophisticated wakelock statistics shown.
Fin
Thank you!
Download Wakelock Detector at
Before sleep
Sunday night:
50% should be
enough until
tomorrow
morning ZZZ
however..next
morning...
Motivations for WLD
Motivations for WLD
4:00 AM
zzzz
screen
turns on..
Ads
Some new
message?

Mais conteúdo relacionado

Mais procurados

Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
Utkarsh Mankad
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Opersys inc.
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
Kan-Ru Chen
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
Lihan Chen
 

Mais procurados (20)

Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)
 
Android AIDL Concept
Android AIDL ConceptAndroid AIDL Concept
Android AIDL Concept
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
Permission in Android Security: Threats and solution
Permission in Android Security: Threats and solutionPermission in Android Security: Threats and solution
Permission in Android Security: Threats and solution
 
Binder: Android IPC
Binder: Android IPCBinder: Android IPC
Binder: Android IPC
 
Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
 
Introduction to Android Window System
Introduction to Android Window SystemIntroduction to Android Window System
Introduction to Android Window System
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
Understanding binder in android
Understanding binder in androidUnderstanding binder in android
Understanding binder in android
 
Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)
 
Android Binder IPC for Linux
Android Binder IPC for LinuxAndroid Binder IPC for Linux
Android Binder IPC for Linux
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 

Semelhante a Android - Wakelock detector

Semelhante a Android - Wakelock detector (20)

Power management android
Power management androidPower management android
Power management android
 
Manual neocoolcam door sensor
Manual neocoolcam door sensorManual neocoolcam door sensor
Manual neocoolcam door sensor
 
Alcatel Onetouch Pixi 8 Manual / User Guide
Alcatel Onetouch Pixi 8 Manual / User GuideAlcatel Onetouch Pixi 8 Manual / User Guide
Alcatel Onetouch Pixi 8 Manual / User Guide
 
Launch X431 EasyDiag User Manual
Launch X431 EasyDiag User ManualLaunch X431 EasyDiag User Manual
Launch X431 EasyDiag User Manual
 
How to use Launch EasyDiag for IOS Android
How to use Launch EasyDiag for IOS Android How to use Launch EasyDiag for IOS Android
How to use Launch EasyDiag for IOS Android
 
Ph pat02 - zipato flood multisensor 3 in 1 user manual v1.0
Ph pat02 - zipato flood multisensor 3 in 1 user manual v1.0Ph pat02 - zipato flood multisensor 3 in 1 user manual v1.0
Ph pat02 - zipato flood multisensor 3 in 1 user manual v1.0
 
LG G5 T-Mobile Manual / User Guide (English)
LG G5 T-Mobile  Manual  / User Guide (English)LG G5 T-Mobile  Manual  / User Guide (English)
LG G5 T-Mobile Manual / User Guide (English)
 
Alcatel Onetouch Evo 7 Manual / User Guide
Alcatel Onetouch Evo 7 Manual / User GuideAlcatel Onetouch Evo 7 Manual / User Guide
Alcatel Onetouch Evo 7 Manual / User Guide
 
Fujitsu LIFEBOOK S752 Getting Started Guide
Fujitsu LIFEBOOK S752 Getting Started GuideFujitsu LIFEBOOK S752 Getting Started Guide
Fujitsu LIFEBOOK S752 Getting Started Guide
 
The Lenovo Ideapad 100s user guide manual PDF (English)
The Lenovo Ideapad 100s user guide manual PDF (English)The Lenovo Ideapad 100s user guide manual PDF (English)
The Lenovo Ideapad 100s user guide manual PDF (English)
 
Pt lg-phoenix3
Pt lg-phoenix3Pt lg-phoenix3
Pt lg-phoenix3
 
What’s new in android o
What’s new in android oWhat’s new in android o
What’s new in android o
 
aseel kutan.pptx
aseel kutan.pptxaseel kutan.pptx
aseel kutan.pptx
 
Qubino luxy smart light - Z-Wave Plus Manual
Qubino luxy smart light - Z-Wave Plus ManualQubino luxy smart light - Z-Wave Plus Manual
Qubino luxy smart light - Z-Wave Plus Manual
 
Moto g 4
Moto g 4Moto g 4
Moto g 4
 
Win power manual
Win power manualWin power manual
Win power manual
 
Mini price on off z wave plus everspring
Mini price on  off z wave plus everspringMini price on  off z wave plus everspring
Mini price on off z wave plus everspring
 
Samsung Galaxy S7 edge Manual / User Guide
Samsung Galaxy S7 edge Manual / User GuideSamsung Galaxy S7 edge Manual / User Guide
Samsung Galaxy S7 edge Manual / User Guide
 
Samsung Galaxy S7 edge Manual / User Guide
Samsung Galaxy S7 edge Manual / User GuideSamsung Galaxy S7 edge Manual / User Guide
Samsung Galaxy S7 edge Manual / User Guide
 
Manual sensor temperature and humidity z-wave plus - philio
Manual sensor temperature and humidity   z-wave plus - philioManual sensor temperature and humidity   z-wave plus - philio
Manual sensor temperature and humidity z-wave plus - philio
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Android - Wakelock detector

  • 2. What is wakelock? Wakelock is the Android feature which can be used by apps to override deep sleep and control power management of device: ● Keep CPU awake (at high frequency) ● Turn on the screen ● Keep the screen on Like in any other portable device when there is no User Interaction, the device enters into deep sleep mode, in which it uses the minimum power to prolong battery life. Usually, before entering into deep sleep mode: ○ First screen dims ○ Then screen turns off ○ Finally, CPU switches to the lowest frequency (sleeps)
  • 3. Why wakelock is bad? ● Wakelock enables apps to do tasks transparently in the background, without user's awareness. Which might waste battery power, network data and other resources. ● Apps can switch on the screen without user's intention. This can be quite annoying for the users. ● Buggy apps; Whenever the wakelock is acquired, it must be released, otherwise it can cause sleepless (insomniac) phone. The phone's CPU keeps running or the screen won't turn off
  • 4. Who benefits from WakeLock Detector(WLD)? ● People who suffer from extreme battery drain, even when they are not using phone (this is caused by CPU wakelocks) ● People who are annoyed by random Screen wake-ups (this one is caused by screen-wakelocks) ● People who don’t know which app is keeping their screen on continuously (this one caused by unreleased wakelocks)
  • 5. Technical Knowledge: Wakelock Types in Android System Android PowerManager supports 4 kind of wakelocks for developers, which are used in acquire/release method : Wakelock Type CPU Screen Keyboard PARTIAL_WAKE_LOCK On* Off Off SCREEN_DIM_WAKE_LOCK On Dim Off SCREEN_BRIGHT_WAKE_LOCK On Bright Off FULL_WAKE_LOCK On Bright Bright Note: ○ PARTIAL_WAKE_LOCK must be released by developer after acquiring, otherwise it causes sleepless mode ○ Other wakelock types(screen related wakelocks) are released automatically when the user presses Power Button ○ By using ACQUIRE_CAUSES_WAKE_UP flag developers can turn on the screen while acquiring one of above wakelock types
  • 6. Wakelock types in WLD To simplify the types of wakelocks “Wakelock detector” combines them into 2 types: ● CPU wakelocks ○ PARTIAL_WAKE_LOCK ● Screen wakelocks ○ SCREEN_DIM_WAKELOCK ○ SCREEN_BRIGHT_WAKELOCK ○ FULL_WAKELOCK
  • 7. What is “Wakeup triggers” In Android, there is a feature called “AlarmManager” which can be used by other apps to schedule periodic tasks (e.g: Facebook schedules a task that checks for new events every 5 minutes). This causes the phone to wake-up from its deep sleep mode for certain period of time. “Wakeup triggers” shows those apps which triggered the periodic tasks. It shows the exact amount of how many times the phone has been awaken by the app. By reducing these wakeups the battery life will be prolonged significantly (e.g: Reduce update(refresh) rate of Weather widgets..)
  • 8. Since when wakelock statistics in WLD is shown The Battery management service of Android resets (nullifies) accumulated battery statistics (including wakelock statistics) in two cases: ● while rebooting phone ● when the phone is unplugged with battery level above 90% In Wakelock detector you can see statistics either since the time when it was reset or since the time when you unplugged the cable. If you choose “since unplug” then you have shorter duration but more sophisticated wakelock statistics shown.
  • 10. Before sleep Sunday night: 50% should be enough until tomorrow morning ZZZ however..next morning... Motivations for WLD
  • 11. Motivations for WLD 4:00 AM zzzz screen turns on.. Ads Some new message?