In addition to the dumpsys
method explained in the other answer, you can use Android's hidden (kind of) permission manager appops
to get recently allowed vibrator requests, e.g. in last minute. From adb shell
:
for pkg in $(pm list packages | sed 's/package://')
do
echo "$pkg $(appops get $pkg VIBRATE)" | grep 'time=+[0-9]*s'
done
pm
is the package manager which lists all installed packages. appops
determines when last time each package made a vibration request and if it was allowed or rejected.
Result can be further filtered by piping output through awk '{
printf "%-12s%-20s%s\n",$3,$4,$1
}
'
:
allow;
time=+15s659ms
com.termux
allow;
time=+6s458ms
com.google.android.inputmethod.latin
Termux made a vibration 15 seconds back. Also the request can be denied:
~$ appops set com.termux VIBRATE deny
Now the output will be like this:
deny;
time=+9s500ms
com.termux
allow;
time=+6s392ms
com.google.android.inputmethod.latin
And a shameless self-promotion. If not comfortable with CLI, you can use my open-source app Permission Manager X to get and set AppOps: