From 4340a6a9a46f25b8556980671cfa146b55c8926b Mon Sep 17 00:00:00 2001 From: Retyunskikh Dmitriy Date: Wed, 5 Mar 2025 22:35:00 +0300 Subject: [PATCH 1/2] Added EXTRA_FLAGS to emulator --- scripts/start-emulator.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/start-emulator.sh b/scripts/start-emulator.sh index 2299e6f..b28a5c0 100644 --- a/scripts/start-emulator.sh +++ b/scripts/start-emulator.sh @@ -69,14 +69,15 @@ echo "CORES - $OPT_CORES" emulator \ -avd android \ -gpu "$GPU_MODE" \ - -memory $OPT_MEMORY \ + -memory "$OPT_MEMORY" \ -no-boot-anim \ - -cores $OPT_CORES \ + -cores "$OPT_CORES" \ -ranchu \ $AUTH_FLAG \ -no-window \ - -no-snapshot || update_state "ANDROID_STOPPED" + -no-snapshot \ + $EXTRA_FLAGS || update_state "ANDROID_STOPPED" # -qemu \ - # -smp 8,sockets=1,cores=4,threads=2,maxcpus=8 \ No newline at end of file + # -smp 8,sockets=1,cores=4,threads=2,maxcpus=8 From 2ee6f78910b039e250c505f49074986ba3b1adad Mon Sep 17 00:00:00 2001 From: Retyunskikh Dmitriy Date: Wed, 5 Mar 2025 22:37:09 +0300 Subject: [PATCH 2/2] Doc --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index c225360..5fc9df9 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,9 @@ MEMORY=8192 #### Cores for emulator CORES=4 +#### Extra flags to emulator +EXTRA_FLAGS="-no-metrics -no-audio -partition-size=8192" + ### Mount an external drive in the container It might be sometimes useful to have the entire Android SDK folder outside of the container (stored on a shared distributed filesystem such as NFS for example), to significantly reduce the size and the build time of the image.