get

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AdbDriver

func AdbDriver() error

func AospExtended

func AospExtended(codename string) (string, error)

Download latest AospExtended zip into flash folder and return the file name

func AospExtendedLatestAvailableFileName

func AospExtendedLatestAvailableFileName(codename string) (string, error)

Returns file name of the latest available AospExtended zip

func AospExtendedLatestAvailableHref

func AospExtendedLatestAvailableHref(codename string) (string, error)

Returns download link of the latest available AospExtended zip

func AospExtendedParseAndroidVersion

func AospExtendedParseAndroidVersion(romversion string) (string, error)

func ArchiveLatestAvailableFileNamesMap

func ArchiveLatestAvailableFileNamesMap(codename string) (map[string]string, error)

func ArchiveLatestAvailableHrefMap

func ArchiveLatestAvailableHrefMap(codename string) (map[string]string, error)

func Binaries

func Binaries() error

func CalyxOsParseAndroidVersion

func CalyxOsParseAndroidVersion(romversion string) (string, error)

func Carbonrom

func Carbonrom(codename string) (string, error)

Download latest Carbonrom zip into flash folder and return the file name

func CarbonromLatestAvailableFileName

func CarbonromLatestAvailableFileName(codename string) (string, error)

Returns file name of the latest available Carbonrom zip

func CarbonromLatestAvailableHref

func CarbonromLatestAvailableHref(codename string) (string, error)

Returns download link of the latest available Carbonrom zip

func CarbonromParseAndroidVersion

func CarbonromParseAndroidVersion(romversion string) (string, error)

func CarbonromParseVersion

func CarbonromParseVersion(filename string) (string, error)

func CopyPartitionsZip

func CopyPartitionsZip() (string, error)

Download latest Magisk zip into flash folder and return the file name

func CopyPartitionsZipLatestAvailableHref

func CopyPartitionsZipLatestAvailableHref() (string, error)

Returns download link of the latest available Magisk zip

func CrDroid

func CrDroid(codename string) (string, error)

Download latest CrDroid zip into flash folder and return the file name

func CrDroidLatestAvailableFileName

func CrDroidLatestAvailableFileName(codename string) (string, error)

Returns file name of the latest available CrDroid zip

func CrDroidLatestAvailableHref

func CrDroidLatestAvailableHref(codename string) (string, error)

Returns download link of the latest available CrDroid zip

func CrDroidParseAndroidVersion

func CrDroidParseAndroidVersion(filename string) (string, error)

func CrDroidParseVersion

func CrDroidParseVersion(filename string) (string, error)

func Divestos added in v1.1.0

func Divestos(codename string) (string, error)

Download latest Divestos zip into flash folder and return the file name

func DivestosLatestAvailableFileName added in v1.1.0

func DivestosLatestAvailableFileName(codename string) (string, error)

Returns file name of the latest available Divestos zip

func DivestosLatestAvailableHref added in v1.1.0

func DivestosLatestAvailableHref(codename string) (string, error)

Returns download link of the latest available Divestos zip

func DivestosParseAndroidVersion added in v1.1.0

func DivestosParseAndroidVersion(romversion string) (string, error)

func DownloadAndOverwriteFile

func DownloadAndOverwriteFile(file_path string, url string, checksum_url_suffix string) (err error)

Does not redownload if the checksum (still) matches with upstream

func DownloadFile

func DownloadFile(file_path string, url string, checksum_url_suffix string) (err error)

Assume we have the correct file if it already exists

func EOS

func EOS(codename string) (string, error)

Download latest EOS zip into flash folder and return the file name

func EOSLatestAvailableFileName

func EOSLatestAvailableFileName(codename string) (string, error)

Returns file name of the latest available EOS zip

func EOSLatestAvailableHref

func EOSLatestAvailableHref(codename string) (string, error)

Returns download link of the latest available EOS zip

func EOSParseAndroidVersion

func EOSParseAndroidVersion(romversion string) (string, error)

func EOSParseVersion

func EOSParseVersion(filename string) (string, error)

func EvolutionXParseAndroidVersion

func EvolutionXParseAndroidVersion(romversion string) (string, error)

func FromArchive

func FromArchive(codename string, what string) (string, error)

func GrapheneOsParseAndroidVersion

func GrapheneOsParseAndroidVersion(romversion string) (string, error)

func GuessRomNameAndAndroidVersion

func GuessRomNameAndAndroidVersion(filename string) (name string, av string, err error)

func Lineageos

func Lineageos(codename string) (string, error)

Download latest LineageOS zip into flash folder and return the file name

func LineageosLatestAvailableFileName

func LineageosLatestAvailableFileName(codename string) (string, error)

Returns file name of the latest available LineageOS zip

func LineageosLatestAvailableHref

func LineageosLatestAvailableHref(codename string) (string, error)

Returns download link of the latest available LineageOS zip

func LineageosMicrog

