backup

package
v0.0.5 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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIBackupTransportName                        = binder.FirstCallTransaction + 0
	TransactionIBackupTransportConfigurationIntent         = binder.FirstCallTransaction + 1
	TransactionIBackupTransportCurrentDestinationString    = binder.FirstCallTransaction + 2
	TransactionIBackupTransportDataManagementIntent        = binder.FirstCallTransaction + 3
	TransactionIBackupTransportDataManagementIntentLabel   = binder.FirstCallTransaction + 4
	TransactionIBackupTransportTransportDirName            = binder.FirstCallTransaction + 5
	TransactionIBackupTransportRequestBackupTime           = binder.FirstCallTransaction + 6
	TransactionIBackupTransportInitializeDevice            = binder.FirstCallTransaction + 7
	TransactionIBackupTransportPerformBackup               = binder.FirstCallTransaction + 8
	TransactionIBackupTransportClearBackupData             = binder.FirstCallTransaction + 9
	TransactionIBackupTransportFinishBackup                = binder.FirstCallTransaction + 10
	TransactionIBackupTransportGetAvailableRestoreSets     = binder.FirstCallTransaction + 11
	TransactionIBackupTransportGetCurrentRestoreSet        = binder.FirstCallTransaction + 12
	TransactionIBackupTransportStartRestore                = binder.FirstCallTransaction + 13
	TransactionIBackupTransportNextRestorePackage          = binder.FirstCallTransaction + 14
	TransactionIBackupTransportGetRestoreData              = binder.FirstCallTransaction + 15
	TransactionIBackupTransportFinishRestore               = binder.FirstCallTransaction + 16
	TransactionIBackupTransportRequestFullBackupTime       = binder.FirstCallTransaction + 17
	TransactionIBackupTransportPerformFullBackup           = binder.FirstCallTransaction + 18
	TransactionIBackupTransportCheckFullBackupSize         = binder.FirstCallTransaction + 19
	TransactionIBackupTransportSendBackupData              = binder.FirstCallTransaction + 20
	TransactionIBackupTransportCancelFullBackup            = binder.FirstCallTransaction + 21
	TransactionIBackupTransportIsAppEligibleForBackup      = binder.FirstCallTransaction + 22
	TransactionIBackupTransportGetBackupQuota              = binder.FirstCallTransaction + 23
	TransactionIBackupTransportGetNextFullRestoreDataChunk = binder.FirstCallTransaction + 24
	TransactionIBackupTransportAbortFullRestore            = binder.FirstCallTransaction + 25
	TransactionIBackupTransportGetTransportFlags           = binder.FirstCallTransaction + 26
	TransactionIBackupTransportGetBackupManagerMonitor     = binder.FirstCallTransaction + 27
)
View Source
const (
	MethodIBackupTransportName                        = "name"
	MethodIBackupTransportConfigurationIntent         = "configurationIntent"
	MethodIBackupTransportCurrentDestinationString    = "currentDestinationString"
	MethodIBackupTransportDataManagementIntent        = "dataManagementIntent"
	MethodIBackupTransportDataManagementIntentLabel   = "dataManagementIntentLabel"
	MethodIBackupTransportTransportDirName            = "transportDirName"
	MethodIBackupTransportRequestBackupTime           = "requestBackupTime"
	MethodIBackupTransportInitializeDevice            = "initializeDevice"
	MethodIBackupTransportPerformBackup               = "performBackup"
	MethodIBackupTransportClearBackupData             = "clearBackupData"
	MethodIBackupTransportFinishBackup                = "finishBackup"
	MethodIBackupTransportGetAvailableRestoreSets     = "getAvailableRestoreSets"
	MethodIBackupTransportGetCurrentRestoreSet        = "getCurrentRestoreSet"
	MethodIBackupTransportStartRestore                = "startRestore"
	MethodIBackupTransportNextRestorePackage          = "nextRestorePackage"
	MethodIBackupTransportGetRestoreData              = "getRestoreData"
	MethodIBackupTransportFinishRestore               = "finishRestore"
	MethodIBackupTransportRequestFullBackupTime       = "requestFullBackupTime"
	MethodIBackupTransportPerformFullBackup           = "performFullBackup"
	MethodIBackupTransportCheckFullBackupSize         = "checkFullBackupSize"
	MethodIBackupTransportSendBackupData              = "sendBackupData"
	MethodIBackupTransportCancelFullBackup            = "cancelFullBackup"
	MethodIBackupTransportIsAppEligibleForBackup      = "isAppEligibleForBackup"
	MethodIBackupTransportGetBackupQuota              = "getBackupQuota"
	MethodIBackupTransportGetNextFullRestoreDataChunk = "getNextFullRestoreDataChunk"
	MethodIBackupTransportAbortFullRestore            = "abortFullRestore"
	MethodIBackupTransportGetTransportFlags           = "getTransportFlags"
	MethodIBackupTransportGetBackupManagerMonitor     = "getBackupManagerMonitor"
)
View Source
const (
	TransactionIObbBackupServiceBackupObbs     = binder.FirstCallTransaction + 0
	TransactionIObbBackupServiceRestoreObbFile = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIObbBackupServiceBackupObbs     = "backupObbs"
	MethodIObbBackupServiceRestoreObbFile = "restoreObbFile"
)
View Source
const (
	TransactionITransportStatusCallbackOnOperationCompleteWithStatus = binder.FirstCallTransaction + 0
	TransactionITransportStatusCallbackOnOperationComplete           = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodITransportStatusCallbackOnOperationCompleteWithStatus = "onOperationCompleteWithStatus"
	MethodITransportStatusCallbackOnOperationComplete           = "onOperationComplete"
)
View Source
const DescriptorIBackupTransport = "com.android.internal.backup.IBackupTransport"
View Source
const DescriptorIObbBackupService = "com.android.internal.backup.IObbBackupService"
View Source
const DescriptorITransportStatusCallback = "com.android.internal.backup.ITransportStatusCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupTransportProxy

