[Android Q&A, Help & Troubleshooting] DJwa163:
Intro:

This thread is about a common & bothersome android OS error:

"System UIDs Inconsistent

UIDs on your system are inconsistent, you need to wipe your data partition or your device will be unstable"

popping at the system startup/boot/reboot.

Detail:

There have already been nearly a hundred threads on this topic, partly because of the problem is so prevalent and ubiquitous...

It has been reported from a wide range of devices, running various ROM/any android version. Most people got fed up trying numerous unbecoming solutions & landed up formatting their devices, and often landed up losing all userdata!

Generally it appears after flashing new ROMs/Kernels and the issue is more common with people who tend to try out different ROMs, therefore have to backup and restore the NANdroid backups in brief intervals.

Wiping data partition is not always desirable, as it would cost you all the saved application data, including contacts and messages.

Unfortunately there was no definite cure till now, but fortunately enough, there's something now!

This error is not necessarily emerging from your system apps/core/kernel etc etc (though, the error message seems more like a system prompt!) , rather it might be originating from petty handful of user-apps (even from those you had uninstalled in the past!!! but their corpse have somehow remained as zombies!).

Acknowledgement:​

Thanks to xcreatir for hinting at this excellent piece of idea on XDA, on a similar thread.

Many more people got close to the solution, but missed the target by a whisker, and got deflected towards weird and terrible 'solutions'!

But, the problem is easy to fix, and indeed self-explanatory (and also logged by android automatically)!

Pre-requisite:​

You'll need root-access.

So, get your phone rooted, before you proceed (if its not already).

Solution:​

STEP 1.

Use a file explorer with root access (e.g. ES File Explorer OR Root Explorer OR File Explorer with Root Addon and browse to /data/system/

and locate a file named "uiderrors.txt"

Here I have relied on ES File Explorer with root privileges.

TIP: Must check "Show hidden files" in the settings of your chosen file manager.

Screenshots:

STEP 2.

Open it via any text reader

Screenshot:

STEP 3.

Look at the last few lines, you'll find the culprit apps whose leftover files have been causing the problem:

This will be completely different in your case.

Disclaimer:

By no means, I'm pointing fingers to these two apps as the culprits (rather, they are some of the best apps available!), this can happen with any give app. Thus, will be completely different in your case.

TIP: Please look through your own "uiderrors.txt" file very carefully to find out which are the apps having UID mismatch in your case!

You need to find every app mentioned in your "uiderrors.txt" file which had UID mismatch. Its not a difficult job, trust me. The list wont be long!

STEP 4.

Now browse to /data/data/

and

/data/app/

you'll need root privileges, otherwise things will show blank.

Screenshots:

STEP 5.

Select the folders with the names mentioned in"uiderrors.txt". Be careful of selecting anything else! This can land you in troubles. Mark only the ones mentioned in your own,

Remember: the apk file can bear any number after its name: e,g, it could also be com.rovio.angrybirdsseasons-4.apk

So, don't worry you have to mark everything that matches the name, forget the suffixes!

Again, the culprit files would be completely different in your case than what I have listed here.

Please take a close look at your own "/data/system/uiderrors.txt"

Screenshots:

6. Carefully delete them by hitting Delete Button at the bottom. Be careful of deleting anything else!

7. Reboot & enjoy!

You're done! No more errors! No need to format your device, keep all your data intact.

Caution:

Programs like Link2SD/ App2SD etc tend to complicate the issue to some extent.

In such cases, you must also scrutinize following directories besides: /data/data/ to find any leftover files belonging to those that are mentioned in your uiderrors.txt

Delete meticulously any such traces!

Good Luck!

​