cancel
Showing results for 
Search instead for 
Did you mean: 

Can't seem to submit my "signed" app, OPW says not signed

MaxSMoke777
Expert Protege
I can't figure out how to get around this issue. I have generated a keystore file and successfully used it to compile my app, so my app is signed, right? It's in my Unreal settings, with the Keystore, the user name, and password. The Keystore is in the Build folder, it's a "Shipping" build. UE4 4.26 compiles the app successfully. But when I use the Oculus Platform Window to upload it, after it goes through all of the upload stuff, it stops and tells me I need to Sign my App. 

It's a free game, so I don't know why it needs this level of security at all. 😛 
1 ACCEPTED SOLUTION

Accepted Solutions

MaxSMoke777
Expert Protege

I found a solution, using the existing Android Tools I already had. I have a batch file that calls up a DOS tool for handling it. If you have the same problem you can use it yourself, so long as you replace the following with your own information: 

 

(Paste this in Notepad and save it as "SomethingEctSigningYourAPK.bat")

------------------------ [Copy below and paste in text file] -------------------------

 

call K:\NVPACK\android-sdk-windows\build-tools\28.0.3\apksigner.bat sign --ks K:\YourUnrealDirectory\YourApp\Your.keystore --ks-key-alias YourKeystoreName --ks-pass pass:YourKeystorePassword --key-pass pass:YourKeyStorePassword K:\YourUnrealDirectory\YourApp\Android_Multi\Your-arm64.apk

pause

 

--------------- [Copy Above and Paste in Text File]----------------------------

 

Make sure to rename your text file with ".bat", so it changes the text file into an executable.

 

You will have to find your "apksigner.bat" file. It'll be wherever you put your Android APK stuff. Try using Windows Search to locate it. 

 

Replace the other directory statements with your own (obviously). 

 

I know the double-dashes look weird, but you *NEED THEM*. It won't work without them.

 

As long as you always build in the same directory, you can use this .bat to sign your APK whenever you like, over and over. The "Call" and "Pause" will allow you to read what the .bat file is doing, so you can see if you messed up somewhere. I, typically, mistaken use the wrong KeyStore or password. It will say something like "Sign #1" error if you make that mistake.  

 

This is all super-easy, suitable for Blueprint users like myself, and doesn't involve any of that scary Android Studio stuff. People need to REMEMBER that many of us aren't professional programmers, and we don't code everything in C++ in our sleep. Have some pity for the motivated amateur. 😛 

View solution in original post

12 REPLIES 12

Hykital
Explorer

I hope I have the answer for this for you - I had an app that I uploaded successfully and signed, I then updated the SDK versions to 25 as it told me to.  Now this apparently interferes with the signing/keystore.  So I had to change my minimum Android SDK to 23 (and I left the other at 25) and now the signing works again.

 

Hope that helps!

kavanavak
Expert Protege

I also had a similar issue with v2 signing. The documentation on this is lacking, to say the least, and most tutorials online skip or assume knowledge of steps. I posted my question/answer here:https://forums.unrealengine.com/development-discussion/vr-ar-development/1867098-quest-apk-v2-signat...

What worked for me was, after packaging your APK with Unreal:
 1- Rather than the version of Android Studio recommend in the unreal documentation (3.5.3) I downloaded the latest version (4.1.2)
