Skip to content

Commit c566dbe

Browse files
muhomorrthestinger
authored andcommitted
add maxSdk=34 to Play services variants that use the older certificate
1 parent 8aca6f6 commit c566dbe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

generate.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ def remove_old_pkg_variants(orig_dict):
112112
if (base_apk_signature not in pkg_signatures):
113113
raise Exception("unknown signature of " + base_apk_path + ", SHA-256: " + base_apk_signature)
114114

115+
# This is needed to prevent App Store from attempting to install minSdk 31 version of this package on SDK 35+
116+
# devices, which have a separate minSdk 35+ package variant
117+
if pkg_name == "com.google.android.gms" and base_apk_signature == "7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053":
118+
pkg_props["maxSdk"] = 34
119+
115120
badging = subprocess.check_output(["aapt2", "dump", "badging", base_apk_path])
116121

117122
lines = badging.split(b"\n")
@@ -219,7 +224,7 @@ def remove_old_pkg_variants(orig_dict):
219224
pkg_msg = "channel: " + pkg_props["channel"] + ", minSdk: " + str(pkg_props["minSdk"])
220225
maxSdk = pkg_props.get("maxSdk")
221226
if maxSdk != None:
222-
pkg_msg += ", maxSdk: " + maxSdk
227+
pkg_msg += ", maxSdk: " + str(maxSdk)
223228
if len(pkg_abis) != 0:
224229
pkg_msg += "\nabis: " + ", ".join(pkg_abis)
225230
staticDeps = pkg_props.get("staticDeps")

0 commit comments

Comments
 (0)