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
- func AppID(uid int32) int32
- func AppIDFromString(uid string) (int32, error)
- func ExtractAppsFromBugReport(s string) ([]*usagepb.PackageInfo, []error)
- func GuessPackage(identifier string, uid string, p []*usagepb.PackageInfo) (l *usagepb.PackageInfo, err error)
- func IsSandboxedProcess(uid int32) bool
Constants ¶
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 ¶
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 ¶
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 ¶
IsSandboxedProcess returns true if the given UID is the UID of a fully isolated sandboxed process.
Types ¶
This section is empty.