2

Android Studio retrying "adb.exe start-server" indefinitely

Hi, is there any way I can configure Android Studio to use different port when running adb?

(e.g. I want it to run adb.exe -P 5038 start-server instead of the default adb.exe start-server)

I've looked through Android Studio settings but couldn't find any settings to change the port.

I know I can run the command from cmd, but it gets tedious when I have to run it every time I want to use my emulator. Also, port 5037 is used by another (necessary) process, so I can't kill said process.

Any kind of help is appreciated, thanks.

1 Answers1

0

As mentioned here ANDROID_ADB_SERVER_PORT env variable is used by adb/android studio on linux.

I have just added the following line to the beginning of studio.sh as a hacky but quick solution:

export ANDROID_ADB_SERVER_PORT=<port number to use>