Lines Matching full:footer

1985     magic: Magic for identifying the footer, see |MAGIC|.
1986 version_major: The major version of avbtool that wrote the footer.
1987 version_minor: The minor version of avbtool that wrote the footer.
2005 """Initializes a new footer object.
2011 LookupError: If the given footer is malformed.
2012 struct.error: If the given data has no footer.
2021 raise LookupError('Given data does not look like a AVB footer.')
2031 """Serializes the footer.
2034 The footer as bytes.
2231 image_filename: File to extract vbmeta data from (with a footer).
2235 AvbError: If there's no footer in the image.
2238 (footer, _, _, _) = self._parse_image(image)
2239 if not footer:
2240 raise AvbError('Given image does not have a footer.')
2242 image.seek(footer.vbmeta_offset)
2243 vbmeta_blob = image.read(footer.vbmeta_size)
2255 image_filename: File to erase a footer from.
2259 AvbError: If there's no footer in the image.
2262 (footer, _, descriptors, _) = self._parse_image(image)
2263 if not footer:
2264 raise AvbError('Given image does not have a footer.')
2268 new_image_size = footer.original_image_size
2297 AvbError: If there's no footer in the image.
2300 (footer, _, descriptors, _) = self._parse_image(image)
2301 if not footer:
2302 raise AvbError('Given image does not have a footer.')
2349 image_filename: File with footer to resize.
2353 AvbError: If there's no footer in the image.
2361 (footer, _, _, _) = self._parse_image(image)
2362 if not footer:
2363 raise AvbError('Given image does not have a footer.')
2366 # image amounts to just moving the footer around.
2367 vbmeta_end_offset = footer.vbmeta_offset + footer.vbmeta_size
2379 # with enough bytes such that the final Footer block is at the end
2385 # Just reuse the same footer - only difference is that we're
2387 footer_blob = footer.encode()
2436 (footer, header, descriptors, image_size) = self._parse_image(image)
2445 if footer:
2446 o.write('Footer version: {}.{}\n'.format(footer.version_major,
2447 footer.version_minor))
2450 footer.original_image_size))
2451 o.write('VBMeta offset: {}\n'.format(footer.vbmeta_offset))
2452 o.write('VBMeta size: {} bytes\n'.format(footer.vbmeta_size))
2555 (footer, header, descriptors, _) = self._parse_image(image)
2557 if footer:
2558 offset = footer.vbmeta_offset
2580 if footer:
2581 print('vbmeta: Successfully verified footer and {} vbmeta struct in {}'
2685 (footer, header, descriptors, _) = self._parse_image(image)
2687 if footer:
2688 offset = footer.vbmeta_offset
2762 The image can either be a vbmeta or an image with a footer.
2765 image: An ImageHandler (vbmeta or footer) with a hashtree descriptor.
2769 is no footer on the image), the second argument is a
2778 footer = None
2781 footer = AvbFooter(image.read(AvbFooter.SIZE))
2787 if footer:
2788 vbmeta_offset = footer.vbmeta_offset
2799 return footer, h, descriptors, image.image_size
2804 The image can either be a vbmeta.img or an image with a footer.
2807 image: An ImageHandler (vbmeta or footer).
2813 footer = None
2816 footer = AvbFooter(image.read(AvbFooter.SIZE))
2822 if footer:
2823 vbmeta_offset = footer.vbmeta_offset
2903 image: An ImageHandler (vbmeta or footer) with a hashtree descriptor.
3288 image_filename: File to add the footer to.
3302 # If there's already a footer, truncate the image to its original
3307 footer = AvbFooter(image.read(AvbFooter.SIZE))
3308 # Existing footer found. Just truncate.
3309 original_image_size = footer.original_image_size
3310 image.truncate(footer.original_image_size)
3314 # Image size is too small to possibly contain a footer.
3333 # footer.
3339 # Append vbmeta blob and footer
3344 # final Footer block is at the end of partition_size..
3348 # Generate the Footer that tells where the VBMeta footer
3349 # is. Also put enough padding in the front of the footer since
3351 footer = AvbFooter()
3352 footer.original_image_size = original_image_size
3353 footer.vbmeta_offset = vbmeta_offset
3354 footer.vbmeta_size = len(vbmeta_blob)
3355 footer_blob = footer.encode()
3383 image_filename: File to add the footer to.
3404 calc_max_image_size: Don't store the footer - instead calculate the
3442 # this size + metadata (footer + vbmeta struct) fits in
3455 # If we aren't appending the vbmeta footer to the input image we can
3460 # If there's already a footer, truncate the image to its original
3466 footer = AvbFooter(image.read(AvbFooter.SIZE))
3467 # Existing footer found. Just truncate.
3468 original_image_size = footer.original_image_size
3469 image.truncate(footer.original_image_size)
3473 # Image size is too small to possibly contain a footer.
3528 # Generate the VBMeta footer.
3543 # Append vbmeta blob and footer, unless requested not to.
3556 # footer.
3567 # final Footer block is at the end of partition_size..
3571 # Generate the Footer that tells where the VBMeta footer
3572 # is. Also put enough padding in the front of the footer since
3574 footer = AvbFooter()
3575 footer.original_image_size = original_image_size
3576 footer.vbmeta_offset = vbmeta_offset
3577 footer.vbmeta_size = len(vbmeta_blob)
3578 footer_blob = footer.encode()
3611 image_filename: File to add the footer to.
3636 calc_max_image_size: Don't store the hashtree or footer - instead
3653 AvbError: If an argument is incorrect or adding the hashtree footer
3674 # size such that an image this size + the hashtree + metadata (footer +
3709 # If there's already a footer, truncate the image to its original
3715 footer = AvbFooter(image.read(AvbFooter.SIZE))
3716 # Existing footer found. Just truncate.
3717 original_image_size = footer.original_image_size
3718 image.truncate(footer.original_image_size)
3722 # Image size is too small to possibly contain a footer.
3830 # Generate the VBMeta footer and add padding as needed.
3849 # Append vbmeta blob and footer, unless requested not to.
3854 # final Footer block is at the end of partition_size..
3859 # Generate the Footer that tells where the VBMeta footer
3860 # is. Also put enough padding in the front of the footer since
3862 footer = AvbFooter()
3863 footer.original_image_size = original_image_size
3864 footer.vbmeta_offset = vbmeta_offset
3865 footer.vbmeta_size = len(vbmeta_blob)
3866 footer_blob = footer.encode()
4126 raise ValueError('Unexpected magic in FEC footer')
4276 help=('Don\'t store the footer - '
4388 help='Add hashes and footer to image.')
4406 help=('Don\'t store the footer - '
4415 help=('Do not append vbmeta struct or footer '
4438 help='Add hashtree and footer to image.')
4480 help=('Don\'t store the hashtree or footer - '
4490 help=('Do not append vbmeta struct or footer '
4510 help='Erase footer from an image.')
4512 help='Image with a footer',
4523 help='Image with a footer',
4530 help='Extracts vbmeta from an image with a footer.')
4532 help='Image with footer',
4548 help='Resize image with a footer.')
4550 help='Image with a footer',
4560 help='Show information about vbmeta or footer.')