apk

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityAction

type ActivityAction struct {
	Name androidbinary.String `xml:"name,attr"`
}

ActivityAction is an action of an activity.

type ActivityCategory

type ActivityCategory struct {
	Name androidbinary.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 androidbinary.Int32ent 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) 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.

type AppActivity

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

AppActivity is an activity in an application.

type AppActivityAlias

type AppActivityAlias struct {
	Name           androidbinary.String   `xml:"name,attr"`
	Label          androidbinary.String   `xml:"label,attr"`
	TargetActivity androidbinary.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 androidbinary.Bool   `xml:"allowTaskReparenting,attr"`
	AllowBackup          androidbinary.Bool   `xml:"allowBackup,attr"`
	BackupAgent          androidbinary.String `xml:"backupAgent,attr"`
	Debuggable           androidbinary.Bool   `xml:"debuggable,attr"`
	Description          androidbinary.String `xml:"description,attr"`
	Enabled              androidbinary.Bool   `xml:"enabled,attr"`
	HasCode              androidbinary.Bool   `xml:"hasCode,attr"`
	HardwareAccelerated  androidbinary.Bool   `xml:"hardwareAccelerated,attr"`
	// Icon                  androidbinary.String `xml:"icon,attr"`
	Icon                  androidbinary.String `xml:"icon,attr"`
	KillAfterRestore      androidbinary.Bool   `xml:"killAfterRestore,attr"`
	LargeHeap             androidbinary.Bool   `xml:"largeHeap,attr"`
	Label                 androidbinary.String `xml:"label,attr"`
	ManageSpaceActivity   androidbinary.String `xml:"manageSpaceActivity,attr"`
	Name                  androidbinary.String `xml:"name,attr"`
	Permission            androidbinary.String `xml:"permission,attr"`
	Persistent            androidbinary.Bool   `xml:"persistent,attr"`
	Process               androidbinary.String `xml:"process,attr"`
	RestoreAnyVersion     androidbinary.Bool   `xml:"restoreAnyVersion,attr"`
	RequiredAccountType   androidbinary.String `xml:"requiredAccountType,attr"`
	RestrictedAccountType androidbinary.String `xml:"restrictedAccountType,attr"`
	SupportsRtl           androidbinary.Bool   `xml:"supportsRtl,attr"`
	TaskAffinity          androidbinary.String `xml:"taskAffinity,attr"`
	TestOnly              androidbinary.Bool   `xml:"testOnly,attr"`
	Theme                 androidbinary.String `xml:"theme,attr"`
	UIOptions             androidbinary.String `xml:"uiOptions,attr"`
	VMSafeMode            androidbinary.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            androidbinary.String `xml:"name,attr"`
	Target          androidbinary.String `xml:"targetPackage,attr"`
	HandleProfiling androidbinary.Bool   `xml:"handleProfiling,attr"`
	FunctionalTest  androidbinary.Bool   `xml:"functionalTest,attr"`
}

Instrumentation is an application instrumentation code.

type Manifest

type Manifest struct {
	Package         androidbinary.String `xml:"package,attr"`
	VersionCode     androidbinary.Int32  `xml:"versionCode,attr"`
	VersionName     androidbinary.String `xml:"versionName,attr"`
	App             Application          `xml:"application"`
	Instrument      Instrumentation      `xml:"instrumentation"`
	SDK             UsesSDK              `xml:"uses-sdk"`
	UsesPermissions []UsesPermission     `xml:"uses-permission"`
}

Manifest is a manifest of an APK.

type MetaData

type MetaData struct {
	Name  androidbinary.String `xml:"name,attr"`
	Value androidbinary.String `xml:"value,attr"`
}

MetaData is a metadata in an application.

type UsesPermission

type UsesPermission struct {
	Name androidbinary.String `xml:"name,attr"`
	Max  androidbinary.Int32  `xml:"maxSdkVersion,attr"`
}

UsesPermission is user grant the system permission.

type UsesSDK

type UsesSDK struct {
	Min    androidbinary.Int32 `xml:"minSdkVersion,attr"`
	Target androidbinary.Int32 `xml:"targetSdkVersion,attr"`
	Max    androidbinary.Int32 `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