persistentdata

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIPersistentDataBlockServiceWrite                            = binder.FirstCallTransaction + 0
	TransactionIPersistentDataBlockServiceRead                             = binder.FirstCallTransaction + 1
	TransactionIPersistentDataBlockServiceWipe                             = binder.FirstCallTransaction + 2
	TransactionIPersistentDataBlockServiceGetDataBlockSize                 = binder.FirstCallTransaction + 3
	TransactionIPersistentDataBlockServiceGetMaximumDataBlockSize          = binder.FirstCallTransaction + 4
	TransactionIPersistentDataBlockServiceSetOemUnlockEnabled              = binder.FirstCallTransaction + 5
	TransactionIPersistentDataBlockServiceGetOemUnlockEnabled              = binder.FirstCallTransaction + 6
	TransactionIPersistentDataBlockServiceGetFlashLockState                = binder.FirstCallTransaction + 7
	TransactionIPersistentDataBlockServiceHasFrpCredentialHandle           = binder.FirstCallTransaction + 8
	TransactionIPersistentDataBlockServiceGetPersistentDataPackageName     = binder.FirstCallTransaction + 9
	TransactionIPersistentDataBlockServiceIsFactoryResetProtectionActive   = binder.FirstCallTransaction + 10
	TransactionIPersistentDataBlockServiceDeactivateFactoryResetProtection = binder.FirstCallTransaction + 11
	TransactionIPersistentDataBlockServiceSetFactoryResetProtectionSecret  = binder.FirstCallTransaction + 12
)
View Source
const (
	MethodIPersistentDataBlockServiceWrite                            = "write"
	MethodIPersistentDataBlockServiceRead                             = "read"
	MethodIPersistentDataBlockServiceWipe                             = "wipe"
	MethodIPersistentDataBlockServiceGetDataBlockSize                 = "getDataBlockSize"
	MethodIPersistentDataBlockServiceGetMaximumDataBlockSize          = "getMaximumDataBlockSize"
	MethodIPersistentDataBlockServiceSetOemUnlockEnabled              = "setOemUnlockEnabled"
	MethodIPersistentDataBlockServiceGetOemUnlockEnabled              = "getOemUnlockEnabled"
	MethodIPersistentDataBlockServiceGetFlashLockState                = "getFlashLockState"
	MethodIPersistentDataBlockServiceHasFrpCredentialHandle           = "hasFrpCredentialHandle"
	MethodIPersistentDataBlockServiceGetPersistentDataPackageName     = "getPersistentDataPackageName"
	MethodIPersistentDataBlockServiceIsFactoryResetProtectionActive   = "isFactoryResetProtectionActive"
	MethodIPersistentDataBlockServiceDeactivateFactoryResetProtection = "deactivateFactoryResetProtection"
	MethodIPersistentDataBlockServiceSetFactoryResetProtectionSecret  = "setFactoryResetProtectionSecret"
)
View Source
const DescriptorIPersistentDataBlockService = "android.service.persistentdata.IPersistentDataBlockService"

Variables

This section is empty.

Functions

This section is empty.

Types

type IPersistentDataBlockService

type IPersistentDataBlockService interface {
	AsBinder() binder.IBinder
	Write(ctx context.Context, data []byte) (int32, error)
	Read(ctx context.Context) ([]byte, error)
	Wipe(ctx context.Context) error
	GetDataBlockSize(ctx context.Context) (int32, error)
	GetMaximumDataBlockSize(ctx context.Context) (int64, error)
	SetOemUnlockEnabled(ctx context.Context, enabled bool) error
	GetOemUnlockEnabled(ctx context.Context) (bool, error)
	GetFlashLockState(ctx context.Context) (int32, error)
	HasFrpCredentialHandle(ctx context.Context) (bool, error)
	GetPersistentDataPackageName(ctx context.Context) (string, error)
	IsFactoryResetProtectionActive(ctx context.Context) (bool, error)
	DeactivateFactoryResetProtection(ctx context.Context, secret []byte) (bool, error)
	SetFactoryResetProtectionSecret(ctx context.Context, secret []byte) (bool, error)
}

func NewPersistentDataBlockServiceStub

func NewPersistentDataBlockServiceStub(
	impl IPersistentDataBlockServiceServer,
) IPersistentDataBlockService

NewPersistentDataBlockServiceStub creates a server-side IPersistentDataBlockService wrapping the given server implementation. The returned value satisfies IPersistentDataBlockService 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 IPersistentDataBlockServiceServer

