3

I have tried to find a solution on this by searching the net for quite some time. If there is a working solution to my question on stackoverflow, it would be nice if someone points me to it.

So problem is very specific:

I like to implement an app updater that installs apps without any further user interaction as soon as the user has started the setup process.

This would something like the way it is done by GMS (Play Store).

Constraints:

  • The implementation has to work on devices back to Android 6.
  • I am an Android system developer and I want to integrate an update for our own hardware.
  • I have an existing app that is running as system app in the system context.
  • The app cannot be device owner, as this will block MDM support that customers might want.
  • I can access hidden APIs of the android system.
  • The solution may not require root access to the device and shall not use any hacks like calling pm install.

The device has to pass the Google approval what restricts everything to the use of the system APIs provided by Android. I think that this is the reason, why it is so hard to find a proper solution or pointer to a code sample for this.

Has anyone worked on this? Are there apps (like free app-stores) that implement something like this?

Edit: I have found a partial response to my question here: https://stackoverflow.com/a/5805299/6289291

The major difference is, that when building from within the AOSP tree, reflections are of course not required and there are some problems I encountered that I will try to summarize in a response to this question as soon as I have resolved those in a proper way.

nexus
  • 236
  • 2
  • 10
  • I assume there will be some degree of impossibility due to Android security measures. From what I've seen, "Galaxy Store" by Samsung is the rare only/few alternatives to Google Play. Doing a search I found this article - https://medium.com/pen-bold-kiln-press/best-google-play-store-alternatives-30c759de1c26 - perhaps these app's behaviors can lead you to a solution – C. Skjerdal Oct 10 '19 at 16:48
  • Thank you for hinting the page. But yes, most of those stores cannot do what I need. The problem is that those stores are meant to be installed on top of a running Android system with untrusted_app permissions. The difference is that I can have apps with system or platform permissions. I don't want to end up with patching the PackageInstaller in some way, so I hoped anyone has encountered and resolved this before. Some Carriers have closed source stores that already do something like this on their branded phones. – nexus Oct 11 '19 at 07:22
  • Okay. I might have a solution that I will try. It might just as easy as using `public abstract void installPackage` from PackageManager via reflections. – nexus Oct 11 '19 at 07:46

0 Answers0