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


Question

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.


Answer

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.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes