views:

783

answers:

2

Can anyone tell me the difference in how an application is delivered and installed to an android G1 phone when it is downloaded from Market vs downloaded from my webserver?

This little test app:

http://yootles.com/outbox/TallyBee.apk (keeps a simple count)

Installs on my (unhacked) G1, but fails to install on two friends' (hacked) G1s when they download from me -- it thinks that the package conflicts with/wants to overwrite Android System -- but installs fine when they download it (the same .apk) from Market.

  • There are no problems with pushing the .apk to the phones with adb.
  • Yes, they both have set their phones to allow "unknown sources" in Application Settings.
  • I want to get the install working from my server in order to expedite testing.
+2  A: 

Without installing this apk on my own G1 (which I'm not keen to do), you should confirm that your friends have Settings > Applications > Unknown sources ticked. If not, they won't be able to install applications that aren't from the marketplace.

Reto Meier
They do have their phones set to accept unknown sources.
Bee
Are you not keen because you have no way to confirm it's not malware, or is there any other risk of installing a random (literally in this case) app?
dreeves
+2  A: 

You're running into an strange android signature bug. If you try to reinstall an application that already exists on the phone it must be signed with the same key. If you install the same application signed with a different key it will delete the application first, and then fail to re-install giving you a useless error. More info on signing here (http://developer.android.com/guide/publishing/app-signing.html) although if it installed at all then you've probably got your head around the signing system.

The solution is to re-install the app from the marketplace (or wherever they originally got it) and then delete it through the application manager. Once it's removed they should be able to download the new version from your webserver. (Also, make sure the setting mentioned in the post above is ticked)

haseman
The very first attempt to install the app was actually via my server, not Market, and failed with this error. If I watch logcat while it is trying to install the .apk it actually tries to delete the android package in order to "reinstall" it.
Bee
have you used more than one key to sign it?
haseman
and I hate to ask, but do your friends with the hacked phones have microSD cards in their phones?
haseman