type IPersistentDataBlockServiceServer interface {
	Write(ctx context.Context, data []byte) (int32, error)
	Read(ctx context.Context) ([]byte, error)
	Wipe(ctx context.Context) error
	GetDataBlockSize(ctx context.Context) (int32, error)
	GetMaximumDataBlockSize(ctx context.Context) (int64, error)
	SetOemUnlockEnabled(ctx context.Context, enabled bool) error
	GetOemUnlockEnabled(ctx context.Context) (bool, error)
	GetFlashLockState(ctx context.Context) (int32, error)
	HasFrpCredentialHandle(ctx context.Context) (bool, error)
	GetPersistentDataPackageName(ctx context.Context) (string, error)
	IsFactoryResetProtectionActive(ctx context.Context) (bool, error)
	DeactivateFactoryResetProtection(ctx context.Context, secret []byte) (bool, error)
	SetFactoryResetProtectionSecret(ctx context.Context, secret []byte) (bool, error)
}

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

type PersistentDataBlockServiceProxy

type PersistentDataBlockServiceProxy struct {
	Remote binder.IBinder
}

func GetPersistentDataBlockService

func GetPersistentDataBlockService(
	ctx context.Context,
	sm *servicemanager.ServiceManager,
) (*PersistentDataBlockServiceProxy, error)

GetPersistentDataBlockService retrieves the PersistentDataBlockService service and returns a typed proxy.

func NewPersistentDataBlockServiceProxy

func NewPersistentDataBlockServiceProxy(
	remote binder.IBinder,
) *PersistentDataBlockServiceProxy

func (*PersistentDataBlockServiceProxy) AsBinder

func (*PersistentDataBlockServiceProxy) DeactivateFactoryResetProtection

func (p *PersistentDataBlockServiceProxy) DeactivateFactoryResetProtection(
	ctx context.Context,
	secret []byte,
) (bool, error)

func (*PersistentDataBlockServiceProxy) GetDataBlockSize

func (p *PersistentDataBlockServiceProxy) GetDataBlockSize(
	ctx context.Context,
) (int32, error)

func (*PersistentDataBlockServiceProxy) GetFlashLockState

func (p *PersistentDataBlockServiceProxy) GetFlashLockState(
	ctx context.Context,
) (int32, error)

func (*PersistentDataBlockServiceProxy) GetMaximumDataBlockSize

func (p *PersistentDataBlockServiceProxy) GetMaximumDataBlockSize(
	ctx context.Context,
) (int64, error)

func (*PersistentDataBlockServiceProxy) GetOemUnlockEnabled

func (p *PersistentDataBlockServiceProxy) GetOemUnlockEnabled(
	ctx context.Context,
) (bool, error)

func (*PersistentDataBlockServiceProxy) GetPersistentDataPackageName

func (p *PersistentDataBlockServiceProxy) GetPersistentDataPackageName(
	ctx context.Context,
) (string, error)

func (*PersistentDataBlockServiceProxy) HasFrpCredentialHandle

func (p *PersistentDataBlockServiceProxy) HasFrpCredentialHandle(
	ctx context.Context,
) (bool, error)

func (*PersistentDataBlockServiceProxy) IsFactoryResetProtectionActive

func (p *PersistentDataBlockServiceProxy) IsFactoryResetProtectionActive(
	ctx context.Context,
) (bool, error)

func (*PersistentDataBlockServiceProxy) Read

func (*PersistentDataBlockServiceProxy) SetFactoryResetProtectionSecret

func (p *PersistentDataBlockServiceProxy) SetFactoryResetProtectionSecret(
	ctx context.Context,
	secret []byte,
) (bool, error)

func (*PersistentDataBlockServiceProxy) SetOemUnlockEnabled

func (p *PersistentDataBlockServiceProxy) SetOemUnlockEnabled(
	ctx context.Context,
	enabled bool,
) error

func (*PersistentDataBlockServiceProxy) Wipe

func (*PersistentDataBlockServiceProxy) Write

func (p *PersistentDataBlockServiceProxy) Write(
	ctx context.Context,
	data []byte,
) (int32, error)

type PersistentDataBlockServiceStub

type PersistentDataBlockServiceStub struct {
	Impl      IPersistentDataBlockService
	Transport binder.VersionAwareTransport
}

PersistentDataBlockServiceStub dispatches incoming binder transactions to a typed IPersistentDataBlockService implementation.

func (*PersistentDataBlockServiceStub) Descriptor

func (s *PersistentDataBlockServiceStub) Descriptor() string

func (*PersistentDataBlockServiceStub) OnTransaction

Jump to

Keyboard shortcuts

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