-
-
Save sushruth/91d6ef9c68fa22897d46e52eb1761f3b to your computer and use it in GitHub Desktop.
Recompile APK + Sign with apktool - Windows version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo off | |
:: This is the project folder | |
set PROJ=%1 | |
shift | |
:: You must first install apktool (https://github.com/iBotPeaches/Apktool) and android SDK | |
:: You must also have APKTOOL_HOME, JAVA_HOME/tools and ANDROID_SDK_HOME/build-tools in your PATH (change location as needed) | |
:: and decompile apk using it | |
:: apktool d -rf my-app.apk | |
:: then generate a key for sign in: | |
:: keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 | |
del signed-app.apk | |
apktool b -f %PROJ% | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore %PROJ%/dist/%PROJ%.apk alias_name | |
zipalign -v 4 %PROJ%/dist/%PROJ%.apk signed-app.apk | |
adb install -r signed-app.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment