Advertisement
metalx1000

Android Shell Tutorial - adb July 2014

Jun 30th, 2014
3,467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.30 KB | None | 0 0
  1. #after rooting you may or may not be root
  2. busybox
  3.  
  4. #package manager help output
  5. pm
  6. #list all packages
  7. pm list packages
  8. #and apk
  9. pm list all packages -f
  10.  
  11. #disable or uninstall
  12. pm disable <package>
  13. pm uninstall <package>
  14.  
  15. #start program then
  16. #ps is not enough
  17. logcat -d|grep <package>|grep cmp|head -n1|tr '=' '\n'|grep ^com|cut -d\} -f1
  18.  
  19. #start program
  20. am start -n <output from last comment>
  21.  
  22. #this is used to start up default programs <like xdg-open or start>
  23. am start -a android.intent.action.VIEW
  24. #examples mp3
  25. am start -a android.intent.action.VIEW -d "file:///mnt/sdcard/Download/music.mp3"
  26. killall <program> or kill pid
  27. am start -a android.intent.action.VIEW -d http://www.filmsbykris.com
  28.  
  29. #if you just want to use Firefox regardless of default browser
  30. am start -n org.mozilla.firefox/.App http://www.filmsbykris.com
  31.  
  32. #program data is stored in /data/data/
  33. #example this is your contact database
  34. #is it SQLite format 3 #you can see this by ‘head’ing  it
  35. /data/data/com.android.providers.contacts/databases/contacts2.db
  36.  
  37.  
  38. #sendkeys
  39. am start -n org.mozilla.firefox/.App http://www.google.com
  40. input text 'Hello'
  41. input text 'Hello%sWorld'
  42.  
  43. #volume loop
  44. for i in `seq 1 10`;do input keyevent 24 & echo "Volume Up";done
  45. for i in `seq 1 10`;do input keyevent 25 & echo "Volume Down";done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement