调试Android振动 [英] Debug Android vibration

查看:111
本文介绍了调试Android振动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的手机没有任何理由振动。所以我想确定发送振动命令振动的应用程序。 Android是否会记录此类事件?或者我可以编写一个应用程序来监视另一个应用程序的 Vibrator :: vibrate(TIMEOUT)呼叫吗?

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?

注意:
我具有root访问权限。

Note: I have root access.

推荐答案

如果您查看系统日志( logcat -b system ),它将显示核心系统服务的日志。 VibrateService仅在最新版本的Android中有一对,它将告诉您正在启动哪种振动模式。不幸的是,它不会向您显示负责该请求的UID / PID。除此之外,您还可以通过挖掘来找出振动器使用的设备接口(例如 / dev / gpio1 )来从内核中找到一些信息。服务。如果该驱动程序公开了 / proc debugfs 上的某些统计信息/调试,则您可能能够确定哪个进程负责

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.

这篇关于调试Android振动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