gpt4 book ai didi

java - 打包和解包 *.obb 文件

转载 作者:行者123 更新时间:2023-11-30 11:10:39 28 4
gpt4 key购买 nike

美好的一天!

假设我有一个名为 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)

我想这意味着我没有包装错误。我该如何解决?

更新

我愿意 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)

最佳答案

我不能说出你所有的错误,但知道相对路径导致 boot sector says there are 0 sectors per FAT 对我来说。使用 C:\fullpath\dotest\ 有效。

关于java - 打包和解包 *.obb 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27638969/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com