Krunal Shah
Krunal Shah

Reputation: 1436

xapk file validation failed - After downdloading obb file

I am getting error "xapk file validation faild" after successfully download an obb file.

A progress reach at 99% then give an error "xapk file validation faild".

I debugging a code and then it thrown an exception "Not a zip archived" from

ZipResourceFile zrf = new ZipResourceFile(fileName);

in ZipResocuceFile,

void addPatchFile(String zipFileName) throws IOException {
  int header = read4LE(f);
        if (header == kEOCDSignature) {
            Log.i(LOG_TAG, "Found Zip archive, but it looks empty");
            throw new IOException();
        } else if (header != kLFHSignature) {
            Log.v(LOG_TAG, "Not a Zip archive");
            throw new IOException();
        }
}

enter image description here

Upvotes: 2

Views: 2196

Answers (2)

Krunal Shah
Krunal Shah

Reputation: 1436

I got a solution, create obb file without using of jobb command, using jobb command it create encrypted obb file, there is no need to create encrypted obb file

I am uploading unencrypted obb file to playstore, here, are steps to create unencrypted obb file

  1. copy you resources files into a folder
  2. create zip file of your resource folder (main.[version_code].[package_name].zip)
  3. rename your zip folder with name (main.[version_code].[package_name].obb)

now, obb file is ready to upload on play store

Its help for me

Upvotes: 1

Lorenzo Salani
Lorenzo Salani

Reputation: 73

Also i have tried with ZipResourceFile but i had the same error. You can try to mount and unmount your obb file with this class: https://gist.github.com/Clockers/11af3c136b5d283f3560

My obb is created using JObb on a folder containing the file, you can find it here: http://developer.android.com/tools/help/jobb.html

Upvotes: 2

Related Questions