Obtain the Linux UID of an Android App

Erez A. Korn picture Erez A. Korn · May 25, 2011 · Viewed 30.5k times · Source

I would like to be able to get the Linux UID (user ID) of an installed Android application.

Excerpt from Security and Permissions: "At install time, Android gives each package a distinct Linux user ID. The identity remains constant for the duration of the package's life on that device."

Is there a way to retrieve this UID?

Answer

Joe Bowbeer picture Joe Bowbeer · Sep 21, 2013

adb shell dumpsys package com.example.myapp | grep userId=