I am writing a Phonegap app that includes a zip archive in the /assets/www/ folder. When the app is launched the file is copied to the fileSystem root. When I try to read the header, it appears that the file has been modified.
Here's the hexdump on my computer:
# hexdump -C Archive.zip| more
00000000 50 4b 03 04 14 00 00 00 08 00 4c b7 b1 40 84 1d |PK........L..@..|
00000010 9b 1a 21 00 00 00 a0 01 00 00 0a 00 1c 00 73 61 |..!...........sa|
Here's the hexdump of the file in /sdcard/:
hexdump -C Archive.zip| more
00000000 50 4b 03 04 14 00 00 00 08 00 4c ef bf bd ef bf |PK........L.....|
00000010 bd 40 ef bf bd 1d ef bf bd 1a 21 00 00 00 ef bf |.@........!.....|
00000020 bd 01 00 00 0a 00 1c 00 73 61 6d 70 6c 65 2e 74 |........sample.t|
HOUSTON! WE HAVE A PROBLEM!
So, who moved my cheese? What happened? Since .apk files are zipped folders, is there a potentially destructive side-effect of adding a zip file into a zip file?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…