Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by cmccown · Oct 10, 2011 at 05:19 AM · apkpublishingsigning

APK Signed for Android, but refuses to install

After building a game and testing it in debug mode, I've tried building the game and signing it for use on the market. The game seems to be signed without issue, and the market even lets me upload and publish it.

However, Android devices refuse to install it. I've tested using several devices, and this has me very puzzled. Especially considering the Android Market sees the APK as being signed and allows it be uploaded and even published/purchased. (Had a friend confirm this on his account).

I've tried all of the following :

g

enerating the key from within Unity, using the standard interface.

generating the key using keytool and jarsigner.
generating the key both ways and then running zipalign(just in case). Using the following tools:
**

64bit Win7,

Unity 3.4.1 Android (I don't own pro yet), Java JDK 1.7.0, Android SDK r13** Any ideas or suggestions would be very appreciated. Below is the result of running jarsigner -verify -verbose on the APK: s 2719 Sun Oct 09 22:49:14 CDT 2011 META-INF/MANIFEST.MF 2881 Sun Oct 09 22:49:14 CDT 2011 META-INF/AX1311.SF
1178 Sun Oct 09 22:49:14 CDT 2011 META-INF/AX1311.DSA
sm 14336 Sun Oct 09 22:49:08 CDT 2011 assets/bin/Data/Managed/Assembly-UnityScript.dll sm 125440 Sun Oct 09 22:49:08 CDT 2011 assets/bin/Data/Managed/Boo.Lang.dll sm 292864 Sun Oct 09 22:49:08 CDT 2011 assets/bin/Data/Managed/Mono.Security.dll sm 1068544 Sun Oct 09 22:49:10 CDT 2011 assets/bin/Data/Managed/System.dll sm 444416 Sun Oct 09 22:49:10 CDT 2011 assets/bin/Data/Managed/UnityEngine.dll sm 2495488 Sun Oct 09 22:49:10 CDT 2011 assets/bin/Data/Managed/mscorlib.dll sm 3023 Sun Oct 09 22:49:10 CDT 2011 assets/bin/Data/level0 sm 1231 Sun Oct 09 22:49:10 CDT 2011 assets/bin/Data/level1 sm 1191 Sun Oct 09 22:49:10 CDT 2011 assets/bin/Data/level2 sm 10865 Sun Oct 09 22:49:10 CDT 2011 assets/bin/Data/mainData sm 150 Sun Oct 09 22:49:10 CDT 2011 assets/bin/Data/settings.xml sm 3126951 Sun Oct 09 22:49:10 CDT 2011 assets/bin/Data/sharedassets0.assets sm 350261 Sun Oct 09 22:49:12 CDT 2011 assets/bin/Data/sharedassets1.assets sm 515 Sun Oct 09 22:49:12 CDT 2011 assets/bin/Data/sharedassets2.assets sm 515 Sun Oct 09 22:49:12 CDT 2011 assets/bin/Data/sharedassets3.assets sm 20863 Tue Sep 13 13:53:10 CDT 2011 assets/bin/Data/splash.png sm 2246019 Sun Oct 09 22:49:12 CDT 2011 assets/bin/Data/unity default resources sm 3743444 Sun Oct 09 22:49:12 CDT 2011 assets/libs/armeabi-v7a/libmono.so sm 6286608 Sun Oct 09 22:49:12 CDT 2011 assets/libs/armeabi-v7a/libunity.so sm 89832 Tue Sep 13 14:01:20 CDT 2011 classes.dex sm 3483 Sun Oct 09 22:49:04 CDT 2011 res/drawable/app_icon.png sm 3440 Sun Oct 09 22:49:14 CDT 2011 AndroidManifest.xml sm 920 Sun Oct 09 22:49:04 CDT 2011 resources.arsc sm 6563 Sun Oct 09 22:49:04 CDT 2011 res/drawable-hdpi/app_icon.png sm 98120 Tue Sep 13 14:01:22 CDT 2011 lib/armeabi-v7a/libmono.so sm 56240 Tue Sep 13 14:01:22 CDT 2011 lib/armeabi-v7a/libunity.so s = signature was verified m = entry is listed in manifest k = at least one certificate was found in keystore i = at least one certificate was found in identity scope jar verified. Warning: This jar contains entries whose certificate chain is not validated.
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Tseng · Oct 11, 2011 at 02:36 AM

You should run logcat (android sdk folder, plattform tools typically, there is an adb.exe. Then do Start > Run > cmd.exe > switch to that folder and type "adb.exe logcat"). Of course you have to enable "USB Debugging" too in your Android phone.

Once logcat is started, open Market and download your game and pause logcat after the download fails and look there.

It's probably not a problem with signing but one that your game is to big for your phones cache (i.e. HTC Desire only has 40 MB where some big chunk is already used by the OS and you typically get ~25 MB). Since HTC Desire uses the /cache partition for downloads (market downloads too), it can't download (and install) games which are bigger than the free space there.

If that's the issue, you should be able to identify it via logcat, as Market (Vending) will display such errors in logcat

edit: There is also another thing which could cause problems on developer devices: When you push the game with Unity3d on the phone you, most developers push the version which is signed with the android debug key. This works for development. But once the game is released, it's signed with the retail key.

The problem is: You can only install or "upgrade" versions which have identical signatures. So if your developer version is still installed on your phone, you must uninstall it first, before you're able to install it from the market.

Go to Settings > Applications > Manage Applications and select your game and hit uninstall. This will remove the game completely from your device (also any saved data) and delete all the private folders in the internal memory. Now you should be able to install it from the market.

The reason for this is: Android uses the signatures to make sure that the game or it's update is coming from the developer who initially published it. So if the signature is changed (i.e. signed by a different key), Android will refuse to update it.

That being said, you should backup your signature key very carefully, because if you lose it once, you will never be able to release any updates to your existing game (you would have to change it's package name and add it as a new entry. All existing users won't get notified about updates until they download the new version... of course they lose all progress)

edit2: With the error message from your latest comments, I found this one

http://forum.unity3d.com/threads/100334-Install_parse_failed_no_certificates

Seem as you have to uninstall JDK 1.7 and use 1.6 instead.

Comment
Add comment · Show 10 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Meltdown · Oct 11, 2011 at 05:36 AM 0
Share

Oops sorry misread that :p

avatar image cmccown · Oct 11, 2011 at 01:07 PM 0
Share

Awesome, thanks guys. I'll give this a shot this evening and let you guys know what I discover.

Will logcat work when I attempt to install the device locally?

I would prefer not to republish the work until I confirm it is working on the market, and I can't seem to find it on the market unless I publish to the world.

avatar image Tseng · Oct 11, 2011 at 01:29 PM 0
Share

I don't think so, since at least for me, the files are pushed to /data

adb install ThePirateGame-snapdragon.apk

daemon started successfully 1386 $$anonymous$$B/s (16071915 bytes in 11.317s) pkg: /data/local/tmp/ThePirateGame-snapdragon.apk But you should look at the logcat first what the market reports while you attempt to download/install it and edit your question with the result. $$anonymous$$aybe it will also display another error. Just on the side note: How big is your AP$$anonymous$$ file (in $$anonymous$$B)?
avatar image cmccown · Oct 11, 2011 at 01:39 PM 0
Share

7.7$$anonymous$$B

I don't think the file size is causing the problem, but I'm willing to try anything. I'm using mostly png and tga files for my images and I'm using the built in primitives wherever I can to conserve space.

I did use raw wav files for audio, but zipalign should compress those down to a reasonable size, right?

Thanks again.

avatar image Tseng · Oct 11, 2011 at 01:59 PM 0
Share
  1. $$anonymous$$B is quite small, so yea... shouldn't be a problem. They usually start with >=25 $$anonymous$$B on some devices (especially the older ones with custom UI like HTC Sense where the /data partition size got reduced in favor of a bigger /system or /data partition, because custom UIs like HTC Sense require more internal space).

What does Logcat says during installation?

I've updated my answer from above with another common source of errors

Show more comments
avatar image
1

Answer by Meltdown · Oct 10, 2011 at 06:08 AM

Try this...

  1. Make sure the jdk\bin path is in the Windows Environment Variable PATH. (Both 32 & 64 bit paths for good measure)

  2. Close and reopen Unity

  3. Create a brand new keystore file from scratch. Make sure your password is 100% correct

I had the same problem and that worked for me. I would also zipalign your .apk once its been built and signed. Let me know if you need help with that.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image cmccown · Oct 10, 2011 at 03:16 PM 0
Share

Thanks $$anonymous$$eltdown, good idea.

I've only used the 64 bit JD$$anonymous$$ to sign the AP$$anonymous$$ this far.

I'll try the 32 bit and 64 bit versions separately tonight when I get home and then if neither works individually I'll test with both JD$$anonymous$$ versions and see if that works.

A 64 bit vs. 32 bit compatibility issue might explain why Windows and Android $$anonymous$$arket's servers see the file as being signed but the devices do not.

Crossing my fingers, I'll let you know how it goes.

avatar image Meltdown · Oct 10, 2011 at 04:14 PM 0
Share

I installed both versions of the JD$$anonymous$$. I run Win 7 64-bit. Set the PATH for both. Good luck :p

avatar image cmccown · Oct 11, 2011 at 01:56 AM 0
Share

Ugh, still no luck. Thanks anyway. Submitting a ticket to Google Developer Help. We'll see what they say.

avatar image
0

Answer by cmccown · Oct 10, 2011 at 10:23 PM

Argh, OK. Closer, but still not there.
I'm not even getting a warning message now, but I still can't install the app to a device. This test was done with the i586 install of JDK listed first and the x68 install second in the PATH variable.

If I get different results with the paths reversed I'll update, but if you have any other ideas to try please let me know.

Thanks!

s k 2719 Mon Oct 10 17:13:08 CDT 2011 META-INF/MANIFEST.MF

     2881 Mon Oct 10 17:13:08 CDT 2011 META-INF/IRGAMES.SF
 
     1164 Mon Oct 10 17:13:08 CDT 2011 META-INF/IRGAMES.DSA
 

smk 14336 Mon Oct 10 17:13:02 CDT 2011 assets/bin/Data/Managed/Assembly-UnityScript.dll

smk 125440 Mon Oct 10 17:13:02 CDT 2011 assets/bin/Data/Managed/Boo.Lang.dll

smk 292864 Mon Oct 10 17:13:02 CDT 2011 assets/bin/Data/Managed/Mono.Security.dll

smk 1068544 Mon Oct 10 17:13:02 CDT 2011 assets/bin/Data/Managed/System.dll

smk 444416 Mon Oct 10 17:13:02 CDT 2011 assets/bin/Data/Managed/UnityEngine.dll

smk 2495488 Mon Oct 10 17:13:02 CDT 2011 assets/bin/Data/Managed/mscorlib.dll

smk 4719 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/level0

smk 3065 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/level1

smk 1189 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/level2

smk 7387 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/mainData

smk 150 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/settings.xml

smk 396143 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/sharedassets0.assets

smk 3081057 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/sharedassets1.assets

smk 350295 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/sharedassets2.assets

smk 473 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/sharedassets3.assets

smk 20863 Tue Sep 13 13:53:10 CDT 2011 assets/bin/Data/splash.png

smk 2246019 Mon Oct 10 17:13:04 CDT 2011 assets/bin/Data/unity default resources

smk 3743444 Mon Oct 10 17:13:04 CDT 2011 assets/libs/armeabi-v7a/libmono.so

smk 6286608 Mon Oct 10 17:13:06 CDT 2011 assets/libs/armeabi-v7a/libunity.so

smk 89832 Tue Sep 13 14:01:20 CDT 2011 classes.dex

smk 3483 Mon Oct 10 17:12:58 CDT 2011 res/drawable/app_icon.png

smk 3440 Mon Oct 10 17:13:06 CDT 2011 AndroidManifest.xml

smk 920 Mon Oct 10 17:12:58 CDT 2011 resources.arsc

smk 6563 Mon Oct 10 17:12:58 CDT 2011 res/drawable-hdpi/app_icon.png

smk 98120 Tue Sep 13 14:01:22 CDT 2011 lib/armeabi-v7a/libmono.so smk 56240 Tue Sep 13 14:01:22 CDT 2011 lib/armeabi-v7a/libunity.so

s = signature was verified m = entry is listed in manifest k = at least one certificate was found in keystore i = at least one certificate was found in identity scope

jar verified.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by cmccown · Oct 11, 2011 at 06:41 PM

Final answer...

DO NOT USE JDK 1.7.0 EVER.

Seems that was the problem, when I changed to JDK 1.6 the universe stabilized and sanity returned. Thanks everyone. I really hope this helps someone else out there.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Failed to sign Android package (Unity 2019) 1 Answer

Publishing an APK 1 Answer

Problem when building/signing .apk 0 Answers

google protect 0 Answers

You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The upload certificate has fingerprint:, 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges