Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10361097
set_geo.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
668 B
Referenced Files
None
Subscribers
None
set_geo.sh
View Options
#!/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
Details
Attached
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)
Attached To
Mode
R134 rentgen-android
Attached
Detach File
Event Timeline
Log In to Comment