Skipser: Why You Lose Data When an Android App is Uninstalled.

0 views
Skip to first unread message

Skipser - Tech Blog

unread,
Aug 26, 2014, 4:29:51 AM8/26/14
to malaya...@googlegroups.com

Skipser: Why You Lose Data When an Android App is Uninstalled.

Link to Skipser - Tech Blog

Why You Lose Data When an Android App is Uninstalled.

Posted: 25 Aug 2014 03:10 AM PDT

When you uninstall a Windows program, the installer usually asks whether to delete your preferences and data. If you choose not to, all your program data will be intact if you re-install the program again. For instance if choose to keep data while uninstalling a game, all your saved games and preferences will be intact upon re-installing.

On the contrary, you don't get back your data or preferences when you re-install android apps. In fact you will never be asked whether to keep app data for later use while uninstalling any android app.

why android app uninstall removes data

Why Android App Data Vanishes on Uninstalling.

Most operating systems provide specific locations where programs can store their data. For instance in Windows 7, you would find a directory named "C:\Program Data". Similarly android provides 3 places where an app can store data-

  1. Internal storage memory.
  2. External storage memory (Usually SD card).
  3. App database (sqlite database).

Although an app can use internal or external memory to store data, the recommended secure way is to use the app database. Android creates an app database for every app the first time it is installed. Also an app's database can only be accessed by that app. This ensures that a rogue app can't steal away data from another app. This database is what 99.9% apps use to store their data.

As part of security, android keeps this database only while the app is installed and available. As soon as you hit the uninstall button, android wipes out the app database along with the app. And if you re-install the app, android will create a fresh new database for the app again and that's the reason why app data can never be retrieved once you uninstall an app.

Why Apps Don't Use Internal/External Storage for App Data?

Even though restoring data on re-install is a nice to have feature for any app, most developers still go with the non-restorable app database because-

  1. App database is secure while internal/external storage is insecure and can be accessed by any other app.
  2. If app data is stored in external storage, the app could dis-function if the SD card is removed, replaced or damaged.
  3. Developers are lazy. Android provides a simple and easy interface to read, write and maintain the app database. Using the internal/external storage means more work and re-inventing a lot of stuff that android is already giving in a platter.

Still there are apps which store data in internal/external storage due to explicit needs. For instance the "Sec Notes" app which is a secure notes/spreadsheets/checklists app stores the data backup to external storage as an encrypted file. This is to allow users to regain their notes if they change phone or want to access the notes in another android device. But most apps doesn't have such compelling reasons to implement data backups for re-installs.

Twitter Facebook


Skipser This story, Why You Lose Data When an Android App is Uninstalled., was originally published at Skipser.

You are subscribed to email updates from Skipser - Tech Blog
To stop receiving these emails, you may unsubscribe now.
Email delivery powered by Google
Google Inc., 20 West Kinzie, Chicago IL USA 60610
Reply all
Reply to author
Forward
0 new messages