Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions src/content/docs/distribute/play-store.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,55 @@ sidebar:
---

import Stub from '@components/Stub.astro';
import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';

<Stub />

## 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`.

<Tabs>
<TabItem label="Java key store">

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.

</TabItem>
</Tabs>