title: Self updating android system application with root access
body: <p>I have created my custom ROM from aosp. I have also included my application, lets call it myCustomInstaller.apk (1.0) in the custom ROM while building. The application basically is kind of Google play Store. The application has system privileges and can install or remove applications silently. </p>
  
  <p>I am able to install, update or remove any other applications. The problem I am facing is, When I am updating the myCustomInstaller.apk to 2.0 itself, the application is also installed silently, I am able to see the latest version installed in installed apps, but when i <strong>restart</strong> the phone, myCustomInstaller app reverts back to the original version.</p>
  
  <p>I really don't know how to proceed, How is google playstore updating itself, and installing other application? Do I need any other permissions to make the updated version of myCustomInstaller app persist?</p>
  
  <p>I am using this for silently installing, yes I do modified code for updating and removing 
  <a href="https://code.google.com/p/auto-update-apk-client/" rel="nofollow">https://code.google.com/p/auto-update-apk-client/</a></p>