type BackupTransportProxy struct {
	Remote binder.IBinder
}

func NewBackupTransportProxy

func NewBackupTransportProxy(
	remote binder.IBinder,
) *BackupTransportProxy

func (*BackupTransportProxy) AbortFullRestore

func (p *BackupTransportProxy) AbortFullRestore(
	ctx context.Context,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) AsBinder

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

func (*BackupTransportProxy) CancelFullBackup

func (p *BackupTransportProxy) CancelFullBackup(
	ctx context.Context,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) CheckFullBackupSize

func (p *BackupTransportProxy) CheckFullBackupSize(
	ctx context.Context,
	size int64,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) ClearBackupData

func (p *BackupTransportProxy) ClearBackupData(
	ctx context.Context,
	packageInfo pm.PackageInfo,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) ConfigurationIntent

func (p *BackupTransportProxy) ConfigurationIntent(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) CurrentDestinationString

func (p *BackupTransportProxy) CurrentDestinationString(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) DataManagementIntent

func (p *BackupTransportProxy) DataManagementIntent(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) DataManagementIntentLabel

func (p *BackupTransportProxy) DataManagementIntentLabel(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) FinishBackup

func (p *BackupTransportProxy) FinishBackup(
	ctx context.Context,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) FinishRestore

func (p *BackupTransportProxy) FinishRestore(
	ctx context.Context,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) GetAvailableRestoreSets

func (p *BackupTransportProxy) GetAvailableRestoreSets(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) GetBackupManagerMonitor

func (p *BackupTransportProxy) GetBackupManagerMonitor(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) GetBackupQuota

func (p *BackupTransportProxy) GetBackupQuota(
	ctx context.Context,
	packageName string,
	isFullBackup bool,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) GetCurrentRestoreSet

func (p *BackupTransportProxy) GetCurrentRestoreSet(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) GetNextFullRestoreDataChunk

func (p *BackupTransportProxy) GetNextFullRestoreDataChunk(
	ctx context.Context,
	socket int32,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) GetRestoreData

func (p *BackupTransportProxy) GetRestoreData(
	ctx context.Context,
	outFd int32,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) GetTransportFlags

func (p *BackupTransportProxy) GetTransportFlags(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) InitializeDevice

