Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, July 10, 2019 6:53 AM
Visual Studio 2019 is able to sign the APK file of your Xamarin Android project, through the "Archive", "Distribute ...", "Ad Hoc" menu options. I checked the signature of the .apk file i got , using the "apksigner.bat" file, that is part of the Android SDK ("C:\Users\username\AppData\Local\Android\Sdk\build-tools\29.0.0") with the following command:
apksigner.bat verify --verbose --print-certs C:\App\temp\com.companyname.App1.apk
Verifies Verified using v1 scheme (JAR signing): true Verified using v2 scheme (APK Signature Scheme v2): false Number of signers: 1 ...
As you can see VS2019 used APK signature scheme v1. Is there a way to set an option in VS2019, in order to get the signature scheme v2 or v3? I'm asking this because I can't find the option and I had to sign the apk file manually, in order to get the v2 signature.
https://stackoverflow.com/questions/4853011/how-to-sign-an-android-apk-file/40064199#40064199
Some internal play store don't like the APK signature scheme v1. Error --> "APK signed with older signature algorithms (such as MD5) have been disabled in the JRE, and are no longer able to be added to BlackBerry UEM".
Thanks.
All replies (3)
Wednesday, July 10, 2019 12:54 PM
I viewed the offical tutorial, but didn't find infomation about changing the APK signature scheme in VS. SHA1 signature of the default Xamarin.Android debug.keystore file, you can custom .keystore file. See the tutorial:https://docs.microsoft.com/en-us/xamarin/android/deploy-test/signing/keystore-signature?tabs=windows
And you can ask help from Developer Community, you may get the answer. https://developercommunity.visualstudio.com/spaces/8/index.html
Thursday, July 11, 2019 7:48 AM
May be here there is some information: https://docs.microsoft.com/en-us/xamarin/android/deploy-test/building-apps/build-process
AndroidUseApkSigner AndroidApkSignerAdditionalArguments
But I don't now where exactly put them in the .csproj file. I tried the following in the 3 PropertyGroup I have inside the project file, but it did not work.
< AndroidUseApkSigner >True< /AndroidUseApkSigner > < AndroidApkSignerAdditionalArguments >--v2-signing-enabled true< /AndroidApkSignerAdditionalArguments >
Tuesday, July 16, 2019 6:40 AM
It turned out to be a BUG of the IDE.