Search code examples
androidexpansion-files

Expansion file download errors. AAC File Validation / Resource could not be found


I'm experiencing 2 different errors, one from the tablet and another from the phone.

I've uploaded a ZIP uncompressed file into the Google Play Store with 4 audio files (more than a day ago) and I'm having some issues.

  1. When trying to download from one device, it downloads the Expansion file and at 99% the error "AAC File Validation Failed" appears.

    This was due to a 'false' argument in "SampleDownloaderActivity" -> 'protected void onPostExecute(Boolean result)'

    Anyway, executing

    Helpers.doesFileExist(this, str, 27959282L, false); 
    

    returns TRUE and the mp3 files inside the Zip (obb) work/plays correct.

  2. When trying to download from another device, this appears: "Download failed because the resources could not be found".

    I've found in console a message that, I think, is pointing me to the culprit.

    [licensechecker] Could not bind to service.

After searching, I've tried:

  • For the 1st issue, commenting the CRC check. It didn't help.
  • For the 2nd issue, following the instructions of this question. It didn't work either.

I haven't found any solution. I'm experiencing the same results with the working sources of 'DND-AAC' (obtained from Google Code).


Solution

  • Here's the solution (Same as answered/edited in the question):

    1st problem: SampleDownloaderActivity

       private static final XAPKFile[] xAPKS = {
        new XAPKFile(
                true, // true signifies a main file
                2001, // the version of the APK that the file was uploaded
                   // against
                27959282L // the length of the file in bytes
        ) /*
         , new XAPKFile(...)
          //*/
        };
    

    The hardcoded info were not correctly set. Also, I didnt have a patch file, so i've had to eliminate it from the array.

    2n Problem: Play Store app was missing!! There was a direct-access but no app (no clue about why). I made an APK backup from the phone's one and installed in the tablet, then reboot the tablet and all worked fine.