Skip to content

Commit

Permalink
Version 0.1.2
Browse files Browse the repository at this point in the history
Added support for custom emulator arguments
  • Loading branch information
yezhiyi9670 committed Aug 12, 2022
1 parent 959c2dc commit 894d4c1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ <h2 class="settings-subtitle">Functionalities</h2>
<wcl-settings-field-check key="func_writable_system" label="Boot with writable system image"></wcl-settings-field-check>
</p>
<p class="settings-explain">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.</p>
<h2 class="settings-subtitle">Advanced</h2>
<wcl-settings-field-text key="emulator_args" label="Extra emulator arguments"></wcl-settings-field-text>
<p class="settings-explain">Advanced users only. Add extra control arguments.</p>
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avd-launcher",
"version": "0.1.1",
"version": "0.1.2",
"main": "main.js",
"icon": "./icon/launcher.png",
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions static/js/common/settings-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ module.exports = {
validator_arg: ['sdk_root', 'cli_ver'],
default: 'latest'
},
emulator_args: {
type: 'text',
validator: () => {
return {pass: true, message: 'Please do not include -writable-system.'}
},
validator_arg: [],
default: ''
},
func_reset_system: {
type: 'bool',
default: true
Expand Down
2 changes: 1 addition & 1 deletion static/js/common/virtual-devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ 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' : ''} -avd ${this.name}`;
let command = `"${emulator_exec}"${useWritableSystem ? ' -writable-system' : ''} ${SettingsProvider.get('emulator_args')} -avd ${this.name}`;
child_process.exec(command);
return {pass: true, message: "Emulator launched."};
};
Expand Down

0 comments on commit 894d4c1

Please sign in to comment.