yashsingh1/xdaforums huggingface dataset:
[Shield General] legofan623:
HALF LIFE 2 AND PORTAL NVIDIA SHIELD RESEARCH

The long awaited guide for all this goodness can be found here: https://pastebin.com/mNGD4Q8G (Thanks r3pwn)

INSTALLING DIFFERENT GAMES ON HALF-LIFE 2 (EP1/HL2) CLIENT HERE: http://youtu.be/pd-t2TrDtfU

Eventually I'd like this to help developers familiar to the Source engine and I port popular HL2 and Portal mods to the Shield.

IF YOU MAKE AN IMPORTANT DISCOVERY REGARDING EITHER OF THESE GAMES ON THE SHIELD, PLEASE POST YOUR DISCOVERY AND I WILL ADD IT TO THIS LIST AND CREDIT YOU FOR IT

These references cover the games at versions 23 (APK) & 22 (DATA)

Hopefully you already know how to get these files from your Shield to your PC, because I’m not covering that.

Vocabulary:

main.22.com.nvidia.valvesoftware.portal.obb – Core game data, contains Source engine core and Half-Life 2 data files

main.22.com.nvidia.valvesoftware.halflife2.obb – identical to ^

patch.22.com.nvidia.valvesoftware.portal.obb – Contains all the data files for Portal

patch.22.com.nvidia.valvesoftware.halflife2.obb – Contains only the maps for HL2 and associated files (BSP, PAT, LMP)

These files can be found in sdcard/Android/Obb, you might need to enable the viewing of hidden files in your file browser to get to them. Open them as if they were ZIP files.

Apparently you can't change or replace files directly in the .obb files because of a checksum/signature check, if you do the game will attempt to redownload the .obb file (Thanks nex86)

Custom files can be loaded from "/data/data/com.nvidia.valvesoftware.halflife2/files", but like all good things this will require your Shield to be rooted.

More will be posted when more is discovered.
[Shield General] nex86:
I tried replacing the voice files with winrar but it seems the game has some kind of checksum/signature check and attempts to redownload the obb file..
[Shield General] nex86:
tried rebuilding the main obb file with the jobb tool in the SDK, did not work either.

for some reason that tool does not create zip files, it creates fat32 images.
[Shield General] legofan623:
Thanks nex86, your info was added into the first post :good:
[Shield General] nex86:
I hope someone knows how to do it,

I'm really tempted to mod the game ^^
[Shield General] Doodle210:
I don't have the games, but if it's anything like GTA SA file checking, you don't touch the OBB files

I'll look into it if i purchase the game.
[Shield General] nex86:
I already tried this. The game ignores files stored in

"Android\data\com.nvidia.valvesoftware.halflife2\files"

I could try extracting all obb's into that folder but it'll take ages because it has thousands of files.
[Shield General] nex86:
Just tried that and didn't work.
[Shield General] nex86:
good news.

I managed to load files from "/data/data/com.nvidia.valvesoftware.halflife2/files"

Root is required to do this and it's also not possible to store them on SD card.

Now I'm just having issues with the soundcache because english and german voices getting mashed up.
[Shield General] legofan623:
Nice work nex! I knew this wouldn't be a very hard thing to crack :D
[Shield General] nex86:
Thanks. I'm struggling with getting the soundcaches and manifest files from the PC version first.

It seems they must getting created by the source engine first but it's not working as it should...

https://developer.valvesoftware.com/wiki/Soundcache

update2:

Just replaced some models, works but textures are showing up as pink checkerboard, guess Tegra is using a different compression, I have to look into that.

I can probably load some custom maps too.
[Shield General] nex86:
Also, unpacking both obb files to

/data/data/com.nvidia.valvesoftware.halflife2/files

reduces loading times and ingame loading lags (not fps wise).

Be aware that you need at least 3,8GB free space on your internal storage for Half Life 2!

the original OBB files must be still present otherwise the game attempts to redownload them, but you can move them to an sdcard with foldermount to save space on the internal storage.

having uncompressed obb files would make things A LOT easier. I hope someone manages to do this.
[Shield General] seaking177:
has anyone tried replacing all the PC files with the android ones?

if so, any luck with it?

38,600 files, 792 folders.

well, this is gonna take some time.

it has all the data for achievements, in "portal\resource\portal_english.txt" you can see all the text in the game, could this be why no subtitles are on?

has subtitle files as well.

secret radio noises are also in "portal\sound\ambient", that means all thats needed is the radios to spawn in each room to enable this, i assume.
[Shield General] nex86:
my goal is to get models and voices from other languages working on Android.

