device

package
v0.9.14 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var D1 = NewDevice()
View Source
var UnlockableBrands = []string{"sony", "motorola", "samsung", "nvidia", "oneplus"}

Functions

This section is empty.

Types

type Device

type Device struct {
	ObserveMe            bool
	State                string
	State_request        string
	State_reached        chan string
	States_history       []string
	Flashing             bool
	Scanning             bool
	Model                string
	Codename             string
	Codename_ambiguous   bool
	Brand                string
	IsBrandUnlockable    bool
	Name                 string
	Arch                 string
	Imei                 string
	IsAB                 bool
	IsAB_checked         bool
	IsUnlocked           bool
	IsSupported          bool
	IsSupported_checked  bool
	TwrpVersionConnected string
	AdbProps             map[string]string
	FastbootVars         map[string]string
}

func NewDevice

func NewDevice() Device

func (*Device) BootRecovery

func (d *Device) BootRecovery(img_file string) (string, error)

Boot a given recovery image. If a partition name other than "boot" can be looked up, try to flash the image to the looked up partition Returns user instructions to boot recovery after flash (key combination)

func (*Device) DoUnlock

func (d *Device) DoUnlock(unlock_data string) error

func (*Device) FlashRom

func (d *Device) FlashRom(zip_file string, wipe string) error

Flashes a rom zip file using TWRP and adb sideload. "Clean flash" (formating data) if wipe == "clean"

func (*Device) FlashZip

func (d *Device) FlashZip(zip_file string) error

func (*Device) GetState

func (d *Device) GetState() string

func (*Device) GetUnlockData

func (d *Device) GetUnlockData() (string, error)

func (*Device) HandleStateRequest

func (d *Device) HandleStateRequest(req_state string)

func (*Device) Observe

func (d *Device) Observe()

func (*Device) ReadMissingProps

func (d *Device) ReadMissingProps()

func (*Device) Reboot

func (d *Device) Reboot(target string) (err error)

func (*Device) StartOver

func (d *Device) StartOver()

func (*Device) Test added in v0.9.11

func (d *Device) Test(model string)

func (*Device) Unlock

func (d *Device) Unlock() error

func (*Device) UnlockMotorola

func (d *Device) UnlockMotorola(unlock_code string) error

func (*Device) UnlockSony

func (d *Device) UnlockSony(unlock_code string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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