diff --git a/src/content/docs/distribute/play-store.mdx b/src/content/docs/distribute/play-store.mdx index bf08830607..aacba4cc2a 100644 --- a/src/content/docs/distribute/play-store.mdx +++ b/src/content/docs/distribute/play-store.mdx @@ -8,5 +8,55 @@ sidebar: --- import Stub from '@components/Stub.astro'; +import { Tabs, TabItem, Steps } from '@astrojs/starlight/components'; + +## Application installer formats + +Tauri generates two files when compiling for Android: APK and AAB. APK is a file that can be used to install the application on your phone, and AAB is a file that can be uploaded to the Play Store to generate optimized APKs for users based on their devices. + + +## Signing + +To upload an application, you need to sign your application. This is a security measure, in order to confirm that a new version of an application was uploaded by the author. + + +The default option uses Google to manage and store the key. This can be changed before updating a new version. The easiest way is on `internal testing`, create a new release, create a new track and click on `change signing key`. + + + + + This option is self managed, meaning you have to save the signing file, be careful not to loose it or make it accesible to others. + + 1. After clicking on `change signing key`, select the option `Export and upload a key from Java keystore`. + + 2. Download, from the links available in that option, the encryption public key and the PEPK tool. + + 2. Create a new keystore: + + ```bash ins={4} + keytool -genkey -v -keystore myKeyStore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias myAlias + ``` + + 3. Create the file that indicates Google what is your signature + + ```bash ins={4} + java -jar pepk.jar --keystore=myKeyStore.jks --alias=myAlias --output=output.zip \ + --include-cert --rsa-aes-encryption --encryption-key-path=./encryption_public_key.pem + ``` + + 4. Upload the generated file (`output.zip`) to Google on the link that says `Upload generated ZIP` + + 5. Sign the AAB file: + + ```bash + jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore myKeyStore.jks \ + ./src-tauri/gen/android/app/build/outputs/bundle/universalRelease/app-universal-release.aab myAlias + ``` + + The AAB file generated by Tauri is now signed, you can upload it to the Google Play Console as an App Bundle. + + + +