Is it possible to specify the location of a self created debug keystore when creating debug .apk
\'s (
) with ant
One easy method you can use as a work-around (which is especially nice in our CI system where many projects are built and where a soft touch is required when dealing with keystores), is to go ahead and run the debug build, use AAPT to remove the contents of the META-INF folder, and run jarsigner to sign it with your custom debug.keystore.
In pseudo-script, it looks like: # Normal Ant debug build ant debug
# Remove default debug signing
aapt remove YourDebugApp.apk META-INF/MANIFEST.MF
aapt remove YourDebugApp.apk META-INF/CERT.SF
aapt remove YourDebugApp.apk META-INF/CERT.RSA
# Use Jarsigner and the custom debug.keystore.
# NOTE: This assumes you explicitly called out MD5withRSA as your signing algorithm
# when you generated the key; drop the -sigalg tag if you did not.
jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore my-release-key.keystore -storepass android YourDebugApp.apk
# Verify signing
jarsigner -verify YourDebugApp.apk