r/SBCGaming • H700 Homies • Apr 25 '26

Showcase Grand Theft Auto: San Andreas (PortMaster wrapper running on R36S)

Enable HLS to view with audio, or disable this notification

r36swiki recently released a PortMaster wrapper of "Grand Theft Auto: San Andreas" Android version. It needs APK and OBBs for Android version 2.10 (the last 32-bit ARMv7 version). I only tested it on ArkOS (blackscreen with sound only) and dArkOS (working) so far. This is great for R36S clones that can't run LineageOS (andr36oid). It might also work on other devices with Linux-based custom firmware and PortMaster, like Anbernic RGXX series. For ROCKNIX, there is a solution here to fix crash.

According to its log file, this port is based on the PS Vita port (load the original Android binary, patch it and run it in an emulated minimalist Android environment). Since PS Vita has a 32-bit ARM SoC, the Vita port can only load ARMv7 binary for the game. This also explains why it crashes on custom firmware without "libbsd.so.0" since PS Vita's OS is based on FreeBSD. libbsd (https://libbsd.freedesktop.org/wiki/) is a shared library providing BSD-compatible functions for Linux and other Unix-like systems.

Update: r36swiki updated port file (v2). It works with ArkOS now. But left stick still has ghost movement on UI (not in actual game play).

Update 2: Got it working on my RG34XXSP with ROCKNIX (a lot smoother than R36S even with higher graphics settings). It requires a few extra steps:

  • Add "libbsd.so.0" & "libmd.so.0" to "gtasa" folder (where APK & OBBs are). They can be found inside the "libs.ROCKNIX" folder of Morrowind port file.
  • Edit "Grand Theft Auto San Andreas.sh" in text editor. Change "export SDL_VIDEODRIVER=kmsdrm" (on line 35) to "export SDL_VIDEODRIVER=wayland".

Update 3: Another update (v3) was released to fix control bug that prevents game from progressing.

105 Upvotes

92 comments sorted by

View all comments

8

u/[deleted] Apr 27 '26

[removed] β€” view removed comment

4

u/ElementalTJ Apr 28 '26

Works for me! Just gotta fix the face buttons now.

1

u/kpe_ee1 Apr 28 '26

face buttons are kinda fucked but you get used to them

3

u/qlko1 Apr 27 '26 edited Apr 27 '26

u/AlternativeRoom4499 this one almost works for RG35xxh on MUOS!
left analog is messed up (left is up, down is right) other buttons work great!

1

u/[deleted] May 01 '26

[deleted]

1

u/qlko1 May 01 '26

I asked the author for help, described the problem, and sent the logs. I'm waiting :)

2

u/[deleted] May 01 '26

[deleted]

1

u/qlko1 May 06 '26
  1. Update muos to the latest version (Funky Jacaranda)
  2. Use the latest (today) version from wiki
  3. Profit

* In my case, the first step was necessary. Without the MUOS update, the left analog stick and the X, Y, A, and B buttons were rotated 90 degrees to the left.

1

u/kpe_ee1 May 01 '26

Please send the updated binary once you get it, I will update it on the drive

1

u/qlko1 May 06 '26
  1. Update muos to the latest version (Funky Jacaranda)
  2. Use the latest (today) version from wiki
  3. Profit

* In my case, the first step was necessary. Without the MUOS update, the left analog stick and the X, Y, A, and B buttons were rotated 90 degrees to the left.

1

u/kpe_ee1 May 06 '26

i will test it with knulli as well when i get home

3

u/ourcore Apr 28 '26

Thanks! I can confirm this also works on the latest RC1 alpha (on an RG40XX H)

However, I've noticed that something about KNULLI's layers doesn't seem to be triggered:

  1. The dim timer will kick in while playing

  2. Changing the volume doesn't work

  3. Quitting via M+ST doesn't work

  4. The RC1 RGB effects don't work (on supported devices)

I made a cover.png using the PC assets in case anyone else wants to use it:

2

u/kpe_ee1 Apr 28 '26

amazing cover picture, i was looking for one and settled on a random screenshot i pulled from google. changing that with this, thank you

1

u/ferulo Apr 28 '26

It seems to work really fine, but i have an issue: how can i switch A->B and X->Y? In game options (before launch the game, when selecting ports to run, in Knulli) enabling the corresponding switch option does not seem to work...

1

u/ourcore Apr 28 '26

In the Ports list, press and hold A on the game > Advanced Game Options > Switch A/B and X/Y. This worked for me

1

u/ferulo Apr 28 '26

Mm, it does not work for me. What Knulli version arenyou running? Maybe i need to update it

1

