Lines Matching full:footer
1969 magic: Magic for identifying the footer, see |MAGIC|.
1970 version_major: The major version of avbtool that wrote the footer.
1971 version_minor: The minor version of avbtool that wrote the footer.
1989 """Initializes a new footer object.
1995 LookupError: If the given footer is malformed.
1996 struct.error: If the given data has no footer.
2005 raise LookupError('Given data does not look like a AVB footer.')
2015 """Serializes the footer.
2018 The footer as bytes.
2215 image_filename: File to extract vbmeta data from (with a footer).
2219 AvbError: If there's no footer in the image.
2222 (footer, _, _, _) = self._parse_image(image)
2223 if not footer:
2224 raise AvbError('Given image does not have a footer.')
2226 image.seek(footer.vbmeta_offset)
2227 vbmeta_blob = image.read(footer.vbmeta_size)
2239 image_filename: File to erase a footer from.
2243 AvbError: If there's no footer in the image.
2246 (footer, _, descriptors, _) = self._parse_image(image)
2247 if not footer:
2248 raise AvbError('Given image does not have a footer.')
2252 new_image_size = footer.original_image_size
2281 AvbError: If there's no footer in the image.
2284 (footer, _, descriptors, _) = self._parse_image(image)
2285 if not footer:
2286 raise AvbError('Given image does not have a footer.')
2333 image_filename: File with footer to resize.
2337 AvbError: If there's no footer in the image.
2345 (footer, _, _, _) = self._parse_image(image)
2346 if not footer:
2347 raise AvbError('Given image does not have a footer.')
2350 # image amounts to just moving the footer around.
2351 vbmeta_end_offset = footer.vbmeta_offset + footer.vbmeta_size
2363 # with enough bytes such that the final Footer block is at the end
2369 # Just reuse the same footer - only difference is that we're
2371 footer_blob = footer.encode()
2420 (footer, header, descriptors, image_size) = self._parse_image(image)
2429 if footer:
2430 o.write('Footer version: {}.{}\n'.format(footer.version_major,
2431 footer.version_minor))
2434 footer.original_image_size))
2435 o.write('VBMeta offset: {}\n'.format(footer.vbmeta_offset))
2436 o.write('VBMeta size: {} bytes\n'.format(footer.vbmeta_size))
2539 (footer, header, descriptors, _) = self._parse_image(image)
2541 if footer:
2542 offset = footer.vbmeta_offset
2564 if footer:
2565 print('vbmeta: Successfully verified footer and {} vbmeta struct in {}'
2669 (footer, header, descriptors, _) = self._parse_image(image)
2671 if footer:
2672 offset = footer.vbmeta_offset
2746 The image can either be a vbmeta or an image with a footer.
2749 image: An ImageHandler (vbmeta or footer) with a hashtree descriptor.
2753 is no footer on the image), the second argument is a
2762 footer = None
2765 footer = AvbFooter(image.read(AvbFooter.SIZE))
2771 if footer:
2772 vbmeta_offset = footer.vbmeta_offset
2783 return footer, h, descriptors, image.image_size
2788 The image can either be a vbmeta.img or an image with a footer.
2791 image: An ImageHandler (vbmeta or footer).
2797 footer = None
2800 footer = AvbFooter(image.read(AvbFooter.SIZE))
2806 if footer:
2807 vbmeta_offset = footer.vbmeta_offset
2887 image: An ImageHandler (vbmeta or footer) with a hashtree descriptor.
3259 image_filename: File to add the footer to.
3273 # If there's already a footer, truncate the image to its original
3278 footer = AvbFooter(image.read(AvbFooter.SIZE))
3279 # Existing footer found. Just truncate.
3280 original_image_size = footer.original_image_size
3281 image.truncate(footer.original_image_size)
3285 # Image size is too small to possibly contain a footer.
3304 # footer.
3310 # Append vbmeta blob and footer
3315 # final Footer block is at the end of partition_size..
3319 # Generate the Footer that tells where the VBMeta footer
3320 # is. Also put enough padding in the front of the footer since
3322 footer = AvbFooter()
3323 footer.original_image_size = original_image_size
3324 footer.vbmeta_offset = vbmeta_offset
3325 footer.vbmeta_size = len(vbmeta_blob)
3326 footer_blob = footer.encode()
3353 image_filename: File to add the footer to.
3373 calc_max_image_size: Don't store the footer - instead calculate the
3409 # this size + metadata (footer + vbmeta struct) fits in
3424 # If there's already a footer, truncate the image to its original
3430 footer = AvbFooter(image.read(AvbFooter.SIZE))
3431 # Existing footer found. Just truncate.
3432 original_image_size = footer.original_image_size
3433 image.truncate(footer.original_image_size)
3437 # Image size is too small to possibly contain a footer.
3492 # Generate the VBMeta footer.
3507 # Append vbmeta blob and footer, unless requested not to.
3520 # footer.
3531 # final Footer block is at the end of partition_size..
3535 # Generate the Footer that tells where the VBMeta footer
3536 # is. Also put enough padding in the front of the footer since
3538 footer = AvbFooter()
3539 footer.original_image_size = original_image_size
3540 footer.vbmeta_offset = vbmeta_offset
3541 footer.vbmeta_size = len(vbmeta_blob)
3542 footer_blob = footer.encode()
3574 image_filename: File to add the footer to.
3598 calc_max_image_size: Don't store the hashtree or footer - instead
3615 AvbError: If an argument is incorrect or adding the hashtree footer
3634 # size such that an image this size + the hashtree + metadata (footer +
3669 # If there's already a footer, truncate the image to its original
3675 footer = AvbFooter(image.read(AvbFooter.SIZE))
3676 # Existing footer found. Just truncate.
3677 original_image_size = footer.original_image_size
3678 image.truncate(footer.original_image_size)
3682 # Image size is too small to possibly contain a footer.
3790 # Generate the VBMeta footer and add padding as needed.
3808 # Append vbmeta blob and footer, unless requested not to.
3813 # final Footer block is at the end of partition_size..
3818 # Generate the Footer that tells where the VBMeta footer
3819 # is. Also put enough padding in the front of the footer since
3821 footer = AvbFooter()
3822 footer.original_image_size = original_image_size
3823 footer.vbmeta_offset = vbmeta_offset
3824 footer.vbmeta_size = len(vbmeta_blob)
3825 footer_blob = footer.encode()
4094 raise ValueError('Unexpected magic in FEC footer')
4244 help=('Don\'t store the footer - '
4351 help='Add hashes and footer to image.')
4370 help=('Don\'t store the footer - '
4379 help=('Do not append vbmeta struct or footer '
4402 help='Add hashtree and footer to image.')
4439 help=('Don\'t store the hashtree or footer - '
4449 help=('Do not append vbmeta struct or footer '
4469 help='Erase footer from an image.')
4471 help='Image with a footer',
4482 help='Image with a footer',
4489 help='Extracts vbmeta from an image with a footer.')
4491 help='Image with footer',
4507 help='Resize image with a footer.')
4509 help='Image with a footer',
4519 help='Show information about vbmeta or footer.')