Documentation ¶
Overview ¶
Package apk provides methods to get information (e.g. manifests, ABIs) from APKs, as well as taking an APK and making it debuggable, for testing purposes.
Index ¶
- Constants
- func GatherABIs(files []*zip.File) []*device.ABI
- func GetManifest(ctx context.Context, files []*zip.File) (manifest.Manifest, error)
- func GetManifestXML(ctx context.Context, files []*zip.File) (string, error)
- func IsApkDebuggable(ctx context.Context, apk string) (bool, error)
- func Read(ctx context.Context, apkData []byte) ([]*zip.File, error)
- type ApkDebugifier
Constants ¶
View Source
const ( ErrMissingManifest = fault.Const("Couldn't find APK's manifest file.") ErrInvalidAPK = fault.Const("File is not an APK.") )
Variables ¶
This section is empty.
Functions ¶
func GatherABIs ¶
GatherABIs returns the list of ABI directories in the zip file.
func GetManifest ¶
Types ¶
type ApkDebugifier ¶
type ApkDebugifier struct { JarSignCmd string // path to the jarsigner binary ZipAlignCmd string // path to the zipalign binary KeyPass string // key passphrase KeyAlias string // key alias for signing StorePass string // keystore passphrase KeyStorePath string // path to keystore (e.g. /path/to/debug.keystore) }
ApkDebugifier makes an APK debuggable. The fields in the struct are used to configure the various paths and passwords required, as well as providing a log context. Intended use is ApkDebugifier{Ctx: ..., JarSignCmd: "jarsigner", ..., KeyStorePath: "..."}.Run(...).
Click to show internal directories.
Click to hide internal directories.