简体   繁体   English

调试Android振动

[英]Debug Android vibration

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? Android是否会记录此类事件? Or can I write an application which will monitor Vibrator::vibrate(TIMEOUT) calls from another application? 或者我可以编写一个应用程序来监视来自另一个应用程序的Vibrator::vibrate(TIMEOUT)调用吗?

Note: I have root access. 注意:我具有root访问权限。

If you look in the system log ( logcat -b system ) it will show you the core system service's logs. 如果您查看系统日志( logcat -b system ),它将显示核心系统服务的日志。 The VibrateService only makes a couple in the latest version of Android, which will tell you what vibration pattern is being started. VibrateService仅在最新版本的Android中有一对,它将告诉您正在启动哪种振动模式。 Unfortunately, it won't show you what UID/PID is responsible for the request. 不幸的是,它不会向您显示什么UID / PID负责该请求。 Beyond that, you may be able to find some information from the kernel by digging around to figure out which device interface (eg /dev/gpio1 ) is the one used by the vibrator service. 除此之外,您还可以通过挖掘来找出振动器服务使用的设备接口(例如/dev/gpio1 )来从内核中找到一些信息。 If that driver exposes some stats/debug on /proc or debugfs you might be able to figure out which process is responsible. 如果该驱动程序在/procdebugfs上公开了一些统计信息/调试信息,则您可能能够确定哪个进程负责。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM