Convert unsigned apk into signed apk

自闭症网瘾萝莉.ら 提交于 2020-01-14 03:19:22

问题


I have an android application with un-signed package, Whenever I try to install this apk, following error message throws Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES].

Now I want to insert my keystore certifcate with this apk file. is there any possibilities to do this with external command rather than IDE?


回答1:


We can do this via jarsigner tool comes with the JDK

Steps

In Windows

Step 1: set path C:\Program Files (x86)\Java\jdk1.8.0_20\bin in command line

Step 2: jarsigner -verbose -keystore /path_to_keystore/keystoreFileName /path_to_apk_file/application_name.apk keystoreFileName_alias

-keystoreFileName_alias. You have to provide your alias name of your keystore file name.

Step 3: Enter password of your keystore file

Step 4: Completed. It will displays warning messages like certifaction validity etc..

Step 5: Verify your apk file jarsigner -verify /path_to_apk_file/application_name.apk

Zip align:

Step 6: set path C:\Program Files (x86)\Android\sdk\build-tools\android-4.4W in command line

Step 7: zipalign -v 4 /path_to_apk_file/application_name.apk /path_to_destination_apk_locaion/zipped_application_name.apk



来源:https://stackoverflow.com/questions/30590242/convert-unsigned-apk-into-signed-apk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!