Complete Guide to Backups on AndroidAPS

  • Mandatory backup of the keystore file and master password to avoid a complete system reinstallation.
  • Importance of exporting the .json preferences file after each completed goal to avoid losing loop progress.
  • Use of hybrid storage by combining local USB backups with cloud services for immediate recovery.

Two synchronized mobile devices with a cloud background, representing cloud backup and synchronization.

Managing your diabetes with AndroidAPS is fantastic, but let's be realistic: the phone we use is essentially a critical medical device . If your phone decides to break down, gets stolen on the subway, or simply gets damaged, you could be without your artificial pancreas system in the blink of an eye. So don't take any chances and put together a solid emergency plan so you don't have to start all over again.

The key here is not to put all your eggs in one basket. Making a backup is pointless if you leave it on the memory of the phone you just lost. Ideally, you should combine an external hard drive or USB drive with a cloud service like Google Drive or OneDrive, so you have your data readily available anytime, anywhere . Even better, if you want to be extra safe, grab an old phone you have lying around and practice restoring it to ensure that, if problems arise, the plan works perfectly the first time.

What you need to recover your system

Organized workspace with laptop and external drives, ideal for representing the combined local and cloud backup strategy.

To make the magic happen and get AAPS working again on a new device, you'll need to have a few things saved. First and foremost, the Android Studio keystore file and its password, which is what allows you to sign the installer. Then, a copy of the most recent APK file you installed and the settings export file , where your goals and custom configurations are saved. Of course, don't forget your AAPS master password and backups of other apps you use, such as xDrip+ or BYODA.

The Keystore: the key to your installation

When you compile the APK, Android Studio uses the keystore to sign it. If you want to update the app without wiping everything, you need to use the exact same keystore . If you lose it, you'll have to completely uninstall and reconfigure the app, which is a real pain. To back it up, find the path in Android Studio's Build menu and save the .jks file to the cloud along with the alias and all associated passwords.

APK file management and preferences

Modern desk with smartphone and laptop, useful as an overall image of managing technological tools and critical medical devices.

Having the APK file on hand saves time, but what's truly vital is the settings or preferences file . This document saves everything from the builder's configuration to the status of your goals . If you don't have this backup, you'll have to repeat all the goals from the beginning to reactivate the closed loop. It's essential to export the file every time you complete a goal or before changing important settings like the type of insulin or pump parameters.

To manually export, go to the Maintenance menu, choose whether to save it locally or to the cloud, and enter your master password . The resulting file, with the .json extension, is saved in the device's preferences folder. A very useful tip is to enable automatic settings export in the Maintenance menu so the system does it automatically every week or after changing a pod.

Steps to restore everything on a new mobile phone

Close-up of a rugged portable hard drive on wood, illustrating the security of physical backups on USB or external drives.

If you have to start from scratch, first install the APK you saved and grant all the necessary permissions. The first thing you should do is go to Protection and set the same master password you used for your backups. Then, define the AAPS directory and move your preferences .json file to the /internal storage/AAPS/preferences folder using your phone's file explorer.

Once the file is in place, go to Maintenance and import the settings. The system will ask for your password to decrypt the data. A key point is to check the box to replace the pump settings if you want the new phone to recognize the current pump without any issues. For users of tubeless pumps, such as Omnipod, keep in mind that if the backup isn't from your current pod, you'll need to create a new one.

The Path to Objectives: From the Base to the Closed Loop

AAPS doesn't unleash its full power all at once; it guides you through a series of milestones. The first eight objectives take you from basic monitoring to hybrid closed-loop in about six weeks . The process begins by setting up the glucose source and pump, progresses through a knowledge quiz in Objective 3, and culminates in open-loop monitoring where you manually apply temporary basal rate adjustments.

Later, you'll enter Low Glucose Suspension (LGS) mode and eventually full closed-loop mode. This is where you adjust the max IOB so the system automatically corrects for hyperglycemia. The final goals, 9 and 10, unlock advanced features like Super Micro Boluses (SMB) and task automation, allowing you to, for example, schedule time-based goals before breakfast.

Synchronization and critical updates

Person using a smartphone with a padlock and cloud icon, representing the management of master passwords and encrypted files.

If you use Nightscout, it's highly recommended to perform a full synchronization before uninstalling AAPS to avoid losing your history. Once reinstalled, you can recover this data using the NSClientV3 plugin. Regarding versions, remember that AAPS has expiration dates; if you don't update, the app will enter Open Loop (LGS) mode for security reasons. Always ensure that your AAPS version is compatible with your Android version to avoid installation errors.

Maintaining a comprehensive backup that includes the keystore, APK, and encrypted preferences file is the only way to ensure that a technical issue doesn't disrupt your treatment. By combining automated export with cloud storage and rigorous goal tracking, you transform a complex system into a robust and recoverable tool in minutes.


Add as preferred source in Google