Mohit
Mohit

Reputation: 11324

different Application signature issue android?

In my project i have created an application that has being modified later now when i try to install new application it ask for full uninstall of the application. of previous application but i can not do the same coz i am to reuse the data left by the previous application not can i fix the different application signatures. issue can i get install it to device without unistallation.

I'm to retain application data

[2012-05-23 19:09:56 - iCam] Re-installation failed due to different application signatures.
[2012-05-23 19:09:56 - iCam] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2012-05-23 19:09:56 - iCam] Please execute 'adb uninstall iCam.Cam' in a shell.
[2012-05-23 19:09:56 - iCam] Launch canceled!

Upvotes: 3

Views: 4812

Answers (4)

Paweł Nadolski
Paweł Nadolski

Reputation: 8484

You need to install application with the same signature as the one which is already on the device.

You will need to determine how the application was installed on the device. You have at least two options:

  • default debug signing key from Eclipse was used (key androiddebugkey in keystore ~/.android/debug.keystore)
  • other keystore was used during the File->Export...

If you used binary generated in the bin directory (or installed apk directly from Eclipse) the default keystore was used and to create compatible apk you need to locate same file which was at this location when creating first apk: ~/.android/debug.keystore. Then use File->Export... and choose this file. Enter android password, choose androiddebugkey and enter android password again. Finally choose destination apk name and click Finish.

If finding previous signing key is not possible you can try to:

  • backup the application data
  • uninstall the application
  • install application with different signature (now it succeeds)
  • install back application data

Backup and restore of application data can be done using TitaniumBackup app. It may require rooted device.

Upvotes: 4

Andi Krusch
Andi Krusch

Reputation: 1383

I had the same problem. Fortunately I had a "to-file" backup functionality in this app. You need the same signature. Do you use the Debug-Keystore? That's not a good idea for real world usage. you need to use the same Debug-Key the original creator used.

Upvotes: 1

DeeV
DeeV

Reputation: 36045

You have to use the same signature you signed your last build with. If you reset the debug signature in Eclipse or if you signed the app with a new release key, then you can't update. The only way to fix this is to use the same key you signed it with last time AFAIK.

In DDMS however, you may be able to pull the data from the SD card, uninstall the app, reinstall, then put the data back. I've never tried this, but I think this may be your only option.

Upvotes: 1

Padma Kumar
Padma Kumar

Reputation: 20041

//install thru command prompt by using -r which reinstall by keeping its data

adb install -r ./yourfolder/MyCam.apk

//adb install options

adb install [-l] [-r] [-s] <file> - push this package file to the device and install it
                                 ('-l' means forward-lock the app)
                                 ('-r' means reinstall the app, keeping its data)
                                 ('-s' means install on SD card instead of internal storage)

Upvotes: 1

Related Questions