Signature Mismatch

1,018 views
Skip to first unread message

Jimmy

unread,
Dec 15, 2011, 5:02:02 PM12/15/11
to Robotium Developers
I am using robotium on an android app, whenever a new iteration of the
app comes out robotium seems to run into some signature mismatch/
permission issues. Although the target package name stays the same, I
don't know how to get around this problem.


I am getting the following error:

INSTRUMENTATION_STATUS: Error=Permission Denial: starting
instrumentation ComponentInfo{com.test.example.package/
android.test.Ins
trumentationTestRunner} from pid=14221, uid=14221 not allowed because
package com.test.example.package.test does not have a signature
matching the target com.test.example.package
INSTRUMENTATION_STATUS_CODE: -1
java.lang.SecurityException: Permission Denial: starting
instrumentation ComponentInfo{com.test.example.package.test/
android.test.Inst
rumentationTestRunner} from pid=14221, uid=14221 not allowed because
package com.test.example.package.test does not have a signature m
atching the target com.test.example.package
Success

Piotr Chłąd

unread,
Dec 15, 2011, 5:30:35 PM12/15/11
to robotium-...@googlegroups.com
Your application file has to have the same signature as your test project. You are getting this error because signatures are not the same.


2011/12/15 Jimmy <akhi...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To post to this group, send email to robotium-...@googlegroups.com.
To unsubscribe from this group, send email to robotium-develo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotium-developers?hl=en.


Jimmy

unread,
Dec 15, 2011, 6:04:14 PM12/15/11
to Robotium Developers
Where do i check the signatures, are they under manifest file?

On Dec 15, 2:30 pm, Piotr Chłąd <chlad.pi...@gmail.com> wrote:
> Your application file has to have the same signature as your test project.
> You are getting this error because signatures are not the same.
>

> 2011/12/15 Jimmy <akhil....@gmail.com>

B Lyon

unread,
Dec 15, 2011, 11:38:53 PM12/15/11
to robotium-...@googlegroups.com
I've had that happen when the app apk and test project apk were built
on different dev machines, in which case I just delete the app apk and
test app apk off the device, and delete the apk's from the app/bin and
test project/bin directory.

Is this all being built on the same machine?

Saneesh Joseph

unread,
Dec 16, 2011, 2:14:51 AM12/16/11
to robotium-...@googlegroups.com
Solution is well explained here :


In short use the below commands ( On windows ),

jarsigner -verbose -keystore C:\Users\<user>\.android\debug.keystore <yourapp>.apk androiddebugkey
jarsigner -verbose -keystore C:\Users\<user>\.android\debug.keystore <your_test_app>.apk androiddebugkey

Enter "android" when asked for password.

Best Regards,
Saneesh Joseph.

baba shanker

unread,
Dec 16, 2011, 2:24:39 AM12/16/11
to robotium-...@googlegroups.com
If you want to use robotium on android app ,your android-application and androidtest-application should have same signature.In robotium documentation they have cleared explained how to re-sign android application to make both  applications to have same sign.just go through it.


 
On Fri, Dec 16, 2011 at 10:08 AM, B Lyon <brad...@gmail.com> wrote:

Sunil Alapati

unread,
Dec 16, 2011, 2:25:11 AM12/16/11
to robotium-...@googlegroups.com
Yes you're correct it should be built on the same machine. Because application apk and test project must have same signature.
 
May be what you can do is you can get a copy of your app apk and re-sign it in the test project apk machine. then run the scripts.
 
To re-sign the build without manually executing the commands, we just need to drag and drop .apk file on this tool. You can download it from below link.
 
 
To re-sign the apk using above tool, make sure that you set the classpath for below system and user variables:
 
JAVA_HOME :
C:\Program Files\Java\jdk1.6.0
Path :
D:\android-sdk\platform-tools;D:\android-sdk\tools;
 
 
Have fun!


 
On Fri, Dec 16, 2011 at 10:08 AM, B Lyon <brad...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages