7
votes

Android studio launches emulator with such command line:

/Users/sergey/Library/Android/sdk/tools/emulator -avd Nexus_5_API_22_x86 -netspeed full -netdelay none

How do I add additional options? I need to specify -http-proxy command line parameter

3

3 Answers

2
votes

First, run the emulator from the terminal:

/Users/sergey/Library/Android/sdk/tools/emulator -avd Nexus_5_API_22_x86 -"all parameters you need"

Then, clic on the run button in Android Studio. Select your device, that is already running. Your app will deploy there.

1
votes

The command to run start Nexus_5X_Edited_API_23 emulator with proxy setting (get more params here)

~/Library/Android/sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5X_Edited_API_23 -http-proxy http://username:password@local_server:8080

also You can list all emulators name from command

emulator -list-avds
0
votes

From Emulator help section make all TCP connections through a specified HTTP/HTTPS proxy

The value of can be one of the following:

http://<server>:<port>

http://<username>:
<password>@<server>:<port>

The http:// prefix can be omitted. If the -http-proxy <proxy> command is not supplied, the emulator looks up the http_proxy environment variable and automatically uses any value matching the <proxy> format described above.