Sunday, June 5, 2016

Android: using zipalign command line tool to align APK for Prod Deployment

Aligning APK with Zipalign command line tool


zipalign : you can find that tool in your Android/sdk/build-tools/23.0.3/ folder

-f : replaces existing file

-v : verbose output

4 : required by Android alignment bytes

input apk : already signed APK as it comes out from Android Studio

output APK : file you will upload to Google Play Developer Console

> 23.0.3 $ pwd

> 23.0.3 $ 
./zipalign -f -v 4 ~/CyberFit-release-23.apk ~/CyberFit-release-23_aligned.apk