Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release apk creates an INSTALL_PARSE_FAILED_NO_CERTIFICATES error during installation #55

Closed
franck-serot opened this issue Jun 6, 2013 · 4 comments

Comments

@franck-serot
Copy link

I create a HelloWorld Android projet with the release archetype.
I try to generate a release apk and install it on my phone.
But, I have the following error with installation step :

D:\temp\HelloWorldAndroid-parent\HelloWorldAndroid>adb install .\target\HelloWorldAndroid.apk
1880 KB/s (44299 bytes in 0.023s)
pkg: /data/local/tmp/HelloWorldAndroid.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

I try to compare apk installation with the following case :
1- signed apk generated from eclipse
2- signed apk manually generated with information available on the following page.
http://developer.android.com/tools/publishing/app-signing.html

In the 2 cases, I can install apk with no error.

I use the following command to generated my release apk with maven :
mvn clean install -Prelease.

Could you help me to solve this problem ?

Best regards,
Franck

@rciovati
Copy link
Contributor

rciovati commented Jun 6, 2013

If you are using the JDK 1.7 try change:

<execution>
    <id>signing</id>
    <goals>
        <goal>sign</goal>
        <goal>verify</goal>
    </goals>
    <phase>package</phase>
    <inherited>true</inherited>
    <configuration>
        <removeExistingSignatures>true</removeExistingSignatures>
        <archiveDirectory/>
        <includes>
            <include>${project.build.directory}/${project.artifactId}.apk</include>
        </includes>
        <keystore>${sign.keystore}</keystore>
        <alias>${sign.alias}</alias>
        <storepass>${sign.storepass}</storepass>
        <keypass>${sign.keypass}</keypass>
        <verbose>false</verbose>
    </configuration>
</execution>

with

<execution>
    <id>signing</id>
    <goals>
        <goal>sign</goal>
        <goal>verify</goal>
    </goals>
    <phase>package</phase>
    <inherited>true</inherited>
    <configuration>
        <removeExistingSignatures>true</removeExistingSignatures>
        <archiveDirectory/>
        <includes>
            <include>${project.build.directory}/${project.artifactId}.apk</include>
        </includes>
        <keystore>${sign.keystore}</keystore>
        <alias>${sign.alias}</alias>
        <storepass>${sign.storepass}</storepass>
        <keypass>${sign.keypass}</keypass>
        <verbose>false</verbose>
        <arguments>
          <argument>-sigalg</argument><argument>MD5withRSA</argument>
          <argument>-digestalg</argument><argument>SHA1</argument>
        </arguments>
    </configuration>
</execution>

@franck-serot
Copy link
Author

I find the solution and thank you for your response that confirms it.

The following configuration is required :

-sigalgMD5withRSA
-digestalgSHA1

@franck-serot
Copy link
Author

I solve the problem with the second solution.
-sigalg and -digestalg parameters are required.
Best regards.
Franck

@ebiermann
Copy link
Contributor

Riccardo added the fix to the archetype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants