Half-Life 2 (portal) playable on non-tegra devices [How to]

Search This thread
Nov 22, 2011
13
0
Hey all! Was able to get this up and running on my Galaxy S3 with a very respectable framerate :D

My issue is that there's some issue with z-sorting or shader emulation or something (I won't pretend to know what might be causing it...). Take a look at my screenshots:

http://imgur.com/a/vSP4s

Basically, objects are showing up in front of objects they shouldn't, certain things are blipping in and out of existence and I walk around, and there are a bunch of rendering issues everywhere.

The weird thing is that the graphics seem to act normally for about 5 seconds right as the game loads the main menu, then it craps out on itself. Any idea how to fix this? Thanks!!
 

Nick Bailuc

New member
Nov 5, 2014
1
0
Controller Problem

Please help, I put a lot of time into this. I got OpenGL to work without issues but a completely unexpected problem appeared. When I play it seems that my right analog stick doesn't work and instead the look is infinately spinning unless i press RT which is the bottom right shift on the wired xbox 360 controller. The game thinks that those shifts are the analog stick and ignores the right analog stick (the left one works). I am on a nexus 7 2013 running 4.4.2. How can i fix this? Is there an app that changes or emulates the keys on a controller?
 

jerbear294

Inactive Recognized Contributor
Oct 9, 2013
1,757
959
24
Google Pixel 4a
Please help, I put a lot of time into this. I got OpenGL to work without issues but a completely unexpected problem appeared. When I play it seems that my right analog stick doesn't work and instead the look is infinately spinning unless i press RT which is the bottom right shift on the wired xbox 360 controller. The game thinks that those shifts are the analog stick and ignores the right analog stick (the left one works). I am on a nexus 7 2013 running 4.4.2. How can i fix this? Is there an app that changes or emulates the keys on a controller?
Tincore KeyMapper can remap the keys to practically anything, but I think you need to pay to get analog remapping. It's worth it, though.
 

AV1d

Senior Member
Apr 26, 2014
51
7
Tincore KeyMapper can remap the keys to practically anything, but I think you need to pay to get analog remapping. It's worth it, though.

Okay... I have the same problem, I don't know what to do now... I tried so many combinations of key making and saw so many tutorials but no avail... Can you make a tutorial? Please
 

Deu5Vult

Member
Apr 8, 2009
37
5
PS3 Pad Working with USB/BT Joystick Center

For those still seeking a solution for the PS3 D-pad problem, install USB/BT Joystick Center.

  • connect to your device first through the Sixaxis app
  • open USB/BT JC and connect your controller
  • select '360" next to the 'Joy' switch
  • select 'USBJoyFreeIME' from the the IME switch
  • open Half Life 2

You should now have a fully functioning D-pad for weapon and menu selection.
 
Nov 8, 2014
14
0
I got gltools installed on my dell venue 7 but cant install the drivers, my dell venue 7 is rooted, but cant install the drivers in gltools and cant run half life 2 on my dell venue 7
 

aydink

Member
Oct 6, 2006
41
9
..HL2 runs on ASUS Transformer TF701T without any issues and also without the need of any hacks/open-gl patches.
I guess its due to the fact that the asus has the tegra 4 inside just like the nvidia shield has.

Just the dpad-issue one the ps3-gamepad annoys a little bit.
 

m52 power!

Senior Member
Mar 6, 2008
295
55
I was able to get half-life 2 working fully on my Nexus 5 lollipop, but portal always crashes after the intro vid. Same settings on both, any idea why portal would crash?
 

konakona~

New member
Dec 31, 2014
1
0
aw

Tried to run it on Nexus 6 with settings in original post, but I'm getting a very small screen to play on (I also tried various settings but without success)
Here's pictures of the issue if anyone has faced it yet: (i am not allowed to post links)
puu.sh/dTIRD/3a296cd636.png
puu.sh/dTINX/c8db0bd0c4.png
The intro video have the correct size though.

Any ideas?
 

X_Joshi_X

New member
Jan 15, 2015
2
0
Dont know

Tried to run it on Nexus 6 with settings in original post, but I'm getting a very small screen to play on (I also tried various settings but without success)
Here's pictures of the issue if anyone has faced it yet: (i am not allowed to post links)
puu.sh/dTIRD/3a296cd636.png
puu.sh/dTINX/c8db0bd0c4.png
The intro video have the correct size though.

