Building with Android "user" build_variant

Which system do you use? Android, Ubuntu, OOWOW or others?

Android 11

Please describe your issue below:

I can build and boot Android 11 in user variant instead of the default userdebug.

But, a popup dialog is displayed during boot, which of course is not acceptable for a final product:
There’s an internal problem with your device. Contact your manufacturer for details

I need support for user variant so that the device is properly locked-down when releasing production builds.

@xavier This error does not affect actual use and can be eliminated by commenting on the source code.

frameworks/base$ git diff
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -6484,7 +6484,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                 } catch (RemoteException e) {
                 }
 
-                if (!Build.isBuildConsistent()) {
+/*                 if (!Build.isBuildConsistent()) {
                     Slog.e(TAG, "Build fingerprint is not consistent, warning user");
                     mUiHandler.post(() -> {
                         if (mShowDialogs) {
@@ -6499,7 +6499,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                             d.show();
                         }
                     });
-                }
+                } */
             }
         }
1 Like

Thanks! I verified that the fingerprints are different and that the change above removed the warning.