Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Arm Community blogs
Arm Community blogs
Mobile, Graphics, and Gaming blog Using DS-5 Streamline with Mali on Samsung Galaxy SIII
  • 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

Tags
  • i9300
  • ds-5
  • Mali
  • galaxy
  • s3
  • siii
  • Streamline
  • samsung
  • exynos
  • Mali-400
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

Using DS-5 Streamline with Mali on Samsung Galaxy SIII

Michael McGeagh
Michael McGeagh
June 19, 2015
6 minute read time.

ABSTRACT

This guide will show how to get ARM® DS-5™ Streamline™ support working on a production Samsung Galaxy SIII device, with minimal modifications.

The resulting files generated will be a gatord, gator.ko and a boot.img file.

This guide is written with Android™ version 4.3 (JellyBean MR2) in mind.

PREREQUISITE

Device Requirements

It is required that the SIII (GT-I9300) device have root access.

This is required in order to install gator and to insert the kernel module.

You will also be flashing a custom kernel.

Software Requirements

ARM DS-5 software is required to be installed. This is required in order to do any capturing of data and also contains the source code for gator.

The community edition of DS-5 can be obtained for free from the ds5 website.

This guide has been tested with DS-5 version 5.20 on Windows and Linux.

In addition, you will need the Android SDK (for adb) and Android NDK (for building gator daemon).

You will also need to install the abootimg linux utility to modify the boot image.

Finally you will need to install the heimdall-flash linux utility in order to flash the boot image. Alternatively, you can use the Windows only version, called ODIN.

KERNEL

Toolchain

This has been tested with the original 4.4.3 toolchain, as well as the more recent 4.6 toolchain. Some extra work is required for 4.6 however.

For 4.4.3:

The toolchain to be used for building the kernel can be obtained from the following public git repository:

git clone https://android.googlesource.com/platform/prebuilt/
export PATH=$PATH:$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin






For 4.6:

The toolchain to be used for building the kernel can be obtained from the following public git repository:

git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin






In order to set up your build environment to use this toolchain and to target cross compilation, do the following:

export CROSS_COMPILE=arm-eabi-
export ARCH=arm
export SUBARCH=arm







Source Code

The kernel source code can be obtained from the following website:

http://opensource.samsung.com/

In order to determine which package to download, connect your SIII and run the following command:

adb shell getprop ro.build.version.incremental






This will return the build to search for. This document has used I9300XXUGMK6 and thus the package downloaded was GT-I9300_JB_Opensource_Update13.zip.

Building

To build the kernel, do the following:

make m0_00_defconfig






Unfortunately, at time of writing, the Kernel will not build straight out of the box. You first need to make 2 modifications.

The first is to edit the Makefile to allow the CROSS_COMPILE environment variable:

Change Line 196

CROSS_COMPILE = /opt...






To be:

CROSS_COMPILE ?= /opt...






The '?' allows us to override the Makefile's path with our own which we previously set.

The second is to edit the drivers/gpu/mali400/r3p2/ump/Kbuild to ignore the SVN_REV command:

Change Line 31

