1

How do I find the certificates used to sign my APK file?
This was discussed in SO question 7104624, apksigner doc on developer.android.com ,and other places. They all say to use the option "--print-certs" on the apksigner verify command line. But I always get error message "unsupported option: --print-certs.".

I have tried apksigner.bat for versions 26.0.2, 27.0.2 and 26.0.3 all with the same result.

I'm probably doing something dumb but I can't figure out what that is. Anybody have a similar experience?

DontPanic
  • 1,936
  • 5
  • 25
  • 50
  • So did you find this: [How do I find out which keystore was used to sign an app?](https://stackoverflow.com/q/11331469/295004) Reminder APKs are just JARs with extra files. – Morrison Chang Nov 19 '18 at 19:29
  • Can you paste the whole command you're using? – Pierre Nov 19 '18 at 21:50
  • I used: "apksigner verify MYAPP.APK --print-certs". Just now I tried "apksigner verify --print-certs MYAPP.APK" and that worked. I guess the options must come *before* the APK. My Bad. I knew it was something dumb. – DontPanic Nov 20 '18 at 20:13

1 Answers1

6

I had used "apksigner verify myapp.apk --print-certs".
Just now I tried "apksigner verify --print-certs myapp.apk" and that worked. I guess the options must come before the APK. My Bad. I knew it was something dumb I did.

DontPanic
  • 1,936
  • 5
  • 25
  • 50