XAPK File Validation Failed - APK Expansion Files

user2056563 picture user2056563 · Feb 26, 2013 · Viewed 28.7k times · Source

I am using the expansion files demo given in the sdks and am placing the obb file on the SD Card at the following location:

/Android/obb/package-name/package-name/main.versioncode.package-name.obb

But i get the following error:

XAPK File Validation Failed


For generating the .obb files this is the procedure i have followed :

1) copy all the images to a folder named main.versioncode.package-name.obb and then zip that file.

2) remove .zip file extension and place it in this /Android/obb/package-name/myobbfile.obb

Is this the correct way of doing it?

Answer

Tim Penner picture Tim Penner · Mar 25, 2016

An OBB file is an uncompressed ZIP file, so make sure that you zip it without compression.

Every ZIP utility should have some sort of compression level option.

The following screenshot is the open source 7-ZIP gui for Add to Archive with a highlight i added to show where the Compression Level is set to Store.

enter image description here


Another way of doing it would be using jobb

Usage

The syntax for running jobb is as follows:

jobb [-d <directory>][-o <filename>][-pn <package>][-pv <version>] \
 [-k <key>][-ov][-dump <filename>][-v][-about]

You can use the jobb tool to create an OBB file or extract the contents of an existing OBB. The following example command creates an OBB file from source files.

$ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11

This example shows how to dump (extract) the contents of an existing OBB file:

$ jobb -d /temp/obb-output/ -o my-app-assets.obb -k secret-key