MTC recorded script import replay signature issue in Eclipse (APK only)

Source: Internet
Author: User

1. Import the MTC script into eclipse

As I recorded the script from MTC, the exported source file

2. After importing into eclipse, such as:

3, if the environment is configured well, after the import will not have an error, even a good phone, to do the following:

3, if you do not do any processing of your test package, there is only one apk, no source code, because the recorded script imported into Eclipse, by default, the script is signed with your eclipse inside the signature file, such as:

The path to the signature file in can be changed, depending on the method reference:

Http://hi.baidu.com/rzrpznspzdbciqq/item/af51ed9cb31b0fbacc80e5f7

Http://blog.sina.com.cn/s/blog_62cdfb9f0101fnuy.html

If you don't change it, use your default signature file in Eclipse to re-sign the apk you want to test.

4. If you do not re-sign the tested APK, the following error will be reported:

Test run failed:permission denial:starting instrumentation componentinfo{com.local.test/ Android.test.InstrumentationTestRunne

R} from pid=356, uid=356 not allowed because package com.local.test does does have a signature matching the target com.***

The hint is that the signature does not match, because there is no source code, cannot generate a signature. 5. Next we re-sign the apk we're testing: now we're going to test. apk file renamed to. zip file, opened with compression tool, not uncompressed, in fact, can not be renamed, directly in the Open tool choose WinRAR or other compression tools----> After opening , delete the Meta-inf file, right-click Delete, and then rename the deleted. zip file to an. apk file, which is the APK with no signature file. Then re-signing the unsigned apk, execute the following command: C:\Program Files (x86) \java\jdk1.7.0_55\bin>jarsigner-digestalg Sha1-sigalg Md5withrsa- KeyStore D:\SetupFiles\sdk\.android\debug.keystore-storepass Android-keypass Android xzone-release-1219bnoresign.apk Androiddebugkey
The jar is signed.

Warning:
-tsa or-tsacert not provided, this jar has no timestamp. If there is no timestamp, the user may not be able to verify the jar after the expiration date of the signer's certificate (2044-12-21) or any subsequent revocation date.

C:\Program Files (x86) \java\jdk1.7.0_55\bin> notes:
6, after the successful signing of the file: 7, Eclipse Run after the completion of the script: Run the result is correct:

MTC recorded script import replay signature issue in Eclipse (APK only)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.