'XAPK File Validation Failed - APK Expansion Files
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?
Solution 1:[1]
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.
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 11This 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
Solution 2:[2]
Here is how you need to get it done
1) You can put your images in any custom named folder you want. e.g myimages.
2) put all those images in a zip archive, once done adding rename that archive to main.versioncode.package-name.obb
3) Place that .obb file in directory sdcar/Android/obb/package-name/main.versioncode.package-name.obb
Hope it helps
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Max |

