I found a hacky solution to add parameters to the Android Studio AVD.
Android Studio by default uses the binary $ANDROID_SDK/emulator/emulator. In my case the path in MacOS is /Users/martin/Library/Android/sdk/emulator/emulator. What I did is:
-
Rename the binary to
emulator-original -
Create a bash script with the name
emulatorthat contains:/Users/<YOUR_USERNAME>/Library/Android/sdk/emulator/emulator-original <PARAMS> $@``` -
Change the script permissions with
chmod +x emulator
Now Android Studio runs my script instead of running the binary
Update: try Stef’s solution first, it looks better than this hack