Skip to content

Commit

Permalink
Fix a crash caused by split apk structure changes since 1.17.30 (beta…
Browse files Browse the repository at this point in the history
… version unknown)

And find out another bug
  • Loading branch information
TripleCamera committed Nov 6, 2021
1 parent f1a26ea commit 5d99ee0
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,17 @@ public ArrayList<NModException> initializeGame(Context context) throws LauncherE
// Load Resources
listener.onLoadResourcesStart();
patchAssetPath.add(context.getPackageResourcePath());
patchAssetPath.add(core.getGamePackageManager().getPackageResourcePath());
String basePath = core.getGamePackageManager().getPackageResourcePath();
patchAssetPath.add(basePath);
/* In `1.17.30`(beta version unknown), almost all assets files were moved to
* `split_install_pack.apk`, including `bootstrap.json`, a file that is crucial to
* launching the game.
*/
String splitPath = basePath.replace("base.apk", "split_install_pack.apk");
File splitFile = new File(splitPath);
if (splitFile.exists()) {
patchAssetPath.add(splitPath);
}
listener.onLoadResourcesFinish();

listener.onLoadGameFilesFinish();
Expand Down

0 comments on commit 5d99ee0

Please sign in to comment.