AndreaM 2 Posted July 8, 2022 I'm using Alexandria (RAD Studio 11.1) but when I try to configure my Android 64 bit project in the Options > Building > Delphi Compiler > Compiling options. After select "All configurations - Android 64-bit platform" as the active target, I don't found in the "Other options" the "Generate Android App Bundle file (arm + arm64)". In the online manual at this link: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Submitting_Your_Android_App_to_Google_Play there is also an image showing this option, but in my delphi it is not present! This option instead is present in 10.4.1. Without this option it is not possible to have an .aab file to upload to the Google Play Console. Can someone help me? 1 Share this post Link to post
Rollo62 536 Posted July 8, 2022 Its available under All Android 64 Bit, and should be under Release Android 64 Bit as well Did you switch in both Android 32 and 64 to the Application Store ? Did you provide in the Project options provisioning the requred data and verified it ? 1 Share this post Link to post
AndreaM 2 Posted July 13, 2022 (edited) Thanks for the reply. I followed all the directions you posted to me. See my settings ... If I set this I have a .APK file!!! Not a .AAB file! If I set this: I have a .AAB file. In the Google Play Console with the .APK file ..\Android64\Base\MyProjectName\bin\ I have this error: with this error: You uploaded an APK signed with a different certificate than previous APKs. You must use the same certificate. Your current APKs are signed with certificates with the fingerprint: SHA1: .... while the certificates used to sign the loaded APK have the fingerprint: SHA1: .... In the Google Play Console with the .AAB file from dir ..\Android64\Release\MyProjectName\bin\ I have this error: Thanks again for your help Edited July 13, 2022 by AndreaM Share this post Link to post
Rollo62 536 Posted July 15, 2022 (edited) How do you generate yout APK file ? For release it should not only compiled as usual, but deployed: First in Release "Build" or "Build all" Then "Deploy" to create and bundle the AAB Is this the way how you are doing it ? Edited July 15, 2022 by Rollo62 Share this post Link to post
AndreaM 2 Posted July 18, 2022 (edited) Hi. It is the same operation. It can be done both ways. For the deployment, however, this is the main screen: To have this with all files: (I cut the image). But I think the problem is in the Google Play Console web page in "App Integrity" -> "App signing". See this image. I don't now how to encrypt my private key. Edited July 18, 2022 by AndreaM Share this post Link to post
Rollo62 536 Posted July 20, 2022 Not sure what went wrong, it looks a bit as if you not have activated the necessary AAB Signature and keystore yet in the PlayStore. I have made an older, probably outdated, description here, and there were also interesting links in the German DP howto generate that keys. More or less the process should be still the same, but Google might have changed the fineprints during the last years, I haven't checked that recently. Share this post Link to post
AndreaM 2 Posted July 21, 2022 Hi. Thanks for the last post. It helped me find the solution! I have put the procedure below, which is quite long. [Sorry for my english] I solved it this way. You have to go to the Google Play Console site and when you make a new release or edit a release ("Production" -> "Edit release") in the screen with title "App Integrity" below you will see "Releases not signed by Google Play". Then a special procedure must be carried out in order to register an "Android App Bundle". Under the wording "Releases not signed by Google Play" press "Opt in" (or go with the menu on the left in "Setup" -> "App Integrity"). Here the screen has the title "App integrity" and you have to go to "App signing" and make a choice between the 2 + 2 others (in the advanced part below). For Delphi it is better to select "Use existing app signing key from Java KeyStore". Here you have to follow the three instructions on the screen. 1) Download the pepk.jar file and put it in a specific dir. 2) Then you must have a latest version of JAVA and use the DOS prompt with this command: java -jar PATH_TO_PEPK --keystore=PATH_TO_KEYSTORE --alias=ALIAS_YOU_USE_TO_SIGN_APK --output=PATH_TO_OUTPUT_FILE --encryptionkey=GOOGLE_ENCRYPTION_KEY See also here: https://stackoverflow.com/questions/52269806/error-running-pepk-app-signing-tool-at-command-line-java-jar-pepk-jar With legend: PATH_TO_PEPK = Path to the pepk.jar you downloaded, could be something like C:\Users\YourName\Downloads\pepk.jar for Windows users. PATH_TO_KEYSTORE = Path to keystore which you use to sign your release APK. Could be a file of type *.keystore or *.jks or without extension. Something like C:\Android\mykeystore or C:\Android\mykeystore.keystore. ALIAS_YOU_USE_TO_SIGN_APK = The name of the alias you use to sign the release APK. PATH_TO_OUTPUT_FILE = The path of the output file with .pem extension, something like C:\Android\private_key.pem GOOGLE_ENCRYPTION_KEY = This encryption key should be always the same. You can find it in the App Signing page, copy and paste it. Should be in this form: eb10fe8f7c7c9ddn2o1idj203jd0232f715022017b00c6471f8ba8170b13049a11e6c09ffe3056a104a3bbe4ac5a955f4ba4fe93fc8ce For Delphi PATH_TO_KEYSTORE: Project - Options - Deployment - Provisioning - Target="Release configuration - Android 64-bit platform" - Build type="Android 64-bit - Application Store" - "Keystore File". ALIAS_YOU_USE_TO_SIGN_APK: Project - Options - Deployment - Provisioning - Target="Release configuration - Android 64-bit platform" - Build type=" Android 64-bit - Application Store" - "Alias in Keystore". GOOGLE_ENCRYPTION_KEY: the specific one for our app that is in the screen. When it launches it asks: The keystore password: see in Delphi Project - Options - Deployment - Provisioning - Target="Release configuration - Android 64-bit platform" - Build type="Android 64-bit - Application Store" - "Keystore Password". The alias password: see in Delphi Project - Options - Deployment - Provisioning - Target="Release configuration - Android 64-bit platform" - Build type="Android 64-bit - Application Store" - "Alias password". Example: java -jar "C:\Pepk\pepk.jar" --keystore="C:\Project_RAD\Myapp\Android_KeyStore\my.keystore" --alias="myalias" --output="C:\APP_PEM\file.pem" --encryptionkey=eb10f01201djqidji2d3o2ba4fe93fc8cef27558a3eb9d2a529a2092761fb833b656cd48b9de6a The file obtained in output is a .PEM file which is the "Private key". 3) Take the .PEM file and upload it to the "App integrity" page. A check will be carried out and if everything is ok then on the page "Create production release" ("Production" - "Edit release") under "App integrity" the message will appear: "Releases signed by Google Play" with green check. At this point it will be possible to upload an .aab file. 1 Share this post Link to post
Dave Nottage 557 Posted July 21, 2022 31 minutes ago, AndreaM said: I have put the procedure below, which is quite long. Quite odd - I haven't had to to that (I submitted a release just over 2 weeks ago), and haven't heard of anyone else that has needed to, either. Share this post Link to post
Rollo62 536 Posted July 21, 2022 (edited) 7 hours ago, Dave Nottage said: Quite odd - I haven't had to to that (I submitted a release just over 2 weeks ago), and haven't heard of anyone else that has needed to, either. Strange, I was forced to do that in order to update AAB, no way to opt-out. And it makes a kindof sense if Google re-bundles your app, to deliver optimized packages to certain phones, depending on the And32/64 bit size. They would need the keystore to re-sign the app, I think is whats happening behind the scenes. Maybe you had an existing app, which was started at APK, I had seen a note from Dalija that its still possible to upload APK (maybe only for And-32). So far I understood that after the deadline also old and new updates to existing apps needed AAB Bundle, which had to be activated first time. There were several ways to do that, I used the way by uploading Keystore, since this is offere by RX11 IDE too. The ever-changing UI looke like this, 2-3 years ago: Saying ... If you want to use AAB ... you have to have Google to manage your signature keystore. 1. Upload an keystore exported from Android Studio 2. Export and upload a key from a Java-Keystore 3. Export and upload a key(NOT from a Java-Keystore) 2. Was the option I used, simple with my existing keystore. Maybe different options arise when using option 1.) or 3.), this is how it looked like Edited July 21, 2022 by Rollo62 Share this post Link to post
Dave Nottage 557 Posted July 21, 2022 2 hours ago, Rollo62 said: Maybe you had an existing app, which was started at APK It was a totally new app. I uploaded an .aab file generated from the IDE in App Store configuration. The keystore file was also generated in the IDE on the Provisioning Page. I did not have to do the things you described - I guess the IDE manages that? Share this post Link to post
Rollo62 536 Posted July 22, 2022 (edited) Ok, I also had created a new app recently, but this was rejected and I had to upload the App Signature process similar as above before, to get the keystore into the AppStore. If that is the case, maybe the difference is that I used the same keystore for several apps, which looks maybe suspicious to Google. I intended to use the same keystore per one company, to avoid keystore / password / alias hell 🙂 Maybe its a better idea to generate a new one for each app, next time I will try to create a brand new keystore to see if that makes a difference. Edited July 22, 2022 by Rollo62 1 Share this post Link to post
AndreaM 2 Posted July 26, 2022 I confirm that the app on which I had to carry out the procedure described above already existed and that it was distributed with .APK files with RAD Studio 10.2, 10.3 and finally 10.4. Share this post Link to post