Marc-Pierre-Barbier / Genshin-Impact-on-linux

this repository only contains a README that describe how to get genshin impact running inside vmware
53 stars 3 forks source link

Genshin Impact on Android VM under Linux working! #9

Open XaeroVincent opened 3 years ago

XaeroVincent commented 3 years ago

I got the game to work under Bliss OS 11.12 with QEMU & Virgil virtual GPU.

I've set the VM to 4 CPU cores and 8GB of RAM.

Download the game from APKPure and download an XAPK Installer app to install it in XAPK form. The game will crash numerous times during the download. Just keep trying. Press the Windows key on the keyboard once the game starts downloading from the 3D menu then open System Monitor to look at the network download traffic. The game may crash but continue to download it's 9GB of data. Try redoing the steps again if the network traffic and CPU usage falls to near zero. Eventually the game will download and once the game is downloaded, it doesn't appear to crash anymore (so far).

Keyboard mapping isn't working (Octopus doesn't seem to launch the game), however the game thankfully responds to mouse input!!

You can move your character around by moving the mouse cursor towards the bottom left hand corner of the screen (but not all the way to the end) and hold the left mouse button. Your character will move when you move your mouse while holding the left button down. Other actions can be done by clicking their respective buttons.

The framerate isn't great (maybe 10 to 15 FPS) but MUCH better compared to the nested virtualization under a Windows VM + Bluestacks that I had working prior. I have the graphics settings set at "Low". This level of performance is with a Core i7 6700HQ, 32GB RAM, and a GTX 1070 Mobile. A better computer will obviously yield better performance results.

genshin

PseudoDistant commented 3 years ago

Hello I am here now.

PseudoDistant commented 3 years ago

Any ETA on the Bluestacks libraries? ;-;

XaeroVincent commented 3 years ago

Any ETA on the Bluestacks libraries? ;-;

Bluestacks libraries aren't needed. The necessary Houdini libraries are already included with Bliss OS.

Marc-Pierre-Barbier commented 3 years ago

Any ETA on the Bluestacks libraries? ;-;

i damaged my install by trying

Any ETA on the Bluestacks libraries? ;-;

Bluestacks libraries aren't needed. The necessary Houdini libraries are already included with Bliss OS.

we can definitly improve if we have the bluestack libs because it doesn't crash as much in the download phase

ghost commented 3 years ago

keyboard mapping isn’t working

Should I make the translation layer or should [at]Marc-Pierre-Barbier make it?

Marc-Pierre-Barbier commented 3 years ago

keyboard mapping isn’t working

Should I make the translation layer or should [at]Marc-Pierre-Barbier make it?

i will work on it if i achieve to make the game run, so feel free to start

ghost commented 3 years ago

