Created
July 24, 2013 19:38
-
-
Save alexdong/6073781 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
echo "Decompile into smali format ..." | |
apktool b ${1} /tmp/${1}-pack.apk | |
echo "\n\nSign the package. Password is mykey ..." | |
jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore mykey.keystore /tmp/${1}-pack.apk mykey | |
echo "\n\nZip align the apk ..." | |
zipalign -f -v 4 /tmp/${1}-pack.apk /tmp/${1}.apk | |
echo "\n\nUninstall existing installation ..." | |
adb uninstall ${2} | |
echo "\n\nInstall apk via adb ..." | |
adb install /tmp/${1}.apk | |
echo "Cleanup /tmp ..." | |
rm /tmp/*.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment