I am trying to make test cases for android native apps using robotium. But for certain apps I get an error "the signature does not match the target package".
Is there any possible way to know the signature to be used for the android native apps?
I suggest you to use this: http://www.troido.de/re-sign.jar (run it as root or administrator) to resign your app, signing it using your debug keystore.
In this document you'll find more informations about all the procedure!
Sorry for my english!
Not for native apps. This is one of the "problems" with Robotium, in that the signatures have to match. Robotium claims that they are able to do "black box" testing, but you have to have a matching signature, which isn't always available. One option is that you can try to remove the old signature, and create a new one using the debug signature.
Here is an excerpt from a Robotium document that might help:
Signature:
The signature will identify the author of the android application. Signature means it contains the information like first name and last name of the developer, Name of the organizational unit, organization, city, state, two-‐letter country code.
Standard tools like Keytool and Jarsigner are used to generate keys and sign applications. [For more help: http://developer.android.com/guide/publishing/app-‐signing.html ]
IMPORTANT STEPS:
* If you know the certificate signature then you need to use the same signature in your test project
* If you do not know the certificate signature then you need to delete the certificate signature and you should use the same android debug key signature in both the application and the test project
* If the application is unsigned then you need to sign the application apk with the android debug key
If the application is signed then you can use the following drag and drop java program to resign it:
http://www.troido.de/re-‐sign.jar
Or
-‐-‐ Un-‐zip the apk file
-‐-‐ Delete the META-‐INF folder
-‐-‐ Re-‐zip the apk file
-‐-‐ In Dos prompt /Command prompt
> jarsigner -keystore ~/.android/debug.keystore -storepass android -keypass android ApplicationToTest.apk androiddebugkey
> zipalign 4 ApplicationToTest.apk TempApplicationToTest.apk
Then rename TempApplicationToTest.apk to ApplicationToTest.apk
Best of luck!
Related
I was trying to establish a ssl connection to the sever in my application. for this, I generated self-signed certificates and added them to the keystore as well as the java cacerts which is the trust store.
But When I launch my application, I keep getting PKIX path building failed validatorException: unable to find valid path to requested target error
Hence unable to login to my java application.I use java1.8.0_144 version.
Try to login to the website which IDE is complaining about, and see if you are able to access it through the browser.
If so, then check for the certificate being used in the browser and check that certificate is present in your java cacerts.
Hi i usually generated the root CA with openssl and never worked importing that into the cacerts with keytools. You can instead generate it with this application i made out of desperation (it's a Java 11 app):
https://github.com/kendarorg/JavaCaCertGenerator
Its only purpose is to replace the generation of the private key and the root certificate, in a form "fit" for cacerts. From there you can produce the various certificates for the addresses
I want to verify the code signature of one file, and i can use codesign -dv to get the information from command line.
Executable=/Users/user/XXXXXXXX.txt
Identifier=com.apple.xxxxxx
Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=281 flags=0x200(kill) hashes=4+5 location=embedded
Hash type=sha1 size=20
CDHash=ca2c3d47e597a19d7776e248832169488bc8c4a0
Signature size=4169
Authority=Apple Mac OS Application Signing
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Info.plist entries=31
TeamIdentifier=K36BKF7T3D
Sealed Resources version=2 rules=8 files=151
Internal requirements count=1 size=128
But is there any way to get the same information using code.
Yes. The source code for the codesign tool is available on http://www.opensource.apple.com/source/security_systemkeychain/security_systemkeychain-55202/src/.
I am trying to encrypt the push sender password in application-descriptor following Storing properties in encrypted format section of the tutorial.
However, when building the wlapp for iOS, I see following error message in Worklight Studio.
FWLST1040E: iphone build failed: com.worklight.common.util.WorklightCertificateException: Certificate error: Unable to process certificate: apns-certificate-production.p12
It appears that Worklight Studio trying to decrypt the p12 certificate using '${xxxx}' as the password during build process. If I put the password as clear text, build passes. Replacing push sender values for GCM with ${xxx} passes also since there is no iOS-like certificate to decrypt. Only iOS build has problem here.
As far as I understand, the encrypted/configurable fields should be decrypted/replaced at server side during run time, not during the build. Right now, I am not able to build a new wlapp for ios because of this issue.
I am not sure what have I done wrong here. Is there a setting to skip the p12 decryption during build process?
Worklight 6.2:
Created a test=1234 in worklight.properties
Using <pushSender password="${test}" /> in application-descriptor.xml
This passes w/out any errors.
MobileFirst 6,3 7.0:
The same steps as above fail with:
[2015-05-20 10:30:01] FWLST1040E: iphone build failed:
com.worklight.common.util.WorklightCertificateException: Certificate
error: Unable to process certificate: apns-certificate-sandbox.p12
I have opened a bug for it.
Are you sure about the version you're using?
I am new to Adobe AIR and I was following the steps given in the site :
"http://net.tutsplus.com/tutorials/tools-and-tips/introduction-to-adobe-air/", to create my first AIR application.
I was almost successful in creating my first AIR application but at the last step of Deploying AIR Application, after the successful creation of certificate when I am trying to create the.air file. I am getting the error :
"Could not generate timestamp: Connection refused: connect".
Can you please help me in resolving the issue as soon as possible.
As a short-term workaround, you can specify "-tsa none" on the ADT command line. (If you are using Flash Pro or Builder, there should be an option in the UI). -tsa none disables timestamps.
A timestamp requires an internet connection in order to get a signed timestamp token from a server. This is used to verify that your certificate was valid when the app was signed. Without a timestamp, your app won't be installable after your code signing certificate expires. With a timestamp, your app installer will not expire.
Proxy connections are sometimes the issue. Since ADT is a Java program, you have to configure the Java proxy settings if this is the source of the trouble.
i guess my .NET application needs to be signed or something. how do i get rid of that prompt unknown publisher when someone tries to install my app?
If it's the prompt I'm thinking of, you'd start by getting a certificate from someone like Verisign and use their certificate to sign your assembly.
You may be able to do a self-signed assembly using the information from these pages:
http://weblogs.asp.net/fbouma/archive/2003/12/23/45396.aspx
http://msdn.microsoft.com/en-us/library/ms247123(VS.80).aspx
http://blogs.msdn.com/junfeng/archive/2006/03/11/549355.aspx
I'd recommnd reading up and going from there.