Bee Bee - 9 months ago 77
Android Question

android: install fails on hacked phones

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: (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.

Answer Source

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 ( 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)