Documentation
¶
Overview ¶
Package cache provides helpers to work with caches in ARC.
Index ¶
Constants ¶
View Source
const ( // LayoutTxt defines output file name that contains generated file directory layout and // file attributes. LayoutTxt = "layout.txt" // PackagesCacheXML defines the name of packages cache file name. PackagesCacheXML = "packages_cache.xml" // GeneratedPackagesCacheXML defines the name of pregenerated packages cache file name. // Used to rename the cache file retrieved from /system/etc. GeneratedPackagesCacheXML = "generated_packages_cache.xml" // GMSCoreCacheArchive defines the GMS Core cache tar file name. GMSCoreCacheArchive = "gms_core_cache.tar" // GMSCoreManifest defines the GMS Core manifest file that lists GMS Core release files // with size, modification time in milliseconds, and SHA256. // of GMS Core release. GMSCoreManifest = "gms_core_manifest" // GSFCache defines the GSF cache database file name. GSFCache = "gservices_cache.db" )
Variables ¶
This section is empty.
Functions ¶
func CopyCaches ¶
CopyCaches waits for required caches are ready and copies them to the specified output directory.
func OpenSession ¶
func OpenSession(ctx context.Context, packagesMode PackagesMode, gmsCoreMode GMSCoreMode, extraArgs []string, outputDir string) (cr *chrome.Chrome, a *arc.ARC, retErr error)
OpenSession starts Chrome and ARC with caches turned on or off, depending on the mode parameter. On success, non-nil pointers are returned that must be closed by the calling function. However, if there is an error, both pointers will be nil
Types ¶
type GMSCoreMode ¶
type GMSCoreMode int
GMSCoreMode represents a flag that determines whether existing GMS Core caches would be used or not.
const ( // GMSCoreEnabled requires to use existing GMS Core caches if they are available. GMSCoreEnabled GMSCoreMode = iota // GMSCoreDisabled requires not to use existing GMS Core caches. GMSCoreDisabled )
type PackagesMode ¶
type PackagesMode int
PackagesMode represents a flag that determines whether packages_cache.xml will be copied within ARC after boot.
const ( // PackagesCopy forces to set caches and copy packages cache to the preserved destination. PackagesCopy PackagesMode = iota // PackagesSkipCopy forces to ignore caches and copy packages cache to the preserved destination. PackagesSkipCopy )
Click to show internal directories.
Click to hide internal directories.