0

I have uploaded our keystore and set the keystore password accordingly but I don't have a clue what the alias and key password will be and it doesn't provide any documentation anywhere in the appcenter.ms documentation as to where these would be and they don't appear anywhere in VS.net 2019 that I could find them.

So how does one get this working with code signing for upload to the play store automatically?

This isn't answered here: How to check certificate name and alias in keystore files? because that doesn't help from a vs.net project that has generated the keystore and does this automatically. AppCenter either shouldn't be requiring these additional fields or they should be self-evident without having to hack a bunch of java commands. There must be an easier/better way and also the keystore tool doesn't work on windows against a .keystore file.

Thanks!

James Hancock
  • 3,348
  • 5
  • 34
  • 59
  • the Android keytool should work on Windows or Mac and should help you figure out the alias and password for your keystore, regardless of who generated it. – Jason Sep 11 '20 at 19:19
  • When I run it, it doesn't recognize -v -list or -keystore parameters and thus I can't get it to do anything useful with the latest version of Android Studio. Also it's not clear at all why Appcenter is asking for things that Visual studio apparently just knows. – James Hancock Sep 11 '20 at 19:23
  • just running keytool or "keytool -?" should give you a list of commands. Are you running it from the "SDK Command Prompt"? – Jason Sep 11 '20 at 19:27
  • It doesn’t. I’m just running it from power shell directly since it’s an exe – James Hancock Sep 11 '20 at 19:27
  • I suspect that you're running the wrong one. Opening an "SDK Command Prompt" will be sure all the environment settings are correct – Jason Sep 11 '20 at 19:29
  • Don’t have a clue how to do this. I’m not a Java person. I wrote xamarin and don’t have a clue what I’m supposed to do and every documentation expects you magically know stuff that no xamarin forms dev would ever need to know. – James Hancock Sep 11 '20 at 19:30
  • You're writing an Android app, it's reasonable to expect that you learn a little about Android's tools to do it. I don't know anything about Java either, but I do know that "no xamarin forms dev would ever need to know." is false. From VS, "Tools --> Android --> Android ADB Command Prompt" – Jason Sep 11 '20 at 19:35
  • Make sure the directory containing **keytool.exe** has been added to the `PATH` environment variable.Then open a **Command Prompt** and run `keytool.exe` using the following command: `Copy keytool.exe -list -v -keystore "%LocalAppData%\Xamarin\Mono for Android\debug.keystore" -alias androiddebugkey -storepass android -keypass android`. Check the link:https://learn.microsoft.com/en-us/xamarin/android/deploy-test/signing/keystore-signature?tabs=windows#for-debug--non-custom-signed-builds – Jarvan Zhang Sep 14 '20 at 06:37
  • Thanks. Now works once I removed the alias tag it finally gave me the info, and the key password is identical to the keystore password and thus redudant. – James Hancock Sep 15 '20 at 18:39

1 Answers1

0

So for those that are looking for a concise answer on how to do this if you generate a keystore and publish manually per the docs in VS.net and then want to use that keystore in app center:

  1. Export the keystore in Visual Studio.
  2. Use this command: keytool.exe -list -v -keystore {filename} -storepass {keystore password} -keypass {keystore password}
  3. This will bring up the alias that it created.
  4. In App Center enter the alias per the output, and then both passwords are the same.
James Hancock
  • 3,348
  • 5
  • 34
  • 59