"There is an internal problem with your device, and it might be unstable until you factory data reset." On boot, I'm getting the message:


  There is an internal problem with your device, and it might be unstable until you factory data reset.


I'm experiencing no force closes or instability.

What circumstances cause this error, and is there some terminal magic which can avert the need for a factory reset?

If this is a problem with a /system/build.prop mismatch, how can I find out the specific mismatches so I can restore those?

I'm running Dirty Unicorns on a Moto Pure/Play, but I've seen this on other ROMs and hardware.
You guessed correctly. It is a mismatch between the build fingerprint mentioned in the build.prop file in the system partition and the build.prop file in the vendor image, specifically the ro.vendor.build.fingerprint key.

As fas as I know, that happens when the vendor partition and system partition were built separately from different builds or versions.

There are several fixes for this issue, I'll specify two I've personally tried and successfully got rid of this annoying error message.

Runtime Fix

The first fix is in runtime and requires root access on adb. We'll mount the images and just make the fingerprint value match by copying it from one partition to the other.


adb root
mount -o rw,remount -t ext4 /system
adb remount
adb pull /vendor/build.prop ./build.prop.vendor
adb pull /system/build.prop ./build.prop.system
copy the value from build.prop.system to build.prop.vendor for ro.vendor.build.fingerprint 
adb push ./build.prop.vendor /vendor/build.prop
adb reboot


Compile Time Fix

The second fix I like more because it actually removes the check completely from the code. If you are building your own Android flavor, or at least compiling it yourself you can just change the code and disable this feature.

The code that checks the fingerprint and eventually raises that error is found in 

/frameworks/base/core/java/android/os/Build.java.

Look for the following method:

public static boolean isBuildConsistent()

Simply comment out all the code in it and replace it with

return true;

This will make your build always "consistent" and no fingerprint problems will ever be raised.