device

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: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

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

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
	SerialNumber         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, bootloader_timeout int) (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) InstallDriversWithZadig added in v1.0.0

func (d *Device) InstallDriversWithZadig() error

func (*Device) InstallUniversalDrivers added in v1.0.0

func (d *Device) InstallUniversalDrivers() error

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) UnlockFairphone added in v1.2.0

func (d *Device) UnlockFairphone() error

func (*Device) UnlockMotorola

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

func (*Device) UnlockSony

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

func (*Device) WriteZadigConfig added in v1.0.0

func (d *Device) WriteZadigConfig() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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