flash

package
v0.0.0-...-c74f1dd Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLockUnlockValidationPause = time.Second * 5
	DefaultLockUnlockRetries         = 2
	DefaultLockUnlockRetryInterval   = time.Second * 30
)

Variables

View Source
var (
	ErrMaxLockUnlockRetries = errors.New("max retries reached")
)

Functions

This section is empty.

Types

type ADBFlasher

type ADBFlasher interface {
	RebootIntoBootloader(deviceId string) error
	KillServer() error
}

type Config

type Config struct {
	HostOS                    string
	FactoryImage              FactoryImageFlasher
	PlatformTools             PlatformToolsFlasher
	ADB                       ADBFlasher
	Fastboot                  FastbootFlasher
	Logger                    *logrus.Logger
	LockUnlockValidationPause time.Duration
	LockUnlockRetries         int
	LockUnlockRetryInterval   time.Duration
}

type FactoryImageFlasher

type FactoryImageFlasher interface {
	Validate(codename device.Codename) error
	FlashAll(device *device.Device, path platformtools.PlatformToolsPath) error
}

type FastbootFlasher

type FastbootFlasher interface {
	UnlockBootloader(deviceId string) error
	LockBootloader(deviceId string) error
	GetBootloaderLockStatus(deviceId string) (fastboot.FastbootLockStatus, error)
	Reboot(deviceId string) error
}

type Flash

type Flash struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config) *Flash

func (*Flash) Flash

func (f *Flash) Flash(d *device.Device) error

type PlatformToolsFlasher

type PlatformToolsFlasher interface {
	Path() platformtools.PlatformToolsPath
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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