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.