Debug Android vibration

坚强是说给别人听的谎言 提交于 2019-12-19 11:29:18

问题


Guys my phone is vibration without any reason. So I want to determine the application which sends vibration command to vibrate. Does Android logging such events? Or can I write an application which will monitor Vibrator::vibrate(TIMEOUT) calls from another application?

Note: I have root access.


回答1:


If you look in the system log (logcat -b system) it will show you the core system service's logs. The VibrateService only makes a couple in the latest version of Android, which will tell you what vibration pattern is being started. Unfortunately, it won't show you what UID/PID is responsible for the request. Beyond that, you may be able to find some information from the kernel by digging around to figure out which device interface (e.g. /dev/gpio1) is the one used by the vibrator service. If that driver exposes some stats/debug on /proc or debugfs you might be able to figure out which process is responsible.



来源:https://stackoverflow.com/questions/25115853/debug-android-vibration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!