Figure 1
Two, can generate signature apK file
Here the input file ChangeBackgroundWidget apk, the resulting ChangeBackgroundWidget_signed. Apk for Android apk executable after signature Enter the following command line:
jarsigner -verbose -keystore ChangeBackgroundWidget.keystore -signedjar ChangeBackgroundWidget_signed.apk ChangeBackgroundWidget.apk ChangeBackgroundWidget.keystore
Enter the keystore passphrase (password) as prompted, as shown in figure 2: Entering the keystore passphrase: Adding: meta-INF/manifest.mf Adding: PNG Signing: res/drawable/icon_audio. PNG Signing: res/drawable/icon_audio. PNG: res/drawable/icon_folder. PNG: res/drawable/icon_home. PNG: res/drawable/icon_home. PNG: Res /drawable/icon_img. PNG Signing: res/drawable/icon_left. PNG Signing: res/drawable/icon_mantou.png signing: res/drawable/icon_mantou.png signing: res/drawable/icon_mantou.png signing: Res /drawable/icon_other. PNG Signing: res/drawable/icon_pause. PNG Signing: res/drawable/icon_play. PNG signing: PNG Signing: res/drawable/icon_right. PNG Signing: res/drawable/icon_set. PNG Signing: res/drawable/icon_set. Res /drawable/icon_text. PNG Signing: res/drawable/icon_xin. PNG Signing: res/layout/ fileItem.xml signing: Res /layout/filelist. XML Signing: res/layout/main. XML Signing: res/layout/ Widget. XML signing: res/ XML /widget_info.xml signing: res/layout/ widget_info.xml Androidmanifest.xml is signing: resources.arsc is signing: classes.dex
Figure 2
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
In running this way, I met several different problem: problem a: jarsigner: unable to open the jar file: ChangeBackgroundWidget. Apk my solution is: Will sign the APK on the corresponding files, as I put the autograph ChangeBackgroundWidget. The APK on the JDK bin file.
Problem two: jarsigner: can’t jar for signature: Java. Util. Zip. ZipException: Invalid entry comp ressed size (Expected 1598 but got 1622 bytes) Invalid entry comp ressed size (Expected 1598 but got 1622 bytes) invalid entry comp ressed size (Expected 1598 but got 1622 bytes) Method 1: The Android development network suggests that these problems are mainly caused by resource files, for Android development should check the files in the RES folder, one by one. This problem can be resolved by upgrading the JDK and JRE versions of your system. ->Android Tools ->Export Unsigned Application Package ->Android Tools ->Export Unsigned Application Package Or Exporting from androidmanifest.xml and then signing the exported unsigned APK, preferably in the same directory where you created your keystore to make it easier. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = MS I found the second problem solutions… Right-click the project corresponding to the APK to be signed, and select Export Unsigned Application Package… in the extension bar on the right of Android Tools. , as shown in Figure 3
Figure 3
Save the unsigned APK in the JDK bin folder in the pop-up dialog, as shown in Figure 4:
Figure 4.
Then run the steps above.
* reprint from http://blog.sina.com.cn/s/blog_62c194760100gaq0.html
Aleju safety
Aliju security (http://jaq.alibaba.com) produced by The Alibaba Security Department, for enterprises and developers to provide Internet business security solutions, comprehensive coverage of mobile security, data risk control, content security, real person authentication and other dimensions, and the industry took the lead in proposing “business-centric security”, enabling ecology, Alibaba Group and the industry to share years of precipitation of professional security ability.