the game does not start after changing the file

gammuma13

New User
2
07/12/24
0
Thread Author
Hi all. I have a problem replacing a file in the mobile game Marvel Contest of Champions. I'm trying to replace the contents of a single asset file that contains some information. After replacing, repacking and replacing the signature, I launch the game, but an unknown error appears.

It’s one thing if it’s difficult to add anything to the game, but I constantly see how they release games with Mod Menus that work without errors. I'm wondering what I'm doing wrong.

Let me clarify, I looked at the errors through LogCat. There are 3 errors, 1 of which I seem to have solved:
1 error - Attempt to load writable dex file: /data/user/0/com.kabam.marvelbattle/cache/google_api_resources_lib.jar
Attempt to load writable dex file: /data/user/0/com.kabam.marvelbattle/cache/app_resources_lib.jar

2 error - UID: [10306] PID: [1693] AssetPackServiceImpl : onError(-2)
Failed to retrieve asset pack: Asset Pack Download Error(-2): The requested pack is not available.
 

Solution






Place modified .dex or .jar files into a read-only location like:


/data/app/com.kabam.marvelbattle-<random>/base.apk


Ensure correct permissions:

chmod 444 filename.dex


This makes it read-only.

  • Alternatively, patch the check:
    • Use Frida or Smali edits to bypass the writable dex check in the lib or classes.dex.



2. AssetPackServiceImpl : onError(-2)


Failed to retrieve asset pack: Asset Pack Download Error(-2): The requested pack is not available.



What this means


This error comes from Google Play Asset Delivery (PAD).
Modern games, including MCoC, use asset packs instead of OBB files. These packs are managed by the Play Store and verified against the server.


When you modify or replace even a single file inside an asset pack:


  • The game checks the SHA-256 hash against what Google provides.
  • If the hash mismatches, it refuses to load the pack, resulting in Error -2.



Fix Options


  1. Update the Asset Pack Manifest
    • Inside the asset bundle, there’s usually a manifest JSON or binary file containing file hashes.
    • After replacing your file, you must recalculate the hash and update this manifest.
    • Tools like AssetStudio or Unity asset pack tools can help.
  2. Bypass Integrity Check
    • Patch the integrity check function in the native libraries (libil2cpp.so, libkabam.so, etc.).
    • Look for functions related to AssetPackManager or VerifyAssetPack.
    • Use Frida or a disassembler like IDA Pro or Ghidra.
  3. Disable Google Asset Delivery (Harder)
    • Some modders reroute calls to Google Play Asset Delivery by intercepting them:
      • Replace calls with dummy asset pack handlers so the game thinks the files are already downloaded.
      • This is how Mod Menus work without requiring Play Store verification.
 
Back
Top Bottom