Skip to content

Instantly share code, notes, and snippets.

@JonCooperWorks
Last active August 22, 2018 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonCooperWorks/cf4666eff44b64b51f5a42d2be269d45 to your computer and use it in GitHub Desktop.
Save JonCooperWorks/cf4666eff44b64b51f5a42d2be269d45 to your computer and use it in GitHub Desktop.
# Recompile APK
apktool b decompiled/apk/directory -o app-patched.apk
# Zipalign APK to make it compatible with Android
zipalign -p 4 app-patched.apk app-aligned.apk
# Sign APK with your key so Android accepts it.
apksigner sign --ks my-release-key.keystore app-aligned.apk
# Alternatively, you can use jarsigner
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keystore.jks app-aligned.apk selfsigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment