Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create OBB files USING jobb tool Android

My app has grown to be over 50mb, so I now need to use an expansion file. On searching I came to know that there are different files that can be used as expansion files such as zip, pdf etc. I am trying to put my data in .obb files but I don't know how to create these files and put the data in these files.

Updated
First:

I found out that jobb tool is used to create obb files. But I am confused how this $ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11 command is run.
I tried to run this ($ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11 on cmd but my cmd saying jobb is not recognise as internal or external command.

Second: Which type of files can I put in these obb files? I am thinking layouts, drawable files?

like image 967
User42590 Avatar asked Feb 04 '13 11:02

User42590


2 Answers

my cmd saying jobb is not recognise as internal or external command

Add /tools to your path or instead of jobb use path/to/sdk/tools/jobb.bat

which type of files are put in these obb files

Big ones. Like drawables, sounds etc. Then, for example, you can use this code to put drawable file into ImageView:

imageView.setImageBitmap(
    BitmapFactory.decodeFile(
        sm.getMountedObbPath("/path/to/obb/file") + 
        "path/to/file/in/obb.png")

or, play sound:

mp.setDataSource(AcItem.this, 
    Uri.fromFile(new File(
        sm.getMountedObbPath("/path/to/obb/file") + 
        "path/to/file/in/obb.png"));
mp.prepare();
mp.start();

As I promised, GitHub link to my obb manager class: https://github.com/uncleLem/AndroidUtils/blob/master/src/io/github/unclelem/androidutils/utils/ObbExpansionsManager.java I hope it would help.

like image 190
uncle Lem Avatar answered Sep 23 '22 15:09

uncle Lem


Just write Like this in command prompt and press enter

C:\>C:\Development\Android\adt-bundle-windows-x86-20140321\sdk\tools\jobb -d C:\
Myworkspace\ImageTargets\assets\ -o Imagetargets.obb -k globe -pn com.ib.globeap
p.activity -pv 200 -v
like image 30
Hitesh Avatar answered Sep 22 '22 15:09

Hitesh