diff --git a/index.html b/index.html index 660ae90..49fbcf5 100644 --- a/index.html +++ b/index.html @@ -81,7 +81,9 @@
Writable system image allows for system modifications, such as installing ARM support and Rooting. Changes to system in one virtual device does not affect another.
Advanced users only. Add extra control arguments.
diff --git a/package.json b/package.json index 7d25c85..a9eaa82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "avd-launcher", - "version": "0.1.2", + "version": "0.1.4", "main": "main.js", "icon": "./icon/launcher.png", "scripts": { diff --git a/static/js/common/settings-data.js b/static/js/common/settings-data.js index 7f10372..0cc6ad5 100644 --- a/static/js/common/settings-data.js +++ b/static/js/common/settings-data.js @@ -38,6 +38,14 @@ module.exports = { validator_arg: ['sdk_root', 'cli_ver'], default: 'latest' }, + preexec: { + type: 'text', + validator: () => { + return {pass: true, message: 'You can use this to set environment variables.'} + }, + validator_arg: [], + default: '' + }, emulator_args: { type: 'text', validator: () => { @@ -46,6 +54,14 @@ module.exports = { validator_arg: [], default: '' }, + qemu_args: { + type: 'text', + validator: () => { + return {pass: true, message: 'Arguments to pass to qemu core.'} + }, + validator_arg: [], + default: '' + }, func_reset_system: { type: 'bool', default: true diff --git a/static/js/common/virtual-devices.js b/static/js/common/virtual-devices.js index 3b3281c..e0a2223 100644 --- a/static/js/common/virtual-devices.js +++ b/static/js/common/virtual-devices.js @@ -80,7 +80,11 @@ const child_process = require('child_process'); if(this.isRunning()) { return {pass: false, error: 'already_running', message: "Emulator is already running."}; } - let command = `"${emulator_exec}"${useWritableSystem ? ' -writable-system' : ''} ${SettingsProvider.get('emulator_args')} -avd ${this.name}`; + let command = `"${emulator_exec}"${useWritableSystem ? ' -writable-system' : ''} ${SettingsProvider.get('emulator_args')} -avd ${this.name} -qemu ${SettingsProvider.get('qemu_args')}`; + let preexec = SettingsProvider.get('preexec'); + if(preexec != '') { + command = preexec + '&' + command; + } child_process.exec(command); return {pass: true, message: "Emulator launched."}; };