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