4

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.

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 restart the phone, myCustomInstaller app reverts back to the original version.

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?

I am using this for silently installing, yes I do modified code for updating and removing https://code.google.com/p/auto-update-apk-client/

Madjokr
  • 147
  • 2
  • 16
  • 1
    "yes I do modified code for updating and removing". I would like to do the exact same thing. I have a system app kiosk mode application that I would like to be able to update silently. Would you share the modified code of the auto-update-apk-client? – alexislg Apr 05 '16 at 06:16

1 Answers1

5

Did you make sure to increment the android:versionCode in your Manifest? If not, the updated version, which will only get stored in the /data/ directory will be deleted when you boot.

David C Adams
  • 1,953
  • 12
  • 12
  • Yup, Its my bad. I need to include incrementing function in gradle. Thanks. I thought, it's just the version name it matters. – Madjokr Jan 28 '14 at 12:13
  • Excellent. I'm about to start working on something similar and I was worried there was going to be problems. :) – David C Adams Jan 28 '14 at 18:19
  • I am facing similar issue where after updating system app its name is changing in setting while if i open app it crashes and runs with old code(but new version name).when i reboot device everything works fine.Any kind of help would be appreciated . – Godfather Aug 22 '16 at 18:41
  • [Detailed new questtion](http://stackoverflow.com/questions/38989406/android-system-app-update-needs-rebooting-device) – Godfather Aug 23 '16 at 08:58