Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Arm Community blogs
Arm Community blogs
Mobile, Graphics, and Gaming blog Building an Unreal Engine Application with Mali Graphics Debugger Support
  • Blogs
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
More blogs in Arm Community blogs
  • AI blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded and Microcontrollers blog

  • Internet of Things (IoT) blog

  • Laptops and Desktops blog

  • Mobile, Graphics, and Gaming blog

  • Operating Systems blog

  • Servers and Cloud Computing blog

  • SoC Design and Simulation blog

  • Tools, Software and IDEs blog

Tell us what you think
Tags
  • tools
  • game_engine
  • mgddaemon
  • game_development
  • optimisation
  • unreal engine
  • Mali Graphics Debugger
  • mali_graphics_debugger
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

Building an Unreal Engine Application with Mali Graphics Debugger Support

Thomas Poulet
Thomas Poulet
September 20, 2016
2 minute read time.

In a previous blog we talked about running Mali Graphics Debugger on a non-rooted device. In this blog we will focus on how you can add support for Mali Graphics Debugger, on a non-rooted device, to your Unreal Engine application. The plan we are going to follow is very simple:

  1. Add the interceptor library to the build system
  2. Edit the activity to load the interceptor library
  3. Install the MGD Daemon application on the target device

For our first step, we will need to download a version of Unreal Engine from the sources available on Github. For more information on this step, please see Epic’s guide.

Once you have a working copy of the engine, we can focus on getting MGD working. You will first need to locate the android-non-root folder in your MGD installation directory, and your Unreal Engine installation folder (where you cloned the repository). Copy the android-non-root folder to Engine\Build\Android\Java\.

Next, we will need to change the Android makefile to ensure that the interceptor is properly packaged inside the engine build. For this, edit the Android.mk file under “Engine/Build/Android/Java/jni/”  add this line at the end, include $(LOCAL_PATH)/../android-non-root/MGD.mk. It should look like this:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := UE4
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libUE4.so
include $(PREBUILT_SHARED_LIBRARY)


include $(LOCAL_PATH)/../android-non-root/MGD.mk

We will now specify to the main game activity that it needs to load the MGD library, locate GameActivity.java inside Engine\Build\Android\Java\src\com\epicgames\ue4\ and edit the onCreate function to look like so:

@Override
public void onCreate(Bundle savedInstanceState)
{
     super.onCreate(savedInstanceState);
     try {
          System.loadLibrary("MGD");
     }
     catch( UnsatisfiedLinkError e ){
          Log.debug( "libMGD not loaded" );
     }

     // create splashscreen dialog (if launched by SplashActivity)
     Bundle intentBundle = getIntent().getExtras();
     
     // Unreal Engine code continues there

Engine wise we are all set, we will now prepare our device. Install the MGD daemon on the target phone using the following command whilst being in the android-non-root folder:

adb install -r MGDDaemon.apk

Now before running your app you will need to run this command from the host PC (please ensure that the device is visible by running adb devices first):

adb forward tcp:5002 tcp:5002

Run the MGD daemon application on the target phone and activate the daemon itself:

mgddaemon.PNG

At that point you can connect it to MGD on the host PC, start your application and begin debugging it. Please refer to the MGD manual for more in-depth information on how to use it.

Following these steps you should be able to use MGD with Unreal applications on any Mali based platform. If you have any issues please raise them on the community and someone will be more than happy to assist you through the process.

Anonymous
Mobile, Graphics, and Gaming blog
  • Optimizing 3D scenes in Godot on Arm GPUs

    Clay John
    Clay John
    Exploring advanced mobile GPU optimizations in Godot using Arm tools like Streamline and Mali Offline Compiler for real-world performance gains.
    • July 10, 2025
  • Optimizing 3D scenes in Godot on Arm GPUs

    Clay John
    Clay John
    In part 1 of this series, learn how we utilized Arm Performance Studio to identify and resolve major performance issues in Godot’s Vulkan-based mobile renderer.
    • June 11, 2025
  • Bringing realistic clothing simulation to mobile: A new frontier for game developers

    Mina Dimova
    Mina Dimova
    Realistic clothing simulation on mobile—our neural GAT model delivers lifelike cloth motion without heavy physics or ground-truth data.
    • June 6, 2025