Run as apksigner [-p password] keystore input-apk output-apk. This will use the specified keystore (or creating one if necessary) to create a signed and zipaligned output file.