Android Blog‎ > ‎

Android - "UIDS on the system are inconsistent" error

posted 10 Sep 2015, 08:24 by Dominique Cressatti   [ updated 29 Jun 2018, 11:11 ]

A few times, probably after using Link2SD to move an app from the SD card to the phone internal storage or convert a user app into a system app, I received the following message



Although it looks scary, it is easy to fix. The key to resolve the error is to look on your device in:

/data/system/uiderrors.txt


If you have rooted your device, which if you've been using something like Link2SD is most likely, use something like ES File explorer, making sure that you've enabled root access and open the above file, scroll to the bottom of the log to find and delete the APK which is causing the error. Otherwise, read on!



Here is an example of mine where the package "com.wordreference" was the cause of the problem.

  1. Connect your device to your computer, fire up ADB and get a shell session

    wisedom@wisedom-thinkpad ~ $ adb devices

    * daemon not running. starting it now on port 5037 *

    * daemon started successfully *

    List of devices attached

    01547AE81900F006 device

    wisedom@wisedom-thinkpad ~ $ adb shell


    Above, I've checked that my device (in bold) was connected before firing up a shell session.

  2. Display the content of /data/system/uiderrors.txt root@android:/ # cat /data/system/uiderrors.txt    

    08/04/2015 18:13: No settings file; creating initial state

    4/8/15 8:20 PM: Need to read from backup settings file

    4/8/15 9:21 PM: System package com.google.android.ears no longer exists; wiping its data

    ….

    ….                                                                                                                        

    29/06/2015 07:04: System package com.vp.alarmClockPlusDock no longer exists; wiping its data 02/07/2015 20:10: Need to read from backup settings file

    06/07/2015 12:18: Need to read from backup settings file                                

    09/07/2015 21:31: Need to read from backup settings file                                

    09/07/2015 21:31: Package com.wordreference has mismatched uid: 10085 on disk, 10127 in settings

    10/07/2015 00:14: Need to read from backup stopped packages file

    Above (in bold), you can clearly see which package was responsible for the error.

  3. Next, all needed to be done was to delete the package (I had 2 my in case). root@android:/ # rm /data/app/com.wordreference-1.apk root@android:/ # rm /data/app/com.wordreference-2.apk
  4. Reboot your device to finish.