Search Unity

OBB Modification

Discussion in 'Android' started by thowthoww, Jul 10, 2013.

  1. thowthoww

    thowthoww

    Joined:
    Dec 11, 2012
    Posts:
    5
    Hello,

    I am trying to modify the OBB file that is produced with Unity 4 when the Split Application Binary option is checked.
    So far, I understand that it is not a simple OBB file created with the jobb tool from Android SDK but actually a more complex process done by Unity. It appears to be a zip compression but somehow random.

    From two builds done with Unity, one after the other and without any single modification, scenes files (level0, level1, ...) will have the same uncompressed size, but most of the time, different compressed size (about a few bits). And they are the only files that are subject to this size difference. It might not be relevant but still, I don't understand it.

    What I understand though is that there is a 32 characters long hexadecimal tag in the assets/bin/Data/settings.xml file in the APK that represents the MD5 of the OBB. But even though I am getting the new MD5 once the OBB modified, changing it in the XML file, resigning and optimizing the APK (I know I got that part working since I can already run a modified APK and read added files), I am still getting this "Level 'LevelName' (1) couldn't be loaded because it has not been added to the build settings" error.

    There must be some signing, optimizing or packaging process that must be done with the OBB file that I don't get.
    So I am asking for your help, hoping someone knows :)
     
  2. Wikkid_Edd

    Wikkid_Edd

    Joined:
    Nov 5, 2013
    Posts:
    1
    I know this is an old thread now, but did you get anywhere with this?

    We're in a similar boat where we need to modify the OBB and we're getting the exact same error. Did you find out what the missing step was?

    Cheers,

    Edd
     
  3. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    I think the answer to this would cause security issues to all existing games using OBB.
    In all honesty, it sounds to me like people are trying to hack games made with Unity, which we devs. don't like :p
     
  4. thowthoww

    thowthoww

    Joined:
    Dec 11, 2012
    Posts:
    5
    Oh sorry, I just found out that people replied to this thread.
    But unfortunately no, we still have not found a way. johnnydj might be right and it could be security related.