Only use APK Signing v3 instead of v2 #164
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There are three current APK signature versions on Android:
If you build an APK with a recent AGP you should get the following:
Since Phocid supports only Android 11+, this implies nothing under Android 9 is supported, which makes it a candidate to disabling v2 signing and having only v3 enabled.
This can be done like this on the build.gradle:
Is there actually any benefit in doing so besides the ability to rotate keys? Since Android is an unpredictable mess as far as I know it, I'm not very into testing what bugs this will bring in the wild if all it does is making the version number pretty.
Hey, thanks for looking into it. APK signing v3 (along with uncompressed DEX) were some of the reasons I dropped pre-Android 9 support from my apps, they might not be changes that relevant but I think it's worth taking a look.
Ok, so I did search a bit and found this presentation by a Google expert: https://speakerdeck.com/akexorcist/why-app-signing-matters-for-your-android-apps-android-bangkok-conference-2024
So, basically, v1 is very insecure and basically any v2+ version is good enough, but v3 seems to be mostly useful for Google Play App Signing.
Since you don't actually publish to the Play Store right now nor has any interest in doing so in the future, there might be no benefits for you particularly.
In any case, while I did suggest disabling v2 signing and only enabling v3, it should be possible to have both v2 and v3 at the same time. But again I can't say you will have any big benefits.