pmb: add -f (force) parameter to bootimg_analyze

We are analyzing the `boot.img` with `file` before we send it to
`unpackbootimg`. File does not recognize all kinds of `boot.img` files,
which `unpackbootimg` can extract, so we need a way to skip this check.

Details:
* Add `-f` parameter, continues extraction with a warning if the file
  seems to be invalid
* Tell the user that `-f` can be used if the `boot.img` is invalid and
  it's not specified
* Consistent spelling of `boot.img` instead of `bootimg` in messages

Fixes #1608
This commit is contained in:
Oliver Smith 2018-07-06 21:57:18 +02:00
parent 0aa125e45c
commit d4f4ea8488
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 19 additions and 6 deletions

View file

@ -437,6 +437,9 @@ def arguments():
bootimg_analyze = sub.add_parser("bootimg_analyze", help="Extract all the"
" information from an existing boot.img")
bootimg_analyze.add_argument("path", help="path to the boot.img")
bootimg_analyze.add_argument("-f", dest="force", action="store_true",
help="force even if the file seems to be"
" invalid")
# Use defaults from the user's config file
args = parser.parse_args()