diff --git a/src/commands/generate-all.ts b/src/commands/generate-all.ts index b42186a..9759db4 100644 --- a/src/commands/generate-all.ts +++ b/src/commands/generate-all.ts @@ -4,6 +4,7 @@ import { createVendorDirs } from '../blobs/build' import { copyBlobs } from '../blobs/copy' import { BlobEntry } from '../blobs/entry' import { DeviceConfig, loadDeviceConfigs } from '../config/device' +import { COLLECTED_SYSTEM_STATE_DIR } from '../config/paths' import { forEachDevice } from '../frontend/devices' import { enumerateFiles, @@ -165,7 +166,7 @@ export default class GenerateFull extends Command { customSrc: flags.string({ char: 'c', description: 'path to AOSP build output directory (out/) or (directory containing) JSON state file', - default: 'out', + default: COLLECTED_SYSTEM_STATE_DIR, }), factoryPath: flags.string({ char: 'f', diff --git a/src/config/paths.ts b/src/config/paths.ts index de52bf4..811f9ba 100644 --- a/src/config/paths.ts +++ b/src/config/paths.ts @@ -13,6 +13,8 @@ export const ADEVTOOL_DIR = path.join(OS_CHECKOUT_DIR, 'vendor/adevtool') export const CONFIG_DIR = process.env['ADEVTOOL_CONFIG_DIR'] ?? path.join(ADEVTOOL_DIR, 'config') export const DEVICE_CONFIG_DIR = path.join(CONFIG_DIR, 'device') +// $DEVICE.json files made by collect-state command +export const COLLECTED_SYSTEM_STATE_DIR = process.env['ADEVTOOL_SYSTEM_STATE_DIR'] ?? path.join(OS_CHECKOUT_DIR, 'vendor/state') export const BUILD_INDEX_DIR = path.join(CONFIG_DIR, 'build-index') export const BUILD_INDEX_FILE = path.join(BUILD_INDEX_DIR, 'build-index.yml')