Skip to content
This repository

[droid] Fix signing of APK with recent java/jarsigner versions #1957

Merged
merged 1 commit into from over 1 year ago

2 participants

Mikkel Troest Cory Fields
Mikkel Troest
Collaborator

It seems that default behaviour for the jarsigner tool has changed in Java7 (maybe earlier).
The result of this is that Android will not install the XBMC apk because the signature and/or digest is unacceptable.
This PR adds arguments to jarsigner to make it explicitly use MD5/RSA for signaure and SHA1 for digest, both of which Android seems to expect.

Cory Fields theuni merged commit b06ab72 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Dec 18, 2012
Mikkel Troest mikkle [droid] Fix signing of APK with recent java/jarsigner versions 175a9a5
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 tools/android/packaging/Makefile
4 tools/android/packaging/Makefile
@@ -36,7 +36,7 @@ libs= $(DSTLIBS)
36 36 multi: x86 arm
37 37 @cp images/xbmcapp-debug-skeleton.apk images/xbmcapp-debug-multi-unaligned.apk
38 38 @cd xbmc; zip -r -q ../images/xbmcapp-debug-multi-unaligned.apk lib/ assets
39   - @jarsigner -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-multi-unaligned.apk androiddebugkey
  39 + @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-multi-unaligned.apk androiddebugkey
40 40 @$(SDKROOT)/tools/zipalign -f 4 images/xbmcapp-debug-multi-unaligned.apk $(XBMCROOT)/xbmcapp-multi-debug.apk
41 41 @rm images/xbmcapp-debug-multi-unaligned.apk
42 42 @echo "$(XBMCROOT)/xbmcapp-multi-debug.apk created"
@@ -47,7 +47,7 @@ package: extras
47 47 @javac -classpath $(SDKROOT)/platforms/$(SDK_PLATFORM)/android.jar:xbmc/obj -d xbmc/obj -sourcepath xbmc/src xbmc/src/org/xbmc/xbmc/*.java
48 48 @$(DX) --dex --output=xbmc/classes.dex xbmc/obj
49 49 @cd xbmc; zip -r -q ../images/xbmcapp-debug-$(PLATFORM)-unaligned.apk lib/$(PLATFORM) assets classes.dex
50   - @jarsigner -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-$(PLATFORM)-unaligned.apk androiddebugkey
  50 + @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-$(PLATFORM)-unaligned.apk androiddebugkey
51 51 @$(SDKROOT)/tools/zipalign -f 4 images/xbmcapp-debug-$(PLATFORM)-unaligned.apk $(XBMCROOT)/xbmcapp-$(PLATFORM)-debug.apk
52 52 @rm images/xbmcapp-debug-$(PLATFORM)-unaligned.apk
53 53 @echo "$(XBMCROOT)/xbmcapp-$(PLATFORM)-debug.apk created"

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.