I had less luck with that so far.

For models, it seems they use a different format and for voices I still have issues with rebuilding the soundcache...

The game still takes the english voicecache and voices are getting mashed up.
[Shield General] legofan623:
Along with what you're currently doing, you might wanna try and find a way to get the console and sv_cheats running. I'd think it would be done a lot like how it is on the 360 version of the orange box. And who knows, maybe it'll help out your current issue.
[Shield General] nex86:
I edited the config.cfg and tried binding the console on a key, also tried con_enable 1 but it's not working.

I guess it's like on the 360 and the console is completely missing in the GUI.

It would be much easier if we would have a working rcon, but I'm not sure how that's gonna work.

by editing the config, I got a bunch of other things working though like showing fps.
[Shield General] legofan623:
I'll take a look into how the PS3 and original Xbox did it... If Amazon accepted PayPal I could have gotten around to so much, so I'm still waiting for my Shield @_@
[Shield General] nex86:
Where do you live?

You could also get one on ebay since most dealers accept Paypal.
[Shield General] legofan623:
Washington but PayPal had an issue with transferring the money to my bank account and it was a huge mess...
[Shield General] nex86:
This might be interesting for you if you still don't own a Shield: http://xdaforums.com/showpost.php?p=53119640&postcount=18
[Shield General] AlexDC2013:
SUCCESS!!!

I finally managed to play HL2 EP1 on my Gionee Elife E7 with Mod files on SDCard (in my case on second memory used as SD).

To play game with the modded data on SD you need to make a file binding.

I will post a video soon were everiting will be explained step by step. It will work on Shield; Elife E7; Note 3 and any other compatible phone.
[Shield General] r3pwn:
Yep. I used this to play Portal on my Nexus 7 and to put Black Mesa: Source on my SDCard. Different game, same method. Also, I noticed references to NVIDIA working on HL2:EP2. Expect that within the next year. :)
[Shield General] AlexDC2013:
Right now I put EP2 o my phone to see if works. And i will try with black mesa later.
[Shield General] r3pwn:
Black Mesa: Source doesn't work. I'm porting it like I did with Portal: Prelude, but it doesn't seem to be working. It might work on HL2: EP1 (The one from NVIDIA, not the way that you're doing it).
[Shield General] AlexDC2013:
Source engine depends very much to binari files. I think with a litle work and some time I will do bms working
[Shield General] r3pwn:
No, it's way more complicated than you think. But, if you think you can fix it, feel free.
[Shield General] AlexDC2013:
Bms is builded on sorce2007 if im correct. 1st step is to port him on source2013. I tried this few times and no succes but I will found a solution. Portal prelude is also build on an old engine but, with gameinfo.txt modification and few folders I managed to add him and few other mods on source2013. Black mesa os a real chalange, but I dont giv up fast.
[Shield General] r3pwn:
It won't work.
[Shield General] AlexDC2013:
Problem / Success

SUCCESS: I maidet to port 4 mods in hl2ep1 using the same strucure I ussed to create Extra Chapters for Fakefactory Mod.

Custom weapons working but still have some textures problems.

Problem: Ep2 it working but dont recognize new characters like Magnusson or Hunters. Same at ep1. At the citadel part where Alyx should make rollemine yellow it stuks, I tink is the same proble with npc recognizing.

Some help please...
[Shield General] r3pwn:
I already did all of that research. I even have textures fixed, but as I stated before (and you didn't listen, I must add), new NPCs won't be possible without using HL2:EP1 as a client. Did you see the link to my site in the OP with a lot of this information already there? The only thing that isn't there is how to install mods the easy way (without chmod & chgrp), but I discovered that shortly after writing it.
[Shield General] AlexDC2013:
To use ep1 as client you should modify obb files. If you do that game will download them again. But I think I found a solution. I think game detects if obb is modded from obb size. Few days ago I decompiled hl2.apk using some tools from internet. In scripts I found an xml where was rided exact size of obb files. After modifing size I recompile app back to apk and i tried to install. No succes because was an error at signature. I dont have any idea about signing an app so i didnt make it work. You should have more knowlege in such things then me. You sould try this maybe will work.
[Shield General] Mexican Pygmy:
Search up zip signer 2. Its an app for android, and it should be here on xda somwhere i dont remember, and i don think that its about the obb size, its probably a signature check on the obb file.
[Shield General] r3pwn:
No, that won't work, either. Changing the client has nothing to do with the obb files. They come with the HL2:EP1 from NVIDIA (you can't get them from anywhere else. Android can't use DLLs). I have a friend who is able to help me out, though. He just got a 32gb LTE SHIELD Tablet.
[Shield General] AlexDC2013:
Gamma Energy

Hy. I just played Portal: Prelude on my phone and its very cool. Can you try port Gamma Energy mod to android. It's one of the best mod for Portal I played.
[Shield General] r3pwn:
I'll take a look at it. I need to release an updated version of Portal: Prelude, too.
[Shield General] AlexDC2013:
Great NEWS!!!!!

Nvidia launch HL2EP1 .

I launch EP2 from it, like i did with HL2 and surprise. It recognize new npcs from EP2 "Magnuson and oters" :))
[Shield General] r3pwn:
I managed to get my hands on it and tried using it for BMS, but no luck so far. I'll be able to look at it later.
[Shield General] AlexDC2013:
Good lock. Please tell me if you make any progress
[Shield General] AlexDC2013:
Need some help