func LineageosMicrog(codename string) (string, error)

Download latest LineageOS for MicroG zip into flash folder and return the file name

func LineageosMicrogLatestAvailableFileName

func LineageosMicrogLatestAvailableFileName(codename string) (string, error)

Returns file name of the latest available LineageOS for MicroG zip

func LineageosMicrogLatestAvailableHref

func LineageosMicrogLatestAvailableHref(codename string) (string, error)

Returns download link of the latest available LineageOS for MicroG zip

func LineageosMicrogParseAndroidVersion

func LineageosMicrogParseAndroidVersion(losversion string) (string, error)

func LineageosMicrogParseVersion

func LineageosMicrogParseVersion(filename string) (string, error)

func LineageosParseAndroidVersion

func LineageosParseAndroidVersion(losversion string) (string, error)

func LineageosParseVersion

func LineageosParseVersion(filename string) (string, error)

func Magisk

func Magisk() (string, error)

Download latest Magisk zip into flash folder and return the file name

func MagiskLatestAvailableFileName

func MagiskLatestAvailableFileName() (string, error)

Returns file name of the latest available Magisk zip

func MagiskLatestAvailableHref

func MagiskLatestAvailableHref() (string, error)

Returns download link of the latest available Magisk zip

func MagiskParseVersion

func MagiskParseVersion(filename string) (string, error)

func Micro5kMicroG added in v1.4.1

func Micro5kMicroG(which string) (string, error)

Download latest Micro5k unofficial microG installer zip into flash folder and return the file name

func Micro5kMicroGLatestAvailableFull added in v1.4.1

func Micro5kMicroGLatestAvailableFull() (map[string]string, error)

func Micro5kMicroGLatestAvailableGsync added in v1.4.1

func Micro5kMicroGLatestAvailableGsync() (map[string]string, error)

func Micro5kMicroGLatestAvailableHref added in v1.4.1

func Micro5kMicroGLatestAvailableHref(which string) (string, error)

Returns variants of the latest available Micro5kMicroG zip

func Micro5kMicroGLatestAvailableOSS added in v1.4.1

func Micro5kMicroGLatestAvailableOSS() (map[string]string, error)

func MinMicroG added in v1.3.0

func MinMicroG(variant string) (string, error)

Download latest MinMicroG zip into flash folder and return the file name

func MinMicroGLatestAvailableHref added in v1.3.0

func MinMicroGLatestAvailableHref(variant string) (string, error)

Returns download link of the latest available MinMicroG zip

func MinMicroGLatestAvailableVariants added in v1.3.0

func MinMicroGLatestAvailableVariants() (map[string]*Item, error)

Returns variants of the latest available MinMicroG zip

func MokeeParseAndroidVersion

func MokeeParseAndroidVersion(romversion string) (string, error)

func NanoDroid

func NanoDroid(which string) (string, error)

Download latest NanoDroid zip into flash folder and return the file name which can be one of "full", "fdroid", "microg" or "patcher"

func NanoDroidLatestAvailableFileName

func NanoDroidLatestAvailableFileName(which string) (string, error)

Returns file name of the latest available NanoDroid zip

func NanoDroidLatestAvailableHref

func NanoDroidLatestAvailableHref(which string) (string, error)

Returns download link of the latest available NanoDroid zip

func NanoDroidParseVersion

func NanoDroidParseVersion(filename string) (string, error)

func OmniromParseAndroidVersion

func OmniromParseAndroidVersion(romversion string) (string, error)

func OpenGapps

func OpenGapps(arch string, android_version string, variant string) (string, error)

Download latest OpenGapps zip into flash folder and return the file name

func OpenGappsAvailableForAndroidVersions

func OpenGappsAvailableForAndroidVersions(arch string) ([]string, error)

func OpenGappsAvailableVariants

func OpenGappsAvailableVariants(arch string, android_version string) ([]string, error)

func OpenGappsIndexOfVariant

func OpenGappsIndexOfVariant(arch string, android_version string, variant_wish string) (int, error)

func OpenGappsLatestAvailableFileName

func OpenGappsLatestAvailableFileName(arch string, android_version string, variant string) (string, error)

Returns file name of the latest available OpenGapps zip

func OpenGappsLatestAvailableHref

func OpenGappsLatestAvailableHref(arch string, android_version string, variant string) (string, error)

Returns download link of the latest available OpenGapps zip for the given architecture and Android version arch must be one of "arm", "arm64", "x86" and "x86_64" android_version must be in the form of "X.Y"

func OpenGappsPopulateAvailablesStruct

func OpenGappsPopulateAvailablesStruct() error

func PixelExperienceParseAndroidVersion

func PixelExperienceParseAndroidVersion(romversion string) (string, error)

func ResurrectionRemix

func ResurrectionRemix(codename string) (string, error)

Download latest ResurrectionRemix zip into flash folder and return the file name

func ResurrectionRemixLatestAvailableFileName

