Skip to content

Commit ad994cf

Browse files
committed
Reinstall new section
1 parent 46adb9b commit ad994cf

9 files changed

Lines changed: 55 additions & 31 deletions

File tree

‎docs/EN/GettingHelp/GeneralTroubleshooting.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If none of the links solve your problem, see [Where can I get help](WhereCanIGet
2626
* [AAPS Builder](#aaps-builder-troubleshooting)
2727
* [Browser build](#aaps-ci-troubleshooting)
2828
* [Android Studio](TroubleshootingAndroidStudio.md)
29-
* [Lost keystore](#troubleshooting_androidstudio-lost-keystore)
29+
* Lost keystore, or new keystore: [Reinstalling AAPS](#reinstall-aaps)
3030
* Updating **AAPS**: [with a browser build](#update-browser-build-troubleshooting), [with Android Studio](#update-computer-build-troubleshooting)
3131

3232
### Installing
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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).

‎docs/EN/GettingHelp/TroubleshootingAndroidStudio.md‎

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,7 @@
99

1010
(troubleshooting_androidstudio-lost-keystore)=
1111
## Lost keystore
12-
If you use the same keystore when updating **AAPS** you do not have to uninstall the previous version on your smartphone. That's why it is recommended to store the keystore in a safe place.
13-
14-
If you try to install the apk, signed with a different keystore than before, you will get an error message explaining that the installation failed!
15-
16-
In the event that you cannot trace your old keystore or password, proceed as follows:
17-
18-
1. [Export settings](../Maintenance/ExportImportSettings.md) on your phone.
19-
2. Copy or upload the settings file from your phone to an external location (i.e. your computer, cloud storage service...).
20-
4. Generate a new version of the signed apk as described on the [Update guide](../Maintenance/UpdateToNewVersion) and transfer it to your phone.
21-
5. Uninstall previous **AAPS** version on your phone.
22-
6. Install new **AAPS** version on your phone.
23-
7. [Import settings](#ExportImportSettings-restoring-from-your-backups-on-a-new-phone-or-fresh-installation-of-aaps) to restore your objectives and configuration.
24-
25-
If you can't find these on your phone, copy them from the external storage to your phone.
26-
27-
8. Check your battery optimization options and disable them again.
28-
9. Keep on looping.
12+
If you lost your keystore or its password, an apk signed with a new keystore cannot update your current **AAPS**: you have to uninstall and reinstall it. See [Reinstalling AAPS with a new keystore](#reinstall-aaps).
2913

3014
## Gradle Sync failed
3115
Gradle Sync can fail for various reasons. When you receive a message saying that 'gradle sync failed', open the "Build" tab (1) at the bottom of Android Studio and check what error message (2) is displayed.
@@ -261,6 +245,7 @@ Your apk was built successfully and can be transferred to your phone!
261245
![phone app note installed](../images/Update_AppNotInstalled.png)
262246
263247
* Make sure you have transferred the “app-full-release.apk” file to your phone.
248+
* This error usually means the new apk is signed with a different keystore than your installed **AAPS**. If you still have your previous keystore, select it and build again. Otherwise, see [Reinstalling AAPS with a new keystore](#reinstall-aaps).
264249
* If "App not installed" is displayed on your phone follow these steps:
265250
266251
1. [Export settings](../Maintenance/ExportImportSettings.md) (in AAPS version already installed on your phone)

‎docs/EN/Maintenance/ExportImportSettings.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Below are the items that are recommended for keeping back-ups.
2222
## Creating back-ups
2323

2424
### Keystore file from the computer you used to build the APK
25-
When building your .APK installer file from Android Studio, it uses the **keystore file and password to sign the .APK installer file**. To update your current AAPS installation, it is required to sign the update .APK installer file with the same keystore used for the initial installation. When updating, all settings and the AAPS database will be kept. Note that without this, you are required to first uninstall the current application and then reinstall and reconfigure AAPS.
25+
When building your .APK installer file from Android Studio, it uses the **keystore file and password to sign the .APK installer file**. To update your current AAPS installation, it is required to sign the update .APK installer file with the same keystore used for the initial installation. When updating, all settings and the AAPS database will be kept. Note that without this, you are required to first uninstall the current application and then [reinstall](#reinstall-aaps) and reconfigure AAPS.
2626

2727
Maintaining the keystore and associated password will greatly reduce the complexity of updating the APK in the future, especially if you need to build the app from a new computer. See the [Updating AAPS](../Maintenance/UpdateToNewVersion.md) section for details on using the keystore when building a new APK.
2828

@@ -125,7 +125,7 @@ Use these instructions if you have a back-up of your APK and **Preferences** tha
125125

126126
_If you are updating **AAPS** using an APK built with the same keystore you should not need to follow this process. However, it is still advised to create a back-up before you apply the update._
127127

128-
If you are updating **AAPS** after you lost or replaced your original keystore (i.e. using a new build computer without transferring the keystore), ensure that you back up all settings per the above and then uninstall the existing version of **AAPS** on your phone.
128+
If you are updating **AAPS** after you lost or replaced your original keystore (i.e. using a new build computer without transferring the keystore), ensure that you back up all settings per the above and then uninstall the existing version of **AAPS** on your phone. See [Reinstalling AAPS with a new keystore](#reinstall-aaps) for the full procedure.
129129

130130
If needed, [set up your CGM/BG source receiver](../Getting-Started/CompatiblesCgms.md) prior to the steps listed below
131131

‎docs/EN/SettingUpAaps/BrowserBuildAapsBuilder.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ A private repository gets 2000 free GitHub Actions minutes per month, which is e
5050
**New key or existing key: this decides whether you can update AAPS.**
5151
5252
- **You already have AAPS on your phone, built with a keystore you still have**: choose **I already have a keystore** on the setup page and upload it. Your next build will update AAPS in place.
53-
- **You build AAPS for the first time, or you lost your keystore or its password**: choose **Create a new key**. An app signed with a new key **cannot update** an AAPS signed with another key. You must [export your settings](#ExportImportSettings-Automating-Settings-Export), copy the file off your phone, uninstall the old AAPS, install the new one, then [import your settings](#ExportImportSettings-restoring-from-your-backups-on-a-new-phone-or-fresh-installation-of-aaps).
53+
- **You build AAPS for the first time, or you lost your keystore or its password**: choose **Create a new key**. An app signed with a new key **cannot update** an AAPS signed with another key. You must export your settings, copy the file off your phone, uninstall the old AAPS, install the new one, then import your settings: see [Reinstalling AAPS with a new keystore](#reinstall-aaps).
5454
5555
Always keep using the same key afterwards. When you create a new key, download the backup the page offers and store it with its password somewhere safe, off your phone.
5656
```

‎docs/EN/SettingUpAaps/BrowserBuildKeystore.md‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@ Choose this if **any** of these is true:
2525
- You have forgotten your keystore password or alias.
2626

2727
```{warning}
28-
Building AAPS with **Option 1** creates a brand-new keystore, so it **will not allow you to upgrade your existing AAPS** in place. To move to this new build you will need to:
29-
1. [Export settings](#ExportImportSettings-Automating-Settings-Export) on your phone.
30-
2. Copy or upload the settings file from your phone to an external location (i.e. your computer, cloud storage service…).
31-
3. Generate a new version of the signed apk as described in Option 1 and transfer it to your phone.
32-
4. Uninstall previous AAPS version on your phone.
33-
5. Install new AAPS version on your phone.
34-
6. [Import settings](#ExportImportSettings-restoring-from-your-backups-on-a-new-phone-or-fresh-installation-of-aaps) to restore your objectives and configuration.
35-
7. Restore your data from Nightscout.
28+
Building AAPS with **Option 1** creates a brand-new keystore, so it **will not allow you to upgrade your existing AAPS** in place. To move to this new build you must export your settings, uninstall the old AAPS, install the new one and import your settings again. Follow the steps in [Reinstalling AAPS with a new keystore](#reinstall-aaps).
3629
```
3730

3831
**→ [Continue with Option 1 – Generate a new keystore](BrowserBuildO1.md)**

‎docs/EN/SettingUpAaps/BuildingAaps.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Each build method has its own troubleshooting section:
4444
* **Browser build** from a computer or an iPhone: [Browser build troubleshooting](#aaps-ci-troubleshooting)
4545
* **Android Studio**: [Troubleshooting Android Studio](../GettingHelp/TroubleshootingAndroidStudio.md)
4646

47-
Lost your keystore or its password? See [Lost keystore](#troubleshooting_androidstudio-lost-keystore).
47+
Lost your keystore or its password? See [Reinstalling AAPS with a new keystore](#reinstall-aaps).
4848

4949
If the app is built but does not install on your phone, see [Transferring and installing AAPS](TransferringAndInstallingAaps.md).
5050

‎docs/EN/SettingUpAaps/ComputerBuild.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ Make sure to note down for yourself where your keystore is stored. You will need
379379

380380
* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2).
381381

382-
The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore).
382+
The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [Reinstalling AAPS with a new keystore](#reinstall-aaps).
383383

384384
```{warning}
385385
**Avoid special characters in your passwords.** Use only letters and digits for the keystore and key passwords. In particular, do not use `$`, a backtick, `"` or `\`. If you later switch to the [Browser build](#aaps-ci-option2) and reuse this keystore, these characters can make the signing step fail, see [Browser build troubleshooting](#aaps-ci-password-special-characters).

‎docs/EN/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ Troubleshooting (start here) <./GettingHelp/GeneralTroubleshooting.md>
186186
- Troubleshooting NSClient <./GettingHelp/TroubleshootingNsClient.md>
187187
- Troubleshooting Android Studio <./GettingHelp/TroubleshootingAndroidStudio.md>
188188
- Browser build troubleshooting <./GettingHelp/BrowserBuildTroubleshooting.md>
189+
- Reinstalling AAPS (new keystore) <./GettingHelp/ReinstallAaps.md>
189190
- Accessing logfiles <./GettingHelp/AccessingLogFiles.md>
190191
FAQ <./UsefulLinks/FAQ.md>
191192
Profile Tuning Guide <./GettingHelp/ProfileTuning.md>

0 commit comments

Comments
 (0)