broken in 1.3: ideas
Opened this issue · 344 comments
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)
Maybe consider using QEMU? Self-denied; QEMU does not allow for good virtual GPU's and passthrough will make you unable to see your screen if you only have 1 GPU (and I am unable to code C at the moment to fix the first problem)
Try masking the DMI information? -> I am trying to no avail, but I might succeed. However, it is very easy to detect yourself running in a VM, by simply measuring the time of a privileged instruction. To bypass this, we need to freeze time while the privileged instruction is executing (and I am unable to code C, of course)
Any other ideas before I (and lots of people) just go to Bluestacks-on-wine? that is not possible (Wine does not work with it)
QEMU ARM and install Android on it, and install Genshin Impact on it?
Or Anbox?
I can code in c with no issue but I have no idea how to implement that
QEMU ARM and install Android on it, and install Genshin Impact on it?
Or Anbox?
Might worth the shot but we will probably lose mouse control for the game
Unfortunately, I am on macOS (Catalina), so I cannot install Anbox. Could you try?
QEMU ARM and install Android on it, and install Genshin Impact on it?
Or Anbox?Might worth the shot but we will probably lose mouse control for the game
Probably. Or we will have to reimplement Bluestacks mouse+keyboard controls.
QEMU ARM and install Android on it, and install Genshin Impact on it?
Or Anbox?Might worth the shot but we will probably lose mouse control for the game
Probably. Or we will have to reimplement Bluestacks mouse+keyboard controls.
Just check there is no controller support on genshin android.
Andbos is based on lxc so no arm support
Maybe a m1 macbook or a chrome book coul use it but not amd64 since the game is arm only as I seen
We can still try qemu it does support arm emulation
https://android.stackexchange.com/questions/115320/is-it-possible-to-simulate-touch-without-root
I can code in shell script and reimplement Bluestacks-like mouse+keyboard controls (sshing to the emulated android device and making a fifo to touch the screen). This means QEMU is feasible, but still no virtual GPU
Note: the Android version has no anticheat (!!!), so it cannot detect VMs.
https://android.stackexchange.com/questions/115320/is-it-possible-to-simulate-touch-without-root
I can code in shell script and reimplement Bluestacks-like mouse+keyboard controls (sshing to the emulated android device and making a fifo to touch the screen). This means QEMU is feasible, but still no virtual GPU
Maybe virtio it does have opengl support it might be worth a try
I can code in c a translation layer for joystick input it easy to do
I will try to get android running in a vm tomorrow
It should be as easy as running
$ input tap x y
Assuming the Android image does not have crippled binaries, this is simple ssh -T command.
ok from what i heard using the android-sdk to get an easy emulation is not possible they deprecated arm some years ago and now it segfault,
we can still try libhoudini and qemu
Edit : they added arm emulation to android 10 in the avd i will try it since i have it already installed for android development
Edit2: it's trash
Edit3: libhoudini don't work with genshin
ok a new idea it might be super dumb or super smart or both but i discovered that there is a chinese emulator that can run the game and is called memu but it can only run in windows i tried their installer with wine it crash i will do some testing by extract the binaries from windows after installation,
but worst case senario we will just be able to launch the game in the windows vm
i have a second stupid idea nested qemu - vmware vm -> we passthrough to the qemu vm the vmware gpu
this way only the gpu is signed by vmware
I thought memu also failed to run the game.
i have a second stupid idea nested qemu - vmware vm -> we passthrough to the qemu vm the vmware gpu
this way only the gpu is signed by vmware
Performance impact will be too big except if you have a Ryzen 7 2nd gen or something (forgot the model numbers)
this way only the gpu is signed by vmware
I cannot fake GPU BIOS/EFI DMI information for the GPU. This means that VMs (host => vm => genshin) are now impossible, because the information gets regenerated at reboot and deleting keyn in the registry only affects the next boot.
I can code in c a translation layer for joystick input it easy to do
I will be unable to test that unfortunately.
I think I might want to make a shell script for that (haha I only know shell and now it is useful for once)
Bluestacks apparently works with 64-bit instance (install with Instance Manager)
Unfortunately, it does not work with macOS, since there is no nested Intel VT-X or AMD [insert name here]
A stupid idea: qemu-arm (not qemu-system-arm) the binary after extracting the .apk. This will most likely fail but let’s try.
apktool will make this easy. Also, reverse-engineering for the purpose of compatibility is legal in France and where I live.
ok i read a lot online and the thing is that most android emulator don't suport armv8 64bit and genshin does use armv8 64 so it's not an option to emulate it since libhoudini only support armv8 32bit or armv7 64bit, last hope is qemu
What about using the user-mode QEMU?
Not qemu-system-arm, just qemu-arm to run the binary
Wait, QEMU TCG on X86-64 should work, because all instructions take some x amount of time to execute. so QEMU must be TCG
Dont’t forget to fake DMI/GPU info/CPU CPUID
android-x86 has a native bridge, sounds like QEMU (usermode)-in-QEMU, might also be worth a try
New problem: we do not have an ARM CPU to grab the CPUID off of
Probably not an issue (no anticheat)
qemu-aarm will not work because we will miss the all of the android libs,
i tried to make a qemu android vm i found how and im not motivated to compile qemu with the android patches just to discover that the performance are garbage
maybe qemu-aarm inside of android x86 ? i may try latter but if i remember correct running android apps require starting an intent and an intent is a java object so i don't know how will qemu-arm behave
android x86 has a compat layer for arm64 apps
in settings
let me try
Maybe consider using QEMU?Self-denied; QEMU does not allow for good virtual GPU's and passthrough will make you unable to see your screen if you only have 1 GPU (and I am unable to code C at the moment to fix the first problem)
I managed to get single-GPU passthrough working just fine.
I can start the VM through the console (Linux no GUI), then when the VM shuts down, I just auto-start SDDM and everything's good :D .
(I don't have Genshin working, but it's something.)
I am running an AMD Radeon RX570, don't know if that helps.
#!/bin/sh
function initvm {
# |||Stops display manager before unstrapping GPU|||
systemctl stop display-manager.service
# Unbind the VTConsoles :D .
#echo 0 > /sys/class/vtcon0/bind
#echo 0 > /sys/class/vtcon1/bind
# Unbind GPU from driver
echo 0000:09:00.0 > /sys/bus/pci/drivers/amdgpu/unbind
echo 0000:09:00.1 > /sys/bus/pci/drivers/snd_hda_intel/unbind
# Also unbind the EFI-Framebuffer!!!
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
# Without sleep, Race condition error
sleep 2
# Unload GPU drivers
modprobe -r amdgpu
# Unbind GPU
virsh nodedev-detach pci_0000_09_00_0
virsh nodedev-detach pci_0000_09_00_1
# Load VFIO to strap GPU
modprobe vfio-pci
modprobe vfio
modprobe vfio_iommu_type1
# Bind GPU to vfio-pci
echo 0000:09:00.0 > /sys/bus/pci/drivers/vfio-pci/bind
echo 0000:09:00.1 > /sys/bus/pci/drivers/vfio-pci/bind
}
function runvm {
# Load QEMU KVM (Windows 10)
qemu-system-x86_64 --enable-kvm \
-smp cores=8 \
-cpu EPYC-v1,hv_vendor_id=null \
-machine kernel_irqchip=on \
-m 12288 \
-usb \
-device qemu-xhci,id=xhci \
-device usb-host,bus=xhci.0,hostbus=01,hostaddr=2 \
-device usb-tablet,bus=xhci.0 \
-device vfio-pci,host=09:00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=09:00.1,multifunction=on \
-device vfio-pci,host=0a:00.3,multifunction=on \
-display none \
-vga none \
-net nic -net user \
--hda /home/farlandercraft/WinVM/Windows10.img \
--hdb /home/farlandercraft/2Drive/AME/Data.img \
-boot menu=on
# -machine kernel_irqchip=on \
# AMD Radeon VGA compatible controller [1002:67df] pci:v00001002d000067DFsv00001462sd0000341Bbc03sc00i00
# AMD Radeon audio device [1002:aaf0] pci:v00001002d0000AAF0sv00001462sd0000AAF0bc04sc03i00
#-bios /usr/share/edk2-ovmf/x64/OVMF_CODE.fd \
#-m 12288 \
#-device usb-host,bus=xhci.0,hostbus=03,hostaddr=5 \
#--cdrom /home/farlandercraft/2Drive/iso/Win101903.iso \
#-display gtk,gl=on \
}
function normalize {
# |||Everything here loads after the QEMU KVM stops|||
# Unbind GPU from vfio-pci
echo 0000:09:00.0 > /sys/bus/pci/drivers/vfio-pci/unbind
echo 0000:09:00.1 > /sys/bus/pci/drivers/vfio-pci/unbind
# Unload VFIO
modprobe -r vfio-pci
modprobe -r vfio_iommu_type1
modprobe -r vfio
# Restart Host to GPU connection
virsh nodedev-reattach pci_0000_09_00_0
virsh nodedev-reattach pci_0000_09_00_1
# Rebind VTConsoles :D !
#echo 1 > /sys/class/vtcon0/bind
#echo 1 > /sys/class/vtcon1/bind
# Reload GPU drivers
modprobe amdgpu
# Bind GPU to driver
echo 0000:09:00.0 > /sys/bus/pci/drivers/amdgpu/bind
echo 0000:09:00.1 > /sys/bus/pci/drivers/snd_hda_intel/bind
# Restart display manager after strapping GPU !!!
#systemctl start display-manager.service
# Reboot system (useful if necessary)
#reboot
}
initvm
runvm
normalize
exit 0
woah. Mind = blown. I thought GPU passthrough was impossible.... but single-GPU passthrough? Impressive.
woah. Mind = blown. I thought GPU passthrough was impossible.... but single-GPU passthrough? Impressive.
Thanks 🥰 .
And this shell script is impressive too. Where did you learn the /sys/class paths?
And this shell script is impressive too. Where did you learn the /sys/class paths?
Years trapped in the basement 😨 .
jk I learned that stuff on StackOverflow and the Arch Linux wiki.
I learned the unbind paths with ls -R (exploring)
(turns out I unbound the hard drive)
(turns out I unbound the hard drive)
lol
by the way, to hide kvm, kvm=off on the qemu command line (it will drop the kvm cpuid bit 31, hypervisor)
Consider also faking the CPUID to your host machine.
edit: also, avoid virtio devices like the plague if you can, they are much faster but easily detected
edit: Also, TCG is our only option, because KVM is detectable (and so is hv)
by the way, to hide kvm, kvm=off on the qemu command line (it will drop the kvm cpuid bit 31, hypervisor)
Consider also faking the CPUID to your host machine.
edit: also, avoid virtio devices like the plague if you can, they are much faster but easily detected
edit: Also, TCG is our only option, because KVM is detectable (and so is hv)
nuuuu not KVM ;-; .
Why do they block VMs?
It's so dumb.
You can hide kvm just look pcie passthrough guide for nvidia they have to do it to get the driver working.
I already mentioned the pcie passthrough In the original .md but I didn't explain why I didn't do it
I have a laptop with fucked up iommu group and no way of dumping my gpu bios making the passthrough method just impossible for some
I can fix the iommu with vfio override but since it's a laptop dgpu i need the bios to get it running
And vfio override is a big security risk and you need to compile a kernel with it built in
And i also mentioned gvt-g Wich allow to split intel hd into vgpu that you can passthrough bit it's bad for performance (i got the genshin logo and then 1-0fps
You can hide kvm just look pcie passthrough guide for nvidia they have to do it to get the driver working.
I already mentioned the pcie passthrough In the original .md but I didn't explain why I didn't do it
I have a laptop with fucked up iommu group and no way of dumping my gpu bios making the passthrough method just impossible for someI can fix the iommu with vfio override but since it's a laptop dgpu i need the bios to get it running
And vfio override is a big security risk and you need to compile a kernel with it built in
And i also mentioned gvt-g Wich allow to split intel hd into vgpu that you can passthrough bit it's bad for performance (i got the genshin logo and then 1-0fps
I don't know how, or if it works, but perhaps Looking Glass might work to resolve that?
I'm aware that it makes setting up GPU passthrough easier, but I don't know exactly what it does lmao . (I usually just configure everything myself.)
Maybe not, again I don't know what it does. Maybe the limitations of your IOMMU groups really are unbreakable :/ .
You can hide kvm just look pcie passthrough guide for nvidia they have to do it to get the driver working.
I already mentioned the pcie passthrough In the original .md but I didn't explain why I didn't do it
I have a laptop with fucked up iommu group and no way of dumping my gpu bios making the passthrough method just impossible for some
I can fix the iommu with vfio override but since it's a laptop dgpu i need the bios to get it running
And vfio override is a big security risk and you need to compile a kernel with it built in
And i also mentioned gvt-g Wich allow to split intel hd into vgpu that you can passthrough bit it's bad for performance (i got the genshin logo and then 1-0fpsI don't know how, or if it works, but perhaps Looking Glass might work to resolve that?
I'm aware that it makes setting up GPU passthrough easier, but I don't know exactly what it does lmao . (I usually just configure everything myself.)Maybe not, again I don't know what it does. Maybe the limitations of your IOMMU groups really are unbreakable :/ .
looking glass use shared ram between the host and the vm to send the display, it has no link with fps
the only solution would be to exctract my bios and then extract from it the gpu bios and use it to passthrough my gpu to the vm i don't know how to do that
by the way, to hide kvm, kvm=off on the qemu command line (it will drop the kvm cpuid bit 31, hypervisor)
Consider also faking the CPUID to your host machine.
edit: also, avoid virtio devices like the plague if you can, they are much faster but easily detected
edit: Also, TCG is our only option, because KVM is detectable (and so is hv)
nuuuu not KVM ;-; .
Why do they block VMs?
It's so dumb.
Anticheat. If they did not, I would be attaching a debugger to the VM process and hacking the game without it noticing.
It's so dumb.
I understand, it's quite annoying to not be able to play your favorite game on a GPU passthrough you setup yourself :)
https://stackoverflow.com/questions/4386449/send-touch-events-to-a-device-via-adb
Todo: make a shell script to run adb shell swipe x y x y 100
and reimplement Bluestacks-like keymapping.
QEMU ARM and install Android on it, and install Genshin Impact on it?
Or Anbox?Might worth the shot but we will probably lose mouse control for the game
I can transform it into a keyboard-only game with adb shell input swipe x y x y duration
, so this is not too bad
the easyest option would be libhoudini 8_Z wich hasn't bee released nor anounced so ... :(
Hmm... We need a poll.
Who prefers mouse control over keyboard? (yes = prefer mouse, no = prefer keyboard/wish it was keyboard)
the easyest option would be libhoudini 8_Z wich hasn't bee released nor anounced so ... :(
Well... yeah. not released nor announced, which means we will absolutely have to QEMU ARM+Android+Genshin (not ideal, we lose some performance)
(I prefer keyboard. Easier on my hands.)
dude it's more that not ideal i tried to get it running i get segfault from he officials android tools, so we need qemu BUT qemu has to be moded to support android and to do that you need to recompile everything and its a nightmare
i get segfault
?!?!?
we need to recompile everything
I use Gentoo, but you use some other Linux distro (arch?)... Should I just compile it and send you the binary?
aargh we also need to compile Android itself...
I already have 33 bad sectors...
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
i have i3-2120... wine build took 3 hours
ok i have a better cpu i will try latter just the time to get the patch and such
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
Also, where is the patch?
Can’t find docs anywhere on the Internet for ranchu patch...
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)
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
im going to try with this system image
https://dl.google.com/android/repository/sys-img/google_apis/arm64-v8a-24_r27.zip
1.06 GB...
I have a very slow internet connection (by modern standard)
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.
@FarLanderCraft adb shell input swipe initialx initialy finalx finaly duration
= will make a shell script for this
or adb shell input touch x y
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
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
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.
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).
Most likely not. (rpi is VERY slow and has a bad iGPU, i think this will be 1spf (1 second per frame))
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'.
well i absolutely dont know
Please link article? I cannot find it anywhere.
I just find this, everything else is 2016 and older.
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)
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 ;-; .
Problem: I am totally unable to code C. Hello World included.
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
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 .)
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.)
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()
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 ;-; .
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 :) .
can you give me the link to this page it seem interesting
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)
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.
im going to try with this system image
https://dl.google.com/android/repository/sys-img/google_apis/arm64-v8a-24_r27.zipWhere 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
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.
Got it to boot this time... if this works I will publish the script
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
Sorry, this Application cannot run in a virtual machine.
[Installing WinDbg]
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
@Marc-Pierre-Barbier Attempt failed, debugger needed :(