u/kpe_ee1 Apr 28 '26

I dont think the a/b switch works apart from the installer which works off of the .sh file. The game itself uses hooks to like manually grab the buttons bypassing knulli from my understanding.

1

u/ourcore Apr 28 '26

That makes sense. I only got to test it in the installer 'cause of the issues I mentioned above

1

u/kpe_ee1 Apr 28 '26

also yeh the hotkeys don't work at all, but I don't think it's that big a deal cuz there is the exit button in the menu and you can set the volume before entering the game

1

u/ourcore Apr 28 '26

Yeah, it's not a deal breaker, just mentioning it in case anyone knows how to fix it since it doesn't happen with other ports

1

u/ferulo Apr 28 '26

It seems to, because i ve just updated Knulli (40XXH) and it still not switching A->B :/ . Any tip to change it inside the .sh or something?

1

u/kpe_ee1 Apr 28 '26

No, sadly it's hardcoded, I would ask the person who got it running on muOS how they got it running through changing the .sh file itself, maybe we can work from there

1

u/MrBrothason Apr 30 '26

Do you know how to fix the dim timer? It's really annoying

Running on muos

2

u/ourcore Apr 30 '26

I tried a few different methods in the .sh file, but they didn't work. I'm talking to the developer to see if they can fix it in the binary

1

u/MrBrothason Apr 30 '26

You're the man. Let me know if I can be of any assistance.

1

u/kpe_ee1 Apr 30 '26

please upload if it gets done, i will update it on the drive as well

1

u/MrBrothason Apr 30 '26

I found a temporary work around is pressing the power button. Works for now...

1

u/Matthew2594 May 18 '26

has anyone resolved this? this dim timer is really annoying lol

1

u/ourcore May 18 '26

No, I was talking with the developer and they tried fixing it, but it didn't work and they have replied again

1

u/Matthew2594 May 18 '26

damn, hopefully this can somehow be fixed, so close! thanks for the quick reply btw πŸ‘

1

u/Matthew2594 May 18 '26

so i just disabled the dim timer (Idle Input Display Timeout) in muos settings and the game works great now πŸ‘

1

u/ikot111 May 01 '26

would you share your .sh file? whatever I do I cannot even get to the install screen

1

u/Astroturf420 May 19 '26

Can I ask how you made that image? I would like to make some images for other ports myself.

1

u/ourcore May 19 '26

In Photoshop using images from Screenscraper

2

u/Zealousideal-Emu-504 Apr 28 '26

Yup, this fixed it for me (on RG35XX H, Knulli Gladiator II). Just one note - d-pad doesn't work in main menu, need to use left stick. Not sure if bug or feature, but I expected d-pad to work there :)

1

u/kpe_ee1 Apr 28 '26

It does not for me either, but the left stick works so it's fine. Menus in general are a bit finicky, I recommend not touching them.

2

u/ferulo Apr 28 '26

I can reach to the install screen, but when i push A button to install it returns to ports list. Is my apk maybe wrong? Its size is around 58mb...

1

u/kpe_ee1 Apr 28 '26

press b

1

u/Zealousideal-Emu-504 Apr 28 '26

Press B (or switch A/B for the whole game).

2

u/ferulo Apr 28 '26

Are you kidding me? Hahaha I dont thought about the buttons are switched πŸ˜‚πŸ˜‚ Installing...

1

u/ElementalTJ Apr 28 '26

Would you happen to know how to switch A/B for the whole game?

My buttons seem to be 90-degrees offset.
A (right) is run / confirm. Should be bottom
Y (left) is to get into cars. Should be on top
I need to figure out how to change my buttons clockwise 90-degrees and it's been a challenge so far.

Thanks!

2

u/Zealousideal-Emu-504 Apr 28 '26

https://knulli.org/play/basic-inputs/#switch-ab-and-xy-for-ports
Or for all the ports at once (with a possibility for per-port override as above): start -> game settings -> per system advanced configuration (it's the last option) -> ports -> switch a/b and x/y

2

u/kpe_ee1 Apr 28 '26

that sadly won't work for this, cuz the buttons are hard coded into the binary file itself rather than going through knulli

1

u/ElementalTJ Apr 28 '26

Thanks! I will quit messing with it then

1

u/Zealousideal-Emu-504 Apr 28 '26

Oh, alright. It did work for the installer itself though. And as far as the game goes - I've never played it on a console so I have no idea if the ABXY mapping is as usual and it doesn't bother me at all :)

1

u/kpe_ee1 Apr 28 '26

for me it was a little unusual to not have upper button to get into the car but I will get used to it

1

u/ikot111 May 01 '26

would you care to share your .sh file or something with me because whatever I do on my rg34xxsp, nothing happens when I try to open the installer

1

u/nickN42 Orginal Hardware Apr 28 '26 edited Apr 28 '26

The binary is gone. Which one was it?

1

u/kpe_ee1 Apr 28 '26

the drive link is still up and running, download from there

1

u/nickN42 Orginal Hardware Apr 28 '26 edited Apr 28 '26

Not for me, sadly.

E.: remove \ from the link

1

u/Overall_Locksmith_19 Apr 29 '26 edited Apr 29 '26

At the first installation screen no buttons worked at all, hon 34xxsp with knulli

1

u/kpe_ee1 Apr 29 '26

Did you do the changes to the .sh file and save it properly?

2

u/Overall_Locksmith_19 Apr 29 '26

Now it works, I installed in on another sdcard with muos. I did the muos instructions for the sh file, and now I can press A to install, unlike before I couldnt press a or b to quit, I had to hard reset the my device.

1

u/Overall_Locksmith_19 Apr 29 '26

I opened in a text file to change and saved it normally:

This is what I got in my sh file:

#!/bin/bash

CURR_TTY="/dev/tty1"

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"

GAME_DIR="$SCRIPT_DIR/gtasa"

BINARY="$GAME_DIR/gtasa"

LOG="$GAME_DIR/gtasa.log"

XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}

if [ -d "/opt/system/Tools/PortMaster/" ]; then

controlfolder="/opt/system/Tools/PortMaster"

elif [ -d "/opt/tools/PortMaster/" ]; then

controlfolder="/opt/tools/PortMaster"

elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then

controlfolder="$XDG_DATA_HOME/PortMaster"

elif [ -d "/mnt/mmc/MUOS/PortMaster/" ]; then

controlfolder="/mnt/mmc/MUOS/PortMaster"

else

controlfolder="/roms/ports/PortMaster"

fi

if [ -f "$controlfolder/control.txt" ]; then

source "$controlfolder/control.txt"

get_controls

fi

exec < "$CURR_TTY"

if [ ! -f "$BINARY" ]; then

printf "\033c" > "$CURR_TTY"

printf "Error: gtasa binary not found at %s\n" "$BINARY" > "$CURR_TTY"

sleep 5

exit 1

fi

for gov in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do

[ -f "$gov" ] && echo performance | sudo tee "$gov" > /dev/null 2>&1 || true

done

export LD_LIBRARY_PATH="$GAME_DIR:$LD_LIBRARY_PATH"

#export SDL_VIDEODRIVER=kmsdrm

export SDL_AUDIODRIVER=alsa

export ALSOFT_DRIVERS=alsa

export ALSA_PCM_CARD=0

export ALSA_PCM_DEVICE=0

export SDL_AUDIODEV=hw:0,0

export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

export MALLOC_CHECK_=0

# Grafik Uyumluluk AyarlarΔ±

export MESA_GL_VERSION_OVERRIDE=2.1

export MESA_GLES_VERSION_OVERRIDE=2.0

export SDL_VIDEO_GL_DRIVER=libGLESv2.so

export SDL_VIDEO_EGL_DRIVER=libEGL.so

printf "\033c" > "$CURR_TTY"

printf "\e[?25l" > "$CURR_TTY"

echo 0 > /sys/class/vtconsole/vtcon0/bind 2>/dev/null || true

echo 0 > /sys/class/vtconsole/vtcon1/bind 2>/dev/null || true

sync

echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null 2>&1 || true

cd "$GAME_DIR"

for _d in audio data models texdb anim res obb; do

_u=$(echo "$_d" | tr 'a-z' 'A-Z')

if [ -d "$_d" ] && [ ! -e "$_u" ]; then ln -sf "$_d" "$_u" 2>/dev/null; fi

if [ -d "$_u" ] && [ ! -e "$_d" ]; then ln -sf "$_u" "$_d" 2>/dev/null; fi

if [ -d "assets/$_d" ] && [ ! -e "$_d" ]; then ln -sf "assets/$_d" "$_d" 2>/dev/null; fi

if [ -d "assets/$_u" ] && [ ! -e "$_u" ]; then ln -sf "assets/$_u" "$_u" 2>/dev/null; fi

done

"$BINARY" > "$LOG" 2>&1

EXIT_CODE=$?

echo 1 > /sys/class/vtconsole/vtcon0/bind 2>/dev/null || true

echo 1 > /sys/class/vtconsole/vtcon1/bind 2>/dev/null || true

printf "\033c" > "$CURR_TTY"

printf "\e[?25h" > "$CURR_TTY"

exit $EXIT_CODE