title: How to Secure Android Shared Preferences?
body: <p>The common location where <code>SharedPreferences</code> are stored in Android apps is:</p>
  
  <pre><code>/data/data/&lt;package name&gt;/shared_prefs/&lt;filename.xml&gt;
  </code></pre>
  
  <p>User with root privileges can navigate to this location and can change its values.Need of protecting it is of much importance.</p>
  
  <p>In how many ways we can encrypt whole <code>shared_pref's xml</code> file?</p>
  
  <p>We all know that we can encrypt and save data in <code>shared_pref's xml</code> file, but that's not only 100% safe, so need to encrypt whole file with a key. Need help in knowing various ways to encrypt whole <code>xml</code> file. This is generic question, various encryption methods discussed as answers here can be helpful to all developers in securing apps.</p>