Zipalign Issue with -f Flag I'm attempting to sift through a folder of .apks, and zipalign them

I have the latest ADT

My command lies in a bash script, that loops through the folder

and my zipalign command is: zipalign -f 4 my.apk my.apk

It keeps popping Input and output can't be the same file

My understanding is (from the ADT docs), is that this is supposed to be possible.

Now, when I try zipalign -f 4 my.apk instead of zipaligning them, it simply gives me the help info for zipalign.

What gives?
You should use

zipalign -f -v 4 my.apk output.apk


Do remember that if you zipalign before you sign, the signing will undo the alignment.