diff --git a/cmake/gauze_run_start_script.cmake b/cmake/gauze_run_start_script.cmake index b858895..02ea387 100644 --- a/cmake/gauze_run_start_script.cmake +++ b/cmake/gauze_run_start_script.cmake @@ -23,6 +23,11 @@ function(gauze_run_start_script) set(GAUZE_ANDROID_EMULATOR_GPU "host") endif() + if("${GAUZE_ANDROID_EMULATOR_PARTITION_SIZE}" STREQUAL "") + # https://developer.android.com/studio/run/emulator-commandline + set(GAUZE_ANDROID_EMULATOR_PARTITION_SIZE 200) + endif() + # Use: # * GAUZE_ANDROID_ADB # * GAUZE_ANDROID_EMULATOR @@ -32,6 +37,7 @@ function(gauze_run_start_script) # * GAUZE_START_LOG # * ANDROID-SDK_ROOT # * GAUZE_ANDROID_EMULATOR_GPU + # * GAUZE_ANDROID_EMULATOR_PARTITION_SIZE configure_file(${GAUZE_START_EMULATOR_SCRIPT} "${start_script}" @ONLY) set(bash_path "/bin/bash") diff --git a/cmake/templates/start-emulator.sh.in b/cmake/templates/start-emulator.sh.in index 6cb1566..7e41deb 100644 --- a/cmake/templates/start-emulator.sh.in +++ b/cmake/templates/start-emulator.sh.in @@ -16,5 +16,6 @@ export "ANDROID_SDK_ROOT=@ANDROID-SDK_ROOT@/android-sdk" -no-window \ -port "@GAUZE_DEVICE_PORT@" \ -gpu "@GAUZE_ANDROID_EMULATOR_GPU@" \ + -partition-size "@GAUZE_ANDROID_EMULATOR_PARTITION_SIZE@" \ 1> "@GAUZE_START_LOG@" \ 2> "@GAUZE_START_ERR@" & diff --git a/docs/prereq/android.rst b/docs/prereq/android.rst index 5002b2b..e0ee0c4 100644 --- a/docs/prereq/android.rst +++ b/docs/prereq/android.rst @@ -59,8 +59,8 @@ Emulator can be stopped by ``kill -9`` command: 9160 ... /.../android-sdk/tools/emulator64-arm -avd gauze_android-19_armeabi-v7a -no-window -port 5678 -gpu host > kill -9 9160 -Emulator GPU -============ +Other options +============= You can set ``GAUZE_ANDROID_EMULATOR_GPU`` to control what GPU type will be using while creating Android emulator: @@ -72,4 +72,9 @@ using while creating Android emulator: For Travis CI: * use ``host`` on macOS machines - * use ``none`` on Linux machines + * use ``off`` on Linux machines + +You can set ``GAUZE_ANDROID_EMULATOR_PARTITION_SIZE`` to specify the system +data partition size in MBs. + +* https://developer.android.com/studio/run/emulator-acceleration#command-gpu