System UIDs Inconsistent – Android

Recently in my tinkering of system APKs, I encountered an error upon reboot: System UIDs Inconsistent.

I thought this could be from me re-adding the Gallery apk since that was the last action before the error, but it turns out it was much more.At some point, I got corruption in my data partition.  I still don’t know how this happened, but a couple identifiers let me know the culprit.

First, I reboot into recovery (TWRP) and ran a permissions fix.  Part of the output told me that it could not access /data/data/com.RiteshSahu.SMSBackupRestore.  I used this app to backup my SMS messages when changing ROMs, so I figured I would simply remove it and the data folder to get rid of the offending problem.  This was not that easy.  In Root File Explorer, there was no folder “data/data/com.RiteshSahu.SMSBackupRestore”.  Hmmm.

Rebooting back into Recovery, I ran permissions fix again to see if the directory was now cleaned out, but received the same error.  I successfully ran a data backup in order to preserve any settings I may lose, so I figured next would be deleting data and then restoring it.  The problem followed.  I even tried to reinstall the app (which I noticed the APK was gone and no longer showed as an installed app).  When trying to reinstall, I received “Unknown Error code during application install: -24” and the install failed.  Next step: Drop to terminal and see if I can remove the folder.

In TWRP, you can easily open a terminal in any folder, so I dropped into /data/data and ran “ls”.  Sure enough – there’s the folder.  Let’s delete it with “rm com.RiteshSahu.SMSBackupRestore”.  A quick “ls” showed me the folder was now gone. Reboot and voila! – No more UID error.

I know this would have been a major pain without the permissions error pointing me in the right direction.  Lesson learned to use multiple approaches to identify the problem.  Good luck to any others who stumble across this error.

Advertisements