Fix date format of vendor patch level (#24)

This was a mistake during the refactoring of TrickyStoreOSS.
After correcting it, we can obtain STRONG integrity (instead of DEVICE) with a valid keybox.

The correct format can be easily found using the `Key Attestation` app.
This commit is contained in:
JingMatrix
2025-11-28 19:45:53 +01:00
committed by GitHub
parent 4f608247fe
commit 2ef89f15c6
2 changed files with 5 additions and 5 deletions
@@ -81,7 +81,7 @@ object AttestationBuilder {
DERTaggedObject(
true,
AttestationConstants.TAG_VENDOR_PATCHLEVEL,
ASN1Integer(AndroidDeviceUtils.vendorPatchLevel.toLong()),
ASN1Integer(AndroidDeviceUtils.vendorPatchLevelLong.toLong()),
)
)
vector.add(
@@ -165,7 +165,7 @@ object AttestationBuilder {
DERTaggedObject(
true,
AttestationConstants.TAG_VENDOR_PATCHLEVEL,
ASN1Integer(AndroidDeviceUtils.vendorPatchLevel.toLong()),
ASN1Integer(AndroidDeviceUtils.vendorPatchLevelLong.toLong()),
),
DERTaggedObject(
true,
@@ -110,10 +110,10 @@ object AndroidDeviceUtils {
getCustomPatchLevelFor("system", isLong = false)
?: Build.VERSION.SECURITY_PATCH.toPatchLevelInt(isLong = false)
val vendorPatchLevel: Int
val vendorPatchLevelLong: Int
get() =
getCustomPatchLevelFor("vendor", isLong = false)
?: Build.VERSION.SECURITY_PATCH.toPatchLevelInt(isLong = false)
getCustomPatchLevelFor("vendor", isLong = true)
?: Build.VERSION.SECURITY_PATCH.toPatchLevelInt(isLong = true)
val bootPatchLevelLong: Int
get() =