From 91b49bfcaa35c564df7a398faa359b45148a2742 Mon Sep 17 00:00:00 2001 From: Paulo Lieuthier Date: Thu, 2 Feb 2023 16:14:32 -0300 Subject: [PATCH] feat(emulator-manager): try to set emulator's heap size another way --- lib/emulator-manager.js | 1 + src/emulator-manager.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/emulator-manager.js b/lib/emulator-manager.js index 428542ded..4da714e3b 100644 --- a/lib/emulator-manager.js +++ b/lib/emulator-manager.js @@ -58,6 +58,7 @@ function launchEmulator(apiLevel, target, arch, profile, cores, ramSize, heapSiz yield exec.exec(`sh -c \\"printf 'hw.ramSize=${ramSize}\n' >> ${process.env.ANDROID_AVD_HOME}/"${avdName}".avd"/config.ini`); } if (heapSize) { + yield exec.exec(`sh -c \\"printf 'vm.heapSize=${heapSize}\n' >> ${process.env.ANDROID_AVD_HOME}/"${avdName}".avd"/config.ini`); yield exec.exec(`sh -c \\"printf 'hw.heapSize=${heapSize}\n' >> ${process.env.ANDROID_AVD_HOME}/"${avdName}".avd"/config.ini`); } if (enableHardwareKeyboard) { diff --git a/src/emulator-manager.ts b/src/emulator-manager.ts index 4c348fbc8..3d527b876 100644 --- a/src/emulator-manager.ts +++ b/src/emulator-manager.ts @@ -46,6 +46,7 @@ export async function launchEmulator( } if (heapSize) { + await exec.exec(`sh -c \\"printf 'vm.heapSize=${heapSize}\n' >> ${process.env.ANDROID_AVD_HOME}/"${avdName}".avd"/config.ini`); await exec.exec(`sh -c \\"printf 'hw.heapSize=${heapSize}\n' >> ${process.env.ANDROID_AVD_HOME}/"${avdName}".avd"/config.ini`); }