I managed to install black mesa on my phone. and I used ep1 as client. Apparently it recognize new caracters like scientists. But it still full of vizual bugs. Textures, mising buttons from controller menu, missing buttons from main menu, missing chapters and others. Are lots of bugs an I can't fix them all. I need some help.
[Shield General] legofan623:
I'll do some work with BMS over the next week and see what I can come to. No guarantees, but I'll take a look.
[Shield General] legofan623:
Black Mesa is at probably 99% bug free graphics wise. NPC's don't look too bad so far, but there's only so much I can see when we can't even load a map yet. :mad:
[Shield General] AlexDC2013:
Can you send me a link where to download your modified BMS version like Portal:Prelude please? Mine is to buggy.

And you try to modify resource\GameMenu.res to load a map? If not use this:

"command" "engine map "mapname""
[Shield General] nex86:
Ep1 works fine on Shield Portable too.

I spoofed my device to a Shield Tablet by changing the build.prop, after that I was able to buy and install it from the store.

It works flawlessly, just the HUD looks smaller because it's optimized for a bigger screen.
[Shield General] thewolf16:
Any news for making german sound files possible for Half life 2 & Portal mobile?
[Shield General] legofan623:
Unfortunately that isn't a main priority right now, but feel free to try something on your own :thumbup:
[Shield General] legofan623:
When NPCs, textures, and weapons work I'll release an alpha build.
[Shield General] lKinder_Bueno:
How can I enable subtitle in portal? I don't understand english spoken
[Shield General] legofan623:
Deleted
[Shield General] legofan623:
I haven't done that yet, but I'll get on it. It should be quick :thumbup:
[Shield General] legofan623:
Well... looks like Valve hasn't upgraded Portal to the EP1 engine yet... sorry, but there's nothing we can do about the subtitles yet.
[Shield General] lKinder_Bueno:
Thanks. Can you tell me if half life 2 (not ep1) has subtitles?
[Shield General] legofan623:
I don't think so, but ruining HL2 on the EP1 engine is possible.
[Shield General] John Cletus:
Just got the 32GB LTE model. It seems that Half - Life 1 Mods work on the Nividia Shield tablet, using DOSBOX Turbo. Anyone tried putting SMOD for HL2 on the Shield?
[Shield General] legofan623:
It's on the list of things to do. You can try it yourself by following the video tutorial :thumbup:
[Shield General] Rae Ayanami:
Non-Tegra user here, has anyone tried porting over Vampire The Masquerade Bloodlines assets? The full game itself would be unrealistic due to how the scripts work (probably?), but has anyone tried importing maps and models? VTMB uses a super-old version of the Source engine, and I'd assume it's around the same age as the version of Source they ported to Android.

I'd love to try it myself, but I only have a Galaxy S3 and a generic A13 Android tablet, both of which have super finicky results when it comes to running Half-Life 2.
[Shield General] Mexican Pygmy:
I think so far, the source engine is different every year its updated, like this one for android, it uses 2013 source i think, it been a while since ive been on here
[Shield General] thewolf16:
Anybody got different voice files (f.e. german) for half life 2 or portal working?
[Shield General] r3pwn:
I doubt it's the 2013 version.
[Shield General] Rae Ayanami:
^ This, pretty much.

At it's core, latest it could really be is up to about EP1's release, maybe EP2's. No older than that.

It's probably quite a bit older that the VTMB engine now that I'm thinking about it, since it shares a lot of similarities with the Orange Box console versions from what I can tell.
[Shield General] kron123456789:
I think this is 2010 version, not 2013.
[Shield General] painkiller_93:
would it be possible to run "Dark Messiah Of Might and Magic"? It's from 2006 and uses Source engine
[Shield General] VladHQ:
Mods

