Page MenuHomeSealhub

set_geo.sh
No OneTemporary

set_geo.sh

#!/bin/bash
ko=$((
echo "auth $(cat ~/.emulator_console_auth_token)"
echo "geo fix $1 $2 0.0"
sleep 0.2
) | telnet localhost 5554 2> /dev/null | grep KO: );
if [ -z "${ko}" ]; then
# Check if the location was actually set, for some reason the location moching doesn't work,
# unless google maps is launched first, and is given access to the phone location
adb shell dumpsys location | grep 'last location=Location\[gps' > /dev/null
if [ $? -ne 0 ]; then
echo Failed to actually set the location, probably need to launch google maps first
exit 1
fi
echo Succesfully set the coordinates to: $(. /conf/get_location.sh)
exit 0
else
echo "$ko"
exit 1;
fi

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, Nov 8, 11:06 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1034500
Default Alt Text
set_geo.sh (668 B)

Event Timeline