Merge "Add all possible flags to the front end." am: 2f5326c0d6
Original change: https://android-review.googlesource.com/c/platform/development/+/1771648 Change-Id: Iddf63cf0216470053ed8ae03dab364379b4072b2
This commit is contained in:
@@ -176,6 +176,10 @@ class ProcessesManagement:
|
|||||||
args['output'] = os.path.join('output', str(id) + '.zip')
|
args['output'] = os.path.join('output', str(id) + '.zip')
|
||||||
if args['verbose']:
|
if args['verbose']:
|
||||||
command.append('-v')
|
command.append('-v')
|
||||||
|
if args['extra_keys']:
|
||||||
|
args['extra'] += '--' + ' --'.join(args['extra_keys'])
|
||||||
|
if args['extra']:
|
||||||
|
command.append(args['extra'])
|
||||||
command.append('-k')
|
command.append('-k')
|
||||||
command.append(
|
command.append(
|
||||||
'../../../build/make/target/product/security/testkey')
|
'../../../build/make/target/product/security/testkey')
|
||||||
|
|||||||
@@ -13,43 +13,45 @@
|
|||||||
/>
|
/>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col
|
<v-col
|
||||||
|
v-for="flag in basicFlags"
|
||||||
|
:key="flag.key"
|
||||||
cols="12"
|
cols="12"
|
||||||
md="4"
|
md="4"
|
||||||
align="center"
|
|
||||||
>
|
>
|
||||||
<BaseCheckbox
|
<BaseCheckbox
|
||||||
v-model="input.verbose"
|
v-model="input[flag.key]"
|
||||||
:label="'Verbose'"
|
:label="flag.label"
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
<v-col
|
|
||||||
cols="12"
|
|
||||||
md="4"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<BaseCheckbox
|
|
||||||
v-model="input.isIncremental"
|
|
||||||
:label="'Incremental'"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
<v-col
|
|
||||||
cols="12"
|
|
||||||
md="4"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<BaseCheckbox
|
|
||||||
v-model="input.isPartial"
|
|
||||||
:label="'Partial'"
|
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<div>
|
<div v-if="input.isPartial">
|
||||||
|
<v-divider />
|
||||||
|
<h3>Select Partitions</h3>
|
||||||
<PartialCheckbox
|
<PartialCheckbox
|
||||||
v-if="input.isPartial"
|
|
||||||
v-model="input.partial"
|
v-model="input.partial"
|
||||||
:labels="updatablePartitions"
|
:labels="updatablePartitions"
|
||||||
/>
|
/>
|
||||||
|
<v-divider />
|
||||||
</div>
|
</div>
|
||||||
|
<v-btn
|
||||||
|
block
|
||||||
|
@click="moreOptions = !moreOptions"
|
||||||
|
>
|
||||||
|
More Options
|
||||||
|
</v-btn>
|
||||||
|
<v-row v-if="moreOptions">
|
||||||
|
<v-col
|
||||||
|
v-for="flag in extraFlags"
|
||||||
|
:key="flag.key"
|
||||||
|
cols="12"
|
||||||
|
md="4"
|
||||||
|
>
|
||||||
|
<BaseCheckbox
|
||||||
|
v-model="input[flag.key]"
|
||||||
|
:label="flag.label"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
<v-divider class="my-5" />
|
<v-divider class="my-5" />
|
||||||
<BaseInput
|
<BaseInput
|
||||||
v-model="input.extra"
|
v-model="input.extra"
|
||||||
@@ -70,7 +72,7 @@ import BaseInput from '@/components/BaseInput.vue'
|
|||||||
import BaseCheckbox from '@/components/BaseCheckbox.vue'
|
import BaseCheckbox from '@/components/BaseCheckbox.vue'
|
||||||
import FileSelect from '@/components/FileSelect.vue'
|
import FileSelect from '@/components/FileSelect.vue'
|
||||||
import PartialCheckbox from '@/components/PartialCheckbox.vue'
|
import PartialCheckbox from '@/components/PartialCheckbox.vue'
|
||||||
import { OTAConfiguration } from '@/services/JobSubmission.js'
|
import { OTAConfiguration, OTABasicFlags, OTAExtraFlags } from '@/services/JobSubmission.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -82,20 +84,23 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
targetDetails: {
|
targetDetails: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
incrementalSource: {
|
incrementalSource: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '',
|
||||||
},
|
},
|
||||||
targetBuild: {
|
targetBuild: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
input: new OTAConfiguration()
|
input: new OTAConfiguration(),
|
||||||
|
moreOptions: false,
|
||||||
|
basicFlags: OTABasicFlags,
|
||||||
|
extraFlags: OTAExtraFlags
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -112,25 +117,25 @@ export default {
|
|||||||
},
|
},
|
||||||
checkIncremental() {
|
checkIncremental() {
|
||||||
return this.input.isIncremental
|
return this.input.isIncremental
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
incrementalSource: {
|
incrementalSource: {
|
||||||
handler: function () {
|
handler: function () {
|
||||||
this.input.isIncremental = true
|
this.input.isIncremental = true
|
||||||
this.input.incremental = this.incrementalSource
|
this.input.incremental = this.incrementalSource
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
targetBuild: {
|
targetBuild: {
|
||||||
handler: function () {
|
handler: function () {
|
||||||
this.input.target = this.targetBuild
|
this.input.target = this.targetBuild
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
checkIncremental: {
|
checkIncremental: {
|
||||||
handler: function () {
|
handler: function () {
|
||||||
this.$emit('update:isIncremental', this.checkIncremental)
|
this.$emit('update:isIncremental', this.checkIncremental)
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
@@ -141,10 +146,12 @@ export default {
|
|||||||
let response_message = await this.input.sendForm()
|
let response_message = await this.input.sendForm()
|
||||||
alert(response_message)
|
alert(response_message)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert('Job cannot be started properly for the following reasons: ' + err)
|
alert(
|
||||||
|
'Job cannot be started properly for the following reasons: ' + err
|
||||||
|
)
|
||||||
}
|
}
|
||||||
this.input = new OTAInput()
|
this.input = new OTAInput()
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -12,12 +12,21 @@ export class OTAConfiguration {
|
|||||||
* Initialize the input for the api /run/<id>
|
* Initialize the input for the api /run/<id>
|
||||||
*/
|
*/
|
||||||
constructor() {
|
constructor() {
|
||||||
|
/**
|
||||||
|
* Please refer to:
|
||||||
|
* https://source.corp.google.com/android/build/make/tools/releasetools/ota_from_target_files.py
|
||||||
|
* for the complete and up-to-date configurations that can be set for
|
||||||
|
* the OTA package generation.
|
||||||
|
* TODO (lishutong): there are dependencies on this flags,
|
||||||
|
* disable checkboxes of which dependencies are not fulfilled.
|
||||||
|
*/
|
||||||
this.verbose = false,
|
this.verbose = false,
|
||||||
this.target = '',
|
this.target = '',
|
||||||
this.incremental = '',
|
this.incremental = '',
|
||||||
this.isIncremental = false,
|
this.isIncremental = false,
|
||||||
this.partial = [],
|
this.partial = [],
|
||||||
this.isPartial = false,
|
this.isPartial = false,
|
||||||
|
this.extra_keys = [],
|
||||||
this.extra = '',
|
this.extra = '',
|
||||||
this.id = uuid.v1()
|
this.id = uuid.v1()
|
||||||
}
|
}
|
||||||
@@ -26,6 +35,11 @@ export class OTAConfiguration {
|
|||||||
* Start the generation process, will throw an error if not succeed
|
* Start the generation process, will throw an error if not succeed
|
||||||
*/
|
*/
|
||||||
async sendForm() {
|
async sendForm() {
|
||||||
|
for (let flag of OTAExtraFlags.slice(3, OTAflags.length)) {
|
||||||
|
if (this[flag.key]) {
|
||||||
|
this.extra_keys.push(flag.key)
|
||||||
|
}
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
let response = await ApiServices.postInput(JSON.stringify(this), this.id)
|
let response = await ApiServices.postInput(JSON.stringify(this), this.id)
|
||||||
return response.data
|
return response.data
|
||||||
@@ -34,3 +48,166 @@ export class OTAConfiguration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const OTABasicFlags = [
|
||||||
|
{
|
||||||
|
key: 'isIncremental',
|
||||||
|
label: 'Incremental OTA',
|
||||||
|
requireArg: 'incremental'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'isPartial',
|
||||||
|
label: 'Partial OTA',
|
||||||
|
requireArg: 'partial'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'verbose',
|
||||||
|
label: 'Verbose'
|
||||||
|
},]
|
||||||
|
|
||||||
|
export const OTAExtraFlags = [
|
||||||
|
{
|
||||||
|
key: 'downgrade',
|
||||||
|
label: 'Downgrade',
|
||||||
|
depend: ['isIncremental']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'override_timestamp',
|
||||||
|
label: 'Override time stamp'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'wipe_user_data',
|
||||||
|
label: 'Wipe User data'
|
||||||
|
},
|
||||||
|
//{
|
||||||
|
// key: 'retrofit_dynamic_partitions',
|
||||||
|
// label: 'Support dynamic partition'
|
||||||
|
//},
|
||||||
|
{
|
||||||
|
key: 'skip_compatibility_check',
|
||||||
|
label: 'Skip compatibility check'
|
||||||
|
},
|
||||||
|
//{
|
||||||
|
// key: 'output_metadata_path',
|
||||||
|
// label: 'Output metadata path'
|
||||||
|
//},
|
||||||
|
{
|
||||||
|
key: 'force_non_ab',
|
||||||
|
label: 'Generate non-A/B package'
|
||||||
|
},
|
||||||
|
/** TODO(lishutong): the following comments are flags
|
||||||
|
* that requires file operation, will add these functions later.
|
||||||
|
*/
|
||||||
|
//{key: 'oem_settings', label: 'Specify the OEM properties',
|
||||||
|
// requireArg: 'oem_settings_files'},
|
||||||
|
//{key: 'binary', label: 'Use given binary', requireArg: 'binary_file',
|
||||||
|
// depend: ['force_non_ab']},
|
||||||
|
{
|
||||||
|
key: 'block',
|
||||||
|
label: 'Block-based OTA',
|
||||||
|
depend: ['force_non_ab']
|
||||||
|
},
|
||||||
|
//{key: 'extra_script', label: 'Extra script', requireArg: 'script_file',
|
||||||
|
// depend: ['force_non_ab']},
|
||||||
|
{
|
||||||
|
key: 'full_bootloader',
|
||||||
|
label: 'Full bootloader',
|
||||||
|
depend: ['force_non_ab', 'isIncremental']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'full_radio',
|
||||||
|
label: 'Full radio',
|
||||||
|
depend: ['force_non_ab', 'isIncremental']
|
||||||
|
},
|
||||||
|
//{key: 'log_diff', label: 'Log difference',
|
||||||
|
// requireArg: 'log_diff_path',depend: ['force_non_ab', 'isIncremental']},
|
||||||
|
//{key: 'oem_no_mount', label: 'Do not mount OEM partition',
|
||||||
|
// depend: ['force_non_ab', 'oem_settings']},
|
||||||
|
//{
|
||||||
|
// key: 'stash_threshold',
|
||||||
|
// label: 'Threshold for maximum stash size',
|
||||||
|
// requireArg: 'stash_threshold_float',
|
||||||
|
// depend: ['force_non_ab']
|
||||||
|
//},
|
||||||
|
//{
|
||||||
|
// key: 'worker_threads',
|
||||||
|
// label: 'Number of worker threads',
|
||||||
|
// requireArg: 'worker_threads_int',
|
||||||
|
// depend: ['force_non_ab', 'isIncremental']
|
||||||
|
//},
|
||||||
|
//{
|
||||||
|
// key: 'verify',
|
||||||
|
// label: 'Verify the checksum',
|
||||||
|
// depend: ['force_non_ab', 'isIncremental']
|
||||||
|
//},
|
||||||
|
{
|
||||||
|
key: 'two_step',
|
||||||
|
label: 'Generate two-step OTA',
|
||||||
|
depend: ['force_non_ab']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'disable_fec_computation',
|
||||||
|
label: 'Disable the on device FEC computation',
|
||||||
|
depend: ['isIncremental'],
|
||||||
|
exclude: ['force_non_ab']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'include_secondary',
|
||||||
|
label: 'Include secondary slot images',
|
||||||
|
exclude: ['force_non_ab', 'isIncremental']
|
||||||
|
},
|
||||||
|
//{key: 'payload_signer', label: 'Specify the signer',
|
||||||
|
// requireArg: ['payload_signer_singer'], exclude: ['force_non_ab']},
|
||||||
|
//{key: 'payload_singer_args', label: 'Specify the args for signer',
|
||||||
|
// requireArg: ['payload_signer_args_args], exclude: ['force_non_ab']},
|
||||||
|
//{
|
||||||
|
// key: 'payload_signer_maximum_signature_size',
|
||||||
|
// label: 'The maximum signature size (in bytes)',
|
||||||
|
// requireArg: ['payload_signer_maximum_signature_size_int'],
|
||||||
|
// exclude: ['force_non_ab']
|
||||||
|
//},
|
||||||
|
//{key: 'boot_variable_file', label: 'Specify values of ro.boot.*',
|
||||||
|
// requireArg: ['boot_variable_file_file'], exclude: ['force_non_ab']},
|
||||||
|
{
|
||||||
|
key: 'skip_postinstall',
|
||||||
|
label: 'Skip the postinstall',
|
||||||
|
exclude: ['force_non_ab']
|
||||||
|
},
|
||||||
|
//{key: 'custom_image', label: 'Use custom image',
|
||||||
|
// requireArg: ['custom_image_files'], exclude: ['force_non_ab]},
|
||||||
|
{
|
||||||
|
key: 'disable_vabc',
|
||||||
|
label: 'Disable Virtual A/B compression',
|
||||||
|
exclude: ['force_non_ab']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'vabc_downgrade',
|
||||||
|
label: "Don't disable VABC for downgrading",
|
||||||
|
depend: ['isIncremental', 'downgrade'],
|
||||||
|
exclude: ['force_non_ab']
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
/** export const requireArgs = new Map([
|
||||||
|
[
|
||||||
|
"stash_threshold_float",
|
||||||
|
{
|
||||||
|
type: "BaseInput",
|
||||||
|
label: "Threshold for maximum stash size"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"worker_threads",
|
||||||
|
{
|
||||||
|
type: "BaseInput",
|
||||||
|
label: "Number of worker threads"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"payload_signer_maximum_signature_size",
|
||||||
|
{
|
||||||
|
type: "BaseInput",
|
||||||
|
label: "The maximum signature size (in bytes)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
]) */
|
||||||
Reference in New Issue
Block a user