-
-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run Steam in Android phone #249
Comments
I've also tried using https://github.com/ptitSeb/gl4es, but the problem persisted. It was successfully able to load it but I still get the |
I gave it more testing and realized gl4es isn't working as expected. After trying to run @ptitSeb |
You built gl4es for Android or for Linux? to get glXMakeCurrent, you need a Linux build, this symbol doesn't exist on Android build. |
Despite using an Android phone, I'm trying to build gl4es for linux inside an Ubuntu container. Running |
You need to build with X11 also, and EGL. |
Oh, cool. Now it worked! glxgears runs nicely, but unfortunately I'm still getting the |
Use |
Hmm, running with
Looks like it's trying to load this |
So, I uninstalled my libvdpau1, downloaded the i386.deb from packages.ubuntu.com and extracted the Anyway, why was I getting Sorry if this may sound a stupid question, I really don't understand the inner works of box86 |
it does, but it's not automatic. All functions ignature has to be declared first (that's what all inside Also, you don't need to add dependancy yourself, you can find them in |
Indeed there are a lot of .so inside steam-runtime subfolders, but some wasn't presented and I had to download manually, like You can simply Is there a way to make box86 use the native ARM version of these libs? |
Yes, there is a way; wrap them. But I'm unsure if it's interresting or easy for now. I may look at them later, to see if it can be a quick win... |
Also, I had some progress! Now Steam doesn't fail anymore when opening, but it opens a transparent window: That's the login window. I can even write my username and passwd, but I can't see anything that's going on. The errors that box86 reports are:
These errors keep looping. I |
You have an opengl issue. Steam use OpenGL to render, and that EGL error is not good! That means you don't have a correct glXContext. |
That's OK, downloading the i386 deb and extracting its files isn't a complicated process anyway.
Ooh, 😕 Do you think recompiling gl4es with some magic flag can fix this? |
Magic flag for build I don't think so. You can try with |
Unfortunately, it didn't work. The behavior is still the same. But now I get the following errors instead:
Does this method require the kernel to support framebuffer? Because if so, I have to recompile Android kernel first. I don't even have |
LIBGL_FB alow to switch different method to create the context. default is 0. /dev/fb0 access is 1 and 2. Method 3 is using PBuffer. If even that doesn't work; that means nothing will. There is no GLES available to gl4es I'm afraid. |
Oh, that's sad :( Sorry for the dumb question, but why gl4es and all this OpenGL stuff works fine in ARM running on a Raspberry, but aren't work in ARM running on a mobile phone? Does it have to do with the GPU chip used? |
Because the Linux that run under Android is not a full linux. Hardware drivers are missing mainly (or not accessible at least) |
Hmm, ok, so it's a software issue, not a hardware. I realized that gl4es compiled for Raspberry and ODROID doesn't have the EDIT: not compiled for Rasp and ODROID. Compiled for Android itself. Which enforces my question, how it is supposed to run without creating a context? |
You are in a Linux environement, so you need to build gl4es for linux, not android. With X11 and EGL enabled. On Android, context is already created (in the java part), that why this part (most glX function that handle Context creation) is not there. |
You could try some GOG games or SteamCMD to see if the principles hold up with or without Steam. |
On Android, it's located on |
@FreddieOliveira install Xephyr and use it as display with llvmpipe instead of gl4es so you have X server and more OpenGL version supported (I think that you are using software renderer anyway). I was able to run some games on Android this way with Linux Deploy. Also I recommend to use taskset -c command to target big cores. |
@Heasterian Can you go into deets, as even if the Steam Client isn't cooperating, we could probably get some of those games working on phones. |
@moocow1452 Easy way for rooted phones. Install Linux Deploy > choose armhf as architecture and Debian Testing as OS in settings, also enable SSH as it's easy to set up drivers etc. form PC/SSH client on phone itself. Enable GUI and change it to X11, later you need to change Pulse Audio port to one that Xserver XSDL will give you. Now you can install os using Linux Deploy, after installation ends, install Xserver XSDL and launch system. I also recommend to use Termux as SSH or PC for rest, as you can just copy-paste commands this way. After installation you need: As I didn't figure out how to restart systemd-binfmt in chroot, you need to run games with wull command like For now, DirectX 9 games are corrupting memory when using dynarec for me. If you will have same issues, try to compile box86 without dynarec. Also, as Dynarec is using less threads on phone, you can use Sometimes Xephyr like to hang so you need to restart it. Probably compiling whole https://android.googlesource.com/platform/external/virglrenderer/ repo, including vtest using bionic C library and running virgl_test_server from Android terminal could make GPU acceleration possible, but it needs 100 GB of AOSP source to compile and setting it up won't be easy anyway. |
@Heasterian We could, or we can go directly to the good stuff. https://chromium.googlesource.com/angle/angle/+/master/doc/DevSetup.md |
I'm not sure how it would work as I first see this project... |
Android 10+ allows you to roll your own drivers in Developer Mode, and ANGLE is the Google GLES/Vulkan solution that can be built to a chip, loaded in as an APK and can be assigned apps that use those drivers to run as opposed to the system standard. If I am understanding it correctly, community drivers could be developed that focus on Games and Graphics APIs that don't have to support the rest of Android, without even having to root. |
Yes, but we need a way to get GPU acceleration inside of armhf subsystem running on Android. I'm not sure how it could help. I'm not developer. I'm just good in tweaking things and research. |
@khanhduytran0 Oh cool, didn't know about that. Maybe now I can use some framebuffer tools, like fbi to display images inside Termux. @moocow1452 I don't have a GOG account, only a Steam one. steamcmd works apparently fine, but I'm not sure how to download and start games using it. @Heasterian Have you ever tried running steam instead of |
@FreddieOliveira I don't know how to set up binfmt to work in chroot so I can't run Steam on my set up. |
The main point is find out how to connect GLES context to glibc space (maybe use Chainfire/libcfsurface to connect to surfaceflinger then obtain GLES context there?) |
I've been talking with the ANGLE group, in theory, we could add whatever functionality we needed to into a developer driver, and run with that as an intermediary. I'm not super up on how Android does graphics, so I wouldn't know if one solution would be more effective than the other. |
@Heasterian why is this binfmt a problem for you? I was able to run steam by simply
The only thing that really stops steam from running, as far as I know, besides the graphics issues, is some semaphore functions it uses that's not available in standard Android kernel. To solve this you have to compile your phone's kernel with What errors exactly do you get when trying to start steam? |
@FreddieOliveira Exec format error when using steam.sh to run it (It's most stable way from my experience). |
Try running the binary directly instead of running the bash script.
Now you should probably get some missing lib or missing semaphore function error instead of format exec error. If you don't have the |
@FreddieOliveira How did you even manage to start a Steam app on Android box86. I just get
|
I believe your kernel is missing semaphore functions. Most Android kernels ship with it disabled by default. You'll have to compile it with Here's a quick, but incomplete guide: https://gist.github.com/FreddieOliveira/efe850df7ff3951cb62d74bd770dce27#33-steam-work-in-progress |
@FreddieOliveira I finally got the latest kernel sources from samsung and have managed to compile it with SYSV-IPC and fixed all the issues associated with the kernel build. But now when I run SteamCMD it runs fine the first time. But the next time when using it gives the following errors and crashes.
Sometimes it gives these errors too but in random and not together
All this doesn't happen when DynaRec is disabled, in which case it runs just fine but extremely slow (as expected). |
That means there is a bug in the dynarec. Try to see of the main steamcmd linux load at a fixed address, and if yes, use BOX86_NODYNAREC=0xXXXXX-0xYYYYYYY to try bisect the region of the dynarec where the issue is. A region of 0x100 is good for debugging, bigger it get a bit hard. The BOX86_NODYNAREC env. var forbid the dynarec to create new block thats start between 0xXXXXXX and 0xYYYYYY (but a block that start before 0xXXXXXX can continue inside the zone, it will not be stopped) |
Okay I guess I should have included the entire error log,
So I kept running it and logging the values for the address it had a problem in accessing. Anyway are there any possible downsides of excluding such a large range of addresses and also is there is more proper solution to the problem. |
It's not a solution, it's a trick to debug... The point would be to get a short adress range, then using a dump (I'll explain later) get the offending generated code, so I can then fix the issue. |
Also yeah some of the errors did mention
|
I think this ticket can be closed now (steam should runs fine)? |
Well I have put this project on hold and since I have gotten a phone with a good enough Adreno GPU for Turnip I guess I'll try the entire thing again. |
@alou-S could try grabbing a jetson nano with LineageOS or an orange pi 5 |
It's similar to what happened to me in void linux, i only had to download mesa-dri-32bit and started to work, in my distro it downloads some Ubuntu packages to run, and yeah it seems like an error in the 32 bit support |
same issue here but can't get past steamui.so.. |
seems to fail because of libappindicator1 but i have it installed and it does not work... |
This is a super old ticket. You will need to put some log in here if you want some hint on how to fix. Also, launch steam with |
I'm trying to run steam using box86 on Android using Termux. For this I managed to port docker for Android. Then, I started a 32 bit Ubuntu container with X11 forwarded, so I could run GUI programs inside it with VNC. From within this container I compiled box86 and downloaded the steam.deb for Linux from the official site. Next, I extracted the files from the .deb, patched the bin_steam.sh so I could run it as the root user and executed it. This caused the steam files to be installed in ~/.local/share/Steam. Finally I exported some variables with
and ran the steam binary with box86:
The first time I executed this, everything worked fine and it was able to download and install the updates.
But, when I executed it again it started to fail with
I googled this issue a lot but couldn't find a solution. I thought it could be related to OpenGL, but I already have
libGL.so
in my container from libgl-dev package. I've also already installedlibappindicator1
,libnm0
andlibdbusmenu-gtk4
packages.The text was updated successfully, but these errors were encountered: