0

I am newbie to Robotium. Everytime, if i change code, i need to create apk and then i need to install in emulator and have to proceed the testing by running shell command.

Is there any way to add my signature on the eclipse, so that i can run from Eclipse?

I have tried the preferences and it has customer keystore but i did not get any field to enter the password.

Any help would be appreciated.

Thanks

Abhinav Sarkar
  • 23,534
  • 11
  • 81
  • 97
ChanGan
  • 4,254
  • 11
  • 74
  • 135

2 Answers2

1

It is very easier than this. If eclipse and Android SDK are properly configured, you can run your app on real device or emulator by just a single click. In such cases, eclipse would use a debug key to sign apps.

when you want to release final apk, you should right-click on project and from Android tools, select Export signed Application... and then make your keystore or use a previous one to sign release package.

yrajabi
  • 637
  • 1
  • 9
  • 28
  • Hi, I am using Robotium Framework. So if i run from the eclipse, since it is using debug keystore it is saying signature mismatch... – ChanGan Sep 23 '12 at 19:37
  • @Chandra So I guess if you uninstall your app once from emulator (which has bin installed with your own key), then you would be able to install again with any key (including debug key). – yrajabi Sep 23 '12 at 20:01
  • if i am installing from eclipse, since my app and the test signature is mismatching.. to avoid this i need to give a keystore while doing installing from the eclipse itself. – ChanGan Sep 27 '12 at 14:02
1

if you are using different apk which your are not created and see " signature mismatch ", then you need to change Signature of that apk,

1)- Delete "META-INF" folder from TestApp.apk

2)- jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore debug.keystore -storepass android -keypass android TestApp.apk androiddebugkey

and you find "debug.keystore" from C:\Users\YourUserName\\.android\ if you have installed eclipse and Android SDK properly.

3)- zipalign 4 TestApp.apk SignedTestApp.apk

4)- jarsigner -verify SignedTestApp.apk

5)- install SignedTestApp.apk, and test your automation again.

for example, you want to do automation for gmail app then TestApp.apk = Gmail.apk

you can find for info from this link. I hope this will solve your issue of " signature mismatch ".

VISHAL VIRADIA
  • 1,388
  • 1
  • 15
  • 34