Android system blocks "There is a problem inside your device, please contact your device manufacturer for details" pop-up window

Problem symptoms:

Customers report that when using an Android system machine, sometimes the desktop will pop up "There is a problem inside your device, please contact your device manufacturer for details." In fact, there is no problem with using the machine, but this interface suddenly pops up, which greatly affects the user experience. What we have to do is to block this section in the Android source code so that this pop-up window will not pop up during use.


Android 5.1 - 9.0

Comment the thread that displays the pop-up window.
frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java,keyword SHOW_FINGERPRINT_ERROR_UI_MSG.

diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 6d87e940b6b..69a138f72bd 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -13643,7 +13643,7 @@ public final class ActivityManagerService extends ActivityManagerNative

             if (!Build.isBuildConsistent()) {
    
    
                 Slog.e(TAG, "Build fingerprint is not consistent, warning user");
-                mUiHandler.obtainMessage(SHOW_FINGERPRINT_ERROR_UI_MSG).sendToTarget();
+                //mUiHandler.obtainMessage(SHOW_FINGERPRINT_ERROR_UI_MSG).sendToTarget();
             }

             long ident = Binder.clearCallingIdentity();

Android11 - 12

There are two reasons why the warning box appears:

  1. The firmware does not match. The three fingerprints of system/boot/vendor are inconsistent and are not the same set of firmware.
  2. The machine opens the config that supports the IO debugging function. When compiling, use the kernel compilation command mentioned earlier in the document to turn it off.
  3. For projects that need to use the IO debugging function, you can directly ignore the above two reasons and directly incorporate the frameworks/basefollowing patch to remove the pop-up window:
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 9b33b56e9f8f..a1c3d60dcaff 100755
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -6485,7 +6485,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
    
    
                 } catch (RemoteException e) {
    
    
                 }

-                if (!Build.isBuildConsistent()) {
    
    
+                if (0 && !Build.isBuildConsistent()) {
    
    
                     Slog.e(TAG, "Build fingerprint is not consistent, warning user");
                     mUiHandler.post(() -> {
    
    
                         if (mShowDialogs) {
    
    

Guess you like

Origin blog.csdn.net/weixin_45639314/article/details/132453404