CommCare Recovery Mode

Phones entering recovery mode is unusual and unexpected. This happens when the app install that's currently on the phone enters an inconsistent state that CommCare can't correct. There are three causes of this:

The app's storage files have been manually changed/modified

Some of CommCare's files non-userdata files are stored on the phone in an area where external apps can delete them. This used to be a rampant problem on Android phones which used the SD card to store certain files (this was common before android 2.2)

The phone's storage layer has corrupted the files stored to the device

This is a problem that we've seen on certain devices that we've been investigating the prevalence of to identify whether it's real. It's hard for us to differentiate between certain types of hardware failures due to the way we encrypt data (since we write user files in an encrypted way, minor block-level corruption of files that would be easy to spot in un-encrypted data simply results in a pseudo-random blob looking equally pseudo-random blob for us).

The kinds of block storage used by mobile devices have physical limitations on the number of reads and writes they can perform. On good Flash storage these limits are unlikely to be hit, but on certain counterfeit storage chips it is a common problem for data reads and writes to fail silently.

We don't believe this to be a common problem outside of Counterfeit SD cards (and most files on most phones are stored on the phone's storage, not on an external SD card), but it has come up in the past rarely.

There is a bug in CommCare's code that is resulting in corrupted files

It's possible that CommCare is writing an invalid app structure to the phone's storage due to an unforseen bug in the code. 

The only time this kind of bug could occur that would result in Recovery Mode being triggered would be immediately after some sort of remote update that resulted in the phone not having a fully installed and consistent version of your app. This would not be expected, however, to cause any problems in submitting unsent data to the server. 

 

 

Selecting "Enter Recovery Mode" will navigate you to a screen like the one below. An advantage of entering recovery mode is that users will be presented with the opportunity to submit any unsent forms.