查看wake_lock状态的命令
2016-03-20 16:31
375 查看
see list of wakelocks here:
adb shell "cat /sys/kernel/debug/wakeup_sources"use below adb command to require a wake lock
adb shell "echo mylock > /sys/power/wake_lock"Then, you can use below command to watch if this lock is active. You will see the time column continuously change, it means the wake lock is active
watch -n 1 'adb shell "cat /proc/wakelocks" | grep mylock'Now, use this adb command to release the wake lock
adb shell "echo mylock > /sys/power/wake_unlock"Then, check it again, the time column will freeze, it means the wake lock is non active
watch -n 1 'adb shell "cat /proc/wakelocks" | grep mylock'You can use the same technique to observe the wake lock you acquire in the code.Is there any way to see the active wakelocks?Run
adb shell dumpsys power.
相关文章推荐
- 【c++】打印九九口诀表
- C++参数传递
- iOS 开发 初级:应用多语言化的方法
- HDOJ 1012 u Calculate e
- Eclipse快捷键大全
- HDOJ 1012 u Calculate e
- 【c++】打印九九口诀表
- [原创] 编写函数,实现对链表元素的排序与分类
- 猎豹MFC--窗口指针
- UFLDL(五)自编码算法与稀疏性
- 工具-NuGet
- C#中的IEnumerable<T>知识点
- 夺命雷公狗---DEDECMS----14dedecms首页导航条的完成
- 《软件工程》第三周学习进度
- 老夫聊发少年狂——浅谈IT之路
- #leetcode#292 Nim Game
- Java Web项目整合spring和Hibernate时报错!
- Linux三剑客中的第二剑――Sed(文本编辑器)
- MyEclipse快捷键大全(转自博客园)
- 先序构建二叉树_preorder