starting the emulator from command line

List avds

λ emulator -list-avds

Warm boot

λ emulator @Pixel_4_API_30

Cold boot

emulator @Pixel_4_API_30 -no-snapshot-load

signing and versioning iOS and Android apps

install emulator from command line

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"

  3. Create Emulator: echo "no" | avdmanager --verbose create avd --force --name "generic_10" --package "system-images;android-29;default;x86" --tag "default" --abi "x86"

    I recommend adding these lines to: ~/.android/avd/generic_10.avd/config.ini        # proper screen size for emulator
    hw.keyboard=yes            # enables keys from your laptop to be sent to the emulator
    If you cannot do this, you can still pass -skin 1080x1920 as an argument when starting the emulator. 
  4. Run Emulator: emulator @generic_10 &

More info

update emulator from commandline

λ sdkmanager --update

showing stories in the browser

Stories not appearing in the browser once the emulator has loaded? Do the following then reload:

adb reverse tcp:7007 tcp:7007