make addition of "require partition-exists=vendor_kernel_boot" generic
Instead of hardcoding the list of devices (which is now missing lynx), check whether vendor_kernel_boot is present in the list of stock A/B partitions.
This commit is contained in:
parent
2b26cec4e3
commit
06114545f4
2 changed files with 3 additions and 3 deletions
|
@ -280,6 +280,7 @@ export async function extractFirmware(
|
|||
config.device.name,
|
||||
stockProps.get('vendor')!.get('ro.build.expect.bootloader')!,
|
||||
stockProps.get('vendor')!.get('ro.build.expect.baseband')!,
|
||||
getAbOtaPartitionsProps(stockProps)!!
|
||||
)
|
||||
await fs.writeFile(`${dirs.firmware}/${ANDROID_INFO}`, androidInfo)
|
||||
|
||||
|
|
|
@ -62,15 +62,14 @@ export async function writeFirmwareImages(images: FirmwareImages, fwDir: string)
|
|||
return paths
|
||||
}
|
||||
|
||||
export function generateAndroidInfo(device: string, blVersion: string, radioVersion: string) {
|
||||
export function generateAndroidInfo(device: string, blVersion: string, radioVersion: string, stockAbOtaPartitions: string[]) {
|
||||
let android_info = `require board=${device}
|
||||
|
||||
require version-bootloader=${blVersion}
|
||||
require version-baseband=${radioVersion}
|
||||
`
|
||||
|
||||
const vendor_kernel_boot_devices = ['cheetah', 'panther']
|
||||
if (vendor_kernel_boot_devices.includes(device)) {
|
||||
if (stockAbOtaPartitions.includes('vendor_kernel_boot')) {
|
||||
android_info += 'require partition-exists=vendor_kernel_boot\n'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue