state: Add device name to state

This commit is contained in:
Danny Lin 2021-12-16 19:57:28 -08:00
parent d7beec10b6
commit 1d33f1cb02

View file

@ -8,14 +8,19 @@ import { withSpinner } from "../util/cli"
import { readFile } from "../util/fs"
import { ALL_SYS_PARTITIONS } from "../util/partitions"
const STATE_VERSION = 2
const STATE_VERSION = 3
export interface SystemState {
deviceInfo: {
name: string
}
partitionFiles: { [part: string]: Array<string> }
partitionProps: PartitionProps
partitionSecontexts: SelinuxPartContexts
partitionOverlays: PartResValues
partitionVintfInfo: PartitionVintfInfo
moduleInfo: SoongModuleInfo
}
@ -63,6 +68,9 @@ export async function collectSystemState(device: string, outRoot: string, aapt2P
let systemRoot = `${outRoot}/target/product/${device}`
let moduleInfoPath = `${systemRoot}/module-info.json`
let state = {
deviceInfo: {
name: device,
},
partitionFiles: {},
} as SystemState