Android Installation Fails

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

Hello Guys i have a problem :confused:

I want to export my Game to my Android Phone. So setup the Export Settings asdescribe in the Godot Tutorial. I can create an APK but when i try to install it on my phone it says : package is damaged

And when i try to install it via adb it says :

Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl1118192211.tmp/base.apk has no certificates at entry AndroidManifest.xml]

i have used the keystore from Android Studio and used my owen but it changed nothing.
I use jdk8

i hope you can help me :slight_smile:

Can you post the log Godot outputs when you export your APK?

Zylann | 2017-12-06 22:34

Sure :slight_smile:

TESTING: G:/Daten/Desktop/engine.cfg
TESTING: G:/Daten/engine.cfg
FOUND versionCode
FOUND versionName
FOUND package
ADDING: AndroidManifest.xml
ADDING: META-INF/MANIFEST.MF
ADDING: classes.dex
ADDING: lib/armeabi-v7a/libgodot_android.so
ADDING: lib/x86/libgodot_android.so
ADDING: res/drawable-hdpi-v4/notify_panel_notification_icon_bg.png
ADDING: res/drawable-mdpi-v4/notify_panel_notification_icon_bg.png
ADDING: res/drawable/icon.png
ADDING: res/layout/downloading_expansion.xml
ADDING: res/layout/status_bar_ongoing_event_progress_bar.xml
*******************GORRRGLE***********************
unicode error: invalid skip
unicode error: invalid skip
unicode error: invalid skip
unicode error: invalid skip
unicode error: invalid skip
ADDING: resources.arsc
HOHO: .
HOHO: ..
HOHO: engine.cfg
HOHO: export.cfg
HOHO: GameObj
HOHO: GameScene.tscn
HOHO: grafics
HOHO: icon.png
HOHO: icon.png.flags
HOHO: logic Scripts
AT: res://
Hinzugefügt: res://icon.png.flags
HOHO: .
HOHO: ..
HOHO: UI
AT: res://GameObj/
HOHO: .
HOHO: ..
HOHO: construct_gh.tscn
AT: res://GameObj/UI/
HOHO: .
HOHO: ..
HOHO: texture
HOHO: ui
AT: res://grafics/
HOHO: .
HOHO: ..
HOHO: grass_texture.jpg
HOHO: grass_texture_small.jpg
AT: res://grafics/texture/
HOHO: .
HOHO: ..
HOHO: construct_icon.png
HOHO: ui_border_left.png
AT: res://grafics/ui/
HOHO: .
HOHO: ..
HOHO: TowerLogic.gd
AT: res://logic Scripts/
REMAP: res://logic Scripts/TowerLogic.gd -> res://logic Scripts/TowerLogic.gdc
REMAP: res://GameObj/UI/construct_gh.tscn -> res://GameObj/UI/construct_gh.tscn.converted.scn
REMAP: res://GameScene.tscn -> res://GameScene.tscn.converted.scn
0 param: -use_depth_32
1 param: -use_immersive

FreshT | 2017-12-06 22:42

Is it all of it? I don’t see anything wrong here… is your APK signed with a debug keystore? Also what are your Android export options?

Zylann | 2017-12-06 23:04

Yes this is all. Yes i use the debug keystore from Android Studio and also tested it with a self created one. I did not change anything on the export Options just default.

FreshT | 2017-12-06 23:08

I searched for the error you get: android - INSTALL_PARSE_FAILED_NO_CERTIFICATES error in Eclipse - Stack Overflow

Maybe try to uninstall the APK before trying to reinstall it?
Other that this, I’m out of ideas

Zylann | 2017-12-06 23:22

Here is a screenshot from my jarsigner maybe this helps ? :frowning:

Jarsigner

FreshT | 2017-12-07 20:04

It says the jar is not signed at the bottom

Zylann | 2017-12-07 20:05

Yes but i dont know how to change this

FreshT | 2017-12-07 20:06

my work around is to signe the apk by myself with the jarsigner. But i dont know why Godot dosent do the Trick.

 ./jarsigner -verbose -keystore debug.keystore -storepass android 
-keypass android my.apk androiddebugkey

FreshT | 2017-12-07 21:11

:bust_in_silhouette: Reply From: jtumain

Sorry to bring an old topic back to life, but I spent about 3 hours trying to build the app for android and the last answer here resolved it for me. Signing the apk myself with jarsigner.

I double checked all of my filenames for invalid characters or spaces.
Recreated my keystore.

But its just the APK needed to be signed by the jarsigner.

In addition to this, I later found out that I wasn’t using the most up to date jarsigner. Thsi was done by deliberate, since I thought I needed to use 1.8. In the end, the latest 1.12 at this time of writing - worked for me.

After updating Godot to use this jarsigner in the settings instead, I can build the app for Android through Godot.

jtumain | 2019-06-02 11:37

Can you please let me know where in the settings I can find setting the jarsigner location?

bashan | 2019-12-15 19:57

:bust_in_silhouette: Reply From: kitsubi

Super late answer, but I fixed this by adding [JDK-PATH]/bin to path in my environment variables.
After that the APK was automatically signed as mentioned in the other answers.