zipalign.exe does not work on Windows for apks that are larger than 2GB

232 Views Asked by At

I found zipalign reports error when I use the command 'zipalign -p -f -v 4 in.apk out.apk' on Windows, the in.apk is larger than 2GB. But the tool zipalign works fine on MacOS and Linux. I don't know what happened on Windows. I am also wondering how to build zipalign.exe base on AOSP source code. Any one can help? Thanks a lot.

zipalign on windows failed, but it worked on Mac and Linux.

1

There are 1 best solutions below

0
On

long ftell(FILE* fp); sizeof(long) on Windows is 4, cannot hold the bytes of a file that larger than 2GB, long is signed, the largest number it can represents is 2^31 - 1.

The build process for zipalign is described in AOSP/sdk/docs/howto_build_SDK.txt