AVBTOOL | The main job of avbtool is to create vbmeta

 by   jcrutchvt10 C Version: android-wear-o-preview-4 License: MIT

kandi X-RAY | AVBTOOL Summary

kandi X-RAY | AVBTOOL Summary

AVBTOOL is a C library. AVBTOOL has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

The main job of avbtool is to create vbmeta.img which is the top-level object for verified boot. This image is designed to go into the vbmeta partition (or, if using A/B, the slot in question e.g. vbmeta_a or vbmeta_b) and be of minimal size (for out-of-band updates). The vbmeta image is cryptographically signed and contains verification data (e.g. cryptographic digests) for verifying boot.img, system.img, and other partitions/images. The vbmeta image can also contain references to other partitions where verification data is stored as well as a public key indicating who should sign the verification data. This indirection provides delegation, that is, it allows a 3rd party to control content on a given partition by including their public key in vbmeta.img. By design, this authority can be easily revoked by simply updating vbmeta.img with new descriptors for the partition in question. Storing signed verification data on other images - for example boot.img and system.img - is also done with avbtool. In addition to avbtool, a library - libavb - is provided. This library performs all verification on the device side e.g. it starts by loading the vbmeta partition, checks the signature, and then goes on to load the boot partition for verification. This library is intended to be used in both boot loaders and inside Android. It has a simple abstraction for system dependencies (see avb_sysdeps.h) as well as operations that the boot loader or OS is expected to implement (see avb_ops.h). The main entry point for verification is avb_slot_verify(). It is expected that most devices will use A/B (e.g. multiple copies of the OS in separate so-called 'slots') in addition to AVB. While managing A/B metadata and associated metadata (e.g. managing stored_rollback_index[n] locations) is outside the scope of libavb, enough interfaces are exposed so the boot loader can integrate its A/B stack with libavb. In particular avb_slot_verify() takes a slot_suffix parameter and its result struct AvbSlotVerifyData convey the rollback indexes in the image that was verified. AVB also includes an A/B implementation that boot loaders may optionally use. This implementation is in the libavb_ab library and integrates with image verification including updating the stored_rollback_index[n] locations on the device as needed. The bootloader can use this through the avb_ab_flow() function which in turn calls avb_slot_verify() as needed. In libavb_ab, A/B metadata is stored in the misc partition using a format private to libavb_ab in the location on misc reserved for this. For more information about the misc.img file format see the bootloader_message.h file in AOSP. A/B metadata can be written to misc.img using the set_ab_metadata sub-command of avbtool. A/B metadata is comprised of data for each slo and per-slot metadata has a priority field (0 to 15), number of tries remaining for attempting to boot the slot (0 to 7), and a flag to indicate whether the slot has successfully booted. A/B metadata integrity is provided by a simple magic marker and a CRC-32 checksum. If invalid A/B metadata is detected, the behavior is to reset the A/B metadata to a known state where both slots are given seven boot tries. An implementation of a boot_control HAL using AVB-specific A/B metadata is also provided. Android Things has specific requirements and validation logic for the vbmeta public key. An extension is provided in libavb_atx which performs this validation as an implementatio of libavb's public key validation operation (see avb_validate_vbmeta_public_key() in avb_ops.h).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              AVBTOOL has a low active ecosystem.
              It has 12 star(s) with 9 fork(s). There are no watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              AVBTOOL has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of AVBTOOL is android-wear-o-preview-4

            kandi-Quality Quality

              AVBTOOL has 0 bugs and 0 code smells.

            kandi-Security Security

              AVBTOOL has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              AVBTOOL code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              AVBTOOL is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              AVBTOOL releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 137 lines of code, 10 functions and 2 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of AVBTOOL
            Get all kandi verified functions for this library.

            AVBTOOL Key Features

            No Key Features are available at this moment for AVBTOOL.

            AVBTOOL Examples and Code Snippets

            No Code Snippets are available at this moment for AVBTOOL.

            Community Discussions

            QUESTION

            Android AOSP build failing in build_image.py for android-10.0.0_r39
            Asked 2020-Sep-24 at 05:04

            On Ubuntu 20.04 LTS. I have an AOSP tree checked out at android-10.0.0_r39. The tree builds fine for walleye - I can build an run on a device, no issues. I have no new files in the AOSP repo tree. If I switch to blueline, though, I get:

            ...

            ANSWER

            Answered 2020-Jul-14 at 11:34

            This is likely due to the file system you are writing your image to. In particular, I received the same problem when writing to a zfs drive. As soon as I redirected my build to an ext4 device, my build completed.

            To redirect where your image is written, set the environment variable OUT_DIR_COMMON_BASE, i.e.

            Source https://stackoverflow.com/questions/62473888

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install AVBTOOL

            Android Verified Boot is enabled by the BOARD_AVB_ENABLE variable. This will make the build system create vbmeta.img which will contain a hash descriptor for boot.img, a hashtree descriptor for system.img, a kernel-cmdline descriptor for setting up dm-verity for system.img and append a hash-tree to system.img.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/jcrutchvt10/AVBTOOL.git

          • CLI

            gh repo clone jcrutchvt10/AVBTOOL

          • sshUrl

            git@github.com:jcrutchvt10/AVBTOOL.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link