Skip to content

Commit

Permalink
Create emulator with ability to overwrite
Browse files Browse the repository at this point in the history
This is necessary on a custom runner, when previous job failed
  • Loading branch information
hannesa2 committed Apr 25, 2023
1 parent 00b47f1 commit d2ec4a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion emulator-run-cmd/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export abstract class BaseAndroidSdk implements AndroidSDK {
additionalOptions += `--device ${hardwareProfile}`
}

await execIgnoreFailure(`bash -c \\\"echo -n no | ${this.androidHome()}/cmdline-tools/bootstrap-version/bin/avdmanager create avd -n ${name} --package \\\"system-images;android-${api};${tag};${abi}\\\" --tag ${tag}\" ${additionalOptions}`)
await execIgnoreFailure(`bash -c \\\"echo -n no | ${this.androidHome()}/cmdline-tools/bootstrap-version/bin/avdmanager create avd -n ${name} --force --package \\\"system-images;android-${api};${tag};${abi}\\\" --tag ${tag}\" ${additionalOptions}`)
return new Emulator(this, name, api, abi, tag, this.portCounter++, this.portCounter++)
}

Expand Down
2 changes: 1 addition & 1 deletion install-sdk/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export abstract class BaseAndroidSdk implements AndroidSDK {
additionalOptions += `--device ${hardwareProfile}`
}

await execIgnoreFailure(`bash -c \\\"echo -n no | ${this.androidHome()}/cmdline-tools/bootstrap-version/bin/avdmanager create avd -n ${name} --package \\\"system-images;android-${api};${tag};${abi}\\\" --tag ${tag}\" ${additionalOptions}`)
await execIgnoreFailure(`bash -c \\\"echo -n no | ${this.androidHome()}/cmdline-tools/bootstrap-version/bin/avdmanager create avd -n ${name} --force --package \\\"system-images;android-${api};${tag};${abi}\\\" --tag ${tag}\" ${additionalOptions}`)
return new Emulator(this, name, api, abi, tag, this.portCounter++, this.portCounter++)
}

Expand Down

0 comments on commit d2ec4a5

Please sign in to comment.