曾无好事来相访,赖尔高文一起予。这篇文章主要讲述android修改getprop读取到的ro.build.fingerprint属性相关的知识,希望能为你提供帮助。
【android修改getprop读取到的ro.build.fingerprint属性】在build/tools/buildinfo.sh中定义ro.build.fingerprint=$BUILD_FINGERPRINT.
然后在build/core/Makefile中给BUILD_FINGERPRINT赋值
但这里确定的是手机system/build.prop中的ro.build.fingerprint,是编译时决定的
getprop读取到的ro.build.fingerprint的值,是运行时决定的,在frameworks/base/core/java/android/os/Build.java 中:
923 /** A string that uniquely identifies this build.
Do not attempt to parse this value. */
924
public static final String FINGERPRINT = deriveFingerprint();
925
926
/**
927
* Some devices split the fingerprint components between multiple
928
* partitions, so we might derive the fingerprint at runtime.
929
*/
930
private static String deriveFingerprint() {
931
Stringfinger = SystemProperties.get("ro.build.fingerprint");
932
if (TextUtils.isEmpty(finger)) {
933
finger = getString("ro.product.brand") + ‘/‘ +
934
getString("ro.product.name") + ‘/‘ +
935
getString("ro.product.device") + ‘:‘ +
936
getString("ro.build.version.release") + ‘/‘ +
937
getString("ro.build.id") + ‘/‘ +
938
getString("ro.build.version.incremental") + ‘:‘ +
939
getString("ro.build.type") + ‘/‘ +
940
getString("ro.build.tags");
941
}
942
return finger;
943
}
推荐阅读
- Android 动态渐变按钮
- Android 密钥保护和 C/S 网络传输安全理论指南
- Android 2018最新的三方库
- [Angular] Extract Implementation Details of ngrx from an Angular Application with the Facade Pattern
- android recovery代码修改之原生建议
- web测试和app测试的区别
- App Technical Support For "心味美食"
- 解决Android Studio 错误方法
- 笔记本win8系统如何设置让桌面变得更加整洁