过程及步骤记录:
1、在device-commom.mk里重写:
BUILD_NUMBER := 0.0.1
BUILD_ID := flying123123123
重新编译后发现system/build.prop 里面ro.build.id没有改变还是默认值
2、尝试直接修改build\core\build_id.mk
export BUILD_ID=MRA58K
修改为export BUILD_ID=flying123123123
编译错误:error: ro.build.fingerprint cannot exceed 91 bytes
网上找到对应方法:
diff --git a/tools/post_process_props.py b/tools/post_process_props.py
index 2237707..df13699 100755
--- a/tools/post_process_props.py
+++ b/tools/post_process_props.py
@@ -23,7 +23,7 @@ import sys
# The constants in system_properties.h includes the termination NUL,
# so we decrease the values by 1 here.
PROP_NAME_MAX = 32
-PROP_VALUE_MAX = 91
+PROP_VALUE_MAX = 149
diff --git a/libc/include/sys/system_properties.h b/libc/include/sys/system_properties.h
index 01c3db3..023b28e 100644
--- a/libc/include/sys/system_properties.h
+++ b/libc/include/sys/system_properties.h
@@ -36,7 +36,7 @@ __BEGIN_DECLS
typedef struct prop_info prop_info;
#define PROP_NAME_MAX 32
-#define PROP_VALUE_MAX 92
+#define PROP_VALUE_MAX 150
3、编译成功后升级发现开机后弹出窗口:
ANDROID系统
您的设备内部出现了问题,请联系您的设备制造商了解详情
从打印信息中发现:
init: property_set("ro.bootimage.build.fingerprint", "Mstar/aosp_almond_dtmb/almond:6.0/LED33051510000/TVOS-04.19.011.02.10.Mooney:userdebug/test-keys") failed12-23 13:52:11.289 1854 1854 E Build : Required ro.build.fingerprint is empty!
12-23 13:52:11.289 1854 1854 E ActivityManager: Build fingerprint is not consistent, warning user
4、
frameworks\base\core\java\android\os\SystemProperties.java
public static final int PROP_VALUE_MAX = 91;//149;//91;
system\core\debuggerd\test\sys\system_properties.h
#define PROP_VALUE_MAX 92//150//92