func (p *BackupTransportProxy) InitializeDevice(
	ctx context.Context,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) IsAppEligibleForBackup

func (p *BackupTransportProxy) IsAppEligibleForBackup(
	ctx context.Context,
	targetPackage pm.PackageInfo,
	isFullBackup bool,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) Name

func (p *BackupTransportProxy) Name(
	ctx context.Context,
	result infra.AndroidFuture,
) error

func (*BackupTransportProxy) NextRestorePackage

func (p *BackupTransportProxy) NextRestorePackage(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) PerformBackup

func (p *BackupTransportProxy) PerformBackup(
	ctx context.Context,
	packageInfo pm.PackageInfo,
	inFd int32,
	flags int32,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) PerformFullBackup

func (p *BackupTransportProxy) PerformFullBackup(
	ctx context.Context,
	targetPackage pm.PackageInfo,
	socket int32,
	flags int32,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) RequestBackupTime

func (p *BackupTransportProxy) RequestBackupTime(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) RequestFullBackupTime

func (p *BackupTransportProxy) RequestFullBackupTime(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

func (*BackupTransportProxy) SendBackupData

func (p *BackupTransportProxy) SendBackupData(
	ctx context.Context,
	numBytes int32,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) StartRestore

func (p *BackupTransportProxy) StartRestore(
	ctx context.Context,
	token int64,
	packages []pm.PackageInfo,
	callback ITransportStatusCallback,
) error

func (*BackupTransportProxy) TransportDirName

func (p *BackupTransportProxy) TransportDirName(
	ctx context.Context,
	resultFuture infra.AndroidFuture,
) error

type BackupTransportStub

type BackupTransportStub struct {
	Impl      IBackupTransport
	Transport binder.VersionAwareTransport
}

BackupTransportStub dispatches incoming binder transactions to a typed IBackupTransport implementation.

func (*BackupTransportStub) Descriptor

func (s *BackupTransportStub) Descriptor() string

func (*BackupTransportStub) OnTransaction

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

type IBackupTransport

type IBackupTransport interface {
	AsBinder() binder.IBinder
	Name(ctx context.Context, result infra.AndroidFuture) error
	ConfigurationIntent(ctx context.Context, resultFuture infra.AndroidFuture) error
	CurrentDestinationString(ctx context.Context, resultFuture infra.AndroidFuture) error
	DataManagementIntent(ctx context.Context, resultFuture infra.AndroidFuture) error
	DataManagementIntentLabel(ctx context.Context, resultFuture infra.AndroidFuture) error
	TransportDirName(ctx context.Context, resultFuture infra.AndroidFuture) error
	RequestBackupTime(ctx context.Context, resultFuture infra.AndroidFuture) error
	InitializeDevice(ctx context.Context, callback ITransportStatusCallback) error
	PerformBackup(ctx context.Context, packageInfo pm.PackageInfo, inFd int32, flags int32, callback ITransportStatusCallback) error
	ClearBackupData(ctx context.Context, packageInfo pm.PackageInfo, callback ITransportStatusCallback) error
	FinishBackup(ctx context.Context, callback ITransportStatusCallback) error
	GetAvailableRestoreSets(ctx context.Context, resultFuture infra.AndroidFuture) error
	GetCurrentRestoreSet(ctx context.Context, resultFuture infra.AndroidFuture) error
	StartRestore(ctx context.Context, token int64, packages []pm.PackageInfo, callback ITransportStatusCallback) error
	NextRestorePackage(ctx context.Context, resultFuture infra.AndroidFuture) error
	GetRestoreData(ctx context.Context, outFd int32, callback ITransportStatusCallback) error
	FinishRestore(ctx context.Context, callback ITransportStatusCallback) error
	RequestFullBackupTime(ctx context.Context, resultFuture infra.AndroidFuture) error
	PerformFullBackup(ctx context.Context, targetPackage pm.PackageInfo, socket int32, flags int32, callback ITransportStatusCallback) error
	CheckFullBackupSize(ctx context.Context, size int64, callback ITransportStatusCallback) error
	SendBackupData(ctx context.Context, numBytes int32, callback ITransportStatusCallback) error
	CancelFullBackup(ctx context.Context, callback ITransportStatusCallback) error
	IsAppEligibleForBackup(ctx context.Context, targetPackage pm.PackageInfo, isFullBackup bool, resultFuture infra.AndroidFuture) error
	GetBackupQuota(ctx context.Context, packageName string, isFullBackup bool, resultFuture infra.AndroidFuture) error
	GetNextFullRestoreDataChunk(ctx context.Context, socket int32, callback ITransportStatusCallback) error
	AbortFullRestore(ctx context.Context, callback ITransportStatusCallback) error
	GetTransportFlags(ctx context.Context, resultFuture infra.AndroidFuture) error
	GetBackupManagerMonitor(ctx context.Context, resultFuture infra.AndroidFuture) error
}

func NewBackupTransportStub

func NewBackupTransportStub(
	impl IBackupTransportServer,
) IBackupTransport

NewBackupTransportStub creates a server-side IBackupTransport wrapping the given server implementation. The returned value satisfies IBackupTransport 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 IBackupTransportServer

type IBackupTransportServer interface {
	Name(ctx context.Context, result infra.AndroidFuture) error
	ConfigurationIntent(ctx context.Context, resultFuture infra.AndroidFuture) error
	CurrentDestinationString(ctx context.Context, resultFuture infra.AndroidFuture) error
	DataManagementIntent(ctx context.Context, resultFuture infra.AndroidFuture) error
	DataManagementIntentLabel(ctx context.Context, resultFuture infra.AndroidFuture) error
	TransportDirName(ctx context.Context, resultFuture infra.AndroidFuture) error
	RequestBackupTime(ctx context.Context, resultFuture infra.AndroidFuture) error
	InitializeDevice(ctx context.Context, callback ITransportStatusCallback) error
	PerformBackup(ctx context.Context, packageInfo pm.PackageInfo, inFd int32, flags int32, callback ITransportStatusCallback) error
	ClearBackupData(ctx context.Context, packageInfo pm.PackageInfo, callback ITransportStatusCallback) error
	FinishBackup(ctx context.Context, callback ITransportStatusCallback) error
	GetAvailableRestoreSets(ctx context.Context, resultFuture infra.AndroidFuture) error
	GetCurrentRestoreSet(ctx context.Context, resultFuture infra.AndroidFuture) error
	StartRestore(ctx context.Context, token int64, packages []pm.PackageInfo, callback ITransportStatusCallback) error
	NextRestorePackage(ctx context.Context, resultFuture infra.AndroidFuture) error
	GetRestoreData(ctx context.Context, outFd int32, callback ITransportStatusCallback) error
	FinishRestore(ctx context.Context, callback ITransportStatusCallback) error
	RequestFullBackupTime(ctx context.Context, resultFuture infra.AndroidFuture) error
	PerformFullBackup(ctx context.Context, targetPackage pm.PackageInfo, socket int32, flags int32, callback ITransportStatusCallback) error
	CheckFullBackupSize(ctx context.Context, size int64, callback ITransportStatusCallback) error
	SendBackupData(ctx context.Context, numBytes int32, callback ITransportStatusCallback) error
	CancelFullBackup(ctx context.Context, callback ITransportStatusCallback) error
	IsAppEligibleForBackup(ctx context.Context, targetPackage pm.PackageInfo, isFullBackup bool, resultFuture infra.AndroidFuture) error
	GetBackupQuota(ctx context.Context, packageName string, isFullBackup bool, resultFuture infra.AndroidFuture) error
	GetNextFullRestoreDataChunk(ctx context.Context, socket int32, callback ITransportStatusCallback) error
	AbortFullRestore(ctx context.Context, callback ITransportStatusCallback) error
	GetTransportFlags(ctx context.Context, resultFuture infra.AndroidFuture) error
	GetBackupManagerMonitor(ctx context.Context, resultFuture infra.AndroidFuture) error
}

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

type IObbBackupService

type IObbBackupService interface {
	AsBinder() binder.IBinder
	BackupObbs(ctx context.Context, packageName string, data int32, token int32, callbackBinder appBackup.IBackupManager) error
	RestoreObbFile(ctx context.Context, pkgName string, data int32, fileSize int64, type_ int32, path string, mode int64, mtime int64, token int32, callbackBinder appBackup.IBackupManager) error
}

func NewObbBackupServiceStub

func NewObbBackupServiceStub(
	impl IObbBackupServiceServer,
) IObbBackupService

NewObbBackupServiceStub creates a server-side IObbBackupService wrapping the given server implementation. The returned value satisfies IObbBackupService 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 IObbBackupServiceServer

type IObbBackupServiceServer interface {
	BackupObbs(ctx context.Context, packageName string, data int32, token int32, callbackBinder appBackup.IBackupManager) error
	RestoreObbFile(ctx context.Context, pkgName string, data int32, fileSize int64, type_ int32, path string, mode int64, mtime int64, token int32, callbackBinder appBackup.IBackupManager) error
}

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

type ITransportStatusCallback

type ITransportStatusCallback interface {
	AsBinder() binder.IBinder
	OnOperationCompleteWithStatus(ctx context.Context, status int32) error
	OnOperationComplete(ctx context.Context) error
}

func NewTransportStatusCallbackStub

func NewTransportStatusCallbackStub(
	impl ITransportStatusCallbackServer,
) ITransportStatusCallback

NewTransportStatusCallbackStub creates a server-side ITransportStatusCallback wrapping the given server implementation. The returned value satisfies ITransportStatusCallback 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 ITransportStatusCallbackServer

type ITransportStatusCallbackServer interface {
	OnOperationCompleteWithStatus(ctx context.Context, status int32) error
	OnOperationComplete(ctx context.Context) error
}

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

type ObbBackupServiceProxy

type ObbBackupServiceProxy struct {
	Remote binder.IBinder
}

func NewObbBackupServiceProxy

func NewObbBackupServiceProxy(
	remote binder.IBinder,
) *ObbBackupServiceProxy

func (*ObbBackupServiceProxy) AsBinder

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

func (*ObbBackupServiceProxy) BackupObbs

func (p *ObbBackupServiceProxy) BackupObbs(
	ctx context.Context,
	packageName string,
	data int32,
	token int32,
	callbackBinder appBackup.IBackupManager,
) error

func (*ObbBackupServiceProxy) RestoreObbFile

func (p *ObbBackupServiceProxy) RestoreObbFile(
	ctx context.Context,
	pkgName string,
	data int32,
	fileSize int64,
	type_ int32,
	path string,
	mode int64,
	mtime int64,
	token int32,
	callbackBinder appBackup.IBackupManager,
) error

type ObbBackupServiceStub

type ObbBackupServiceStub struct {
	Impl      IObbBackupService
	Transport binder.VersionAwareTransport
}

ObbBackupServiceStub dispatches incoming binder transactions to a typed IObbBackupService implementation.

func (*ObbBackupServiceStub) Descriptor

func (s *ObbBackupServiceStub) Descriptor() string

func (*ObbBackupServiceStub) OnTransaction

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

type TransportStatusCallbackProxy

type TransportStatusCallbackProxy struct {
	Remote binder.IBinder
}

func NewTransportStatusCallbackProxy

func NewTransportStatusCallbackProxy(
	remote binder.IBinder,
) *TransportStatusCallbackProxy

func (*TransportStatusCallbackProxy) AsBinder

func (*TransportStatusCallbackProxy) OnOperationComplete

func (p *TransportStatusCallbackProxy) OnOperationComplete(
	ctx context.Context,
) error

func (*TransportStatusCallbackProxy) OnOperationCompleteWithStatus

func (p *TransportStatusCallbackProxy) OnOperationCompleteWithStatus(
	ctx context.Context,
	status int32,
) error

type TransportStatusCallbackStub

type TransportStatusCallbackStub struct {
	Impl      ITransportStatusCallback
	Transport binder.VersionAwareTransport
}

TransportStatusCallbackStub dispatches incoming binder transactions to a typed ITransportStatusCallback implementation.

func (*TransportStatusCallbackStub) Descriptor

func (s *TransportStatusCallbackStub) Descriptor() string

func (*TransportStatusCallbackStub) OnTransaction

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

Jump to

Keyboard shortcuts

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