From a05fc7677d20228bc760abef80d7ccc5d940cf49 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 27 Apr 2018 14:51:29 +0300 Subject: [PATCH] Add GAUZE_ANDROID_EMULATOR_PARTITION_SIZE --- cmake/gauze_run_start_script.cmake | 6 ++++++ cmake/templates/start-emulator.sh.in | 1 + docs/prereq/android.rst | 11 ++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) 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