metalx1000

Android ADB Command List

Dec 20th, 2021 (edited)
939
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.72 KB | None | 0 0
  1. #list of adb commands
  2.  
  3. ###get Services
  4. adb shell dumpsys | grep "DUMP OF SERVICE"
  5.  
  6. ###network
  7. adb shell dumpsys wifi
  8. adb shell dumpsys wifi|grep startTime|tr "," "\n"
  9. adb shell dumpsys wifi|grep startTime|tr "," "\n"|grep 'SSID'|head -n1
  10. alias awifi='adb shell dumpsys wifi|grep startTime|tr "," "\n"|grep "SSID"|head -n1'
  11.  
  12. adb shell ifconfig
  13. adb shell dumpsys wifi|grep "IPv4 address"
  14. alias aip='adb shell dumpsys wifi|grep "IPv4 address"'
  15.  
  16. ###battery
  17. adb shell cat /sys/class/power_supply/battery/capacity
  18. adb shell dumpsys battery
  19. adb shell dumpsys battery|grep level
  20.  
  21. ###Get Media Being Accessed
  22. #start music player (Vanilla)
  23. #start voice recorder
  24. #then camera video recorder
  25. adb shell dumpsys media.player
  26. adb shell dumpsys media.player|grep "   Video" -A 10
  27. #note that audio file being accessed such as camera click sounds
  28.  
  29. ###audio
  30. adb shell dumpsys audio
  31. adb shell dumpsys audio|grep -A 5 "STREAM_NOTIFICATION:"
  32.  
  33. ###volume
  34. adb shell media
  35. adb shell media volume --show --stream 0
  36. adb shell media volume --show --stream 1
  37. adb shell media volume --show --stream 2
  38. adb shell media volume --show --stream 3
  39. adb shell media volume --show --stream 3 --set 11
  40. adb shell media volume --show --stream 0 --set 7
  41.  
  42. adb shell media volume --adj lower
  43. adb shell media volume --adj raise
  44.  
  45. ###media player
  46. adb shell media dispatch play-pause
  47. adb shell media dispatch next
  48. adb shell media dispatch previous
  49. adb shell media fast-forword
  50. adb shell media rewind
  51.  
  52. ###finger print reader
  53. adb shell dumpsys fingerprint
  54. adb shell dumpsys fingerprint|jq .
  55.  
  56. ###GPS
  57. #Get last known location
  58. adb shell dumpsys location
  59. adb shell dumpsys location|grep "passive:"|tail -n1|awk '{print $3}'
  60. #termux is a better option
  61.  
  62.  
Add Comment
Please, Sign In to add comment