Help us shape the future of Go! Take the 2026 Go Developer Survey

fastboot

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIFastbootDoOemCommand                       = binder.FirstCallTransaction + 0
	TransactionIFastbootDoOemSpecificErase                 = binder.FirstCallTransaction + 1
	TransactionIFastbootGetBatteryVoltageFlashingThreshold = binder.FirstCallTransaction + 2
	TransactionIFastbootGetOffModeChargeState              = binder.FirstCallTransaction + 3
	TransactionIFastbootGetPartitionType                   = binder.FirstCallTransaction + 4
	TransactionIFastbootGetVariant                         = binder.FirstCallTransaction + 5
)
View Source
const (
	MethodIFastbootDoOemCommand                       = "doOemCommand"
	MethodIFastbootDoOemSpecificErase                 = "doOemSpecificErase"
	MethodIFastbootGetBatteryVoltageFlashingThreshold = "getBatteryVoltageFlashingThreshold"
	MethodIFastbootGetOffModeChargeState              = "getOffModeChargeState"
	MethodIFastbootGetPartitionType                   = "getPartitionType"
	MethodIFastbootGetVariant                         = "getVariant"
)
View Source
const DescriptorIFastboot = "android.hardware.fastboot.IFastboot"
View Source
const (
	IFastbootFailureUnknown int32 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FastbootProxy

type FastbootProxy struct {
	Remote binder.IBinder
}

func NewFastbootProxy

func NewFastbootProxy(
	remote binder.IBinder,
) *FastbootProxy

func (*FastbootProxy) AsBinder

func (p *FastbootProxy) AsBinder() binder.IBinder

func (*FastbootProxy) DoOemCommand

func (p *FastbootProxy) DoOemCommand(
	ctx context.Context,
	oemCmd string,
) (string, error)

func (*FastbootProxy) DoOemSpecificErase

func (p *FastbootProxy) DoOemSpecificErase(
	ctx context.Context,
) error

func (*FastbootProxy) GetBatteryVoltageFlashingThreshold

func (p *FastbootProxy) GetBatteryVoltageFlashingThreshold(
	ctx context.Context,
) (int32, error)

func (*FastbootProxy) GetOffModeChargeState

func (p *FastbootProxy) GetOffModeChargeState(
	ctx context.Context,
) (bool, error)

func (*FastbootProxy) GetPartitionType

func (p *FastbootProxy) GetPartitionType(
	ctx context.Context,
	partitionName string,
) (FileSystemType, error)

func (*FastbootProxy) GetVariant

func (p *FastbootProxy) GetVariant(
	ctx context.Context,
) (string, error)

type FastbootStub

type FastbootStub struct {
	Impl      IFastboot
	Transport binder.VersionAwareTransport
}

FastbootStub dispatches incoming binder transactions to a typed IFastboot implementation.

func (*FastbootStub) Descriptor

func (s *FastbootStub) Descriptor() string

func (*FastbootStub) OnTransaction

func (s *FastbootStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type FileSystemType

type FileSystemType byte
const (
	FileSystemTypeEXT4 FileSystemType = 0
	FileSystemTypeF2FS FileSystemType = 1
	FileSystemTypeRAW  FileSystemType = 2
)

type IFastboot

type IFastboot interface {
	AsBinder() binder.IBinder
	DoOemCommand(ctx context.Context, oemCmd string) (string, error)
	DoOemSpecificErase(ctx context.Context) error
	GetBatteryVoltageFlashingThreshold(ctx context.Context) (int32, error)
	GetOffModeChargeState(ctx context.Context) (bool, error)
	GetPartitionType(ctx context.Context, partitionName string) (FileSystemType, error)
	GetVariant(ctx context.Context) (string, error)
}

func NewFastbootStub

func NewFastbootStub(
	impl IFastbootServer,
) IFastboot

NewFastbootStub creates a server-side IFastboot wrapping the given server implementation. The returned value satisfies IFastboot and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IFastbootServer

type IFastbootServer interface {
	DoOemCommand(ctx context.Context, oemCmd string) (string, error)
	DoOemSpecificErase(ctx context.Context) error
	GetBatteryVoltageFlashingThreshold(ctx context.Context) (int32, error)
	GetOffModeChargeState(ctx context.Context) (bool, error)
	GetPartitionType(ctx context.Context, partitionName string) (FileSystemType, error)
	GetVariant(ctx context.Context) (string, error)
}

IFastbootServer is the server-side interface that user implementations provide to NewFastbootStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

Jump to

Keyboard shortcuts

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