In "battery history" I have found that the app with UID 10058 is using a lot of battery.

How can I find the name of the app with UID equal to 10058?

6 Answers 6


Android assigns each application a UID (User ID) at install time; unlike PID (Process ID) which is transient and keeps changing all the time, UID stays constant as long as the application is not reinstalled. The UID should be unique to each application, except when the application explicitly requests to share a User ID with another application (there are security restrictions around this, the two applications must be signed with the same private key, i.e. comes from the same developer).

Try looking at /data/system/packages.xml (you need root to view this file), each installed application should have an entry there. Say, I have Adobe Reader installed on my phone:

<package name="com.adobe.reader" codePath="/mnt/asec/com.adobe.reader-1/pkg.apk" flags="262144" ts="1300539048000" version="37149" userId="10034" installer="com.google.android.feedback">
<sigs count="1">
<cert index="21" key="... very long random string ..." />
<perms />

My phone has assigned userId="10034" to Adobe Reader.

For applications that have requested to share a User ID with another application, say Handcent:

<package name="com.handcent.nextsms" codePath="/system/app/HandcentSMS.apk" flags="1" ts="1217592000000" version="373" sharedUserId="10064">
<sigs count="1">
<cert index="17" key="... very long random string ..." />

then the attribute you're looking for is sharedUserId="10064"


Prerequisites: set up in a PC, connect the device to the PC, launch a shell on the PC to enter adb commands.


  • Replace UID wherever it occurs in the following commands with the UID you're searching for.
  • The commands below would only provide the package name of the app corresponding to your UID. To get the app label/name after obtaining the package name, you can use my answer here, or of GAThrawn's or of Izzy's.

For Android 8.x and above

Enter the command:

adb shell cmd package list packages --uid UID
adb shell pm list packages --uid UID                 # alternative command


$ adb shell pm list packages --uid 10250
package:com.adobe.scan.android uid:10250

For Android 7.x and above

Enter the command:

adb shell "cmd package list packages -U | grep UID"
adb shell "pm list packages -U | grep UID"           # alternative command

IF above cmds don't work you can try these below giving you the exact name
adb shell "cmd package list packages uid UID"
adb shell "pm list packages uid UID"           # alternative command


$ adb shell "cmd package list packages -U | grep 10247"
package:dev.ukanth.ufirewall uid:10247

For any Android version (tested from Android 4.2.1 to 10.0)

Enter the command:

adb shell "dumpsys package | grep -A1 'userId=UID'"

It might take a few seconds to print the desired output.


$ adb shell "dumpsys package | grep -A1 'userId=10102'"
   pkg=Package{46171ce com.android.chrome}

The line containing Package{ would show the package name of the app in between whitespace and }. You can do adb shell dumpsys package PKG_NAME (PKG_NAME → package name of an app) to know more details about that package/app.

For rooted Android versions

If the Android is rooted, than using adb shell or a terminal emulator app you can do:

cat /data/system/packages.list | grep UID

In the output, anything before the UID would be the package name.


shell@shamu:/ $ su
root@shamu:/ # cat /data/system/packages.list | grep 10102
com.android.chrome 10102 0 /data/data/com.android.chrome default 3002,3003,3001

Alternatively, if you've Busybox or Toybox installed and available under PATH variable, than from a terminal emulator or adb shell do:

find /data/data/ -type d -group UID -maxdepth 1 | xargs basename


shell@shamu:/ $ su
root@shamu:/ # find /data/data/ -group 10102 -type d -maxdepth 1 | xargs basename

  • This works for me without root. May 5, 2016 at 6:36

Install a terminal emulator, launch it and run:

ps | grep 10058

ps lists the processes and grep filters for the ID you want.

But this only works if the application is running when you run the command.

  • I try this, but it doesn't works, because such app is not already running
    – azat
    Apr 19, 2011 at 13:54
  • 6
    This is for PID, the asker was referring to UID
    – Lie Ryan
    Apr 19, 2011 at 17:21
  • 2
    The UID is shown in the ps output as well as the PID. The ps output typically has lines like '12345 app_118...' where 12345 is the PID and app_118 is the UID (corresponding to userId=10118 in /data/system/packages.xml)
    – Art Swri
    Jun 12, 2013 at 16:09

In ADB shell (or terminal emulator) use the following command:

cat /proc/<your_process_id_here>/status

and look in the "Name" field. This should be the name of the process. So in your case it would be "cat /proc/10058/status"

  • 3
    10058 is supposed to be the PID here while OP gave us UID.
    – Firelord
    Oct 2, 2015 at 11:02

I had a similar issue with Android 6.0, Moto G 2nd Gen from 2014. I happened to have upgraded the ES File Explorer application and I noticed it was bloated as hell and sucking up a lot of battery. I removed the application from the system, but the application let a zombie process taking up CPU. The UID was similar to yours 10118, and it listed in the battery statistics as the most hungry resource process.

Then I installed an app named "OS Monitor" and noticed that a .esfm file was actually the only process taking up 60% of CPU. I immediately had known that it had to do with ES File Explorer, but wait... I HAD uninstalled ES File Explorer. Yes. The only thing I didn't do was to RESTART the smartphone. Believe me, I was thinking about crazy things, like going root and beat the crap out of that process, throw the phone against the wall, and even started to believe that my battery reached end of life. To my surprise, I simply restarted the phone and the process was gone.

So before taking any drastic measures, try to figure out which app is giving you a bad time, uninstall it and then restart the phone. Check on OS Monitor the CPU usage list, and you should be fine.


To find "everything" by UID (or GroupID) on a rooted phone, including running processes, system apps and hardware sensors:

# ID=3011; find / -group $ID -o -user $ID   2>/dev/null

Example 1:

# ID=3011; find / -group $ID -o -user $ID   2>/dev/null

# ls -la /proc/208/exe
lrwxrwxrwx 1 root root 0 2017-04-04 22:14 /proc/208/exe -> /system/bin/sensors.qcom

Example 2

# ID=10009; find / -group $ID -o -user $ID   2>/dev/null

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .