Advertisement
metalx1000

Android Volume Button Press Detection

Nov 26th, 2024 (edited)
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.26 KB | None | 0 0
  1. #!/bin/sh
  2. # Run Command when volume button is Pressed on Android
  3. # no Root Needed (at lest not on my device)
  4. # Deferent devices the "event" file might change
  5.  
  6. cat /dev/input/event0|\
  7. xxd|\
  8. grep '7200 0100'|\
  9. while read l;
  10. do
  11.   echo "Button Pressed"
  12. done
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement