FileInputStream in = new FileInputStream(unsignedApk);
FileOutputStream out = new FileOutputStream(mOutputApk);
KeyStore ks = getKeyStore();
PrivateKey key = (PrivateKey)ks.getKey(ALIAS, ALIAS_PASSWORD);
X509Certificate cert = (X509Certificate)ks.getCertificate(ALIAS);
SignedJarBuilder builder = new SignedJarBuilder(out, key, cert);
builder.writeZip(in, null);
builder.close();
out.close();
in.close();
}