Android-cuttlefish cvd tool
Public Member Functions | Friends | List of all members
cuttlefish::AndroidBuild Class Referenceabstract

#include <android_build.h>

Inheritance diagram for cuttlefish::AndroidBuild:
Inheritance graph
[legend]

Public Member Functions

virtual ~AndroidBuild ()=default
 
virtual std::string Name () const =0
 
virtual PrettyStruct Pretty ()=0
 
virtual Result< std::set< std::string, std::less< void > > > Images ()
 
virtual Result< std::string > ImageFile (std::string_view name, bool extract=true)
 
virtual Result< void > SetExtractDir (std::string_view)
 
virtual Result< std::set< std::string, std::less< void > > > AbPartitions ()
 
virtual Result< std::set< std::string, std::less< void > > > SystemPartitions ()
 
virtual Result< std::set< std::string, std::less< void > > > VendorPartitions ()
 
virtual Result< std::set< std::string, std::less< void > > > LogicalPartitions ()
 
virtual Result< std::set< std::string, std::less< void > > > PhysicalPartitions ()
 

Friends

std::ostream & operator<< (std::ostream &, const AndroidBuild &)
 
std::string format_as (const AndroidBuild &)
 

Detailed Description

Represents an Android build, as defined by image files and some of the metadata text files produced by the build system.

The build system produces a subset of these files with faster m builds, and does the complete set and packages them up into zip files in slower m dist builds. The zip files are uploaded to the Android Build server, and the cvd fetch tool can download subsets of them to the local filesystem.

Image files also contain some duplication: the 'super' image contains logical partitions that may also be present as standalone image files, depending on the file subset available.

Note the distinction between "images" and "partitions" in methods. Image files may contain zero or more partitions.

Instances of this class present a subset of the files produced by the build system. This may be complete or incomplete subset.

Constructor & Destructor Documentation

◆ ~AndroidBuild()

virtual cuttlefish::AndroidBuild::~AndroidBuild ( )
virtualdefault

Member Function Documentation

◆ AbPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::AndroidBuild::AbPartitions ( )
virtual

◆ ImageFile()

Result< std::string > cuttlefish::AndroidBuild::ImageFile ( std::string_view  name,
bool  extract = true 
)
virtual

◆ Images()

Result< std::set< std::string, std::less< void > > > cuttlefish::AndroidBuild::Images ( )
virtual

Image information, as reported by the Android build system.

An image may be one of three different categories:

  • A partition in the top-level GPT, such as the the super partition.
  • A logical partition stored inside the GPT super partition.
  • A super_empty pseudo-partition file that reports what should be in the super partition, but without the logical partition contents.

Reimplemented in cuttlefish::anonymous_namespace{android_product_dir.cc}::AndroidProductDirImpl, cuttlefish::anonymous_namespace{combined_android_build.cc}::CombinedAndroidBuildImpl, cuttlefish::FakeAndroidBuild, cuttlefish::anonymous_namespace{img_zip.cc}::ImgZipImpl, cuttlefish::anonymous_namespace{super_image.cc}::SuperImageAsBuildImpl, and cuttlefish::anonymous_namespace{target_files.cc}::TargetFilesImpl.

◆ LogicalPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::AndroidBuild::LogicalPartitions ( )
virtual

◆ Name()

virtual std::string cuttlefish::AndroidBuild::Name ( ) const
pure virtual

◆ PhysicalPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::AndroidBuild::PhysicalPartitions ( )
virtual

◆ Pretty()

virtual PrettyStruct cuttlefish::AndroidBuild::Pretty ( )
pure virtual

◆ SetExtractDir()

Result< void > cuttlefish::AndroidBuild::SetExtractDir ( std::string_view  )
virtual

Stores a directory to use for extracting generated files. ImageFile may store generated files here, and implementations may extract files here as part of the implementation of other methods.

Reimplemented in cuttlefish::anonymous_namespace{combined_android_build.cc}::CombinedAndroidBuildImpl, cuttlefish::anonymous_namespace{img_zip.cc}::ImgZipImpl, cuttlefish::anonymous_namespace{target_files.cc}::TargetFilesImpl, cuttlefish::anonymous_namespace{super_image.cc}::SuperImageAsBuildImpl, and cuttlefish::FakeAndroidBuild.

◆ SystemPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::AndroidBuild::SystemPartitions ( )
virtual

If this build is combined with another build by mixing system and vendor from different places, reports which partitions this build expects to contribute to a particular side of the mix. System and vendor partition sets should be disjoint.

Reimplemented in cuttlefish::anonymous_namespace{combined_android_build.cc}::CombinedAndroidBuildImpl, cuttlefish::FakeAndroidBuild, cuttlefish::anonymous_namespace{misc_info_metadata.cc}::MetadataFromMiscInfo, and cuttlefish::anonymous_namespace{super_image.cc}::SuperImageAsBuildImpl.

◆ VendorPartitions()

Result< std::set< std::string, std::less< void > > > cuttlefish::AndroidBuild::VendorPartitions ( )
virtual

Friends And Related Function Documentation

◆ format_as

std::string format_as ( const AndroidBuild build)
friend

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const AndroidBuild build 
)
friend

The documentation for this class was generated from the following files: