packageutils

package
v0.0.0-...-d2356ba Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package packageutils contains functions used to extract package information from a bug report and to determine the best guess as to which package is associated with a given string and uid.

Index

Constants

View Source
const (

	// FirstApplicationUID defines the start of a range of UIDs (and GIDs), going from this number to
	// LAST_APPLICATION_UID (which is 19999) that are reserved for assigning to applications. Both
	// constants are defined in frameworks/base/core/java/android/os/Process.java.
	FirstApplicationUID = 10000
)

Variables

This section is empty.

Functions

func AppID

func AppID(uid int32) int32

AppID returns the appID (or base uid) for a given uid, stripping out the user id from it. Based on frameworks/base/core/java/android/os/UserHandle.java.

func AppIDFromString

func AppIDFromString(uid string) (int32, error)

AppIDFromString returns the appID (or base uid) for a given uid, stripping out the user id from it. (ie. "10001" -> 10001,nil; "u0a25" -> 10025,nil; "text" -> 0,error

func ExtractAppsFromBugReport

func ExtractAppsFromBugReport(s string) ([]*usagepb.PackageInfo, []error)

ExtractAppsFromBugReport looks through a bug report and extracts as much application info as possible.

func GuessPackage

func GuessPackage(identifier string, uid string, p []*usagepb.PackageInfo) (l *usagepb.PackageInfo, err error)

GuessPackage returns the best guess for the owning package corresponding to the identifying string (ie. a sync adapter or wakelock name) by evaluating the given UID and the package name found in desc.

func IsSandboxedProcess

func IsSandboxedProcess(uid int32) bool

IsSandboxedProcess returns true if the given UID is the UID of a fully isolated sandboxed process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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