Source: https://www.linkedin.com/pulse/android-emulator-tips-security-testers-divya-mudgal/
export ANDROID_SDK=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_SDK/emulator:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools/bin:$ANDROID_SDK/tools
emulator -list-avds
emulator -avd Pixel_3_XL_API_26 -writable-system
adb root
Remount "/system" because it is by default mounted as "read-only" even if "-writable-system" is used:
adb remount
adb shell
su
mount -o rw,remount /system
mount -o rw,remount /