Skip to content
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

Why Android port was removed and will it come back? #113

Open
artdeell opened this issue Mar 1, 2021 · 31 comments
Open

Why Android port was removed and will it come back? #113

artdeell opened this issue Mar 1, 2021 · 31 comments

Comments

@artdeell
Copy link

artdeell commented Mar 1, 2021

System Details

Platform: Android

Build host: Linux Debian Bullseye

Compiler: clang90 aarch64-linux-android

Problems Description

I did nothing yet

Was the Android build removed because regular Wine build for arm64-v8a is broken? If armv7 version of Hangover's qemu will be made, will Android port be returned?

Yes, i did read #84

@stefand
Copy link
Collaborator

stefand commented Mar 1, 2021

Its a mix of all of this. Upstream Wine is broken, even when hangover was working it only worked for a handful of people. Due to the different screen and input formats running Windows applications on Android is nothing more than a curiosity anyhow.

@artdeell
Copy link
Author

artdeell commented Mar 1, 2021

Just checked - Hangover on Android (0.4.0 release) can't run most executables because most of the libraries are either "not found" or Qemu can't reserve address space for the image. Wonder why it's like that...

@AndreRH
Copy link
Owner

AndreRH commented Mar 1, 2021

It's lot of work for nearly no users. If you want to hack on it I could try to support you, though.

@artdeell
Copy link
Author

artdeell commented Mar 1, 2021

Actually, there's a pretty big user base of Exagear users, which also emulates x86 but on the Linux side, so there are a lot of potential users.
Because afaik Hangover is faster, there can be a lot of people that will go with Hangover

@Mathias-Boulay
Copy link

A lot of people are trying to run even "simple" PC games, so much so there are dedicated YT channels for trying to do so.

@SakiNawak
Copy link

Exagear user here. Hangover seems to have an huge potential because it's faster than Exagear so a lot of players will use it.

@AndreRH
Copy link
Owner

AndreRH commented Mar 1, 2021

So, you can still download hangover 0.4 for Android, but we never had a huge user base when we supported it...

@Mathias-Boulay
Copy link

Mainly due to its limited usability state.
Solutions like exagear are "working" but are far from being fast 👀

@SakiNawak
Copy link

Yes on my phone every .exe are not working on hangover 0.4.0 that's the problem
But hangover can beat Exagear because it's very slow

@AndreRH
Copy link
Owner

AndreRH commented Mar 1, 2021

How do you know hangover is faster?

@SakiNawak
Copy link

I don't say it's faster but Hangover is working almost natively while exagear need to emulate an x86 Ubuntu then wine.

@AndreRH
Copy link
Owner

AndreRH commented Mar 2, 2021

Ok, I added a goal to my patreon for this

@SevenIsNotNumber
Copy link

Ok, I added a goal to my patreon for this

Cool!

@simon-i1-h
Copy link
Contributor

Does https://github.com/termux/termux-packages make porting the hangover to the Android partially easy?

@SevenIsNotNumber
Copy link

Does https://github.com/termux/termux-packages make porting the hangover to the Android partially easy?

Just use proot (fakeroot) 😎😎. Jk. There's no hardware acceleration

@SevenIsNotNumber
Copy link

