|
| 1 | +(reinstall-aaps)= |
| 2 | +# Reinstalling AAPS with a new keystore |
| 3 | + |
| 4 | +Every **AAPS** apk is signed with a **keystore**. An update only installs over your current **AAPS** if it is signed with the **same keystore**: all your settings and data are then kept. That's why it is recommended to store the keystore and its password in a safe place. |
| 5 | + |
| 6 | +If you try to install an apk signed with a different keystore than before, you will get an error message explaining that the installation failed! |
| 7 | + |
| 8 | +(reinstall-aaps-when)= |
| 9 | +## When do you need to reinstall? |
| 10 | + |
| 11 | +You need to uninstall and reinstall **AAPS** when your new apk is signed with a different keystore, for example: |
| 12 | + |
| 13 | +- You cannot find your old keystore or its password. |
| 14 | +- You created a new keystore, for example with [Option 1 of the browser build](../SettingUpAaps/BrowserBuildKeystore.md) or **Create a new key** in [AAPS Builder](../SettingUpAaps/BrowserBuildAapsBuilder.md). |
| 15 | +- You build on a new computer and did not copy your keystore to it. |
| 16 | + |
| 17 | +If you still have your keystore, you don't need this page: reuse it and [update **AAPS**](../Maintenance/UpdateToNewVersion.md) in place. |
| 18 | + |
| 19 | +(reinstall-aaps-before)= |
| 20 | +## Before you start |
| 21 | + |
| 22 | +- Uninstalling **AAPS** deletes all its settings, your objectives and the current pump connection. You get them back by importing your **settings file**, so make sure you have a recent one. |
| 23 | +- The settings file does not contain your treatment and glucose history. If you upload to Nightscout, your past data is still available there. |
| 24 | +- **Omnipod and Medtrum users:** read [Tubeless pumps](#ExportImportSettings-tubeless-pumps) first. Your settings file must have been exported during the pod or patch you are wearing now. |
| 25 | +- If needed, [set up your CGM/BG source receiver](../Getting-Started/CompatiblesCgms.md) before you start. |
| 26 | + |
| 27 | +(reinstall-aaps-steps)= |
| 28 | +## Steps |
| 29 | + |
| 30 | +1. [Export settings](#ExportImportSettings-Automating-Settings-Export) on your phone. |
| 31 | +2. Copy or upload the settings file from your phone to an external location (i.e. your computer, cloud storage service...). |
| 32 | +3. [Build](../SettingUpAaps/BuildingAaps.md) a new signed apk with your new keystore and transfer it to your phone. |
| 33 | +4. Uninstall previous **AAPS** version on your phone. |
| 34 | +5. Install new **AAPS** version on your phone. |
| 35 | +6. [Import settings](#ExportImportSettings-restoring-from-your-backups-on-a-new-phone-or-fresh-installation-of-aaps) to restore your objectives and configuration. |
| 36 | + |
| 37 | + If you can't find these on your phone, copy them from the external storage to your phone. |
| 38 | + |
| 39 | +7. Check your battery optimization options and disable them again. |
| 40 | +8. Keep on looping. |
| 41 | + |
| 42 | +(reinstall-aaps-afterwards)= |
| 43 | +## Afterwards |
| 44 | + |
| 45 | +Always keep using your new keystore from now on, and store it with its password somewhere safe, off your phone. See [Creating back-ups](../Maintenance/ExportImportSettings.md). |
0 commit comments