Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I verify that an Android apk is signed with a release certificate?

How can I check that an Android apk is signed with a release and not debug cert?

like image 305
Vadivelan Avatar asked Oct 20 '22 04:10

Vadivelan


People also ask

How can I tell if APK is signed with a v2?

Run apksigner verify -v <apk> and look for Verified using v2 scheme (APK Signature Scheme v2): true in the output. apksigner can be found in Android SDK build tools 24.0. 3.

Where can I find the APK signature?

It's the tool print-apk-signature uses. Show activity on this post. First, unzip the APK and extract the file /META-INF/ANDROID_. RSA (this file may also be CERT.


2 Answers

Use this command, (go to java < jdk < bin path in cmd prompt)

$ jarsigner -verify -verbose -certs my_application.apk

If you see "CN=Android Debug", this means the .apk was signed with the debug key generated by the Android SDK (means it is unsigned), otherwise you will find something for CN. For more details see: http://developer.android.com/guide/publishing/app-signing.html

like image 429
Anass Avatar answered Oct 22 '22 16:10

Anass


Use console command:

apksigner verify --print-certs application-development-release.apk

You could find apksigner in ../sdk/build-tools/24.0.3/apksigner.bat. Only for build tools v. 24.0.3 and higher.

Also read google docs: https://developer.android.com/studio/command-line/apksigner.html

like image 122
PavelGP Avatar answered Oct 22 '22 18:10

PavelGP