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

Apksigner verify warnings #1569

Closed
tobiasKaminsky opened this issue Sep 21, 2017 · 8 comments
Closed

Apksigner verify warnings #1569

tobiasKaminsky opened this issue Sep 21, 2017 · 8 comments

Comments

@tobiasKaminsky
Copy link
Member

» apksigner verify android2-gplay-release.apk 
WARNING: META-INF/DEPENDENCIES not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/README.txt not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/com.fasterxml.jackson.core.JsonFactory not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/org.apache.commons.logging.LogFactory not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.

Althought these are only text files we should investigate how to avoid this.

@mario
Copy link
Contributor

mario commented Sep 21, 2017

Easy. Exclude as follows:

packagingOptions {
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/LICENSE'
}

@tobiasKaminsky
Copy link
Member Author

This is a way, but don't we need these files?
This is in DEPENDENCIES

// ------------------------------------------------------------------
// Transitive dependencies of this project determined from the
// maven pom organized by organization.
// ------------------------------------------------------------------
Jackrabbit WebDAV Library
From: 'an unknown organization'

I am also unsure about the purpose of META-INF/services/com.fasterxml.jackson.core.JsonFactory.
Content is only: com.fasterxml.jackson.core.JsonFactory

@mario
Copy link
Contributor

mario commented Sep 21, 2017

I don't think we need any of these, to be honest. For DEPENDENCIES and README.TXT I'm sure. And those two other files are just random files.

@tobiasKaminsky
Copy link
Member Author

👍
Then let's try with simple exclude them.

@tobiasKaminsky
Copy link
Member Author

Adding these options works for all files but the services files:

packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/README.txt'
        exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
        exclude 'META-INF/services/org.apache.commons.logging.LogFactory'
    }

apksigner verify gplay/release/android2-gplay-release.apk
WARNING: META-INF/services/com.fasterxml.jackson.core.JsonFactory not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/org.apache.commons.logging.LogFactory not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.

@tobiasKaminsky tobiasKaminsky removed this from the Nextcloud App 2.1.0 milestone Jan 5, 2018
@lilian131
Copy link

hi @tobiasKaminsky where can I put these line of code ?
packagingOptions { exclude 'META-INF/LICENSE.txt' exclude 'META-INF/LICENSE' exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/README.txt' exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory' exclude 'META-INF/services/org.apache.commons.logging.LogFactory' }

@AndyScherzinger
Copy link
Member

You need to create a file named proguard-rules.pro

@tobiasKaminsky
Copy link
Member Author

It still shows warnings, but all in meta-inf directory, so I consider this as no problem.

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

No branches or pull requests

4 participants