4
  • Phone : nexus 5 version 2013
  • Android version : 6.0
  • Kernel version : 3.4.0-g2aa165e
  • Build number : MRA58N

For the last few days, 10118 has been draining my phone's battery. It drains battery by using GPS. I typed 'ps' in a terminal emulator, and there was no application with PID 10118. I don't know what exactly 10118 is. My guess is that it's one of recently installed weather apps.

How can I fix this?

screenshot screenshot
Screenshots (click images for larger variants)

Izzy
  • 91,166
  • 73
  • 343
  • 943
  • 3
    That appears to be UID to me. See if you can find the associated package name using that as UID. This may help: How to know app name by UID Also, use a paste service (such as pastebin) to give us the output of adb shell dumpsys batterystats. You would need [tag:adb] setup in PC and USB debugging enabled in the device. – Firelord Nov 29 '15 at 09:04
  • Confirmed @Firelord: it is the UID. And alternatively to installing ADB as recommended by Firelord, you can also try dumpsys batterystats from within a terminal app. – Izzy Nov 29 '15 at 09:11
  • @Izzy, I thought about that recommendation too but the bare minimum privilege required to access a system service is ADB and the final one is root. That's what my attempt in terminal emulator told me. – Firelord Nov 29 '15 at 09:12
  • 1
    @Firelord I was thinking about that. But while there's a permission to collect BATTERY_STATS, I found none to access them. I've not tried it either. So you have and it didn't work ("permission denied" or any other error)? – Izzy Nov 29 '15 at 09:17
  • 1
    Interesting info. I think you're right about that. The proper denial message I receive is that user (user in terminal app) doesn't have the permission android.permissions.DUMP. So I guess two permissions would be required for successful execution of the command: permission to dump and permission to gather batterystats, or at least the first one to access dumpsys tool. – Firelord Nov 29 '15 at 09:21
  • Ouch. You're absolutely correct, @Firelord: That requires the permission DUMP, protection-level "development", and (quote) "Not for use by third-party applications." So a terminal app wanting to access dumpsys would need to be at least pre-installed. And yes, I was blind here: "The information accessible with this permission is most likely comparable of that retrieved by the dumpsys command-line tool." (quoted my own permission description here ;) – Izzy Nov 29 '15 at 09:30
  • 1
    The intriguing fact is that you can execute dumpsys alone without any problem. You won't get the error about that specific dump permission. All that would happen is you would see permission denial error for every available service there. I used com.android.terminal app to access batterystats service and I got the permission error alike to terminal emulator. @Izzy – Firelord Nov 29 '15 at 09:38
  • 1
    @Firelord The output of 'adb shell dumpsys batterystats' is on https://gist.github.com/crocket/1ac5999ef4679cbf542e The gist will be deleted after weeks. –  Nov 29 '15 at 10:04
  • 'adb shell dumpsys package | grep -A1 "userId=10118"' returns no output. –  Nov 29 '15 at 10:09
  • Interesting output. There is clearly an app or at least a user ID 10118. See it in the output by searching u0a118. Tell me, do you have root access? When you tell me that, please provide the output of adb shell dumpsys procstats and adb shell dumpsys location. – Firelord Nov 29 '15 at 10:23
  • @Firelord adb shell dumpsys procstats : http://dpaste.com/2DVBP98 adb shell dumpsys location : http://dpaste.com/2GJ500A –  Nov 29 '15 at 10:51
  • Hmm, I was expecting procstats to show something useful. Guess I'll have to go with what location service is showing. I know the clarification I sought hasn't lead you anywhere, but if possible, could your provide the separate output for adb shell dumpsys package kr.co.kweather , adb shell dumpsys package com.google.android.dialer , adb shell dumpsys package com.aws.android, adb shell dumpsys package com.wisemobile.openweather? – Firelord Nov 29 '15 at 11:20
  • Only dialer had output. dialer : http://dpaste.com/1C2R76P I think kweather and openweather were deleted in the past. –  Nov 29 '15 at 11:34

1 Answers1

1

It's the UID of a removed app.

For such a number like 10118, it is the Unix UID for a user app (u0_a118).

There must have been a power-intensive app like a big game and you uninstalled it. Then there's nothing but its UID left, which is used in system logging.

Android does not log by app (for user apps), but its UID instead. So when you view battery usage, Android tells you the list by process UIDs, which contains one that has no app associated to it. Android cannot determine what app that UID is for, so it chooses to give you the UID directly, and that's the number you see.

iBug
  • 7,747
  • 8
  • 44
  • 83