I would love to run Black Mesa on my shield! Also, I will personally donate $50 into PayPal if you get CS:Source and L4D working! Some of my favorite Source games, great progress so far, keep porting everything! xD
[Shield General] r3pwn:
Unfortunately, we ran into a major issue with BMS which prevented either of us (me and legofan) from being able to port it successfully. I think legofan took a look at CS:S a while back and couldn't get it working too well (working maps, but no guns, no online, etc.). I told myself I would take a look at L4D, but never got around to it. Whenever I get time, I'll look into it. :)
[Shield General] VladHQ:
That's great to hear! I would love to play CS:Source with just bots, if the console's working, isn't it possible to add them? I just read the whole thread and read that Black Mesa is 7GBs, and while porting it would be awesome, I just wouldn't have enough space to store it lol! I am pretty damn sure Valve will release it's own Steam for Android with a lot of source ported games, that would be fantastic. I would love to play my favorite games on the go with the Shield portable.
[Shield General] r3pwn:
No, I don't think bots would work, plus, no weapons. :/
[Shield General] berryman13:
Okay, this is follow I the guidelines you set and the hl2 mod files? Looks like we need some new mod files then. I'm getting to know this tegra device very well and also will look into this.

@r3pawn, how did you initially create the mod files? What's different verses hl2 and portal? It seems as if the orange box engine is causing issues, as we don't have that version of source supported yet.
[Shield General] r3pwn:
They work fine, running them on my SHEILD Portable now. Kinda busy now, let me help you later.
[Shield General] thewolf16:
Ive tried to get the german voice files to work (Portal). It wont work because f.e. the german voice file is 7 seconds long and the english one 6 seconds long, but the german voice file will just play for 6 seconds (like the english one) until the next voice file is played (so a part of the german voice file is cut ). I think it has something to do with the sound.cache. Ive already renamed the "portal_sound_vo_german.vpk.sound.cache" to "sound.cache" and moved it to my device but it wont work either. What can i do?

EDIT: I think ive got this working. That problem what ive said is a little bug in the game. It appears when two sound files are operlapping. Happily its just on the first two sentences. This bug was fixed on the pc version awhile ago but because weve hot the old source engine version this bug is still there but its no problem. Here you can see this bug:

https://www.youtube.com/watch?v=h06sddvZ9Bk

[at 0:26] "Hallo und nocheinmal willkommen im computergesteuerten Enrichment Center from Aperture [cut] Wir hoffen..."

This is how it should be:

https://www.youtube.com/watch?v=v8C1UqqTtYw

[at 2:25] "Hallo und nocheinmal willkommen im computergesteuerten Enrichment Center from Aperture scienceWir hoffen..."

So no big deal. Just a bug from the game. :)
[Shield General] legofan623:
That's awesome! Great to see some more progress.
[Shield General] thewolf16:
After much struggles (like high pitched static noises and low fps) ive got half life 2 working properly on my shield tablet. So portal and half life 2 is fully playable with german voice (when somebody want a tutorial then ask me). Next i will try to get the half life 2 "alchemilla" mod working, When it wont work i will try some older half life 2 mods like "Nightmare house".

EDIT: Cant try the alchemilla mod because its too big for my internal memory.

EDIT2: Got custom maps (Nightmare house) to work. Its pretty awesome.
[Shield General] berryman13:
Hey I'm sending you a PM for tutorial
[Shield General] thewolf16:
Here is my tutorial for the custom maps:

-start the game until the first level is fully loaded so config.cfg is generated

-put .bsp files under /data/data/com.nvidia.valvesoftware.halflife2(or portal)/files/hl2(or portal)/maps

-open config.cfg under /data/data/com.nvidia.valvesoftware.halflife2(or porta)/files/hl2(or portal)/cfg

-edit command f.e. (bind "UP "slot1") to (bind "UP "name nameofyourmap") and save

-enter the adb commands in "Terminal emulator" like in the tutorial from r3pwn

-open game and load first story level

-when its fully loaded then push the button you have bind the "map" command to in the config.cfg to load the custom map

When you need the german files for HL2 or Portal, PM me!
[Shield General] AlexDC2013:
Nimghtmare house 2 is an excelent mod. If you make it run you are cool
[Shield General] Neodreamer24:
Please [MENTION=4238534]thewolf16[/MENTION] tell me how can I change the language. I asked to the programers for Spanish and they said me the last year that in future a update will be released...but never happened. I have the game original in pc steam and original in android. Can I change files or any mod to get Spanish in shield game? Thanks

Enviado desde mi SM-N9005 usando Tapatalk 2
[Shield General] thewolf16:
[MENTION=1353365]Neodreamer24[/MENTION]

Ive made a tutorial to translate it to german. Since i dont know how the files are named in the spanish version i cant make a tutorial specified for the spanish version. But i think its the same as the german version except the "hl2_sound_vo_german_dir.vpk" or "portal_sound_vo_german_dir.vpk" should be named as something like "hl2_sound_vo_spanish_dir.vpk" or "portal_sound_vo_spanish_dir.vpk". Heres my tutorial:

Reply to me when you need help.
[Shield General] Neodreamer24:
Sorry but i dont find portal or half life 2 data directory, only obb with 2 big files. They are in /android/obb/com.nvidia.valvesoftware.halflife2 but not /data/data...

Could you make a screen capture? Thanks

Edit: sorry, I found it. Tomorrow I will try them. Thanks

Enviado desde mi SM-N9005 usando Tapatalk 2
[Shield General] Neodreamer24:
I dont understand Step 10. Which permissions will we change if only change the language and no map mod?

I dont understand 5dn and the *...

Thanks

Enviado desde mi SM-N9005 usando Tapatalk 2
[Shield General] thewolf16:
[MENTION=1353365]Neodreamer24[/MENTION]

Just follow the steps in the given link. Just type in (in terminal emulator app which you can download in the play store):

su

cd thepathtoyourgamefiles (for example, when you want to mod hl2 then type in: cd /data/data/com.nvidia.valvesoftware.portal/files)

ls -na (with this command you will see a few 5 digit numbers, this 5 digit number which is there the most you will need for the following commands)

Now when the most occurring 5 digit number is for example 10111 then you have to type in:

chown 10111 *

chown 10111 */*

chown 10111 */*/*

and so on (type in everything you see in this link on step 10)... do the same with the chgrp commands.
[Shield General] Neodreamer24:
Ok. I tried changing permissions like ole hl2 directory and files but when i started the game it was in english... I tried adding resource directory and Spanish dat and txt for force subtittles and changing in config.cfg file putting 1 on cc subtittles and Spanish language but nothing change... Its like I was never changed nothing... Why it continue in english if I change the files? It must be in Spanish or not sound I think... Isn't it? Thanks

Edit: I did all the chowns but when i go to make chgrp it says me tmp-mksh: chgrp not found

Edit2: its working!i didn't need chgrp... Thanks! I dont understand how valve didn't make it... Its easy...

Enviado desde mi SM-N9005 usando Tapatalk 2
[Shield General] matyas69:
On my way
[Shield General] berryman13:
Just maps and models and sounds, assets, is all I can see this being able to import right now. What would be cool is to figure out how half life 2 runs and then implement Garrys mod 9 over it. That's the last free one.
[Shield General] kron123456789:
Half-Life 2: Episode 2 confirmed

http://shield.nvidia.com/games/android/hl2ep2

But, it says that it's available only for Shield Console. So there is a question — will it work on Shield Portable and/or NST?
[Shield General] KLBrey:
As it is today, HL2:ep2 will not run on Shield Portables. It's always required a graphics capability only found in TK1 & TX1, not T4.

Maybe someday it'll get ported to T4 but I wouldn't hold my breath. At $199 the TX1 equipped Shield Android TV (aka Shield Console) is within the reach of many die-hard Portable users. Myself included.
[Shield General] r3pwn:
But Episode 1 works on the Portable. It's not installable from the play store (without tricks), but it works.
[Shield General] i_guana:
Any progress on the console yet? Also, I noticed a VR mode command in the config file. Is this just a left over from porting or is there a way to enable the feature? I've installed the game on my Note 4 and it runs great using GLTools. Would love to see it in VR with my Gear VR!
[Shield General] r3pwn:
I think it's just leftover from the port.
[Shield General] i_guana:
Bah! Too bad. When I saw it I started to get excited! Oh well, maybe someone will make it work via a method like TriDef. Here's hoping!

Alas I still would at least like to use the console. It must be locked pretty deep if no one has figured it out yet.
[Shield General] r3pwn:
Yeah. It's pretty safe to say that we won't unlock the console anytime soon. We didn't even know the console showed up in-game until I came along.
[Shield General] i_guana:
I wonder why they went to such lengths to block use of the console. It must be because of the exclusivity with nVidia. I can't think of anything else.
[Shield General] Mexican Pygmy:
Another bump so this thread stays alive, hasnt been updated in almost a month