3

The current startup location for my terminal is:

C:\Users\[name]\Code\[app-dir]\[app-ext]>

I want to change it to:

C:\Users\[user]\AppData\Local\Android\sdk\platform-tools

Because now i have to manually type in:

cd C:\Users\[user]\AppData\Local\Android\sdk\platform-tools

To get to the directory of adb.exe

I could not find the answer to this question on this forum, neither on google. I found this answer: https://stackoverflow.com/a/41014583/7654070 This got me a broken terminal. It didnt want to open anymore, so i changed it back to:

cmd.exe

Any of you know how to do this?

Ulysse BN
  • 10,116
  • 7
  • 54
  • 82
Alex
  • 789
  • 1
  • 6
  • 13

2 Answers2

2

Create a bat file somewhere with contents:

@cd /d %HOMEDRIVE%%HOMEPATH%\AppData\Local\Android\sdk\platform-tools

Then in Android Studio Settings/Tools/Terminal replace "Shell path"

cmd.exe

with

"cmd.exe" /K C:\yourbatfile.bat

Adding platform-tools folder to path is probaly still a good idea.

Okas
  • 2,664
  • 1
  • 19
  • 26
1

For the newer versions of Android Studio ,follow these steps:-

  1. From the File menu , Select Settings option.
  2. Under the tools option, select Terminal and change the start directory to

    C:\Users\UserName\AppData\Local\Android\sdk\platform-tools .

  3. Click Ok.
  4. Again from the file menu select Invalidate Chahes/Restart ,again restart.

This method would update the current projects terminal default directory .

Kaveri
  • 1,060
  • 2
  • 12
  • 21
  • This suggestion cannot be correct, it causes local terminal to be unattainable! reinsert cmd.exe if you like me got into trouble. Now local terminal will work again – carl May 18 '19 at 10:57