Troubles with apk installation.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DriNeo
:warning: Old Version Published before Godot 3 was released.

For the first time I’m developping for mobile, so please be indulgent.

My apk created by Godot 2.0 stable can’t be copied in the .apk folder of my phone and Godot output says this:

Warning:
This jar contains entries whose certificate chain is not validated.
This jar contains signatures that does not includes a timestamp. 
Without a timestamp, users may be not able to validate this jar after the signer certificate's expiration date (2046-03-04) or after any future revocation date.

The “jarsigner”, “adb” and “debug keystore” files comes from the Android Studio installation.
Other apk from the web works on this phone. What should I do ?

:bust_in_silhouette: Reply From: DriNeo

I created a new debug keystore by copy paste this on my windows cmd.

keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999

And I export the project again. It works but on debug mode the warning is already here and in release mode I have these lines on Godot standard output.

no manifest.
jar is unsigned. (signatures missing or not parsable)

On Android the release apk is visible but on installation attempt, an “unkown error 103” is displayed.
The debug apk works (with a graphic issue, but it’s another question).

I tried to export another demo and the apk refuses to be pasted in the phone again.
I created a new debug keystore and it works.
It seems every keystore file is used for one apk only.
However the setting is in “Editor setting” and I guess these settings are global so it must works for several projects.
I wonder if it’s normal.

DriNeo | 2016-03-16 17:31

:bust_in_silhouette: Reply From: KelinciFX

Hopefully the picture could help…

But, make sure your computer connected to internet before hitting that Export button.

Btw, The weird thing is Android Studio, Eclipse, CopperCube, GameMaker Studio, Unity doesn’t have a kind of this timestamp problem. So, no need an internet connection to sign the .apk

Thanks the timestamp warning is resolved, but the main problem is still here: The release apk can’t be installed.

First I’ll try to resolve this message displayed by the debug window.

jarsigner error: java.lang.RuntimeException: keystore load: Keystore was tampere
d with, or password was incorrect
running cmdline: "C:/OpenJava6/jdk6Installation/bin/jarsigner.exe" "-verify" "C:
/Users/D.T/Dev/GEngine/Tests/SnakeGame/SnakeGameAPK/SnakeGame.apk" "-verbose"
no manifest.
jar is unsigned. (signatures missing or not parsable)

I haven’t knowledge on Java stuffs, and the help on the web needs these knowledges.
Do you know the short way to resolve this without learning Java programming ?

DriNeo | 2016-03-14 11:51

A.] Debug Mode is different with Release Mode.

  • By using the picture above, you MUST put debug.keystore which usually comes with Android Studio, Eclipse, or InteliJIDEA to the field given.

  • If you plan to export the game as a Release, then you need your own Keystore. Something like: NeoGame.keystore. But, don’t put it to a field owned by debug.keystore (see picture above). After that, you MUST specify the alias (godot called it, User) and the password of your key. Remember, both alias and password is case sensitive. So, never type it wrong.

B.] You do not need to make your own debug.keystore. Just use the one that comes with Android Studio. And remember, do not use it as a keystore for Release mode.

:slight_smile:

KelinciFX | 2016-03-14 12:12

So for a release, I must fill the keytool command line with my own alias and password and the Godot export settings like this ?

“-alias” = Export > Android > “Release User”
“-keypass” = Export > Android > “Release Password”

but in the keytool command line, do I need to replace the -dname “CN = Android Debug” too ?

DriNeo | 2016-03-14 13:20

A.] Generating a Release Keystore

  • Using GUI. Android Studio or Eclipse have a functionality to do this.
    ==== OR ====
  • Using CommandLine :
    keytool -genkey -v -keystore NeoGame.keystore -alias NeoGameKey -keyalg RSA -keysize 2048 -validity 9999

B.] Where to put that Release Keystore in Godot ?

enter image description here

KelinciFX | 2016-03-14 17:08

Thank you. You are very helpful.

DriNeo | 2016-03-14 17:47

i am also having timestamp problem…your provided link is not working …pls reply

Pratik | 2018-08-20 20:13