10

I am running the following command to get my encrypted obb file for apk expansion.

jobb -d /home/manoj/Desktop/Test -o main.1.com.example.helloworld.obb -k "manoj" -pn com.example.helloworld -pv 1

I am getting following exception. Please tell what went wrong.

Slop: 0   Directory Overhead: 0
Slop: 1132   Directory Overhead: 768
Partial Sector [32] writing to sector: 15
Partial Sector [32] writing to sector: 15
Partial Sector [32] writing to sector: 15
Partial Sector [331] writing to sector: 223
Partial Sector [417] writing to sector: 400
Partial Sector [406] writing to sector: 577
Partial Sector [333] writing to sector: 754
Partial Sector [223] writing to sector: 931
java.io.IOException: FAT Full (1676, 1677)
at de.waldheinz.fs.fat.Fat.allocNew(Fat.java:298)
at de.waldheinz.fs.fat.Fat.allocAppend(Fat.java:376)
at de.waldheinz.fs.fat.Fat.allocNew(Fat.java:353)
at de.waldheinz.fs.fat.ClusterChain.setChainLength(ClusterChain.java:164)
at de.waldheinz.fs.fat.ClusterChain.setSize(ClusterChain.java:132)
at de.waldheinz.fs.fat.FatFile.setLength(FatFile.java:91)
at de.waldheinz.fs.fat.FatFile.write(FatFile.java:154)
at com.android.jobb.Main$1.processFile(Main.java:495)
at com.android.jobb.Main.processAllFiles(Main.java:604)
at com.android.jobb.Main.processAllFiles(Main.java:600)
at com.android.jobb.Main.main(Main.java:417)
Exception in thread "main" java.lang.RuntimeException: Error getting/writing file with           name: main.1.com.example.helloworld.obb
at com.android.jobb.Main$1.processFile(Main.java:501)
at com.android.jobb.Main.processAllFiles(Main.java:604)
at com.android.jobb.Main.processAllFiles(Main.java:600)
at com.android.jobb.Main.main(Main.java:417)
Techie Manoj
  • 432
  • 3
  • 14
  • 1
    I've got the same problem as you...Still figuring out how to solve it. If you found the solution, please, let me know. – xarlymg89 Mar 05 '13 at 15:16
  • 2
    See [Android issue #53878](https://code.google.com/p/android/issues/detail?id=53878). – tc. Apr 10 '13 at 16:29

7 Answers7

4

You can also get following error with the jobb-Tool (at least in windows with the jobb.bat), if you have many many files.

de.waldheinz.fs.fat.Directory Full Exception: directory is full

This is, because the obb file format is saved in FAT16, whitch only allows 512 entries/files in the root directory

On Windows: if you have a folder "data" whith lost of pictures, and copied to the android sdk-tools directory

  • data/1.jpg
  • data/2.jpg
  • data/3.jpg
  • data/...
  • data/5000.jpg

and you use

console>>>jobb -pn my.package.name -pv VERSIONCODE -d ./data -k obb_password
-o main.VERSIONCODE.my.package.name.obb

you will get the mentioned error. Try to add one directory-hierarchy and make the "data"-directory to a subfolder

  • root/data/1.jpg
  • root/data/2.jpg
  • root/data/3.jpg
  • root/data/...
  • root/data/5000.jpg

use

console>>>jobb -pn my.package.name -pv VERSIONCODE -d ./root -k obb_password 
-o main.VERSIONCODE.my.package.name.obb

you have to keep in mind, that if you want to read from the obb later, that the pictures are now in a subfolder.

lx222
  • 248
  • 1
  • 16
2

In addition to what Ix222 said about FAT16 limiting the number of files in the root directory, there's also an issue in the jobb tool itself, and the FAT library it uses.

In the FAT library it is determining the maximum filesystem size for FAT12 to be 4 MB, FAT16 at 512 MB and using FAT32 for anything beyond that. In reality FAT12 allows up to 16 MB (32 MB in some implementations) and FAT16 allows up to 2 GB. This is the reason that if your OBB size using the current tool is limited to the range 4 MB <= OBB size < 512 MB.

The jobb tool is also wrongly relying on the FAT library to determine the filesystem, but it is only compatible with FAT16.

A quick fix is to build your own version of the jobb tool (I recommend backing up the existing JAR and replacing it with your own, the Windows Batch file should still be used to run it) with a modified version of the libfat32 library built in. Simply modifying the method that determines the filesystem to return FAT16 for anything up to 2 GB and FAT32 otherwise is sufficient to build valid OBB files up to 2 GB (which is the limit for OBB files anyway).

SuperFloppyFormatter returning FAT32 for anything over 512 MB?

https://code.google.com/p/android/issues/detail?id=60294

Community
  • 1
  • 1
monkey0506
  • 2,489
  • 1
  • 21
  • 27
1

I was getting the same behaviour but this was only in a test directory structure I was experimenting with. It had almost no content so maybe this is an issue with jobb at these small sizes. Or maybe some error conditions are met depending on the space taken up by the all the files. I've commented in more detail on the Google Code issue.

I wonder if adding a couple of redundant files might avoid this error behaviour for those that are experiencing it with non-trivial directory structures.

darrenp
  • 4,265
  • 2
  • 26
  • 22
0

In my case, it solved running again the program, with the same parameters and the same content at the directory that I wanted to pack.

./jobb -d /media/assets/ -o my-app-assets.obb -k my_pass -pn package-name -pv your-version
SkyWalker
  • 28,384
  • 14
  • 74
  • 132
xarlymg89
  • 2,552
  • 2
  • 27
  • 41
0

Got the same problem and the workaround I found is to make an archive with a minimum size of 4mo. To add fake data to my small archive make it worked…

Issue : https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=53878

Nicolas Lauquin
  • 1,517
  • 3
  • 14
  • 23
  • To further clarify, an OBB of any file size up to 2 GB should be valid. Suggestions to pad them to at least 4 MB are a workaround for the underlying issue. And...what's "mo" anyway? :P – monkey0506 Sep 21 '13 at 07:54
0

In my case, I solved the issue removing several hidden files...

My boss owns and works on MacOSX, me on Windows. So, when he passed it on and after opening the folder, I found several hidden files, such as .DS_Store and ._.DS_Store. Additionally, I found hidden temporary JPGs, for example if I had a file called image1.jpg I had another one .image1.jpg. So, eventually I deleted all of the hidden files.

And voilà!

joninx
  • 1,775
  • 6
  • 31
  • 59
-1

In my case I just have to add one file of a size 2.46 MB. Adding smaller file didn't work. So just try adding more dummy files until it works.

drunkcat
  • 19
  • 2