2 - the Oculus documentation (https://developer.oculus.com/documen...ation-signing/) just says "In Android Studio, go to Build > Generate Signed Bundle / APK." This isn't clear enough. I had to open Android studio and open>[Unreal Project]>Intermediate>arm64>gradle
3 - when open (mine wouldn't open in ASv3.5.3), then Build > Generate Signed Bundle / APK
4 - the generated/signed apk was saved in gradle>app>app-release.apk
5 - When I only selected v2 signature Oculus didn't accept the apk as signed, even though the above docs say selecting just v2 is fine. I had to select both v1 and v2 to get a build that the site accepted.

MaxSMoke777
Expert Protege

I found a solution, using the existing Android Tools I already had. I have a batch file that calls up a DOS tool for handling it. If you have the same problem you can use it yourself, so long as you replace the following with your own information: 

 

(Paste this in Notepad and save it as "SomethingEctSigningYourAPK.bat")

------------------------ [Copy below and paste in text file] -------------------------

 

call K:\NVPACK\android-sdk-windows\build-tools\28.0.3\apksigner.bat sign --ks K:\YourUnrealDirectory\YourApp\Your.keystore --ks-key-alias YourKeystoreName --ks-pass pass:YourKeystorePassword --key-pass pass:YourKeyStorePassword K:\YourUnrealDirectory\YourApp\Android_Multi\Your-arm64.apk

pause

 

--------------- [Copy Above and Paste in Text File]----------------------------

 

Make sure to rename your text file with ".bat", so it changes the text file into an executable.

 

You will have to find your "apksigner.bat" file. It'll be wherever you put your Android APK stuff. Try using Windows Search to locate it. 

 

Replace the other directory statements with your own (obviously). 

 

I know the double-dashes look weird, but you *NEED THEM*. It won't work without them.

 

As long as you always build in the same directory, you can use this .bat to sign your APK whenever you like, over and over. The "Call" and "Pause" will allow you to read what the .bat file is doing, so you can see if you messed up somewhere. I, typically, mistaken use the wrong KeyStore or password. It will say something like "Sign #1" error if you make that mistake.  

 

This is all super-easy, suitable for Blueprint users like myself, and doesn't involve any of that scary Android Studio stuff. People need to REMEMBER that many of us aren't professional programmers, and we don't code everything in C++ in our sleep. Have some pity for the motivated amateur. 😛 

Thanks! I did try your solution, and it did work for me for awhile. But then I found the better one listed below. You should try it as well. it works with 25 without issue and it's super simple. 

 

Now my big issue is Permissions. From what I can tell, there is NO WAY to remove all of them, and App Lab won't accept APK's unless their permissions are limited to just the absolute necessities. It's driving me INSANE! >:[ 

Thanks for your suggestion. I'm certain it's a great one for serious programmers. But I'm not. 😕 

 

I'm a lowly Blueprint user and Android Studio is *WAY* above my paygrade. Too scary! But I did find a simple method using the APKSigner.bat and some command line stuff. Now I have a batch file I can double click on to sign my app anytime I need. As long as I always rebuild in the same directory, problem solved! 

 

Thanks for your advice though. Maybe I'll understand it... someday... 😉

I've not had any issues with permissions at all - I've added some almost random one in an attempt to get stuff to work (such as text to speech).  Does it just reject it at upload?

MaxSMoke777
Expert Protege

There's NO WAY you could use blueprints, make a game with UE4, submit to App Lab, and not get told your app is full of "Dangerous Permissions". My first App Lab game, a single player game with NO SAVED GAME FILE, asked for these permissions: 

 

android.permission.INTERNET android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_EXTERNAL_STORAGE android.permission.READ_MEDIA_AUDIO android.permission.READ_MEDIA_VIDEO android.permission.READ_MEDIA_IMAGES android.permission.ACCESS_MEDIA_LOCATION android.permission.ACCESS_NETWORK_STATE android.permission.WAKE_LOCK com.android.vending.CHECK_LICENSE android.permission.ACCESS_WIFI_STATE com.android.vending.BILLING

 

I just spent the last 3 days meticulously removing over 2 dozen plugins, just to remove permissions. I used a "ManifestRequirementsOverride.txt" with virtually nothing in it, just to remove permissions. And still, *STILL*, I have these permissions I can NOT REMOVE! 

 

Permissions
android.permission.READ_EXTERNAL_STORAGE android.permission.READ_MEDIA_AUDIO android.permission.READ_MEDIA_VIDEO android.permission.READ_MEDIA_IMAGES android.permission.ACCESS_MEDIA_LOCATION android.permission.ACCESS_NETWORK_STATE
 
I am so F****ING MAD at this point! You are either mistaken or confused! There is NO WAY you don't have permission issues!
 
It's not like I did anything special or unique. It's a basic shooter! NOT EVEN A SAVED GAME! At this point it feels like the Unreal Engine is just a terrible vehicle of spyware! It's like a Trojan horse, using my hard work to sneak a world of spyware onto people's devices without me knowing it. I had NO IDEA it was so full of permission requests until App Lab looked it over! I can't even imagine what nefarious things have been going on, just looking at all of these rogue permissions I'm seeing! 
 
I am so tired right now from all of the dead-ends I've searched for a means to cull this permission scourge. For you to claim it's not a problem is a huge insult. You might as well have backhanded me across the face! 

Hykital
Explorer

I get three security vulnerability warnings and that's all - and it distributes via App Lab without any issue at all.  They're on a long todo list.

 

My project has C++ as it was required for something I was using, so maybe that's why I don't have any issues?

 

You're aware you can change all of these permissions in the project settings in UE?

Under Advanced APK Packaging (Platforms - Android) there's an array of "Extra Permissions" which specifies a few of the permissions from your first list, but not all of them.

 

If you'd been a bit more polite in your reply I'd probably have looked up some answers for you.

MaxSMoke777
Expert Protege

That's what I feared was true, THEY PUNISH BLUEPRINT USERS! If you do a C++ project, you're fine, but if you do a blueprint one, they load it up with spyware galore! Right now blueprint users can't use App Lab. It will also bounce their work for excessive permissions! 

 

You can't remove permissions in Advanced Packaging, just add more. It was one of the first things I checked. I have also removed all Ad support, error logging, and crash reporting. I *STILL* have 6 permissions! 

 

And are you even certain you have no permissions you're unaware of? You won't see them on "Test Results", which is the default window. They only appear on the "details".