打包和解包* .obb文件

时间:2014-12-24 15:17:49

标签: java android

美好的一天!

假设我有一个名为test的目录。它包含几个目录和文件。 (dir_1:file_1,file_2; dir_2:file_1,file_2; ...; dir_5:file_1,file_2;)

我愿意      jobb -d ./test -k key -o data.obb -pn com.example.obbtest -pv 1

得到

Slop: 0   Directory Overhead: 0
Slop: 37185   Directory Overhead: 2880
Partial Sector [32] writing to sector: 199
Partial Sector [32] writing to sector: 199
Partial Sector [32] writing to sector: 199
Partial Sector [96] writing to sector: 231
Alignment off writing to sector: 231
Partial Sector [96] writing to sector: 231
Alignment off writing to sector: 231
Partial Sector [96] writing to sector: 199
Partial Sector [96] writing to sector: 235
Alignment off writing to sector: 235
Partial Sector [96] writing to sector: 235
Alignment off writing to sector: 235
Partial Sector [160] writing to sector: 231
Alignment off writing to sector: 231
Partial Sector [307] writing to sector: 8911
Partial Sector [176] writing to sector: 17075
Partial Sector [96] writing to sector: 17079
Alignment off writing to sector: 17079
Partial Sector [320] writing to sector: 235
Alignment off writing to sector: 235
Partial Sector [96] writing to sector: 17079
Alignment off writing to sector: 17079
Partial Sector [224] writing to sector: 231
Alignment off writing to sector: 231
Partial Sector [307] writing to sector: 25755
Partial Sector [191] writing to sector: 33919
Partial Sector [96] writing to sector: 33923
Alignment off writing to sector: 33923
Partial Sector [320] writing to sector: 235
Alignment off writing to sector: 235
Partial Sector [320] writing to sector: 17079
Alignment off writing to sector: 17079
//and so on

文件已准备就绪。 比如,

http://developer.android.com/tools/help/jobb.html

我做

jobb -d ./dotest/ -o data.obb -k key -pn com.example.obbtest -pv 1

得到:

Slop: 0   Directory Overhead: 0
Slop: 0   Directory Overhead: 0
Java.io.IOException: boot sector says there are 0 sectors per FAT
at de.waldheinz.fs.fat.Fat.<init>(Fat.java:112)
at de.waldheinz.fs.fat.Fat.create(Fat.java:96)
at de.waldheinz.fs.fat.SuperFloppyFormatter.format(SuperFloppyFormatter.java:236)
at com.android.jobb.Main.main(Main.java:414)

我想这意味着我没有包装错误。 我该怎么办?

UPADATE

我愿意     jobb -d ./test/ -o my-app-assets.obb -pn com.examlpe.obbtest -pv 1 -k 11111111

那很好

比     jobb -dump my-app-assets.obb -d ./undo/ -k 11111111

我收到我的档案。但是 - 它们都不到1 mb。如果我添加大于1 mb的文件,我会得到

 Package Name: com.example.obbtest 
Package Version: 1
SALT: -5c0a03daa17137e2

6fbd61c113679c5258231a5439459dd5
LFN = file1 (3rd copy).jpg / SFN = ShortName [?

                                     |/ifl -- 12 3f b 16 18 7c 10 2f 69 66 6c ]
Partial read from sector: 179
Exception in thread "main" java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
at java.nio.ByteBuffer.put(ByteBuffer.java:859)
at  com.android.jobb.EncryptedBlockFile$    
   EncryptedBlockFileChannel.readDecryptedSector(EncryptedBlockFile.java:292)
at com.android.jobb.EncryptedBlockFile$EncryptedBlockFileChannel. 
   read(EncryptedBlockFile.java:142)
at de.waldheinz.fs.util.FileDisk.read(FileDisk.java:118)
at de.waldheinz.fs.fat.ClusterChain.readData(ClusterChain.java:225)
at de.waldheinz.fs.fat.FatFile.read(FatFile.java:126)
at com.android.jobb.Main.dumpDirectory(Main.java:137)
at com.android.jobb.Main.main(Main.java:315)

1 个答案:

答案 0 :(得分:1)

我无法说出您的所有错误,但我知道相对路径会导致boot sector says there are 0 sectors per FAT。使用C:\fullpath\dotest\工作。