Room > VR > Android Test Key… (⇧⌘F8) sets the key that Build & Run on Headset (⇧F8) and Run on Device (F6) sign Android test builds with. Free with an account: Run on Device uses it too.
Android only updates a game with the key it was first signed with. If the game on your headset came from the project's own build script or from GameMaker, signed with the project's key, a build signed with Android's debug key can't install over it: adb answers INSTALL_FAILED_UPDATE_INCOMPATIBLE ("signatures do not match"). With the project's key set, Studio's builds install over that copy, and the game's saves on the headset stay.
- The first time. When the project has a
keystorefolder with exactly one.keystoreor.jksfile, the first Android device build asks: Sign with this project's key? Type the key file's password once and press Use This Key, or press Use Android's Test Key to keep Android's debug key (Studio doesn't ask again; ⇧⌘F8 changes it later). - Key name is the key's alias in the file. Left empty, the file's only key is used. Studio checks the password with the JDK's
keytoolbefore keeping it. - Key password is needed only when the key's own password differs from the file's.
- Where it's kept. The key file and its name are remembered for this project in Studio's settings. The passwords are kept in your Keychain, never in the project, never on a command line and never in Output (Output shows
•••). - The build is made the way GameMaker makes a signed Android build (Gradle's release build), signed with the key through Gradle's signing settings. Exports are unchanged: Android APK and App Bundle (test) use Android's debug key, and App Bundle for Google Play asks for your upload key each time.
- When the keys don't match, Output and one box say "The game on Quest 2 was signed with a different key". Choose This Project's Key… opens this setting and builds again with the key; Cancel leaves everything as it is. Studio never offers to uninstall the game.
Related topics
Keys are shown as on the Mac: ⌘ Command, ⌥ Option, ⌃ Control, ⇧ Shift. Studio for Windows shows its own keys beside each menu item.