Skip to content

Commit

Permalink
fix Android emulator authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
IGPenguin committed Oct 7, 2020
1 parent 3af73bf commit ac73b7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion android/aemulator
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ check_running_emulator(){
if [[ "$RESPONSE" == "y" || "$RESPONSE" == "Y" ]];
then
launch_emulator
android_wait_for_device
get_token
fi
exit
Expand Down Expand Up @@ -70,11 +71,12 @@ launch_emulator(){

get_token(){
check_dependency "telnet"
[ -f ./emulator_console_auth_token ] || telnet localhost 5554
[ -f ./emulator_console_auth_token ] || echo "localhost 5554" | telnet &> /dev/null
TOKEN=$(cat "$HOME"/.emulator_console_auth_token)
}

telnet_command() {
get_token
if [ -z "$1" ];then
read -r -p "📝 Insert telnet command: " COMMAND
else
Expand Down

0 comments on commit ac73b7a

Please sign in to comment.