This article relates to the game "Portal". Click here for more information.
This article relates to the game "Half-Life 2". Click here for more information.
This article's documentation is for anything that uses the Source engine. Click here for more information.

Source on Android: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Converted page to multipage)
Tag: Replaced
Line 1: Line 1:
{{multipage}}
{{portal topicon}}{{hl2 topicon}}{{src topicon}}
{{portal topicon}}{{hl2 topicon}}{{src topicon}}
[[Category:Source_engine_branches]]
[[Category:Source_engine_branches]]
[[Category:Source_mods]]
[[Category:Source_mods]]
[[File:Hl2 on android.jpg|512px|thumb|{{hl2|4}} running on a [https://en.wikipedia.org/wiki/Redmi_Note_9 Redmi Note 9 Pro] ]]
On May 12, 2014, [https://www.nvidia.com/en-us/ NVIDIA] released an exclusive port of {{Portal|4}} and {{hl2|4}} to their [https://en.wikipedia.org/wiki/Nvidia_Shield_Portable NVIDIA Shield platform].<br>
Ever since then, buying a NVIDIA Shield device was the only way of playing those two games on a [https://en.wikipedia.org/wiki/Android_(operating_system) Android] based system.
==History==
In 2019 a user named "[https://www.youtube.com/@nillerusr niIlerusr]" started uploading development videos to YouTube showing off a modified version of the NVIDIA Shield version of {{hl2|4}} running on a standard Android device.<br>
[https://www.youtube.com/watch?v=ocPByhSukRQ In his first video] on the topic he shows off the touch capabilities of the mod.<br>
A public build would be released on October 30, 2020. This build included playable versions of {{hl2|4}}, {{hl2ep1|4}}, {{hl2ep2|4}} and {{portal|4}}.
Since then many other games have been ported such as {{hl2dm|4}}, {{hls|4}}, {{dods|4}} and {{css|4}}.
==Installation==
[[File:Main source app.jpg|256px|right|thumb|The main Source Engine app]]
# Download the latest Source Engine apk and then the game apk of your choosing (the Source Engine app launches base Half-Life:2)
# In the phone's storage create a folder called {{path|srceng}} (or anything really)
# Connect your phone to your PC with a cable or wirelessly
# Go into the {{hl2|4}} directory and copy over every folder aside from the bin and steam_input folder into the srceng folder
# Set the path to the game resources in the Source Engine app
{{tip|If the gallery app picks up the images from the game files, place a [https://drive.google.com/file/d/1-7DUU7F277Ek0jrocLnyt-MNCHOtByAD/ ".nomedia"] file in the srceng folder}}
==Installing Other Games==
To install games besides {{hl2|4}} simply copying the folder of the same name as the game to the srceng folder is all that is needed.<br>
For example, to install {{portal|4}}, copying the folder {{path|/steamapps/common/Portal/portal}} to the srceng folder will let you play {{portal|4}} via the Portal app.
The following diagram showcases the game folder structure:<syntaxhighlight lang="">
srceng
|
├── hl2        -->  Half-Life 2, (REQUIRED FOR ALL GAMES)
├── platform    -->  Half-Life 2, (REQUIRED FOR ALL GAMES)
|
├── hl2mp      -->  Half-Life 2: Deathmatch
├── episodic    -->  Half-Life 2: Episode 1
├── ep2        -->  Half-Life 2: Episode 2
|
├── hl1        -->  Half-Life: Source
├── dod        -->  Day of Defeat: Source
├── cstrike    -->  Counter-Strike: Source
└── portal      -->  Portal
</syntaxhighlight>
[[File:Portal on android.jpg|thumb|{{portal|4}} running on a [https://en.wikipedia.org/wiki/Redmi_Note_9 Redmi Note 9 Pro] ]]
==Installing on an SD-Card==
Installing all the game files on a SD-Card can be beneficial if the internal storage is full or the user just prefers it that way.<br>
However since the app only allows for the selection of directories from the internal storage, the SD-Card path has to be entered manually.
{{warning|Installing the game files on the SD-Card is not recommended by the developers}}<br>
Getting the path to the SD-Card alone can be challenging since regular file managers just report it as {{code|preset=4|SD Card}} and don't give the actual path to it.
The easiest and least "ad-riddled" way of getting the SD-Card path is to connect the device to a computer loaded with [https://developer.android.com/tools/releases/platform-tools#downloads ADB (Android Debug Bridge)]
To use ADB, USB debugging has to be enabled which varies from OS to OS.
{{tip|Simply look up your device on the internet for instructions on enabling USB debugging}}
Once all that has been done, a command prompt has to be opened in the folder in which ADB is located in (this can be done by typing {{code|preset=3|cmd}} in the address bar)<br>
Then to confirm that the device is recognized by the system, typing in {{code|preset=3|adb devices}} will show all attached devices.
If a string of numbers and letters followed with {{code|preset=4|device}} shows up, that means that it has been detected.
Next, type {{code|preset=3|adb shell}}
Then, type {{code|preset=3|df}}. This will list all directories on a root level. The directories we are interested in are usually at the bottom.
There should be 2 directories starting with {{path|/storage/}}.<br>
The internal storage will always be {{path|/storage/emulated}} while the SD-Card is usually {{path|/storage/}} followed by a 8 character string divided into two by a dash ({{code|preset=4|-}})
For example:<syntaxhighlight lang="">
/dev/fuse 109783884 53449520 56203292  49%  /storage/emulated <- The Internal Storage
/dev/fuse 124835840 35815296 89020544  29%  /storage/9257-194E <- The SD-Card
</syntaxhighlight>
The path specified (in this example {{path|/storage/9257-194E}}) is what we will write in the "Path to game resources" dialog in the app.
==External Links==
[https://discord.gg/7mBT2tq9Mw niIlerusr's Discord server]<br>
[https://arumoon.github.io/source-engine-download/ Latest Source Engine apk]<br>
[https://nc.workbench.network/s/gdRnpcc2zrXz5Xg/download?path=%2F&files=episodic-1.06_96.apk Latest Episodic apk]<br>
[https://nc.workbench.network/s/gdRnpcc2zrXz5Xg/download?path=%2F&files=cstrike-1.09_96.apk Latest {{css|4}} apk]<br>
[https://nc.workbench.network/s/gdRnpcc2zrXz5Xg/download?path=%2F&files=hl2mp-1.07_96.apk Latest {{hl2dm|4}} apk]<br>
[https://nc.workbench.network/s/gdRnpcc2zrXz5Xg/download?path=%2F&files=hl1-1.06_96.apk Latest {{hls|4}} apk]<br>
[https://nc.workbench.network/s/gdRnpcc2zrXz5Xg/download?path=%2F&files=dod-1.06_96.apk Latest {{dods|4}} apk]<br>
[https://nc.workbench.network/s/gdRnpcc2zrXz5Xg/download?path=%2F&files=portal-1.05_96.apk Latest {{portal|4}} apk]
==See Also==
[[Source]]<br>
[[GoldSource]]<br>
[[Source SDK]]

Revision as of 05:39, 10 July 2024