Skip to content

Instantly share code, notes, and snippets.

@aliustaoglu
Created February 4, 2021 07:17
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 aliustaoglu/a70f5949a6c334fdfcdd4674350e5898 to your computer and use it in GitHub Desktop.
Save aliustaoglu/a70f5949a6c334fdfcdd4674350e5898 to your computer and use it in GitHub Desktop.
How to resign an already signed apk
  1. Find build.apk file and rename it to build.zip and open it.
  2. Remove META-INF folder and close the zip file.
  3. Change the name back to build.apk
  4. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore cert.keystore build.apk keyalias
  5. zipalign -v -p 4 "build.apk" "build-aligned.apk"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment