Originally Posted by vuhuy
Here's a working configuration to play Half-Life 2 on rooted devices with a Mediatek MT6753 SOC (Mali T720 GPU) running Android Lollipop. Tested on a DOOGEE F5, but it should work on other MT6753 devices as well. This guide also explains how to use the Sixaxis Controller App with a DualShock Controller to play Half-Life 2 (including weapon switching).
- Rooted Android Phone with Mediatek MT6753
- Half-Life 2 APK
- GLtools APK
- Compatible controller
In my case I've used a rooted DOOGEE F5 running Android 5.1 Lollipop (20160303), Half-Life 2 v56 APK that I've pulled from my NVIDIA SHIELD tablet, and GLTools v1.99 APK. The GLtools APK is distributed for free on the XDA forums, but if you want to support the developer you can download it from the Play Store
Configure GLtools to run Half-Life 2
- Install GLtools APK.
- Open GLtools and select the TEX(DE)coder driver from Saem Persun. If you don't select this driver, you will be running into some rendering problems (e.g. black textures). An internet connection is required for this option to show up.
- Tick the boxes that state you're aware of the conditions, and install the driver. I've used the 'normal' installation instead of flashing it with recovery, since flashing with recovery didn't work for me with the stock recovery on my DOOGEE F5.
- Grant GLtools SU rights if you haven't granted it before.
- If using non-recovery installation, your device will reboot shortly after installation.
- If using recovery installation, reboot to recovery and apply the install_gltools.zip located on your internal storage / SD card.
- After installation and rebooting, install the Half-Life 2 APK.
- Configure GLtools to run Half-Life 2 (next section).
- Optionally configure your controller to play Half-Life 2 (next section).
- Open GLtools and select Half-Life 2 in the list.
- Use the following configuration (based on default settings):
- Check "Enable custom settings for this app"
- Check "Use fake GPU info"
- Tap on "Use a template" and select GPU/CPU: Tegra 4 (SHIELD)
- Check "Simple MapBuffer emulation"
- Check "Software VBO emulation"
- Check "Use packed stencil buffer"
Full configuration list:
Configure your controller
In some cases, you might need to adjust your controller mappings to play Half-Life 2 on your Android device. This is the case for MOBA and Playstation controllers. XBOX controllers should work fine after connecting via USB-OTG / wireless.
I'm using a wireless Playstation DualShock 3 controller with the app Sixaxis Controller v0.8.3. You can get this app of the Play Store
. After pairing my controller with Bluetooth, I've configured the application for playing Half-Life 2:
DualShock Digital pad and Sixaxis Controller
- In the Sixaxis app, go to settings (can be found under the 'hamburger' menu).
- Tap on "Gamepad Settings".
- Check "Enable Gamepad".
- Tap on "Edit Mappings".
- Map your controller as it was a XBOX / SHIELD controller (cross: A, circle: B, square: X, triangle: Y).
- Fix the digital pad for weapon switching (next section).
In case you're using the same controller setup as me (Playstation DualShock 3 Controller with Sixaxis Controller app), everything will work fine except for the digital pad. In Half-Life 2, the digital pad is used for weapon switching. In order to make weapon switching work in the game, we'll need to adjust the bindings in the configuration file of the game. I'm using ES File Explorer for this task, which you can grab for free at the Play Store
. You can also use your favorite file explorer, but ES has everything I needed for this task.
- Enable Root Explorer and mount system as R/W (read and write).
- Open the hamburger menu in ES File Explorer.
- Scroll down and tap on "Tools".
- Enable "Root Explorer" .
- Tap on in it, and a pop-up will open.
- Tap op "Mount R/W" and set "/system" as "RW".
- Grant ES File Explorer SU rights if your haven't granted it before.
- Copy the original configuration file "config.cfg" to your SD card. The file is located in "/data/data/com.nvidia.valvesoftware.halflife2/files/hl2/cfg".
- Also, write down the permissions, owner and group of the original configuration file mentioned in the previous step.
- Select the file by holding on to it.
- Tap on "Properties" (the properties button might be located under "More" in ES File Explorer")
- Write down the permissions, owner and group of the configuration file (e.g. mine has only RW for the owner [rw- --- ---] and is owned by u0_a114 in group u0_a114)
- Create an additional copy of the configuration file on your SD card as back up.
- Modify the copied "config.cfg" on your SD card using your favorite text-editor, or just use the ES Note Editor which comes with ES File Explorer.
- Change the digital pad bindings to make it work with the DualShock controller. Half-Life 2 is using UP / RIGHT / DOWN / LEFT as bindings, but you'll need to change this to UPARROW / RIGHTARROW / DOWNARROW / LEFTARROW. You will end up having this:
bind "UPARROW" "slot1"
bind "RIGHTARROW" "slot2"
bind "DOWNARROW" "slot3"
bind "LEFTARROW" "slot4"
- Save the file, and copy it back to its original location.
- Restore the permissions, owner and group of the file.
- Mount "/system" back to read-only (RO).
Please skip this part if you want to play the game. This section is for discussion only. I have tried various other optimizing functions of GLtools, with no success. Here are my findings:
- Anti-aliasing (MSAA/CSAA). Disabling might improve performance. But it seems to me there is no MSAA/CSAA in this game, so default and disabled are basically the same thing.
- User lower render resolution. Game will crash of set other than 1x (disabled).
- Force 16 bit rendering. Game will crash if enabled.
- Optimize GLSL shaders. Causes artifacts to non-static models (e.g. character faces) if enabled.
- Enable texture recompression. Disabling this might improve performance, don't know yet. Might cause your device running out of memory.
- Downscale textures. Makes game run smoother, but causes rendering problems (e.g. black textures) aside from the lower texture quality (hello there Sherlock).
Note that some performance tweaking is also available by editing the configuration file. Although not every command is available, I just snooped some extra FPS by disabling HDR and such.
Enjoy your City 17 guys! Don't forget to take a look to Xash3D for bringing the original Half-Life to your Android phone. Happy gaming.