Open crackleeeessyp opened 1 month ago
thanks for reporting!
it looks like I missed that those fields are unsigned, and ByteBuffer
is treating them as signed ints, which isn't right. I also did a quick search and found that ByteBuffer
doesn't support reading unsigned ints directly. So, we'll need to create our own way to handle this, maybe by extending the ByteBuffer
class.
but sorry, I can't dive into this right now as I'm pretty swamped. I'll take a look next month. If anyone else wants to give it a shot in the meantime, feel free! :)
@iyxan23 , thanks for your quick response!
Are there any document I can refer for zip format, and if time available, I will try to fix it.
By the way, does APK support zip64? If it also supports zip64, I think we should also consider it
hi @crackleeeessyp
Are there any document I can refer for zip format, and if time available, I will try to fix it.
thanks for the helping hand, I really appreciate it! here are some of the sources I used:
By the way, does APK support zip64? If it also supports zip64, I think we should also consider it
actually, that's the one thing that I have been wondering about whilst developing zipalign-java!
I haven't implemented it yet, and I don't think there are APKs out there that uses zip64, looking at this stackoverflow question. And also, I've seen several phones that flat-out throws an error "zip64 not supported" when users tries to install a zip64 apk (but interestingly, they exist?)
I'm honestly not sure whether or not zip64 should be implemented; if you wanted to do it, I'm all ears :)
Seems the centralDirOffset is wrong if apk file size > 2G