:(

@kote2345
Copy link

kote2345 commented Mar 9, 2021

A lot of people are trying to run even "simple" PC games, so much so there are dedicated YT channels for trying to do so.

Recently able to launch games with hardware acceleration. For example STALKER on snapdragon 865: https://youtu.be/UMrKEE4FYhU
POSTAL 2 on snapdragon 632: https://youtu.be/aNP4yWuTHCk
Worms 4 on snapdragon 845: https://www.youtube.com/watch?v=yAID4vSzTNw
FurMark on snapdragon 845: https://www.youtube.com/watch?v=eWTfZtRpCgY

But many games work with artifacts, but it seems like developer virgl (https://github.com/mittorn/virglrenderer-android) will fix all artifacts and will improve performance. And in games GPU is loaded by only 5-10%, even in fullhd resolution. GPU is loaded 100% only in FurMark. Apparently cpu is a bottleneck

@artdeell
Copy link
Author

A lot of people are trying to run even "simple" PC games, so much so there are dedicated YT channels for trying to do so.

Recently able to launch games with hardware acceleration. For example STALKER on snapdragon 865: https://youtu.be/UMrKEE4FYhU
POSTAL 2 on snapdragon 632: https://youtu.be/aNP4yWuTHCk
Worms 4 on snapdragon 845: https://www.youtube.com/watch?v=yAID4vSzTNw
FurMark on snapdragon 845: https://www.youtube.com/watch?v=eWTfZtRpCgY

But many games work with artifacts, but it seems like developer virgl (https://github.com/mittorn/virglrenderer-android) will fix all artifacts and will improve performance. And in games GPU is loaded by only 5-10%, even in fullhd resolution. GPU is loaded 100% only in FurMark. Apparently cpu is a bottleneck

Virgl gives a lot of overhead, that's why

@Mathias-Boulay
Copy link

Recently able to launch games with hardware acceleration. For example STALKER on snapdragon 865: https://youtu.be/UMrKEE4FYhU
POSTAL 2 on snapdragon 632: https://youtu.be/aNP4yWuTHCk
Worms 4 on snapdragon 845: https://www.youtube.com/watch?v=yAID4vSzTNw
FurMark on snapdragon 845: https://www.youtube.com/watch?v=eWTfZtRpCgY

But many games work with artifacts, but it seems like developer virgl (https://github.com/mittorn/virglrenderer-android) will fix all artifacts and will improve performance. And in games GPU is loaded by only 5-10%, even in fullhd resolution. GPU is loaded 100% only in FurMark. Apparently cpu is a bottleneck

Nice to hear such alternatives exist.
Any luck with 2d games (such as celeste ?)

@kote2345
Copy link

Recently able to launch games with hardware acceleration. For example STALKER on snapdragon 865: https://youtu.be/UMrKEE4FYhU
POSTAL 2 on snapdragon 632: https://youtu.be/aNP4yWuTHCk
Worms 4 on snapdragon 845: https://www.youtube.com/watch?v=yAID4vSzTNw
FurMark on snapdragon 845: https://www.youtube.com/watch?v=eWTfZtRpCgY
But many games work with artifacts, but it seems like developer virgl (https://github.com/mittorn/virglrenderer-android) will fix all artifacts and will improve performance. And in games GPU is loaded by only 5-10%, even in fullhd resolution. GPU is loaded 100% only in FurMark. Apparently cpu is a bottleneck

Nice to hear such alternatives exist.
Any luck with 2d games (such as celeste ?)
I launch Starbound https://youtu.be/83i8Bh4V34U
Game is demanding, on my laptop with i5 3570 and 8750m can not pull 60 fps, sometimes there are drawdowns below 30 fps. This game seems to be very demanding on CPU

@SevenIsNotNumber
Copy link

A lot of people are trying to run even "simple" PC games, so much so there are dedicated YT channels for trying to do so.

Recently able to launch games with hardware acceleration. For example STALKER on snapdragon 865: https://youtu.be/UMrKEE4FYhU
POSTAL 2 on snapdragon 632: https://youtu.be/aNP4yWuTHCk
Worms 4 on snapdragon 845: https://www.youtube.com/watch?v=yAID4vSzTNw
FurMark on snapdragon 845: https://www.youtube.com/watch?v=eWTfZtRpCgY
But many games work with artifacts, but it seems like developer virgl (https://github.com/mittorn/virglrenderer-android) will fix all artifacts and will improve performance. And in games GPU is loaded by only 5-10%, even in fullhd resolution. GPU is loaded 100% only in FurMark. Apparently cpu is a bottleneck

Virgl gives a lot of overhead, that's why

We cant forget to pojav launcher team attempt (artdeell is included)... They port Gl-streaming to android... (Originally gl streaming is created for transmitting open gl es command from a linux pc without a gpu e.g parallella to a raspberry pi)

@SevenIsNotNumber
Copy link

It have some success but as they said gl-streaming with gl4ez didn't work

@artdeell
Copy link
Author

artdeell commented Mar 20, 2021 via email

@SevenIsNotNumber
Copy link

I like how this went from Hangover on Android to gl-streamimg пн, 15 мар. 2021 г., 10:44 SevenIsNotNumber @.***>:

It have some success but as they said gl-streaming with gl4ez didn't work — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#113 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK6SASTOOIMGWV5TCVVVMRTTDW3EPANCNFSM4YMVDPJQ .

Actually it is one topic. Making pc games on android as fast as possible

@Heasterian
Copy link

At this stage, you can run in armhf proot or chroot i386 version of Wine using box86 (but you can expect some additional issues in proot ie. with lack of udev). With some Adreno GPU's you can even get GPU acceleration using Turnip with KGSL support and Zink, but wined3d have some issues with dynarec on phones so for now you need box86 compiled without dynarec to run DirectX games. Box86 can be build as binary for Android, but it lacks some wrapping of libs that are required by Wine apk, so we need to wait for using moded i386 apk on arm phones. If fork of Wine without libhardware dependency is possible, it would probably can speed up port as it's one of that unwrapped libs. @AndreRH Could fork like this work or libhardware is required by Wine apk on Android?

@marcussacana
Copy link

I think the most part of arm devices are used in smartphones, then the hangover stopping the support to Android make this project lost a part of his bright. But gladly the AndreRH still open to return to Android one day.

@xDoge26
Copy link

xDoge26 commented Nov 28, 2022

i tried fex-emu and it work great , its pretty good but hard to install ,

@twaik
Copy link

twaik commented Jun 17, 2024

@AndreRH are there any problems in wine except display output? I think I can fix output with suggestions I posted here (I used them in termux-11 code and it works fine on Android 8+) but it will be useless if there are more issues here.

@AndreRH
Copy link
Owner

AndreRH commented Jun 17, 2024

Might be enough, so if you could come up with a patch that might lead to a solution. Packaging is not fun though, but possible

@twaik
Copy link

twaik commented Jun 17, 2024

Can you please write a build script for this which will actually build an apk, even a broken one? I searched for them in internet, but they seem to be outdated.

@twaik
Copy link

twaik commented Jun 17, 2024

I am not sure if this list is final but that should do the thing I described in Wine's bugzilla.

  1. Changing the number of reserved args in argv to 4 instead of 2 to make sure we can pass wine-preloader{,64} /system/bin/app_process{,64} / org.winehq.wine.Loader instead of wine-preloader{,64} wine-loader{,64}. org.winehq.wine.Loader is currently non-existing class with main function passing control to native loader's main and implementing some stuff for interacting with Activity and Android APIs. Here.
  2. Replacing the whole loader_exec content with the code choosing between app_process and app_process64, passing correct CLASSPATH and LD_PRELOAD (to make sure it will load library with correct ABI). Here.
  3. Changing loader's makefile to make sure both wine and wine64 are built as shared libraries containing correct JNI code converting Java's String[] args to c-compatible argc and argv. Here.
  4. Making sure __wine_main receives JavaVM* as one of it's arguments and stores it somewhere to make sure ntdll can work with our Java machine. Here.
  5. Writing org.winehq.wine.Loader java code which creates new background thread with Looper.prepareMainLooper(); and Looper.loop(); to make sure it works with Binder, implements sending broadcasts to main Activity process working in foreground via some private Android APIs using some code from termux-x11 and making sure it can request Surfaces from main Activity via JNI. Not so complicated (at least for me).
  6. Replacing create_ioctl_window content with the code calling Java function from Loader (requesting Surface from main Activity using Binder API) and converting Surface object to ANativeWindow using ANativeWindow_fromSurface. Here. Not so complicated (at least for me).

This list is not complete and probably will grow. I have no problem implementing it, but I have a problems with setting up building script (termux's package building of hangover seems to be pretty much complicated and I am not sure I can do that alone).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests