From a790900e31de168a2f9600ba320381e805864203 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 23 Dec 2019 20:16:27 +0100 Subject: [PATCH] pmb.parse.bootimg: fix kernel detection (!1846) Adjust to new text that "file" outputs for ARM linux kernels: "ARM OpenFirmware FORTH Dictionary..." Make test_bootimg_kernel pass again, which was failing with: AssertionError: assert 'heimdall-isorec' in 'File is not an Android ... --- pmb/parse/bootimg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pmb/parse/bootimg.py b/pmb/parse/bootimg.py index 067a2189..cf8a3c6f 100644 --- a/pmb/parse/bootimg.py +++ b/pmb/parse/bootimg.py @@ -55,7 +55,8 @@ def bootimg(args, path): " boot.img file, you could force the analysis" " with: 'pmbootstrap bootimg_analyze " + path + " -f'") - if "linux kernel" in file_output.lower(): + if ("linux kernel" in file_output.lower() or + "ARM OpenFirmware FORTH Dictionary" in file_output): raise RuntimeError("File is a Kernel image, you might need the" " 'heimdall-isorec' flash method. See also:" "