Advertisement
metalx1000

ADB Android Shell GPS Location

Oct 17th, 2017
726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. #Get GPS Location from android phone
  2. #If no program is checking the location (example: Google Maps) then the location won't update
  3. #while [ 1 ];do adb shell dumpsys location |grep 'gps: Lo'|awk '{print $3}';done
  4. while [ 1 ];do adb shell dumpsys location |grep -A1 'Last Known Locations:'|tail -n 1|awk '{print $3}';done
  5.  
  6. #if you haven't set permissions for accessing ADB you might need to use 'sudo'
  7. sudo killall adb
  8. #while [ 1 ];do sudo adb shell dumpsys location |grep 'gps: Lo'|awk '{print $3}';done
  9. while [ 1 ];do sudo adb shell dumpsys location |grep -A1 'Last Known Locations:'|tail -n 1|awk '{print $3}';done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement