Skip to content

Commit 5a7b87d

Browse files
committed
drop support for devices without Android 13
1 parent acb280b commit 5a7b87d

File tree

2 files changed

+2
-61
lines changed

2 files changed

+2
-61
lines changed

app/src/main/java/app/attestation/auditor/AttestationProtocol.java

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -300,24 +300,9 @@ boolean hasPogoPins() {
300300
"Pixel 6 Pro",
301301
"Pixel 6a").contains(Build.MODEL);
302302

303-
private static final ImmutableSet<Integer> extraPatchLevelMissing = ImmutableSet.of(
304-
R.string.device_sm_g970f,
305-
R.string.device_sm_g975f,
306-
R.string.device_sm_n970f,
307-
R.string.device_sm_n970u,
308-
R.string.device_sm_n975u);
309-
310303
private static final ImmutableMap<String, DeviceInfo> fingerprintsCustomOS = ImmutableMap
311304
.<String, DeviceInfo>builder()
312305
// GrapheneOS
313-
.put("0F9A9CC8ADE73064A54A35C5509E77994E3AA37B6FB889DD53AF82C3C570C5CF",
314-
new DeviceInfo(R.string.device_pixel_3, 3, 4, false, true, R.string.os_graphene))
315-
.put("06DD526EE9B1CB92AA19D9835B68B4FF1A48A3AD31D813F27C9A7D6C271E9451",
316-
new DeviceInfo(R.string.device_pixel_3_xl, 3, 4, false, true, R.string.os_graphene))
317-
.put("8FF8B9B4F831114963669E04EA4F849F33F3744686A0B33B833682746645ABC8",
318-
new DeviceInfo(R.string.device_pixel_3a, 3, 4, false, true, R.string.os_graphene))
319-
.put("91943FAA75DCB6392AE87DA18CA57D072BFFB80BC30F8FAFC7FFE13D76C5736E",
320-
new DeviceInfo(R.string.device_pixel_3a_xl, 3, 4, false, true, R.string.os_graphene))
321306
.put("80EF268700EE42686F779A47B4A155FE1FFC2EEDF836B4803CAAB8FA61439746",
322307
new DeviceInfo(R.string.device_pixel_4, 3, 4, false, true, R.string.os_graphene))
323308
.put("3F15FDCB82847FED97427CE00563B8F9FF34627070DE5FDB17ACA7849AB98CC8",
@@ -365,12 +350,6 @@ boolean hasPogoPins() {
365350
.build();
366351
private static final ImmutableMap<String, DeviceInfo> fingerprintsStock = ImmutableMap
367352
.<String, DeviceInfo>builder()
368-
.put("4B9201B11685BE6710E2B2BA8482F444E237E0C8A3D1F7F447FE29C37CECC559",
369-
new DeviceInfo(R.string.device_oneplus_7_pro_gm1913, 3, 4, false, false, R.string.os_stock))
370-
.put("61FDA12B32ED84214A9CF13D1AFFB7AA80BD8A268A861ED4BB7A15170F1AB00C",
371-
new DeviceInfo(R.string.device_pixel_3_generic, 3, 4, false, true, R.string.os_stock))
372-
.put("E75B86C52C7496255A95FB1E2B1C044BFA9D5FE34DD1E4EEBD752EEF0EA89875",
373-
new DeviceInfo(R.string.device_pixel_3a_generic, 3, 4, false, true, R.string.os_stock))
374353
.put("AE6316B4753C61F5855B95B9B98484AF784F2E83648D0FCC8107FCA752CAEA34",
375354
new DeviceInfo(R.string.device_pixel_4_generic, 3, 4, false, true, R.string.os_stock))
376355
.put("879CD3F18EA76E244D4D4AC3BCB9C337C13B4667190B19035AFE2536550050F1",
@@ -411,29 +390,11 @@ boolean hasPogoPins() {
411390
new DeviceInfo(R.string.device_pixel_9_pro_fold, 300, 300, false, true, R.string.os_stock))
412391
.put("3327AF62D84AB897AF2523A16DCB5801E60C5D5B97F41CA1BD099C4784F7B743",
413392
new DeviceInfo(R.string.device_pixel_9a, 300, 300, false, true, R.string.os_stock))
414-
.put("9D77474FA4FEA6F0B28636222FBCEE2BB1E6FF9856C736C85B8EA6E3467F2BBA",
415-
new DeviceInfo(R.string.device_sm_g970f, 3, 4, false, false, R.string.os_stock))
416-
.put("08B2B5C6EC8F54C00C505756E1EF516BB4537B2F02D640410D287A43FCF92E3F",
417-
new DeviceInfo(R.string.device_sm_g975f, 3, 4, false, false, R.string.os_stock))
418-
.put("E94BC43B97F98CD10C22CD9D8469DBE621116ECFA624FE291A1D53CF3CD685D1",
419-
new DeviceInfo(R.string.device_sm_n970f, 3, 4, false, false, R.string.os_stock))
420-
.put("466011C44BBF883DB38CF96617ED35C796CE2552C5357F9230258329E943DB70",
421-
new DeviceInfo(R.string.device_sm_n970u, 3, 4, false, true, R.string.os_stock))
422-
.put("52946676088007755EB586B3E3F3E8D3821BE5DF73513E6C13640507976420E6",
423-
new DeviceInfo(R.string.device_sm_n975u, 3, 4, false, true, R.string.os_stock))
424393
.build();
425394

426395
private static final ImmutableMap<String, DeviceInfo> fingerprintsStrongBoxCustomOS = ImmutableMap
427396
.<String, DeviceInfo>builder()
428397
// GrapheneOS
429-
.put("0F9A9CC8ADE73064A54A35C5509E77994E3AA37B6FB889DD53AF82C3C570C5CF",
430-
new DeviceInfo(R.string.device_pixel_3, 3, 4, false, true, R.string.os_graphene))
431-
.put("06DD526EE9B1CB92AA19D9835B68B4FF1A48A3AD31D813F27C9A7D6C271E9451",
432-
new DeviceInfo(R.string.device_pixel_3_xl, 3, 4, false, true, R.string.os_graphene))
433-
.put("73D6C63A07610404FE16A4E07DD24E41A70D331E9D3EF7BBA2D087E4761EB63A",
434-
new DeviceInfo(R.string.device_pixel_3a, 3, 4, false, true, R.string.os_graphene))
435-
.put("3F36E3482E1FF82986576552CB4FD08AF09F8B09D3832314341E04C42D2919A4",
436-
new DeviceInfo(R.string.device_pixel_3a_xl, 3, 4, false, true, R.string.os_graphene))
437398
.put("80EF268700EE42686F779A47B4A155FE1FFC2EEDF836B4803CAAB8FA61439746",
438399
new DeviceInfo(R.string.device_pixel_4, 3, 4, false, true, R.string.os_graphene))
439400
.put("3F15FDCB82847FED97427CE00563B8F9FF34627070DE5FDB17ACA7849AB98CC8",
@@ -481,10 +442,6 @@ boolean hasPogoPins() {
481442
.build();
482443
private static final ImmutableMap<String, DeviceInfo> fingerprintsStrongBoxStock = ImmutableMap
483444
.<String, DeviceInfo>builder()
484-
.put("61FDA12B32ED84214A9CF13D1AFFB7AA80BD8A268A861ED4BB7A15170F1AB00C",
485-
new DeviceInfo(R.string.device_pixel_3_generic, 3, 4, false, true, R.string.os_stock))
486-
.put("8CA89AF1A6DAA74B00810849356DE929CFC4498EF36AF964757BDE8A113BF46D",
487-
new DeviceInfo(R.string.device_pixel_3a_generic, 3, 4, false, true, R.string.os_stock))
488445
.put("AE6316B4753C61F5855B95B9B98484AF784F2E83648D0FCC8107FCA752CAEA34",
489446
new DeviceInfo(R.string.device_pixel_4_generic, 3, 4, false, true, R.string.os_stock))
490447
.put("879CD3F18EA76E244D4D4AC3BCB9C337C13B4667190B19035AFE2536550050F1",
@@ -525,10 +482,6 @@ boolean hasPogoPins() {
525482
new DeviceInfo(R.string.device_pixel_9_pro_fold, 300, 300, false, true, R.string.os_stock))
526483
.put("3327AF62D84AB897AF2523A16DCB5801E60C5D5B97F41CA1BD099C4784F7B743",
527484
new DeviceInfo(R.string.device_pixel_9a, 300, 300, false, true, R.string.os_stock))
528-
.put("3D3DEB132A89551D0A700D230BABAE4E3E80E3C7926ACDD7BAEDF9B57AD316D0",
529-
new DeviceInfo(R.string.device_sm_n970u, 3, 4, false, true, R.string.os_stock))
530-
.put("9AC63842137D92C119A1B1BE2C9270B9EBB6083BBE6350B7823571942B5869F0",
531-
new DeviceInfo(R.string.device_sm_n975u, 3, 4, false, true, R.string.os_stock))
532485
.build();
533486

534487
private static byte[] getChallengeIndex(final Context context) {
@@ -712,11 +665,11 @@ private static Verified verifyStateless(final Certificate[] certificates,
712665
throw new GeneralSecurityException("OS patch level too old: " + osPatchLevel);
713666
}
714667
final int vendorPatchLevel = teeEnforced.vendorPatchLevel.orElse(0);
715-
if (vendorPatchLevel < VENDOR_PATCH_LEVEL_MINIMUM && !extraPatchLevelMissing.contains(device.name)) {
668+
if (vendorPatchLevel < VENDOR_PATCH_LEVEL_MINIMUM) {
716669
throw new GeneralSecurityException("Vendor patch level too old: " + vendorPatchLevel);
717670
}
718671
final int bootPatchLevel = teeEnforced.bootPatchLevel.orElse(0);
719-
if (bootPatchLevel < BOOT_PATCH_LEVEL_MINIMUM && !extraPatchLevelMissing.contains(device.name)) {
672+
if (bootPatchLevel < BOOT_PATCH_LEVEL_MINIMUM) {
720673
throw new GeneralSecurityException("Boot patch level too old: " + bootPatchLevel);
721674
}
722675

app/src/main/res/values/strings.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,6 @@
116116
<string name="no">no</string>
117117
<string name="yes">yes</string>
118118

119-
<string name="device_pixel_3_generic">Google Pixel 3 / Pixel 3 XL</string>
120-
<string name="device_pixel_3">Google Pixel 3</string>
121-
<string name="device_pixel_3_xl">Google Pixel 3 XL</string>
122-
<string name="device_pixel_3a_generic">Google Pixel 3a / Pixel 3a XL</string>
123-
<string name="device_pixel_3a">Google Pixel 3a</string>
124-
<string name="device_pixel_3a_xl">Google Pixel 3a XL</string>
125119
<string name="device_pixel_4_generic">Google Pixel 4 / Pixel 4 XL</string>
126120
<string name="device_pixel_4">Google Pixel 4</string>
127121
<string name="device_pixel_4_xl">Google Pixel 4 XL</string>
@@ -146,12 +140,6 @@
146140
<string name="device_pixel_9_pro_xl">Google Pixel 9 Pro XL</string>
147141
<string name="device_pixel_9_pro_fold">Google Pixel 9 Pro Fold</string>
148142
<string name="device_pixel_9a">Google Pixel 9a</string>
149-
<string name="device_sm_g970f">Samsung Galaxy S10e (SM-G970F)</string>
150-
<string name="device_sm_g975f">Samsung Galaxy S10+ (SM-G975F)</string>
151-
<string name="device_sm_n970f">Samsung Galaxy Note 10 (SM-N970F)</string>
152-
<string name="device_sm_n970u">Samsung Galaxy Note 10 (SM-N970U)</string>
153-
<string name="device_sm_n975u">Samsung Galaxy Note 10+ (SM-N975U)</string>
154-
<string name="device_oneplus_7_pro_gm1913">OnePlus 7 Pro GM1913</string>
155143

156144
<string name="os_stock">Stock</string>
157145
<string name="os_graphene">GrapheneOS</string>

0 commit comments

Comments
 (0)