I don’t even have it running yet :( Also, it seems that Genshin Impact uses a timing attack to detect VM, so Windows version is officially hopeless. Only android is possible now... let’s hope it still works

ghost commented 3 years ago

I can nearly hear my SSD’s happiness as 39GB of virtual SSD is deleted from the system

Marc-Pierre-Barbier commented 3 years ago

im going to try the lastest blissos release to see if it change something

ghost commented 3 years ago

1.7GB, this may take some time...

XaeroVincent commented 3 years ago

I don’t even have it running yet :( Also, it seems that Genshin Impact uses a timing attack to detect VM, so Windows version is officially hopeless. Only android is possible now... let’s hope it still works

They make so much effort to block Windows VMs now, yet it's still easy to bypass the anti-cheat altogether, which is how others are playing it on Linux via Wine with throwaway accounts. Stupid decisions on the developers part.

XaeroVincent commented 3 years ago

Any ETA on the Bluestacks libraries? ;-;

i damaged my install by trying

Any ETA on the Bluestacks libraries? ;-;

Bluestacks libraries aren't needed. The necessary Houdini libraries are already included with Bliss OS.

we can definitly improve if we have the bluestack libs because it doesn't crash as much in the download phase

Slightly less crashing but it still did crash a ton of times during the download phase. I wouldn't really consider it much of an improvement (if any). The improvement with Bluestacks is the super easy keyboard mapping.

What might be an improvement is distributing updated Bliss OS disk images with Genshin Impact fully pre-installed?

Marc-Pierre-Barbier commented 3 years ago

What might be an improvement is distributing updated Bliss OS disk images with Genshin Impact fully pre-installed?

yea great idea

ghost commented 3 years ago

Though I am unsure of the legality of such a thing... aka unsure if we can distribute disk images containing Genshin Impact

Marc-Pierre-Barbier commented 3 years ago

Though I am unsure of the legality of such a thing... aka unsure if we can distribute disk images containing Genshin Impact

i don't want to read the genshin licence ...

XaeroVincent commented 3 years ago

Another thing that might be a problem for using Bluestacks houdini is that it's based on Android 7.1 but Bliss OS is Android 9.

There are different versions of Houdini for different Android versions, such as Houdini7_x/y/z.sfs vs 9_x/y/z.sfs

XaeroVincent commented 3 years ago

Though I am unsure of the legality of such a thing... aka unsure if we can distribute disk images containing Genshin Impact

i don't want to read the genshin licence ...

I'm guessing we're already violating the license by just playing the game in a VM in the first place.

PseudoDistant commented 3 years ago

Though I am unsure of the legality of such a thing... aka unsure if we can distribute disk images containing Genshin Impact

i don't want to read the genshin licence ...

I'm guessing we're already violating the license by just playing the game in a VM in the first place.

I mean, I never saw anything in the agreement about a VM :/ .

ghost commented 3 years ago

It says that we cannot tamper with the anticheat, nothing about not running it in emulators or VMs, it also says that we cannot disable the anticheat, but this is not the primary goal of running it in a vm

Le 18 févr. 2021 à 13:12, FarLanderCraft notifications@github.com a écrit :

 Though I am unsure of the legality of such a thing... aka unsure if we can distribute disk images containing Genshin Impact

i don't want to read the genshin licence ...

I'm guessing we're already violating the license by just playing the game in a VM in the first place.

I mean, I never saw anything in the agreement about a VM :/ .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ghost commented 3 years ago

The primary goal is actually to ensure compatibility while they can’t, so this should be legal AND ToS compliant

Le 18 févr. 2021 à 13:31, pika chu pikachu25215@gmail.com a écrit :

 It says that we cannot tamper with the anticheat, nothing about not running it in emulators or VMs, it also says that we cannot disable the anticheat, but this is not the primary goal of running it in a vm

Le 18 févr. 2021 à 13:12, FarLanderCraft notifications@github.com a écrit :

 Though I am unsure of the legality of such a thing... aka unsure if we can distribute disk images containing Genshin Impact

i don't want to read the genshin licence ...

I'm guessing we're already violating the license by just playing the game in a VM in the first place.

I mean, I never saw anything in the agreement about a VM :/ .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ghost commented 3 years ago

If this is a 15FPS on a 1070M, on an i5-5250U iGPU, this will be 1fps :( This means that playing Genshin on my PC will be impossible :( Of course, playing on a macbook isn’t exactly the best idea, but syscall user dispatch isnt out yet so no wine, so my only options are still limited

Le 18 févr. 2021 à 13:31, pika chu pikachu25215@gmail.com a écrit :

 It says that we cannot tamper with the anticheat, nothing about not running it in emulators or VMs, it also says that we cannot disable the anticheat, but this is not the primary goal of running it in a vm

Le 18 févr. 2021 à 13:12, FarLanderCraft notifications@github.com a écrit :

 Though I am unsure of the legality of such a thing... aka unsure if we can distribute disk images containing Genshin Impact

i don't want to read the genshin licence ...

I'm guessing we're already violating the license by just playing the game in a VM in the first place.

I mean, I never saw anything in the agreement about a VM :/ .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

XaeroVincent commented 3 years ago

If this is a 15FPS on a 1070M, on an i5-5250U iGPU, this will be 1fps :( This means that playing Genshin on my PC will be impossible :( Of course, playing on a macbook isn’t exactly the best idea, but syscall user dispatch isnt out yet so no wine, so my only options are still limited Le 18 févr. 2021 à 13:31, pika chu @.> a écrit :  It says that we cannot tamper with the anticheat, nothing about not running it in emulators or VMs, it also says that we cannot disable the anticheat, but this is not the primary goal of running it in a vm >> Le 18 févr. 2021 à 13:12, FarLanderCraft @.> a écrit : >> >  > Though I am unsure of the legality of such a thing... aka unsure if we can distribute disk images containing Genshin Impact > > i don't want to read the genshin licence ... > > I'm guessing we're already violating the license by just playing the game in a VM in the first place. > > I mean, I never saw anything in the agreement about a VM :/ . > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub, or unsubscribe.

That's with "low" settings. You could try with "lowest" and turn off AA, but yeah it won't be great and the experience is worse than when it ran in a Windows VM.

This game requires higher-end Android smart phones (Snapdragon 845 or better is recommended) since they don't really water it down compared to the PC version and I'm guessing the x64 to Aarch64 translation is eating up a lot of resources.

You could create a spare throwaway account and play the game with Wine and the game patcher. It would be a far better experience than what we're doing here, just riskier.

If you're using a Macbook with macOS, you can just install Bluestacks 4 64-bit for Mac. It might run better compared to Android x86? Just make sure it's the 64-bit version with 64-bit Android.

From what I've read the "syscall user dispatch" wont magically allow anti-cheat kernel drivers to work under Wine. IIRC, it's more for allowing anti-tamper and other forms of DRM like Denuvo to behave better under Wine and Linux.

ghost commented 3 years ago

im used to 60fps on my ipad... may as well play on it i think the best idea might be to just play on a mobile device at this point

Le 18 févr. 2021 à 15:30, XaeroVincent notifications@github.com a écrit :

 If this is a 15FPS on a 1070M, on an i5-5250U iGPU, this will be 1fps :( This means that playing Genshin on my PC will be impossible :( Of course, playing on a macbook isn’t exactly the best idea, but syscall user dispatch isnt out yet so no wine, so my only options are still limited … Le 18 févr. 2021 à 13:31, pika chu @.> a écrit :  It says that we cannot tamper with the anticheat, nothing about not running it in emulators or VMs, it also says that we cannot disable the anticheat, but this is not the primary goal of running it in a vm >> Le 18 févr. 2021 à 13:12, FarLanderCraft @.> a écrit : >> >  > Though I am unsure of the legality of such a thing... aka unsure if we can distribute disk images containing Genshin Impact > > i don't want to read the genshin licence ... > > I'm guessing we're already violating the license by just playing the game in a VM in the first place. > > I mean, I never saw anything in the agreement about a VM :/ . > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub, or unsubscribe.

That's with "low" settings. You could try with "lowest" and turn off AA, but yeah it won't be great and the experience is worse than when it ran in a VM.

This game requires higher-end Android smart phones (Snapdragon 845 or better is recommended) since they don't really water it down compared to the PC version.

You could create a spare throwaway account and play the game with Wine and the game patcher. It would be a far better experience than what we're doing here, just riskier.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ghost commented 3 years ago

Screen Shot 2021-02-18 at 3 51 00 PM yeah uhh is this normal

XaeroVincent commented 3 years ago

Are you on macOS or is that just a Mac Linux theme?

ghost commented 3 years ago

On macOS

ghost commented 3 years ago

Now it says it's i686. WHAT IS WRONG WITH YOU QEMU sorry had to vent

XaeroVincent commented 3 years ago

Have you tried Bluestacks for Mac?

https://www.bluestacks.com/download.html

Or does the Mac version only support 32-bit Android games?

ghost commented 3 years ago

Exactly. Also, now it boots

ghost commented 3 years ago

Screen Shot 2021-02-18 at 3 57 55 PM

Something went wrong I hate windows... wait this is not windows

XaeroVincent commented 3 years ago

Looks like the macOS version supports 64-bit ARM:

image

ghost commented 3 years ago

Wait what installing now

ghost commented 3 years ago

oh it's 11.12

ghost commented 3 years ago

Looks like the macOS version supports 64-bit ARM:

image

Question is: is it ARMv8?

XaeroVincent commented 3 years ago

oh it's 11.12

Yep, 11.13 would be better since it has Google Play support but Virgil is broken under it, so you have to use 11.12 and side-load the game.

I would assume ARMv8 is supported since the game worked under BlueStacks on Windows. I'd assume the Android images used are the same or very similar.

Even though I have the game installed and was working, I'm having a hell of time getting the game to start again a second time. The game just keeps crashing for me now. :(

ghost commented 3 years ago

Installing 11.12 actually installed 11.11...?

XaeroVincent commented 3 years ago

Installing 11.12 actually installed 11.11...?

Developers probably forgot to update the version references but if you go to About Tablet it will say Bliss 11.12.

ghost commented 3 years ago

It just drops me to a CLI Screen Shot 2021-02-18 at 4 12 15 PM

XaeroVincent commented 3 years ago

You can try my qemu args (making any necessary changes for macOS):

#!/bin/bash

qemu-system-x86_64 \
    -m 8192 -smp 4 \
    -cpu host \
    -machine q35 \
    -name Android \
    -boot menu=on \
    -drive file=$HOME/AndroidVM/android.qcow2,if=virtio \
    -enable-kvm \
    -device nec-usb-xhci \
    -device usb-tablet \
    -nic user \
    -net user,hostfwd=tcp::5555-:22 \
    -soundhw hda \
    -device virtio-vga,virgl=on \
    -display sdl,gl=on

But you're probably just wasting your time and Bluestacks would work better.

Or if you have an M1-based Mac, maybe it can run the iOS version of the game? I know that is one of the perks of the new 'Apple Silicon' Macs.

ghost commented 3 years ago

Screen Shot 2021-02-18 at 4 22 28 PM Again

ghost commented 3 years ago

Running Linux has its perks, like actual KVM support and not having to use hvf

XaeroVincent commented 3 years ago

Wait... does Virgil 3D renderer even work on macOS hosts?

ghost commented 3 years ago

Aaaaand we know why it's broken on macOS. I will try to help, but note that my Linux box is a 535NP Samsung laptop (yes the one with the EFI corruption lol)

ghost commented 3 years ago

Starting the Engine, please wait

ghost commented 3 years ago

Screen Shot 2021-02-18 at 4 36 37 PM Nope.

XaeroVincent commented 3 years ago

In the settings it doesnt give an option for ARM64 like shown in the earlier screenshot?

ghost commented 3 years ago

Turns out you have to restart for EVERY SINGLE setting change

ghost commented 3 years ago

Aaaand it works.

ghost commented 3 years ago

Aaaaand it crashes, blackscreen, MacBook Air early 2015.

ghost commented 3 years ago

ok so now entire Bluestacks crashes... but QEMU not an option...