Documentation ¶
Index ¶
- Variables
- func AdbPropFallback(device *Device, props map[string]string, property string) (string, error)
- func AllUserIds(installed map[string]Package) map[int]struct{}
- func IsServerRunning() bool
- func StartServer() error
- type Device
- func (d *Device) AdbCmd(args ...string) *exec.Cmd
- func (d *Device) AdbProp(property string) (string, error)
- func (d *Device) AdbProps() (map[string]string, error)
- func (d *Device) AdbShell(args ...string) *exec.Cmd
- func (d *Device) CurrentUserId() (int, error)
- func (d *Device) Install(path string) error
- func (d *Device) InstallUser(path, user string) error
- func (d *Device) Installed() (map[string]Package, error)
- func (d *Device) Uninstall(pkg string) error
- func (d *Device) UninstallUser(pkg, user string) error
- type Package
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Common install and uninstall errors ErrInternalError = errors.New("internal error") ErrUserRestricted = errors.New("user restricted") ErrAborted = errors.New("aborted") // Install errors ErrAlreadyExists = errors.New("already exists") ErrInvalidApk = errors.New("invalid apk") ErrInvalidURI = errors.New("invalid uri") ErrInsufficientStorage = errors.New("insufficient storage") ErrDuplicatePackage = errors.New("duplicate package") ErrUpdateIncompatible = errors.New("update incompatible") ErrReplaceCouldntDelete = errors.New("replace couldn't delete") ErrDexopt = errors.New("dexopt") ErrOlderSdk = errors.New("older sdk") ErrConflictingProvider = errors.New("conflicting provider") ErrNewerSdk = errors.New("newer sdk") ErrTestOnly = errors.New("test only") ErrCPUAbiIncompatible = errors.New("cpu abi incompatible") ErrMissingFeature = errors.New("missing feature") ErrContainerError = errors.New("combiner error") ErrInvalidInstallLocation = errors.New("invalid install location") ErrVerificationTimeout = errors.New("verification timeout") ErrVerificationFailure = errors.New("verification failure") ErrPackageChanged = errors.New("package changed") ErrUIDChanged = errors.New("uid changed") ErrVersionDowngrade = errors.New("version downgrade") ErrNotApk = errors.New("not apk") ErrBadManifest = errors.New("bad manifest") ErrUnexpectedException = errors.New("unexpected exception") ErrNoCertificates = errors.New("no certificates") ErrInconsistentCertificates = errors.New("inconsistent certificates") ErrCertificateEncoding = errors.New("certificate encoding") ErrBadPackageName = errors.New("bad package name") ErrManifestMalformed = errors.New("manifest malformed") ErrManifestEmpty = errors.New("manifest empty") ErrDuplicatePermission = errors.New("duplicate permission") ErrNoMatchingAbis = errors.New("no matching abis") // Uninstall errors ErrDevicePolicyManager = errors.New("device policy manager") ErrOwnerBlocked = errors.New("owner blocked") )
Functions ¶
func AdbPropFallback ¶ added in v0.6.0
func AllUserIds ¶ added in v0.7.0
func IsServerRunning ¶
func IsServerRunning() bool
func StartServer ¶
func StartServer() error
Types ¶
type Device ¶
type Device struct { ID string Usb string Product string Model string Device string ABIs []string APILevel int }
func (*Device) CurrentUserId ¶ added in v0.7.0
func (*Device) InstallUser ¶ added in v0.6.0
func (*Device) UninstallUser ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.