Jars have a strange sorting order; the META-INF/ directory should come first, then META-INF/MANIFEST.MF, then any other files in META-INF/, and then any files outside META-INF. Add a -j argument to zip2zip that sorts using jar ordering. Test: zip2zip_test Change-Id: I80e2bc7e284ef74f6561c26cb6541298834db1bc