SVN_REV := $(shell ...






To be:

SVN_REV := '0000'






The command to figure out the SVN revision is broken, and it is not even an svn repo, so we set it to 0000 as a fall back.

PLEASE NOTE:

If you are using arm-eabi-4.6 toolchain (You do not need to do the following if you are using the arm-eabi-4.4.3 toolchain) then you also need to turn off the more aggressive warning as errors, as well as fix a few missing asm extension declarations:

In Makefile, change Line 367:

KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \






To be:

KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Wno-maybe-uninitialized -Wno-address \






This disables the warning as error for maybe-uninitialized and address problems.

In drivers/misc/tzic.c, change Lines 44, 64 and 75:

__asm__ volatile ("smc    0\n"...






To be:

__asm__ volatile (".arch_extension sec\nsmc    0\n"






This enables the smc instruction to be used.

In order to build the gator driver however, you will need to make modifications to the kernel.

make menuconfig

Enable the following:


General setup -->

[*] Profiling support

    Kernel Performance Events And Counters -->
          [*] Kernel performance events and counters


Device Drivers -->

Graphics Support -->

Mali-300/400/450 support -->

    [*] Enable Mali profiling

You can now build the kernel with make.



BOOT IMAGE

In order to get this modified kernel onto the device, you need to generate a boot.img file for use with either heimdall or ODIN.

boot.img

You can obtain the original stock boot.img file directly off the device with the following commands:

adb shell
su
cat /dev/block/platform/dw_mmc/by-name/BOOT > /sdcard/boot.img
exit
exit
adb pull /sdcard/boot.img






Now we can update the kernel:

abootimg -u boot.img -k kernel/arch/arm/boot/zImage






Finally, we can flash this new image onto the device:

adb reboot download
sudo heimdall flash --BOOT boot.img




Or the equivalent ODIN method.

WiFi issue

When you upload this custom kernel to the device, you may find you can no longer connect to the wifi.

Unfortunately there is no known way to fix this as of yet.

GATOR

You can obtain the driver and daemon source files from your DS-5 installation directory:

<DS-5 Installation Directory>/arm/gator/

Driver

Build the driver by doing the following, from within the gator-driver directory:

GATOR_WITH_MALI_SUPPORT=MALI_4xx CONFIG_GATOR_MALI_PATH="<path_to>/kernel/drivers/gpu/mali400/r3p2/mali/" make -C <path_to>/kernel M=`pwd` modules

You should now have gator.ko.

Daemon

First, you will need to modify the structure of the gator-daemon directory in order to build for Android.

Create a folder called jni inside gator-daemon and move all files and folder to this location:

mkdir jni
mv * jni/






Then build the daemon by doing the following from within the gator-daemon directory:

ndk-build

You should now have gatord.

Device Setup

Unfortunately you cannot simply push these two gator files directly into the system directory on the device due to permission issues with a secure adb device.

The way around this is to do the following. First, remount the system partition as read/write access:

adb shell su -c mount -o remount /system

Next, push the files to the sdcard:

adb push gator.ko /sdcard/
adb push gatord /sdcard/






Then copy these files from the sdcard to the system directory:

adb shell su -c cp /sdcard/gator* /system/bin/

Finally, give full permissions to the daemon:

adb shell su -c chmod 777 /system/bin/gatord

You are now ready to use the device with Streamline support.

Using Gator

The normal procedure for using gator is as follows – and is required to be done each time the device restarts:

adb shell su -c mount -o remount /system

Setup forwarding through usb instead of network:

adb forward tcp:8080 tcp:8080

Launch the daemon from within an adb shell:

adb shell su -c gatord &

Launch DS-5, and enter localhost in the connection box.

Select the counters you are interested in capturing, and you are now ready to begin capturing.

PLEASE NOTE!

Due to the old version of the driver in this device, from the version of Android stated in this document, you should only pick 2 counters for the Fragment Processor (a.k.a Pixel Processor).

Streamline will let you choose up to 8 counters for this device, but the values you get will be incorrect. Please only choose 2 counters, not 8.

Later OTA updates for the phone may resolve this issue, so if you are running a later version as stated in this document, please make sure to check the values of your counters before believing them.

The symptom is that the first 2 values are duplicated across the other (up to 8) counters you selected, so you would see 2 values duplicated up to 4 times, within a 1% variance.

Anonymous
Parents
  • Roger Su
    Roger Su over 10 years ago

    Hi Michael,

    I tried this way on your post, and I cannot see the filmstrip on Streamline.

    However, I had been tried filmstrip on Streamline with ODROID-A, it worked correctly even I just slide my screen and without running any application on Android.

    Do you have any idea?

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Comment
  • Roger Su
    Roger Su over 10 years ago

    Hi Michael,

    I tried this way on your post, and I cannot see the filmstrip on Streamline.

    However, I had been tried filmstrip on Streamline with ODROID-A, it worked correctly even I just slide my screen and without running any application on Android.

    Do you have any idea?

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Children
No Data
Mobile, Graphics, and Gaming blog
  • Unlock the power of SVE and SME with SIMD Loops

    Vidya Praveen
    Vidya Praveen
    SIMD Loops is an open-source project designed to help developers learn SVE and SME through hands-on experimentation. It offers a clear, practical pathway to mastering Arm’s most advanced SIMD technologies…
    • September 19, 2025
  • What is Arm Performance Studio?

    Jai Schrem
    Jai Schrem
    Arm Performance Studio gives developers free tools to analyze performance, debug graphics, and optimize apps on Arm platforms.
    • August 27, 2025
  • How Neural Super Sampling works: Architecture, training, and inference

    Liam O'Neil
    Liam O'Neil
    A deep dive into a practical, ML-powered approach to temporal super sampling.
    • August 12, 2025