Skip to content

Commit

Permalink
add maxSdk=34 to Play services variants that use the older certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
muhomorr authored and thestinger committed Nov 14, 2024
1 parent 8aca6f6 commit c566dbe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ def remove_old_pkg_variants(orig_dict):
if (base_apk_signature not in pkg_signatures):
raise Exception("unknown signature of " + base_apk_path + ", SHA-256: " + base_apk_signature)

# This is needed to prevent App Store from attempting to install minSdk 31 version of this package on SDK 35+
# devices, which have a separate minSdk 35+ package variant
if pkg_name == "com.google.android.gms" and base_apk_signature == "7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053":
pkg_props["maxSdk"] = 34

badging = subprocess.check_output(["aapt2", "dump", "badging", base_apk_path])

lines = badging.split(b"\n")
Expand Down Expand Up @@ -219,7 +224,7 @@ def remove_old_pkg_variants(orig_dict):
pkg_msg = "channel: " + pkg_props["channel"] + ", minSdk: " + str(pkg_props["minSdk"])
maxSdk = pkg_props.get("maxSdk")
if maxSdk != None:
pkg_msg += ", maxSdk: " + maxSdk
pkg_msg += ", maxSdk: " + str(maxSdk)
if len(pkg_abis) != 0:
pkg_msg += "\nabis: " + ", ".join(pkg_abis)
staticDeps = pkg_props.get("staticDeps")
Expand Down

0 comments on commit c566dbe

Please sign in to comment.