Last active
December 20, 2024 21:49
-
-
Save ScottJWalter/c8368df2e0266475c19fba268e976356 to your computer and use it in GitHub Desktop.
Use ADB to get recent vibration requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run from an ADB debugging connection | |
# | |
# Reference: | |
# https://android.stackexchange.com/questions/215638/how-to-determine-which-app-is-causing-vibration | |
package_name=$1 # VIBRATE | |
for pkg in $(pm list packages | sed 's/package://') | |
do | |
echo "$pkg $(appops get $pkg $package_name)" | \ | |
grep 'time=+[0-9]*s' | \ | |
awk '{printf "%-12s%-20s%s\n",$3,$4,$1}' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment