apk

package
v0.0.0-...-8c020c4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityAction

type ActivityAction struct {
	Name string `xml:"name,attr"`
}

ActivityAction is an action of an activity.

type ActivityCategory

type ActivityCategory struct {
	Name string `xml:"name,attr"`
}

ActivityCategory is a category of an activity.

type ActivityIntentFilter

type ActivityIntentFilter struct {
	Actions    []ActivityAction   `xml:"action"`
	Categories []ActivityCategory `xml:"category"`
}

ActivityIntentFilter is an intent filter of an activity.

type Apk

type Apk struct {
	// contains filtered or unexported fields
}

Apk is an application package file for android.

func OpenFile

func OpenFile(filename string) (apk *Apk, err error)

OpenFile will open the file specified by filename and return Apk

func OpenZipReader

func OpenZipReader(r io.ReaderAt, size int64) (*Apk, error)

OpenZipReader has same arguments like zip.NewReader

func (*Apk) Close

func (k *Apk) Close() error

Close is avaliable only if apk is created with OpenFile

func (*Apk) Icon

func (k *Apk) Icon(resConfig *androidbinary.ResTableConfig) (image.Image, error)

Icon returns the icon image of the APK.

func (*Apk) IconPath

func (k *Apk) IconPath(resConfig *androidbinary.ResTableConfig) string

IconPath returns the icon path of the APK.

func (*Apk) Label

func (k *Apk) Label(resConfig *androidbinary.ResTableConfig) (s string, err error)

Label returns the label of the APK.

func (*Apk) MainActivity

func (k *Apk) MainActivity() (activity string, err error)

MainActivity returns the name of the main activity.

func (*Apk) Manifest

func (k *Apk) Manifest() Manifest

Manifest returns the manifest of the APK.

func (*Apk) PackageName

func (k *Apk) PackageName() string

PackageName returns the package name of the APK.

func (*Apk) ReadZipFile

func (k *Apk) ReadZipFile(name string) (data []byte, err error)

func (*Apk) Table

func (k *Apk) Table() *androidbinary.TableFile

type AppActivity

type AppActivity struct {
	Theme         string                 `xml:"theme,attr"`
	Name          string                 `xml:"name,attr"`
	Label         string                 `xml:"label,attr"`
	IntentFilters []ActivityIntentFilter `xml:"intent-filter"`
}

AppActivity is an activity in an application.

type AppActivityAlias

type AppActivityAlias struct {
	Name           string                 `xml:"name,attr"`
	Label          string                 `xml:"label,attr"`
	TargetActivity string                 `xml:"targetActivity,attr"`
	IntentFilters  []ActivityIntentFilter `xml:"intent-filter"`
}

AppActivityAlias https://developer.android.com/guide/topics/manifest/activity-alias-element

type Application

type Application struct {
	AllowTaskReparenting  bool               `xml:"allowTaskReparenting,attr"`
	AllowBackup           bool               `xml:"allowBackup,attr"`
	BackupAgent           string             `xml:"backupAgent,attr"`
	Debuggable            bool               `xml:"debuggable,attr"`
	Description           string             `xml:"description,attr"`
	Enabled               bool               `xml:"enabled,attr"`
	HasCode               bool               `xml:"hasCode,attr"`
	HardwareAccelerated   bool               `xml:"hardwareAccelerated,attr"`
	Icon                  string             `xml:"icon,attr"`
	KillAfterRestore      bool               `xml:"killAfterRestore,attr"`
	LargeHeap             bool               `xml:"largeHeap,attr"`
	Label                 string             `xml:"label,attr"`
	ManageSpaceActivity   string             `xml:"manageSpaceActivity,attr"`
	Name                  string             `xml:"name,attr"`
	Permission            string             `xml:"permission,attr"`
	Persistent            bool               `xml:"persistent,attr"`
	Process               string             `xml:"process,attr"`
	RestoreAnyVersion     bool               `xml:"restoreAnyVersion,attr"`
	RequiredAccountType   string             `xml:"requiredAccountType,attr"`
	RestrictedAccountType string             `xml:"restrictedAccountType,attr"`
	SupportsRtl           bool               `xml:"supportsRtl,attr"`
	TaskAffinity          string             `xml:"taskAffinity,attr"`
	TestOnly              bool               `xml:"testOnly,attr"`
	Theme                 string             `xml:"theme,attr"`
	UIOptions             string             `xml:"uiOptions,attr"`
	VMSafeMode            bool               `xml:"vmSafeMode,attr"`
	Activities            []AppActivity      `xml:"activity"`
	ActivityAliases       []AppActivityAlias `xml:"activity-alias"`
	MetaData              []MetaData         `xml:"meta-data"`
}

Application is an application in an APK.

type Instrumentation

type Instrumentation struct {
	Name            string `xml:"name,attr"`
	Target          string `xml:"targetPackage,attr"`
	HandleProfiling bool   `xml:"handleProfiling,attr"`
	FunctionalTest  bool   `xml:"functionalTest,attr"`
}

Instrumentation is an application instrumentation code.

type Manifest

type Manifest struct {
	Package     string          `xml:"package,attr"`
	VersionCode int             `xml:"versionCode,attr"`
	VersionName string          `xml:"versionName,attr"`
	App         Application     `xml:"application"`
	Instrument  Instrumentation `xml:"instrumentation"`
	SDK         UsesSDK         `xml:"uses-sdk"`
}

Manifest is a manifest of an APK.

type MetaData

type MetaData struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

MetaData is a metadata in an application.

type UsesSDK

type UsesSDK struct {
	Min    int `xml:"minSdkVersion,attr"`
	Target int `xml:"targetSdkVersion,attr"`
	Max    int `xml:"maxSdkVersion,attr"`
}

UsesSDK is target SDK version.

Jump to

Keyboard shortcuts

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