出现“您的设备内部出现了问题。请联系您的设备制造商了解详情”错误后,kernel的配置问题查找

当遇到'您的设备内部出现了问题。请联系您的设备制造商了解详情'错误,问题可能源于kernel配置。关键在于检查frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java中的Build.isBuildConsistent。该值依赖于ro.treble.enabled属性,进一步深入到VintfObject.verifyWithoutAvb()函数。通过logcat日志分析,发现问题涉及kernel信息的匹配。经过谷歌搜索和Android官方文档,了解到内核匹配规则,并在/proc/config.gz中寻找信息。最终在system/libvintf目录找到线索,通过compatibility_matrix.2.xml解决配置问题。参考了https://blog.csdn.net/yekongzhongdexing/article/details/103961461的博客获取关键思路。
摘要由CSDN通过智能技术生成

您的设备内部出现了问题。请联系您的设备制造商了解详情。
1. 文件:frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java中判断Build.isBuildConsistent的值进行检查

15411     public void systemReady(final Runnable goingCallback, TimingsTraceLog traceLog) {
   
		   ……
5601             if (!Build.isBuildConsistent()) {
   
15602                 Slog.e(TAG, "Build fingerprint is not consistent, warning user");
15603                 mUiHandler.obtainMessage(SHOW_FINGERPRINT_ERROR_UI_MSG).sendToTarget();
15604             }
	       ……
  1. isBuildConsistent函数在frameworks/base/core/java/android/os/Build.java中其中IS_TREBLE_ENABLED是进行兼容性判断的关键判断,这个值来自于属性ro.treble.enabled。继续查看发现 int result = VintfObject.verifyWithoutAvb();为判断设备兼容性的关键函数。
	 962     /**
	 963      * True if Treble is enabled and required for this device.
	 964      *
	 965      * @hide
	 966      */
	 967     public static final boolean IS_TREBLE_ENABLED =
	 968         SystemProperties.getBoolean("ro.treble.enabled", false);
	 969 
	 970     /**
	 971      * Verifies the current flash of the device is consistent with what
	 972      * was expected at build time.
	 973      *
	 974      * Treble devices will verify the Vendor Interface (VINTF). A device
	 975      * launched without Treble:
	 976      *
	 977      * 1) Checks that device fingerprint is defined and that it matches across
	 978      *    various partitions.
	 979      * 2) Verifies radio and bootloader partitions are those expected in the build.
	 980      *               
	 981      * @hide              
	 982      */  
	 983     public static boolean isBuildConsistent() {
   
	 984         // Don't care on eng builds.  Incremental build may trigger false negative.
	 985         if (IS_ENG) return true;
	 986 
	 987         if (IS_TREBLE_ENABLED) {
   
	 988             // If we can run this code, the device should already pass AVB.
	 989             // So, we don't need to check AVB here.
	 990             int result = VintfObject.verifyWithoutAvb();
	 991 
	 992             if (result != 0) {
   
	 993                 Slog.e(TAG, "Vendor interface is incompatible, error="
	 994                         + String.valueOf(result));
	 995             }    
	 996 
	 997             return result 
  • 6
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值