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

broken in 1.3: ideas #7

Open ghost opened 3 years ago

ghost commented 3 years ago

I am investigating into it being broken and I think it detects the IO port in VMware. Now, it seems that more things are being detected. I am masking the DMI information, but it fails (and I am on VirtualBox unfortunately). Can somebody try? Also, keep in mind that it might be completely impossible to stop them from detecting the VM (due to some privileged operations taking longer and causing VM exits)

ghost commented 3 years ago

aargh we also need to compile Android itself...

I already have 33 bad sectors...

Marc-Pierre-Barbier commented 3 years ago

we dont need to compile android we can get precompiled binaries for arm directly from google (i alredy have those) but we need qemu with the ranchu patch if you compile it for me (im on arch) that would be great

ghost commented 3 years ago

i have i3-2120... wine build took 3 hours

Marc-Pierre-Barbier commented 3 years ago

ok i have a better cpu i will try latter just the time to get the patch and such

ghost commented 3 years ago

Well, I could compile on a macbook with i5-5250, but

1- overheating 2- fan wear 3- only 4gb of ram, so cannot compile in tmpfs 4- as a result, ssd wear 5- 3.4 GB of space left on ssd 6- faking bios dmi info not done yet, i still have a chance and most importantly, 7- no time and stuff to do

ghost commented 3 years ago

Also, where is the patch?

ghost commented 3 years ago

Can’t find docs anywhere on the Internet for ranchu patch...

ghost commented 3 years ago

What’s your CPU? Ryzen 7 3700? (just asking so I can estimate compile times)

oh my god it compiles in 60 seconds how the... for me it took 3 hours to compile (i go sleep and i leave my pc on compiling)

Marc-Pierre-Barbier commented 3 years ago

i have a i7 8350H and since i can't find docs (but i found the source) im trying to use the precompiled suff bundled inside the android sdk but currently im greated by a segfault

Marc-Pierre-Barbier commented 3 years ago

im going to try with this system image https://dl.google.com/android/repository/sys-img/google_apis/arm64-v8a-24_r27.zip

ghost commented 3 years ago

1.06 GB...

I have a very slow internet connection (by modern standard)

PseudoDistant commented 3 years ago

Would there be some way to properly emulate touch input on an Android VM on QEMU?

I've had no success with both Android x86 and built-for-QEMU arm images.

ghost commented 3 years ago

@FarLanderCraft adb shell input swipe initialx initialy finalx finaly duration = will make a shell script for this

ghost commented 3 years ago

or adb shell input touch x y

Marc-Pierre-Barbier commented 3 years ago

you are all going too fast. we dont have a working android system yet the officiant android emulator segfault on my system can someone try it on his ? the easiest way is by installing android-studio and going into the avd manager adding a device and using a armv8 64bit rom

ghost commented 3 years ago

I cannot try until March, so @FarLanderCraft is our last available tester. TODO: pressure miHoYo to give us a native linux client :) probably will fail but

PseudoDistant commented 3 years ago

