Skip to content

4.Configuration

maarsalien edited this page Jul 28, 2023 · 2 revisions

There is two solutions to configure the mod menu:

  1. From the source code in Android Studio. (Recommended)
  2. From Frida script.

From the source code in Android Studio

  1. Open the project in Android Studio.
  2. Open the Config.java file.
  3. Change the values as you want.
  4. Build the project.

From Frida script

  1. Hook the Config.java class and create a new instance of it. then change the values as you want.
const Config = Java.use('com.maars.fmenu.Config');

const config = Config.$new();

config.MENU_TITLE.value = 'Subway Surfers';
...

Note: The config values type should be the same as the original value type. for example changing the menu background color to int value.

const Color = Java.use('android.graphics.Color');
const Config = Java.use('com.maars.fmenu.Config');

const config = Config.$new();

config.MENU_BG_COLOR.value = Color.parseColor("#DD141C22");

Lastly don't forget to pass the config instance to the Menuconstructor. the final code should be like this:

const Color = Java.use('android.graphics.Color');
const Config = Java.use('com.maars.fmenu.Config');
const Menu = Java.use('com.maars.fmenu.Menu');

const config = Config.$new();

config.MENU_TITLE.value = 'Subway Surfers';
config.MENU_BG_COLOR.value = Color.parseColor("#DD141C22");

const menu = Menu.$new(MainActivity, config);
...

Changing the launcher icon

The launcher icon is a base64 string of the icon image. you can change it from the Config.java file or from Frida script. There are many online tools to convert image to base64 string. for example base64-image..

Android Studio:

protected final String MENU_LAUNCHER_ICON = "iVBORw0KGgoAAAANSU...";

Frida script:

const Config = Java.use('com.maars.fmenu.Config');

const config = Config.$new();

config.MENU_LAUNCHER_ICON.value = 'iVBORw0KGgoAAAANSU...';

Clone this wiki locally