Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

@mikkle
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.

@theuni theuni merged commit b06ab72 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 tools/android/packaging/Makefile
View
4 tools/android/packaging/Makefile
@@ -36,7 +36,7 @@ libs= $(DSTLIBS)
multi: x86 arm
@cp images/xbmcapp-debug-skeleton.apk images/xbmcapp-debug-multi-unaligned.apk
@cd xbmc; zip -r -q ../images/xbmcapp-debug-multi-unaligned.apk lib/ assets
- @jarsigner -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-multi-unaligned.apk androiddebugkey
+ @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-multi-unaligned.apk androiddebugkey
@$(SDKROOT)/tools/zipalign -f 4 images/xbmcapp-debug-multi-unaligned.apk $(XBMCROOT)/xbmcapp-multi-debug.apk
@rm images/xbmcapp-debug-multi-unaligned.apk
@echo "$(XBMCROOT)/xbmcapp-multi-debug.apk created"
@@ -47,7 +47,7 @@ package: extras
@javac -classpath $(SDKROOT)/platforms/$(SDK_PLATFORM)/android.jar:xbmc/obj -d xbmc/obj -sourcepath xbmc/src xbmc/src/org/xbmc/xbmc/*.java
@$(DX) --dex --output=xbmc/classes.dex xbmc/obj
@cd xbmc; zip -r -q ../images/xbmcapp-debug-$(PLATFORM)-unaligned.apk lib/$(PLATFORM) assets classes.dex
- @jarsigner -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-$(PLATFORM)-unaligned.apk androiddebugkey
+ @jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore -storepass android images/xbmcapp-debug-$(PLATFORM)-unaligned.apk androiddebugkey
@$(SDKROOT)/tools/zipalign -f 4 images/xbmcapp-debug-$(PLATFORM)-unaligned.apk $(XBMCROOT)/xbmcapp-$(PLATFORM)-debug.apk
@rm images/xbmcapp-debug-$(PLATFORM)-unaligned.apk
@echo "$(XBMCROOT)/xbmcapp-$(PLATFORM)-debug.apk created"
Something went wrong with that request. Please try again.