Any ideas?

Don't know... Running perfectly on my Nexus 5 with settings from original Post.

---------- Post added at 05:08 PM ---------- Previous post was at 04:48 PM ----------

The Ps3 controller D-pad is still not working, any ideas? Tried the method woth Usb/Bt Joy didnt work.
 

jerbear294

Inactive Recognized Contributor
Oct 9, 2013
1,757
959
24
Google Pixel 4a
Tried to run it on Nexus 6 with settings in original post, but I'm getting a very small screen to play on (I also tried various settings but without success)
Here's pictures of the issue if anyone has faced it yet: (i am not allowed to post links)
puu.sh/dTIRD/3a296cd636.png
puu.sh/dTINX/c8db0bd0c4.png
The intro video have the correct size though.

Any ideas?
You don't need to use this guide on a Nexus 6. Just sideload the Half Life 2/Portal apk and it will run natively on the Tegra K1.
 

Mudderz

Member
Jan 16, 2015
18
3
reno
Hey I've been testing portal v23 with latest gltools on my nexus 6 and it crashes after the source logo. Any help or suggestions appreciated:D
 

dan0019

Member
Jan 15, 2015
20
3
Has anyone got this working with the 360 controller?
Everything works apart from the D-Pad. Which seems to work in the main menu but not in submenu's or in-game? would like to know if you have experienced this or have any ideas? I am using the HTC One on Lollipop 5.0.1 Revolution HD.
 

X_Joshi_X

New member
Jan 15, 2015
2
0
Has anyone got this working with the 360 controller?
Everything works apart from the D-Pad. Which seems to work in the main menu but not in submenu's or in-game? would like to know if you have experienced this or have any ideas? I am using the HTC One on Lollipop 5.0.1 Revolution HD.

