AAB-files get signed, but not APK-files
See original GitHub issueDescription
When I publish a specific project to Android I get two AAB-files, one unsigned and one signed, and an APK-file that should be signed but isn’t. I verify this with the keytool command. If I do the same on a new MAUI application the APK will be signed.
I suspect this is a bug. I get same result both in .NET 6 and .NET 7.
Steps to Reproduce
Run this to get code and publish:
git clone https://github.com/pekspro/RadioStorm.git
cd .\RadioStorm\Source\Pekspro.RadioStorm.MAUI\
keytool -genkey -v -keystore signtest.keystore -alias signtest -keyalg RSA -keysize 2048 -validity 10000
(Enter stuff, use password 1234568)
dotnet publish Pekspro.RadioStorm.MAUI.csproj --framework:net6.0-android --configuration:Release /p:AndroidSigningKeyStore=./signtest.keystore /p:AndroidKeyStore=True /p:AndroidSigningKeyAlias=signtest /p:PublishTrimmed=False /p:AndroidSigningKeyPass=12345678 /p:AndroidSigningStorePass=12345678 /p:RunAOTCompilation=False --verbosity normal
Run this to verify output:
keytool -printcert -jarfile .\bin\Release\net6.0-android\com.pekspro.radiostorm-Signed.aab
This outputs the signature.
keytool -printcert -jarfile .\bin\Release\net6.0-android\com.pekspro.radiostorm-Signed.apk
This says: “Not a signed jar-file”
Link to public reproduction project repository
https://github.com/pekspro/RadioStorm
Version with bug
7.0 Release Candidate 2
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Windows 10.0.17763.0, Android 11
Did you find any workaround?
No response
Relevant log output
It’s a lot of logs 😃 This is the best I found:
_Sign:
C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin\jarsigner.exe -keystore ./signtest.keystore -storepass 12
345678 -keypass 12345678 -digestalg SHA-256 -sigalg SHA256withRSA -signedjar bin\Release\net6.0-android\com.pe
kspro.radiostorm-Signed.aab obj\Release\net6.0-android\android\bin\com.pekspro.radiostorm.aab signtest
jar signed.
The signer's certificate is self-signed.
Signed android package ''
_CreateUniversalApkFromBundle:
Deleting file "obj\Release\net6.0-android\android\bin\com.pekspro.radiostorm-Universal.apks".
C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin\java.exe -Xmx1G -jar "C:\Program Files\dotnet\packs\Micro
soft.Android.Sdk.Windows\32.0.476\tools\bundletool.jar" build-apks --mode universal --bundle obj\Release\net6.
0-android\android\bin\com.pekspro.radiostorm.aab --output obj\Release\net6.0-android\android\bin\com.pekspro.r
adiostorm-Universal.apks --aapt2 "C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.476\tools\a
apt2.exe" --ks ./signtest.keystore --ks-key-alias signtest --key-pass pass:12345678 --ks-pass pass:12345678
PrepareForPublish:
Creating directory "bin\Release\net6.0-android\publish\".
Issue Analytics
- State:
- Created a year ago
- Comments:20 (11 by maintainers)
Top Results From Across the Web
How can I dump the signature of an Android App Bundle?
I'm switching my CI process from producing APK files to App Bundles. One stage in my pipeline will, after producing the signed binary,...
Read more >Question - Android App Bundle is not signed. Problem
I created AAB files through the "Build App Bundle (Google Play)" feature in "Unity Build Setting". However, uploading this "AAB" file to the...
Read more >How to test .aab file on Android device
Step by Step tutorial to create AAB files and test them on Android Device. ... AAB files can be locally converted into APK...
Read more >Aab and Apk files
AAB files are used to publish app to Google Play (recommended). APK files are used to publish app to Google Play (not recommended)...
Read more >The Play Store now doesn't allow to upload .APK files only . ...
AAB format using custom builds. The problem is that my .aab file is around 600mb and Google only allows 150mb .aab files. I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If you have a repro that is command-line, can you file an issue here:
https://github.com/google/bundletool/issues
If you can give them an
.aabfile and an example command showing it’s broken, maybe Google will fix it? If they can see the issue without building a C#/.NET app, they might know what is going on.@pekspro when you reproduce the issue with
dotnet build, can you add-blto your command? This will put anmsbuild.binlogin the current directory. Can you share it here?