引言
记录某行招标安兔兔参数修改
硬件,CPU型号,Build Fingerprint
修改记录
diff --git a/build/make/core/Makefile b/build/make/core/Makefile
index 18e6de8c5f..f8bfd5a76f 100755
--- a/build/make/core/Makefile
+++ b/build/make/core/Makefile
@@ -240,7 +240,8 @@ ifeq (,$(strip $(BUILD_FINGERPRINT)))
else
BF_BUILD_NUMBER := $(file <$(BUILD_NUMBER_FILE))
endif
- BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BF_BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
+ #BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BF_BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
+ BUILD_FINGERPRINT := $(PRODUCT_BRAND)/full_tb6771p1_64_bsp/tb6771p1_64_bsp:$(PLATFORM_VERSION)/$(BUILD_ID)/$(BF_BUILD_NUMBER):user/$(BUILD_VERSION_TAGS)
endif
# unset it for safety.
BF_BUILD_NUMBER :=
diff --git a/frameworks/base/core/java/android/os/Build.java b/frameworks/base/core/java/android/os/Build.java
index cf5bb39fb3..0952314d40 100755
--- a/frameworks/base/core/java/android/os/Build.java
+++ b/frameworks/base/core/java/android/os/Build.java
@@ -108,7 +108,7 @@ public class Build {
public static final String RADIO = getString(TelephonyProperties.PROPERTY_BASEBAND_VERSION);
/** The name of the hardware (from the kernel command line or /proc). */
- public static final String HARDWARE = getString("ro.hardware");
+ public static final String HARDWARE = getHardware("ro.hardware");
/**
* Whether this build was for an emulator device.
@@ -1119,6 +1119,10 @@ public class Build {
return SystemProperties.get(property, UNKNOWN);
}
+ private static String getHardware(String property) {
+ return "mt6771";
+ }
+
private static String[] getStringList(String property, String separator) {
String value = SystemProperties.get(property);
if (value.isEmpty()) {
diff --git a/kernel-4.4/arch/arm64/kernel/cpuinfo.c b/kernel-4.4/arch/arm64/kernel/cpuinfo.c
index 55dec3b305..a0ea78a49f 100644
--- a/kernel-4.4/arch/arm64/kernel/cpuinfo.c
+++ b/kernel-4.4/arch/arm64/kernel/cpuinfo.c
@@ -173,7 +173,7 @@ static int c_show(struct seq_file *m, void *v)
}
/* backward-compatibility for thrid-party applications */
- seq_printf(m, "Hardware\t: %s\n", machine_desc_str);
+ seq_printf(m, "Hardware\t: %s\n", "MT6771");
return 0;
}
编译刷机之后,发现鲁大师cpu信息有一半不对MT6771(mt8788)
adb shell getprop ro.hardware ,输出mt8788,直接修改SystemProperties.java的get方法即可。
diff --git a/frameworks/base/core/java/android/os/SystemProperties.java b/frameworks/base/core/java/android/os/SystemProperties.java
old mode 100644
new mode 100755
index 7d3ba6a3cf..82b71f5576
--- a/frameworks/base/core/java/android/os/SystemProperties.java
+++ b/frameworks/base/core/java/android/os/SystemProperties.java
@@ -115,6 +115,10 @@ public class SystemProperties {
@TestApi
public static String get(@NonNull String key, @Nullable String def) {
if (TRACK_KEY_ACCESS) onKeyAccess(key);
+ //add by djw
+ if ("ro.hardware".equals(key)){
+ return "mt6771";
+ }
return native_get(key, def);
}