Same here with Play Station 3 Controller please help!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    Hi all!

    I find way to play Half-life 2 on non-tegra devices. I get it run on my Samsung Galaxy Note 3 (Snapdragon 800 version) using app GLTools. Just make sure you install on start GLTools second options (install texture decoders on first gltools install), then download game and set settings for HL2 in GLTools like these:

    activate function Optimize GLSL shaders
    Use fake gpu info
    Template: tegra 4
    Simple mapbuffer emulation
    Software VBO emulation
    Use packed stencil buffer

    With these settings and connected moga controller i was able to run game and play it. :) Its playable but sometimes its get laggy on in bigger arenas. I also get crash bug on the end of first part - after the first elevator part the game hang on a loading screen. Its always crash but it has solution - just start HL2 again, start new game and chose second part, it will be already avaliable and you can continue in playing :) Enjoy!! For now i have something about 1hour of playing and still no problem. Only thing is sometimes weird textures, but this is done by emulating T4.

    And now question on you all - i wonder if its possible to hack google play, that i can see and buy portal too?? I want to try it. I thing Portal will be playable too with these settings. :good: :D
    3
    Started? I can start it and get it to a black screen after the valve guy, then the source page. But that's where it ends.

    Can you get further on N?

    Sent from my HTC 10 using XDA-Developers Legacy app

    Can you screen grab your settings please ?

    Also did you get half life 2 to work?

    Sent from my HTC 10 using XDA-Developers Legacy app
    Screenshot_20170423-110750.jpg
    Yes, Half-Life 2, Half-Life 2 EP1 and Portal works with this settings.
    3
    WORK AROUND FOR ANDROID N AND M!

    Been talking with the dev for GLTools, great guy, he offered the following insight into the issue:

    I've found the reason, an update will be available soon (I hope). The problem is that HL2 engine is using some weird behavior of dlopen() on Android < 6.
    You can symlink your /system/lib/libGLESv2.so and /system/lib/libEGL.so to /usr/lib/libGLESv2.so and /usr/lib/libEGL.so, maybe it will even work.

    I ended up dumping the symlinks and simply copying and pasting the files into the directory called out directory (make sure I matched the permissions on the folders if you create and dont copy). IT WORKS GREAT. Ive played though most of portal and working on hl2 as well. The folders/files you created/copied to /usrlib/lib/ disappear after a reboot but thats fine by me until a GLtools update is rolled out.

    Enjoy!!!!
    2
    Working configuration for DOOGEE F5 (and possible other Mediatek MT6753 devices)

    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).

    Prerequisites
    • 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.

    Installation
    1. Install GLtools APK.
    2. 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.
    3. 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.
    4. Grant GLtools SU rights if you haven't granted it before.
    5. If using non-recovery installation, your device will reboot shortly after installation.
    6. If using recovery installation, reboot to recovery and apply the install_gltools.zip located on your internal storage / SD card.
    7. After installation and rebooting, install the Half-Life 2 APK.
    8. Configure GLtools to run Half-Life 2 (next section).
    9. Optionally configure your controller to play Half-Life 2 (next section).

    Configure GLtools to run Half-Life 2
    1. Open GLtools and select Half-Life 2 in the list.
    2. 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:
    Code:
    Enable custom settings for this app: checked
    Anti-aliasing (MSAA/CSAA): default (defined by app)
    Use lower render resolution: 1x (disabled)
    Force 16 bit rendering: unchecked
    Optimize GLSL shaders: unchecked
    
    Textures
    Enable texture decompression: unsupported only
    Enable texture recompression: decompressed only
    Downscale textures: disable
    
    FPS counter
    Disable or use logcat if you want to see the FPS counter.
    
    GPU name/emulation
    Use fake GPU info: checked
    Use fake CPU/RAM info: unchecked
    Use a template: GPU/CPU Tegra 4 (SHIELD)
    All other settings filled in by selected template
    
    Emulation options
    Simple MapBuffer emulation: checked
    Software VBO emulation: checked
    Used packed stencil buffer: checked
    Half-float texture hack: unchecked
    Fix FBO attachment sizes: unchecked
    Decode sRGB: unchecked
    Shader attribute reordering: unchecked
    
    Expert options
    Leave all options unchecked
    Shader processing: don't do anything
    The folder used for shaders: <path to android/data folder on SD card>/com.nvidia.valvesoftware.halflife2/files

    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:
    1. In the Sixaxis app, go to settings (can be found under the 'hamburger' menu).
    2. Tap on "Gamepad Settings".
    3. Check "Enable Gamepad".
    4. Tap on "Edit Mappings".
    5. Map your controller as it was a XBOX / SHIELD controller (cross: A, circle: B, square: X, triangle: Y).
    6. Fix the digital pad for weapon switching (next section).

    DualShock Digital pad and Sixaxis Controller
    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.
    1. Enable Root Explorer and mount system as R/W (read and write).
      1. Open the hamburger menu in ES File Explorer.
      2. Scroll down and tap on "Tools".
      3. Enable "Root Explorer" .
      4. Tap on in it, and a pop-up will open.
      5. Tap op "Mount R/W" and set "/system" as "RW".
      6. Grant ES File Explorer SU rights if your haven't granted it before.
    2. 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".
    3. Also, write down the permissions, owner and group of the original configuration file mentioned in the previous step.
      1. Select the file by holding on to it.
      2. Tap on "Properties" (the properties button might be located under "More" in ES File Explorer")
      3. 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)
    4. Create an additional copy of the configuration file on your SD card as back up.
    5. 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.
    6. 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:
      Code:
      [...]
      bind "UPARROW" "slot1"
      bind "RIGHTARROW" "slot2"
      bind "DOWNARROW" "slot3"
      bind "LEFTARROW" "slot4"
      [...]
    7. Save the file, and copy it back to its original location.
    8. Restore the permissions, owner and group of the file.
    9. Mount "/system" back to read-only (RO).

    Optimization
    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.
    2
    I've got the same problem! I've tried everything. Happens on portal and half life

    Sent from my Nexus 7 using Tapatalk

    UPDATE: Please check if you really selected the right plugin.
    Now only the models Textures appears, all other Textures are black. Im lucky i know every single map from both games. So I can navigate with ease even with those. I will play around with settings and see what I can do.
    Device tested: Nexus 4 PA 4.2 Beta, Snapdragon 600 - Good FPS, texture bugs.

    Fixed everything, i have enabled the other options (sRGB emulation and stuff) and now it works.
    Configs for N4
    Same as above but enable:
    Half-float texture Jack
    FBO Attachment (i think thats its name)
    sRGB emulation