Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android console: authentication required

Tags:

android

I am trying to run the geo fix command but I am unable to do so because I am greeted by the following message:

Android Console: Authentication required Android Console: type 'auth ' to authenticate Android Console: you can find your in '/Users/me/.emulator_console_auth_token'

I am on a mac [new user] and I do not know how to access the .emulator_console_auth_token file to delete it.

I have tried ~/Users to get to the users folder but it is returning no results. Additionally, the folder with my name does not contain that file. Please help.

like image 733
kyzen Avatar asked May 25 '16 16:05

kyzen


People also ask

What is Emulator_console_auth_token?

The conntent of .emulator_console_auth_token might be something like. LSoNKBoN4ql6TuLi. This value is used when connecting to an Android Emulator with telnet (Android Console):

How do I close android emulator?

To stop a running emulator, click Menu and select Stop.


2 Answers

The best thing you can do is:

  1. Go to the file .emulator_console_auth_token
  2. Open it.
  3. Delete the content, let it in blank.
  4. Restart your terminal
  5. Type again: telnet 127.0.0.1 port_number(5554)

Example: telnet 127.0.0.1 5554

like image 182
Christian Cortes Avatar answered Sep 18 '22 11:09

Christian Cortes


You need to take key from this file. On Mac OS this file is hidden by default.

open terminal, run command:

nano ~/.emulator_console_auth_token

and copy token from opened file (token look like: mEKb+d0DA2x9eHaK)

Connect to Emulator (if does not connected yet):

1) Check the Port of emulator:

adb devices

2) Connect to Emulator:

telnet localhost <number of port like 5554>

you should see:

" Authentication required Android Console: type 'auth ' to authenticate Android Console: you can find your in '/Users/me/.emulator_console_auth_token'"

3) Set Auth Token:

auth <your auth token>

Now you can run:

geo fix <longitude value> <latitude value>

or

sms send <phonesender> <textmessage>
like image 33
Oleksandr B Avatar answered Sep 18 '22 11:09

Oleksandr B