1. Hey! Guest! The 34th GMC Jam will take place between August 22nd, 12:00 UTC (Thursday noon) and August 26th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

Android Problem with Singing your game/APK

Discussion in 'Legacy GameMaker Community Tech Support' started by tiestolord, Apr 8, 2019.

  1. tiestolord

    tiestolord Member

    Joined:
    Aug 12, 2016
    Posts:
    45
    Hi everyone,

    i found few topics related to this problem but there is no real answer...
    So my problem is, when i make APK game on GM i need to Sign my game with certification/SHA1 code, but i dont know how to do that... I opened apk in android studio, tried building it under Build > Build > Generate Signed Bundle/APK. And nothing happened, there is no APK of my game in any of folder from Android Projects. Did anyone had similar problem or has anykind of fix or different way to do it? :(
     
  2. pipebkOT

    pipebkOT Member

    Joined:
    Dec 13, 2018
    Posts:
    208
    which version of game maker are you using? if it's below game maker studio 1.4, like game maker 8 or 8.1 i think that you can't make apks first of all, if it's game maker studio 1.4 the program makes the work for you and sign the apk when you compile it
     
    tiestolord likes this.
  3. zbox

    zbox Member GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    788
    tiestolord likes this.
  4. tiestolord

    tiestolord Member

    Joined:
    Aug 12, 2016
    Posts:
    45
    thx for replay, but I see here only old Keystore singing not the new System that google wants, im trying to upload a new game apk on android console, it wont accept my keystore i need one more Google Certificate to sing my apk with there given SHA-1, should i send to them my keystore SHA1 or?
    soo i need to convert my keystore in pem file to send them? and how can i do that?
     
  5. tiestolord

    tiestolord Member

    Joined:
    Aug 12, 2016
    Posts:
    45
    have 1.499 already few games on google play, but now i wanna upload a new game, but wont accept new apk, its saying it needs google singing -.-
     
  6. zbox

    zbox Member GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    788
    I'm unaware of any changes to the signing system? You sign the APK in Gamemaker and upload it - Google doesn't need to know any more?
     
    tiestolord likes this.
  7. pipebkOT

    pipebkOT Member

    Joined:
    Dec 13, 2018
    Posts:
    208
    the diference between gms 1.4 and the actual gms 2 apk keystore signing is that there is a new field to complete called "alias pasword" aside from that i don't know if there are other changes, so i guess since your keystore doesn't have the alias pasword field in it , google play refuse to accept it
     
    Last edited: Apr 9, 2019
    tiestolord likes this.
  8. tiestolord

    tiestolord Member

    Joined:
    Aug 12, 2016
    Posts:
    45
    this could be a problem, but they want from me to send them my key but in pem file. I manage to put it in jks, but cant convert it to pem file.

    "Enroll in Google Play App Signing to Secure Your App Keys" this is what i mean. im still trying to figure this out.

     
    Last edited by a moderator: Apr 10, 2019
  9. pipebkOT

    pipebkOT Member

    Joined:
    Dec 13, 2018
    Posts:
    208
    tiestolord likes this.
  10. pipebkOT

    pipebkOT Member

    Joined:
    Dec 13, 2018
    Posts:
    208
    or you could generate the keystore in android studio and then import it to gms 1.4, but i'm not sure if it will work
     
    tiestolord likes this.
  11. tiestolord

    tiestolord Member

    Joined:
    Aug 12, 2016
    Posts:
    45
    wont work, i tried to make apk in gm and import it in Android Studio for new signing but i cant get same apk after new apk building....
     
  12. pipebkOT

    pipebkOT Member

    Joined:
    Dec 13, 2018
    Posts:
    208
    tiestolord likes this.
  13. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,336
    Did you try Googling "convert keystore to pem"?

    The first 10 results are guides on how to do it.
     
    tiestolord likes this.
  14. tiestolord

    tiestolord Member

    Joined:
    Aug 12, 2016
    Posts:
    45
    already saw that, thx anyway. I found out what is problem i think. My game was Draft in Android Console, after i made version 1 game and tried to upload game, google didnt accept it because SHA1 key is randomly given and i should accept it or change it with that pem file(Keystore). hmmm

    yes i did, i should use openSSL to convert it but i justcan't get it to work... i tried even cmd but no success

    Converting JKS Key and Certificate to PEM


    This process uses both Java Keytool and OpenSSL (keytool and openssl, respectively, in the commands below) to export the composite private key and certificate from a Java keystore and then extract each element into its own file.

    The PKCS12 file created below is an interim file used to obtain the individual key and certificate files.

    Replace hostname-keystore, cmhost, hostname, and password with values from your system.

    1. Export the private key and certificate command line:
      $ keytool -importkeystore -srckeystore /opt/cloudera/security/jks/hostname-keystore.jks \
      -srcstorepass password -srckeypass password -destkeystore /tmp/hostname-keystore.p12 \
      -deststoretype PKCS12 -srcalias hostname -deststorepass password -destkeypass password

    2. Extract the certificate file from the resulting PKCS12 file:
      $ openssl pkcs12 -in /tmp/hostname-keystore.p12 -passin pass:password -nokeys \
      -out /opt/cloudera/security/pki/hostname.pem

      This extracted certificate can be used, as is.
    [/paste:font]
    Use OpenSSL to extract the private key from the PKCS keystore when needed. This statement extracts the key and saves it to a keystore, giving it the password you provide:
    $ openssl pkcs12 -in /tmp/hostname-keystore.p12 -passin pass:password \
    -nocerts -out /opt/cloudera/security/pki/hostname.key -passout pass:password

    To generate a key without a password, use this version of the command:
    $ openssl rsa -in /tmp/hostname-keystore.p12 -passin pass:password \
    -nocerts -out /opt/cloudera/security/pki/hostname.pem


    Its so complicated, i cant belive there is no some kind of program to do that... I tryied with cmd via java keytool but im getting all the time Access is denied. -.-

    *********
    Moderator Edit: triple post merged. Please don't make back-to-back posts. Use the edit feature to update previous post.
     
    Last edited by a moderator: Apr 10, 2019
  15. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,336
    Use the edit button on your posts to add information, there's no need to make multiple posts in a row just minutes apart.

    Open the cmd prompt with Admin rights and try again.
    Also make sure the file is located somewhere that isn't protected by Windows.
     
    tiestolord likes this.
  16. tiestolord

    tiestolord Member

    Joined:
    Aug 12, 2016
    Posts:
    45
    googles special technician contacted me and gived me 2 options after some investigation. I cannot believe that was so simple, just delete Draft of your game and start new Draft and voila... so simple but yet so easy to forget about that....

    Thx everyone for your time, tips and answers <3

    And here you can check my new game FARTY on GooglePlayStore :D
    https://play.google.com/store/apps/details?id=com.terrestrialarts.farty
     
  17. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    360
    I overcame this issue. I lost my keyfile that belonged to my app. I truely do not remember the process but,

    • I sent an e-mail to Google Play team, describing my issue and asked for a keystore file change.
    • They requested a new .pem file(sign certificate) to be replaced.
    • I did it with Windows CMD(cmd.exe on search bar). As far as I remember, I pointed the file's location. The console then asked me for the password. I gave it and voila!
    • Sent it back to the team and they replaced the key in 24 hours.
    All went smooth and good. I wish I remembered more details about this.
     
    tiestolord likes this.
  18. Joh

    Joh Member

    Joined:
    Jul 23, 2016
    Posts:
    63
    Hi, I was wondering how did this signing issue affect you? do you use google services?
    I can't login in my game and I was wondering if that issue might be related?
    I somehow got the game into the playstore, but I'm not sure how the whole key thing works. I had my (GM) key linked with google play services, but when I made the App to put it on the store it generated a new key with "Enroll in Google Play App Signing to Secure Your App Keys" and i'm not sure if that one being different might lead to issues.

    Sorry if this is unrelated to your issue, worth asking.
     
  19. tiestolord

    tiestolord Member

    Joined:
    Aug 12, 2016
    Posts:
    45
    true i did that but i had problem with cmd, but it done now :D
     
  20. tiestolord

    tiestolord Member

    Joined:
    Aug 12, 2016
    Posts:
    45
    hi, was game already published on google play or its draft? And do you mean by login when you get in game on phone wont login via google play service like your player account?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice