question

soapdev avatar image
soapdev asked

Unity: How do I determine the "Package Name" and "Signature" ?

I am sorry for my stubbornness but I am primarily a unity developer and not a Android programmer. Right now I am a bit lost with the instructions because first of all they seem to be slightly outdated or wrong as some of the section of the whitelist binary submissions are hidden now elsewhere on this website. Also why is it called "Whitelist Registry" and other times "Whitelist a Binary"- what does it really mean and how is it related to Game Circle? But the thing that is not explained at all is how or what the "Game Package Name" is and where I get the "Signature" from. Could someone enlighten me if these are just different terminologies or if I need other tools than Unity and more importantly how to use them to retrieve those 2 strings? I have half a day left to decide whether we implement this Game Circle or not, I wish stuff like this wouldn't interrupt me.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dixith@Amazon avatar image
Dixith@Amazon answered
Thank you for your intrest on developing games in Amazon GameCircle. 1.)To provide additional security for your game's communication with Amazon GameCircle services you need to register your Android application's signature with Amazon Game Circle. This process is called whitelisting of a binary. 2.)You can generate your application's signature by using key tool , which comes with java SDK. keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 Please follow the below link that gives clear picture on Amazon Game Circle. https://developer.amazon.com/sdk/gamecircle/documentation/gamecircle-setup.html
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Peter@AWS avatar image
Peter@AWS answered
Hello. GameCircle uses a whitelist to prevent random, unpublished applications from connecting to the service. If your app is still in development (that is, unpublished), GameCircle will still allow access as long as your app's binary has been whitelisted. "Whitelist Registry" refers to the actual list of applications allowed to access GameCircle; "Whitelist a Binary" is what you do to get your app into the Registry. When developing Android apps with Unity, a Java wrapper is created around your code when it's packaged into an .apk file. All the Java code in the wrapper is associated with a named Java "package," which GameCircle uses to check access permissions. If the package name isn't whitelisted, GameCircle access is denied. You can find the package name Unity will generate under Other Settings on the Android-specific section of the PlayerSettings pane. The signature is actually the SHA1 hash of the certificate used to sign your Android app. As Dixith mentioned, you can generate this hash using the command line above, provided you have the necessary commands installed. Hope this helps, -peter
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

moproductions avatar image
moproductions answered
I had the exact same problem as the original poster but I don't think the above information is correct. Above it states to use this command to generate the signature: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 The problem is that's all debug keys, and in order to publish apps and test certain features you must use a release key. The above command will just spit out any random key with any password you give it. In Unity, part of the process is generating a keystore, where it gives you an interface to set up the information. Once that keystore is generated, I believe you need to run the keytool command on THAT keystore, not a debug one. For example on our app we did this: keytool -exportcert -alias ourappalias -keystore ourkeystorename.keystore | openssl sha1 -binary | openssl base64 That seemed to generate the same key. Can anybody confirm if this information is correct? If so I'd like to share it with some of my fellow Unity developers. Thanks -Mo
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Venkat@Amazon avatar image
Venkat@Amazon answered
Hi Mo, Thank you for your post. If your app is in development and unpublished, by whitelisting your app signature Gamecircle will allow you to access the unpublished content for testing purpose. For this we generate the app signature by below command: $ keytool -exportcert -alias androiddebugkey -keystore ./.android/debug.keystore | openssl sha1 -binary | openssl base64 Please ensure to use the debug keystore password as "android" while generating the signature. By providing the random password (other than "android"), incorrect signature will be generated.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.