I might have difficulties due to kernel updates breaking my old QEMU builds (I needed custom versions of QEMU to run a flawless non-detected (It started other Android games that detected VMs) VM...

But I'll try.

PseudoDistant commented 3 years ago

Anyone know if Genshin runs on Raspberry Pi 3b ?

That would make the QEMU thing a lot easier, and remove any need for a custom QEMU (at least to get it running).

ghost commented 3 years ago

Most likely not. (rpi is VERY slow and has a bad iGPU, i think this will be 1spf (1 second per frame))

PseudoDistant commented 3 years ago

Most likely not. (rpi is VERY slow and has a bad iGPU, i think this will be 1spf (1 second per frame))

Honestly I just want to see if it works on modern non-patched QEMU, as it'd be easier for non-programmers to set up. As such framerate isn't that important to me right now.

Linux should be more approachable, and if vanilla QEMU is somehow capable, we can work from there to make something a bit easier (messing with clock speeds used to be possible, maybe it still is) for normal people to use.

If more people get behind qemu-system-aarch64, maybe QEMU would be more willing to support boards with faster, more modern CPUs instead of the five most recent supported arm board being labelled 'QEMU'.

ghost commented 3 years ago

well i absolutely dont know

Marc-Pierre-Barbier commented 3 years ago

From what I read vanilla qemu won't be able to run the game

Le dim. 14 févr. 2021 à 18:35, notkirito notifications@github.com a écrit :

well i absolutely dont know

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Marc-Pierre-Barbier/Genshin-Impact-on-linux/issues/7#issuecomment-778811054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJO3AZMO3OYLOSR2SRWMR3S7ACVBANCNFSM4XPO64AA .

ghost commented 3 years ago

Please link article? I cannot find it anywhere.

Marc-Pierre-Barbier commented 3 years ago

Just search on Google how to install android arm8v qemu and you will find links that describe how qemu arm Work

The main thing is that qemu simulate devices that has to be supported by the kernel so if you want to avoid compiling the full android kernel for a specific platform you need to get the qemu with the corresponding board

Le dim. 14 févr. 2021 à 18:56, notkirito notifications@github.com a écrit :

Please link article? I cannot find it anywhere.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Marc-Pierre-Barbier/Genshin-Impact-on-linux/issues/7#issuecomment-778814253, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJO3A5QN7KXLYGKFOP6ERDS7AFD5ANCNFSM4XPO64AA .

PseudoDistant commented 3 years ago

https://www.cnx-software.com/2020/04/30/qemu-5-0-armv8-x-architectures-cortex-m7-host-directory-access/

I just find this, everything else is 2016 and older.

Marc-Pierre-Barbier commented 3 years ago

https://www.linaro.org/blog/running-64bit-android-l-qemu/ 2014 after that google streamlined. The vms and merged the code into their android emulator wich doesn't support armv8 64bit

PseudoDistant commented 3 years ago

https://www.linaro.org/blog/running-64bit-android-l-qemu/ 2014 after that google streamlined. The vms and merged the code into their android emulator wich doesn't support armv8 64bit

Android emulator is based on QEMU, right?

I want to say the majority of Google's code for the Android SDK (including the emulator) is open-source. Is it possible to make a fork with support for it? (As mainline QEMU does support the armv8 architecture)

Marc-Pierre-Barbier commented 3 years ago

Yes it is possible and there is a public repo for that you can also download the roms from google's website

But you know what it segfault on my system i can't run arm at all they probably broke compatibility with the realise of project treble

Le dim. 14 févr. 2021 à 19:28, FarLanderCraft notifications@github.com a écrit :

https://www.linaro.org/blog/running-64bit-android-l-qemu/ 2014 after that google streamlined. The vms and merged the code into their android emulator wich doesn't support armv8 64bit

Android emulator is based on QEMU, right?

I want to say the majority of Google's code for the Android SDK (including the emulator) is open-source. Is it possible to make a fork with support for it? (As mainline QEMU does support the armv8 architecture)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Marc-Pierre-Barbier/Genshin-Impact-on-linux/issues/7#issuecomment-778819588, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJO3A5RAGHXFDJGDOWRSQTS7AI5TANCNFSM4XPO64AA .

PseudoDistant commented 3 years ago

It took a bit of looking, but I think this is the git for the source code.

https://android.googlesource.com/platform/external/qemu.git

I'm going to try to play around with it, but I haven't modified QEMU since version 3 or something :/ . I'm not making any promises. Anyone with more experience but no patience for dealing with the confusing web of Google links, here you go.

EDIT: I'm not sure anymore, the files look completely different from the mainline QEMU github ;-; .

ghost commented 3 years ago

Problem: I am totally unable to code C. Hello World included.

ghost commented 3 years ago

It took a bit of looking, but I think this is the git for the source code.

https://android.googlesource.com/platform/external/qemu.git

I'm going to try to play around with it, but I haven't modified QEMU since version 3 or something :/ . I'm not making any promises. Anyone with more experience but no patience for dealing with the confusing web of Google links, here you go.

EDIT: I'm not sure anymore, the files look completely different from the mainline QEMU github ;-; .

commits 6 years ago unfortunately

PseudoDistant commented 3 years ago

Problem: I am totally unable to code C. Hello World included.

Try reinstalling gcc or installing another version of gcc. (Or if you are like me and are bad, check that you're using the right gcc lmao .)

PseudoDistant commented 3 years ago

It took a bit of looking, but I think this is the git for the source code. https://android.googlesource.com/platform/external/qemu.git I'm going to try to play around with it, but I haven't modified QEMU since version 3 or something :/ . I'm not making any promises. Anyone with more experience but no patience for dealing with the confusing web of Google links, here you go. EDIT: I'm not sure anymore, the files look completely different from the mainline QEMU github ;-; .

commits 6 years ago unfortunately

Yeah lmao . Turns out you need the google repo tool. https://android.googlesource.com/platform/tools/base/+/studio-master-dev/source.md

I dum sorry.

EDIT: Thankfully I have the repo tool installed already :D . (I was downloading the Android 2.3.6 source code the other day for lols.)

ghost commented 3 years ago

Problem: I am totally unable to code C. Hello World included.

Try reinstalling gcc or installing another version of gcc. (Or if you are like me and are bad, check that you're using the right gcc lmao .)

not a technical problem, purely i-dont-understand i fail the hello world 3 times until i remember to int main()

PseudoDistant commented 3 years ago

Problem: I am totally unable to code C. Hello World included.

Try reinstalling gcc or installing another version of gcc. (Or if you are like me and are bad, check that you're using the right gcc lmao .)

not a technical problem, purely i-dont-understand i fail the hello world 3 times until i remember to int main()

Oh, I do that a lot too ;-; .

PseudoDistant commented 3 years ago

The official Google Android SDK emulator actually already has aarch64 support, just no images for it. (Either that or I dum dum ;-; .)

I should either find or build an aarch64 AOSP image to test with :) .

Marc-Pierre-Barbier commented 3 years ago

There is an armv8 image but when I use it It crash with segfault

ghost commented 3 years ago

Screen Shot 2021-02-15 at 9 35 57 AM I have a 128GB SSD, so this is not buildable on my computer.

Marc-Pierre-Barbier commented 3 years ago

can you give me the link to this page it seem interesting

ghost commented 3 years ago

https://source.android.com/setup/build/requirements @Marc-Pierre-Barbier

ghost commented 3 years ago

https://developer.android.com/topic/generic-system-image/releases Are these the images that we need to download? Or do I have to install Android Studio? (also is this legal)

ghost commented 3 years ago

im going to try with this system image https://dl.google.com/android/repository/sys-img/google_apis/arm64-v8a-24_r27.zip

Where did you find this image? I can only find the GSI ones.

Marc-Pierre-Barbier commented 3 years ago

im going to try with this system image https://dl.google.com/android/repository/sys-img/google_apis/arm64-v8a-24_r27.zip

Where did you find this image? I can only find the GSI ones.

i got it by running android studio and going into the system images -> other image -> a random one using armv8 64

ghost commented 3 years ago

1.06 GB + QEMU = out of space on mac :(

I will continue trying to mask DMI, but if it fails, I will delete the VM to make space for Android.

ghost commented 3 years ago

Got it to boot this time... if this works I will publish the script

Marc-Pierre-Barbier commented 3 years ago

Got it to boot this time... if this works I will publish the script

please event if it doesn't so we can work from it

ghost commented 3 years ago

Sorry, this Application cannot run in a virtual machine.

[Installing WinDbg]

ghost commented 3 years ago

It failed, it detected one of the unremovable DMI strings, DMI 11, VBox Version I think.

If I can debug and alter the jump, hopefully it will work

ghost commented 3 years ago

@Marc-Pierre-Barbier Attempt failed, debugger needed :(

Marc-Pierre-Barbier commented 3 years ago

image bingo now we know we need android emulator (the official maintained by google) version 26.1.2 so we can use the prebuild rom i linked earlyer since it's a android 7 rom and trebble is from android 8