Announcement

Collapse
No announcement yet.

How to sign a APK file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to sign a APK file

    Well the title says it all. When I'm trying to upload my alpha release to the google developer console for testing i get the following error



    I can't seem to find any UE4 documentation mentioning how to sign a APK file? A tutorial or how to would be greatly appreciated.
    Attached Files
    Do Not Argue Toxic Game
    Balloony PoP get it on Google Play
    Fishy Blub Blub
    get it on Google Play

    #2
    Got it working. I'm thinking about writing a how to on this topic as there's no documentation from Epic at all.
    Do Not Argue Toxic Game
    Balloony PoP get it on Google Play
    Fishy Blub Blub
    get it on Google Play

    Comment


      #3
      That would be great if you could, because I've been having troubles with that whole process.

      Comment


        #4
        No guarantee but i may upload a video of how to package, sign and upload and get a game on google play store (basically everything after your finished developing the game). Then maybe a seperate video for AdMob/Google Play Game Services (Achievements/Leaderboard).

        Although not thorough , look at this answer hub report https://answers.unrealengine.com/que...hipping-p.html
        Last edited by KRushin; 07-03-2014, 08:21 PM.
        Twitter - @TheKRushin

        Feel free to ask questions and come learn to be an #UnrealDev

        How to report a Bug

        Comment


          #5
          Yeah, it took me a LOOOONNNGGGG time to finally figure this out, even after reading much of the documentation. I'm assuming that this is only a problem for people who have never ever created a mobile application. Even after reading all of the documents about signing apks, I was still pretty unsure. Then I watched this quick video:

          https://www.youtube.com/watch?v=k0g0PzzkUyo

          It basically covers the steps outlined in another link that was cited here ( http://developer.android.com/tools/p...ning.html#cert ) but I guess I'm the kind of person who needs to see someone do it first. I didn't realize you had to access the keytool from the command line until I watched the video I linked to above.

          Anyway, after I watched that basic video, and after I was able to reproduce it, and do the same thing, I was still unsure of what to do. Then I read the following post:

          https://answers.unrealengine.com/que...d-package.html

          That post tells you how to alter the main SigningConfig.xml file. I did that in notepad. I then saved it to my project's folder. Then, when I went to build the project for shipping, it finally worked!

          However, even though I was finally able to upload my .apk to Google Play, I have not been able to figure out how to upload the .obb files. I was live-chatting with their help, and they were like, "when you upload your .apk, it will ask you to upload your extension files", but I did that so many times, and have not yet seen anything asking me to upload the extension files. So, good luck with that.

          Comment


            #6
            Step By Step

            It's quite easy.

            Making a key.
            keytool -genkey -v -keystore C:\Users\YourUserName\YourAppName.keystore -alias YourAppName -keyalg RSA -keysize 2048 -validity 10000
            Change YOURUSERNAME to your windows username
            Change YOURAPPNAME to your app/game name

            Then in

            C:\Users\YourUserName\Documents\Unreal Projects\YourAppName\Build\Android

            open the file SigningConfig.xml

            <keyalias>Same as key alias above so YourAppName</keyalias>
            <keystore>full path to keystore file from above - C:\Users\YourUserName\YourAppName.keystore</keystore>
            <keystorepassword>made above during the generation of your key</keystorepassword>
            <keypassword>_sameaskeystore_</keypassword>
            This is it. This way you will sign your APK file so you can upload it to the Google Play Store and it will be signed. Ill update this topic to add some screenshots of the process with the above you should be able to sign your APK file.

            To read your keyfile:

            keytool -list -v -keystore C:\Users\YourUserName\YourAppName.keystore
            Do Not Argue Toxic Game
            Balloony PoP get it on Google Play
            Fishy Blub Blub
            get it on Google Play

            Comment


              #7
              In addition to verify it was signed do this

              Originally posted by KillerSneak View Post
              It's quite easy.

              Making a key.


              Change YOURUSERNAME to your windows username
              Change YOURAPPNAME to your app/game name

              Then in

              C:\Users\YourUserName\Documents\Unreal Projects\YourAppName\Build\Android

              open the file SigningConfig.xml



              This is it. This way you will sign your APK file so you can upload it to the Google Play Store and it will be signed. Ill update this topic to add some screenshots of the process with the above you should be able to sign your APK file.

              To read your keyfile:
              To verify that it is signed do this!
              $ jarsigner -verify -verbose -certs C:\PathToAPK\YourAppName.apk

              Comment


                #8
                Not sure if you still need help with this but I would like to ad my experience in hopes it'll help.

                I have NEVER gotten unreal 4 to successfully sign an apk for me. Not sure what i'm doing wrong but I ended up doing it manually which takes me about a minute.
                package for android (I use etc1 for max compatibility).
                Once its made I move it to my jdk bin folder (which is C:\NVPACK\jdk1.6.0_45\bin on my computer).
                Once its there I press shift+right click and open a cmd window.
                Once I have that open, I simply follow the steps at the bottom of the page here: http://developer.android.com/tools/p...p-signing.html under Signing your APP Manually
                Don't forget to also zipalign your apk.

                Ive done this multiple times for our game Lux Protocol, which is now on google play. Hopefully it helps as this took me forever to figure out.

                Comment


                  #9
                  Making a key part

                  Originally posted by KillerSneak View Post
                  It's quite easy.

                  Making a key.


                  Change YOURUSERNAME to your windows username
                  Change YOURAPPNAME to your app/game name

                  Then in

                  C:\Users\YourUserName\Documents\Unreal Projects\YourAppName\Build\Android

                  open the file SigningConfig.xml



                  This is it. This way you will sign your APK file so you can upload it to the Google Play Store and it will be signed. Ill update this topic to add some screenshots of the process with the above you should be able to sign your APK file.

                  To read your keyfile:
                  So, when you say keytool -genkey -v -keystore , what does this mean?

                  Comment


                    #10
                    It means you type that line into the command prompt (on Windows). You must have the JDK installed and configured in the path for keytool to be found -- it's not part of the Android SDK.

                    Comment


                      #11
                      Hi all,

                      Since this thread is a bit scattered and the process for .apk signing has changed since it was started, I created an Unreal Wiki page that goes step by step through the most current process (as of Unreal 4.12). Link here:

                      https://wiki.unrealengine.com/How_To...ndroid_Package

                      These instructions are based on my own experience struggling to correctly sign an .apk app for distribution recently. If you find any errors or omissions in this walkthrough, please let me know and I'll do my best to correct it ASAP.

                      Comment


                        #12
                        Hi Monotoan, thanks very much for making this Wiki - as this part of the process has had me stumped. So there is one step I also need to make which was messing me up and that is the Android manifest. Is this something that you can help with too please?

                        Many thanks,

                        Paul

                        Comment

                        Working...
                        X