func ResurrectionRemixLatestAvailableFileName(codename string) (string, error)

Returns file name of the latest available ResurrectionRemix zip

func ResurrectionRemixLatestAvailableHref

func ResurrectionRemixLatestAvailableHref(codename string) (string, error)

Returns download link of the latest available ResurrectionRemix zip

func ResurrectionRemixParseAndroidVersion

func ResurrectionRemixParseAndroidVersion(romversion string) (string, error)

func ResurrectionRemixParseVersion

func ResurrectionRemixParseVersion(filename string) (string, error)

func StatusCode

func StatusCode(url string) (code string, err error)

func TwrpImg

func TwrpImg(codename string) (string, error)

Download latest TWRP image into flash folder and return the file name

func TwrpImgLatestAvailableHref

func TwrpImgLatestAvailableHref(codename string) (string, error)

Returns file name of the latest available TWRP image

func TwrpImgParseVersion

func TwrpImgParseVersion(filename string) (string, error)

func TwrpZip

func TwrpZip(codename string) (string, error)

Download latest TWRP zip into flash folder and return the file name

func TwrpZipLatestAvailableHref

func TwrpZipLatestAvailableHref(codename string) (string, error)

Returns file name of the latest available TWRP zip

func TwrpZipParseVersion

func TwrpZipParseVersion(filename string) (string, error)

func VerifyIntegrity

func VerifyIntegrity(file_path string, url string, suffix string) (isCorrect bool, err error)

Return false only on explicit verification failure Return true if the checksum file could not be downloaded

func Zadig

func Zadig() error

Types

type AospExtendedApiResponse

type AospExtendedApiResponse struct {
	Error    bool   `json:"error"`
	Filename string `json:"filename"`
	Md5      string `json:"md5"`
	Url      string `json:"url"`
}
var ParsedAospExtendedApiResponse AospExtendedApiResponse

func AospExtendedParseApiResponse

func AospExtendedParseApiResponse(codename string) (AospExtendedApiResponse, error)

type Api

type Api struct {
	Variants []Variant `json:"variants"`
}

type Arch

type Arch struct {
	Api        map[string]Api `json:"apis"`
	Date       string         `json:"date"`
	Human_date string         `json:"human_date"`
}

type Archive

type Archive struct {
	Rom           map[string]*Item
	Romlist       []string
	Twrp          *Twrp
	Override_twrp *Twrp
	Flashme_pre   *Item
	Flashme_post  *Item
}

type Available

type Available struct {
	Reloading bool
	Mutex     *sync.Mutex
	Upstream  *Upstream
	Archive   *Archive
	User      *User
}

func NewAvailable

func NewAvailable() *Available

func (*Available) CanFlash

func (a *Available) CanFlash() bool

func (*Available) Populate

func (a *Available) Populate(codename string) error

func (*Available) PopulateArchive added in v0.9.7

func (a *Available) PopulateArchive(codename string) (*Available, error)

func (*Available) PopulateForApi added in v0.9.7

func (a *Available) PopulateForApi(codename string) error

func (*Available) Print

func (a *Available) Print()

func (*Available) String added in v1.0.2

func (a *Available) String() string

type DivestosApiResponse added in v1.1.0

type DivestosApiResponse struct {
	Filename string `json:"filename"`
	Version  string `json:"version"`
	Url      string `json:"url"`
}
var ParsedDivestosApiResponse DivestosApiResponse

func DivestosParseApiResponse added in v1.1.0

func DivestosParseApiResponse(codename string) (DivestosApiResponse, error)

type Item

type Item struct {
	Name                string
	Href                string
	Filename            string
	Version             string
	Android_version     string
	Checksum_url_suffix string
}

type OpenGappsJson

type OpenGappsJson struct {
	Arch  map[string]Arch `json:"archs"`
	Ready bool
}

Structs for parsing the OpenGapps JSON

var ParsedOpenGappsJson OpenGappsJson

func OpenGappsParseJson

func OpenGappsParseJson() (OpenGappsJson, error)

type RetrievalError

type RetrievalError struct {
	What  string
	Error error
}

type Twrp

type Twrp struct {
	Img *Item
	Zip *Item
}

type Upstream

type Upstream struct {
	Rom            map[string]*Item
	Romlist        []string
	Twrp           *Twrp
	NanoDroid      map[string]*Item
	MinMicroG      map[string]*Item
	Micro5kMicroG  map[string]*Item
	OpenGapps      map[string]map[string][]string
	Magisk         *Item
	CopyPartitions *Item
}

type User

type User struct {
	Rom            *Item
	Twrp           *Twrp
	AdditionalZips []string
}

type Variant

type Variant struct {
	Name          string `json:"name"`
	Zip           string `json:"zip"`
	Zip_size      string `json:"zip_size"`
	Md5           string `json:"md5"`
	Version_info  string `json:"version_info"`
	Source_report string `json:"source_report"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL