add new alt system/vendor mismatch error fix
This commit is contained in:
parent
a01d3e7cc2
commit
0ebaa098bc
2 changed files with 21 additions and 66 deletions
21
patches/Build.java-alt-4.patch
Normal file
21
patches/Build.java-alt-4.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
--- old/Build.java 2026-07-28 15:27:24.193140783 -0500
|
||||||
|
+++ new/Build.java 2026-07-28 16:12:26.635606082 -0500
|
||||||
|
@@ -1729,18 +1729,8 @@
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static boolean isBuildConsistent() {
|
||||||
|
- // Don't care on eng builds. Incremental build may trigger false negative.
|
||||||
|
- if (IS_ENG) return true;
|
||||||
|
-
|
||||||
|
- int result = VintfObject.verifyBuildAtBoot();
|
||||||
|
- if (result != 0) {
|
||||||
|
- Slog.e(TAG, "Vendor interface is incompatible, error=" + result);
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
/** Build information for a particular device partition. */
|
||||||
|
public static class Partition {
|
||||||
|
/** The name identifying the system partition. */
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
public static boolean isBuildConsistent() {
|
|
||||||
// Don't care on eng builds. Incremental build may trigger false negative.
|
|
||||||
/*if (IS_ENG) return true;
|
|
||||||
|
|
||||||
if (IS_TREBLE_ENABLED) {
|
|
||||||
int result = VintfObject.verifyBuildAtBoot();
|
|
||||||
|
|
||||||
if (result != 0) {
|
|
||||||
Slog.e(TAG, "Vendor interface is incompatible, error="
|
|
||||||
+ String.valueOf(result));
|
|
||||||
}
|
|
||||||
|
|
||||||
return result == 0;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
final String system = SystemProperties.get("ro.system.build.fingerprint");
|
|
||||||
final String vendor = SystemProperties.get("ro.vendor.build.fingerprint");
|
|
||||||
final String bootimage = SystemProperties.get("ro.bootimage.build.fingerprint");
|
|
||||||
final String requiredBootloader = SystemProperties.get("ro.build.expect.bootloader");
|
|
||||||
final String currentBootloader = SystemProperties.get("ro.bootloader");
|
|
||||||
final String requiredRadio = SystemProperties.get("ro.build.expect.baseband");
|
|
||||||
final String currentRadio = joinListOrElse(
|
|
||||||
TelephonyProperties.baseband_version(), "");
|
|
||||||
|
|
||||||
if (TextUtils.isEmpty(system)) {
|
|
||||||
Slog.e(TAG, "Required ro.system.build.fingerprint is empty!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(vendor)) {
|
|
||||||
if (!Objects.equals(system, vendor)) {
|
|
||||||
Slog.e(TAG, "Mismatched fingerprints; system reported " + system
|
|
||||||
+ " but vendor reported " + vendor);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
|
|
||||||
/* TODO: Figure out issue with checks failing
|
|
||||||
if (!TextUtils.isEmpty(bootimage)) {
|
|
||||||
if (!Objects.equals(system, bootimage)) {
|
|
||||||
Slog.e(TAG, "Mismatched fingerprints; system reported " + system
|
|
||||||
+ " but bootimage reported " + bootimage);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(requiredBootloader)) {
|
|
||||||
if (!Objects.equals(currentBootloader, requiredBootloader)) {
|
|
||||||
Slog.e(TAG, "Mismatched bootloader version: build requires " + requiredBootloader
|
|
||||||
+ " but runtime reports " + currentBootloader);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(requiredRadio)) {
|
|
||||||
if (!Objects.equals(currentRadio, requiredRadio)) {
|
|
||||||
Slog.e(TAG, "Mismatched radio version: build requires " + requiredRadio
|
|
||||||
+ " but runtime reports " + currentRadio);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue