10

My friend's app will be preinstalled on ~60,000 Android devices. We'd like the devices to download and install a newer version of the app when it becomes available on our web site (we'll post the .apk file).

The application would not be published in the Market. It's an in-house business app.

I looked for similar questions and found https://stackoverflow.com/a/1662032 from 2009 and https://stackoverflow.com/a/4264819 from 2010 which recommend distributing a new firmware with the newer version of the app. Is that still the best option in 2014? We are looking for a completely unattended fully automatic software update with as little downtime as possible.

I'm exploring using CFEngine, as I'm familiar with CFEngine and dynamic reconfiguration is within its purview and capability, but I'm also checking for an Android “native” solution.

https://stackoverflow.com/a/2585448 describes downloading the APK but the next step requires human interaction to click the APK in the download manager to install it. We are looking for a completely unattended installation.

I also came across GCM (http://developer.android.com/google/gcm/index.html) but our devices will be on internal networks, behind firewalls, which is why we want them to pull down updates, rather than us pushing updates to them (which I think GCM would facilitate as it allows a fabric for sending messages to devices).

We can't reach the devices by push, but they can pull from our web server.

The most promising answer seems to be https://stackoverflow.com/a/12274740/3371843 which describes how to programmatically download and install an APK but it still requires user interaction for security except when done through Google Play? We won't be on Google Play.

With the continued growth of Android and adoption of Android for business, I'm sure this question will come up for others. Would appreciate any help you can offer.

Community
  • 1
  • 1
atsaloli
  • 111
  • 6
  • 1
    Supposing one could update/install an app without ANY user intervention, I think it would be a big disaster. Suppose the new update needs new permissions, don't you think the user would want to know if your app now wants to access his/her contacts/sms etc? Don't you think that the user should be given a choice of whether he/she wants to give permissions or not? – Shobhit Puri Mar 02 '14 at 22:36
  • 2
    @atsaloli: I hear you. We have exact problem running 24h/7d kioskapp without any real end users. No mouse, no touchscreen access, just HDMI output. This is a valid Android use-case, some people just see a personal tablet+phone usecase. App should still be updateable and without any user interaction. Should root privileges be enough if have rooted device. That's Im trying to find. We cannot go through some obscure chinese device provider installing new /system/app each time. – Whome Sep 20 '14 at 08:35
  • 1
    Hey, I'm having the same issue. Did you manage to find a solution? – Chaitali Aug 28 '18 at 06:19
  • Any news on this ? – W.M. Oct 01 '20 at 17:50
  • Thanks everybody that commented or submitted an answer. The consensus seems to be this is a real use case and there is no solution for this today. – Aleksey Tsalolikhin Oct 02 '20 at 19:26

2 Answers2

3

We are looking for a completely unattended fully automatic software update with as little downtime as possible.

That is not possible from an ordinary SDK application. Upgrading an application requires user intervention.

The makers of a firmware can offer automatic updates of apps, the way that Play Store-equipped firmwares do for Play Store apps that do not add new permissions.

which is why we want them to pull down updates, rather than us pushing updates to them (which I think GCM would facilitate as it allows a fabric for sending messages to devices)

Unless your APK files, when encoded in JSON, are less than 4K, GCM would not be much use, other than as a trigger mechanism to indicate that something is available for download.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • If firmware maker gives us root access, we grant myapp.apk have a root privileges, preinstalled it. App can download myapp.apk from the webserver to temp folder. Is it still a showstopper? We cannot instruct PackageManager or "adb.exe push..." like shellexec without any user interaction? We have a kioskapp no real users, no GooglePlay infra. Still app should be updatable. Android is a showstopper? – Whome Sep 20 '14 at 08:32
2

Did you get any solution? I am facing same issue with my app (silent update), I found a solution to silently check updated version and download silently, by using following library:

https://github.com/RaghavSood/AppaholicsUpdateChecker

It is close, but still it asks for user permission before upgrade . I would like to see a (non-rooted) solution for by passing user permissions.

FHDFRD
  • 66
  • 1
  • 8