views:

507

answers:

3

I've accepted for a while now that it's impossible to silently install an application on Android - that is, to have a program install an application bundled as an APK without providing the standard OS installation prompt and going through the app installer activity. But now I've picked up a copy of the Appbrain fast web installer, and it does exactly this.

How on earth is this possible? :D

A: 

IF you can work out what the standard installer does when it installs, you can replicate that behaviour in your app, however yours would need quite extensive permissions to do everything properly.

Seriously, don't even try.

Emyr
I can work out what the standard installer does when it installs, and replicate that behaviour so that it would theoretically work with the appropriate privileges.The issue here is that I've *seen* an application that works just fine without those privileges, that doesn't seem to be taking that approach. This is behaviour that I'd like to be able to duplicate if possible.
Adrian
A: 

You can ( in a very hackish way ) install apps silently using adb. You have to enable USB Debugging, but just push the APK to /data/app. ie:

adb push MyApp.apk /data/app

  • or -

adb install MyApp.apk (cleaner way)

The second command MAY prompt for an installation, I don't remember off the top of my head.

ChrisSoyars
+5  A: 

I think the clue is pretty much in this statement I found here in the FAQ.

The fast web install worked for me yesterday, but it doesn't work anymore today. What's wrong?

The permission to install apps directly on your phone needs to be refreshed once every few days. Go back to the "Fast Web Install" app on your phone and click the button to give us the permission again. We are working on a future update that will optionally automatically refresh this setting.

I presume this is very similar to what Google does in the kill switch. I am assuming that the kill switch is an application on my device, just hidden from me. When Google wants to remove an application, it silently uninstalls it without asking for our permission. I am very sure this security hole is of their making. Now we just need to figure that out... =D

Shouvik
Yes, that seems likely. There's an informative article on the kill/install functionality here:http://jon.oberheide.org/blog/2010/06/25/remote-kill-and-install-on-google-android/
Adrian
Ha ha, I see another remote kill of AppBrain in the near feature.. =D
Shouvik
Another link on the same lines. This I think clinches the deal... http://jon.oberheide.org/blog/2010/06/28/a-peek-inside-the-gtalkservice-connection/
Shouvik