zhaodice / qemu-anti-detection

A patch to hide qemu itself, bypass mhyprot,EAC,nProtect / VMProtect,VProtect, Themida, Enigma Protector,Safegine Shielden
804 stars 117 forks source link

Git apply qemu7.0.0.patch error.. #5

Closed kerimcancetin closed 1 year ago

kerimcancetin commented 1 year ago

image

I run the commands in order, but I get an error in this part. My Ubuntu version is 22.04 LTS. Help me thank you.

zhaodice commented 1 year ago

could you attach all of the log about your console(includes your inputs)?

kerimcancetin commented 1 year ago

I'm out right now. I will be home in 1 hour. Is there a contact address where I can reach you? discord address?

kerimcancetin commented 1 year ago

could you attach all of the log about your console(includes your inputs)?

log.txt

zhaodice commented 1 year ago

you should download "qemu7.0.0.patch" which in this project root path , put it into your qemu folder which you had cloned

zhaodice commented 1 year ago

cd qemu wget https://raw.githubusercontent.com/zhaodice/qemu-anti-detection/main/qemu7.0.0.patch git apply qemu7.0.0.patch

kerimcancetin commented 1 year ago

cd qemu wget https://raw.githubusercontent.com/zhaodice/qemu-anti-detection/main/qemu7.0.0.patch git apply qemu7.0.0.patch

I get the error in the picture after throwing the file you said in the project directory

kerimcancetin commented 1 year ago
test@test-virtual-machine:~$ cd qemu
test@test-virtual-machine:~/qemu$ git apply qemu7.0.0.patch
error: can't open patch 'qemu7.0.0.patch': No such file or directory
test@test-virtual-machine:~/qemu$ 
test@test-virtual-machine:~/qemu$ wget https://raw.githubusercontent.com/zhaodice/qemu-anti-detection/main/qemu7.0.0.patch
--2023-02-13 22:03:40--  https://raw.githubusercontent.com/zhaodice/qemu-anti-detection/main/qemu7.0.0.patch
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 47870 (47K) [text/plain]
Saving to: ‘qemu7.0.0.patch’

qemu7.0.0.patch     100%[===================>]  46,75K  --.-KB/s    in 0,05s   

2023-02-13 22:03:40 (969 KB/s) - ‘qemu7.0.0.patch’ saved [47870/47870]

test@test-virtual-machine:~/qemu$ git apply qemu7.0.0.patch
warning: unable to rmdir 'roms/edk2': Directory not empty
test@test-virtual-machine:~/qemu$ git apply qemu7.0.0.patch
error: patch failed: block/vhdx.c:2005
error: block/vhdx.c: patch does not apply
error: patch failed: block/vvfat.c:1174
error: block/vvfat.c: patch does not apply
error: patch failed: chardev/msmouse.c:150
error: chardev/msmouse.c: patch does not apply
error: patch failed: chardev/wctablet.c:179
error: chardev/wctablet.c: patch does not apply
error: patch failed: contrib/vhost-user-gpu/vhost-user-gpu.c:1190
error: contrib/vhost-user-gpu/vhost-user-gpu.c: patch does not apply
error: patch failed: hw/acpi/aml-build.c:1724
error: hw/acpi/aml-build.c: patch does not apply
error: patch failed: hw/arm/nseries.c:847
error: hw/arm/nseries.c: patch does not apply
error: patch failed: hw/arm/sbsa-ref.c:835
error: hw/arm/sbsa-ref.c: patch does not apply
error: patch failed: hw/arm/virt.c:1588
error: hw/arm/virt.c: patch does not apply
error: patch failed: hw/audio/hda-codec.c:117
error: hw/audio/hda-codec.c: patch does not apply
error: patch failed: hw/char/escc.c:959
error: hw/char/escc.c: patch does not apply
error: patch failed: hw/display/edid-generate.c:394
error: hw/display/edid-generate.c: patch does not apply
error: patch failed: hw/i386/acpi-build.c:2674
error: hw/i386/acpi-build.c: patch does not apply
error: patch failed: hw/i386/pc_piix.c:174
error: hw/i386/pc_piix.c: patch does not apply
error: patch failed: hw/i386/pc_q35.c:197
error: hw/i386/pc_q35.c: patch does not apply
error: patch failed: hw/ide/atapi.c:796
error: hw/ide/atapi.c: patch does not apply
error: patch failed: hw/ide/core.c:2560
error: hw/ide/core.c: patch does not apply
error: patch failed: hw/input/adb-kbd.c:356
error: hw/input/adb-kbd.c: patch does not apply
error: patch failed: hw/input/adb-mouse.c:236
error: hw/input/adb-mouse.c: patch does not apply
error: patch failed: hw/input/ads7846.c:154
error: hw/input/ads7846.c: patch does not apply
error: patch failed: hw/input/hid.c:511
error: hw/input/hid.c: patch does not apply
error: patch failed: hw/input/ps2.c:1219
error: hw/input/ps2.c: patch does not apply
error: patch failed: hw/input/tsc2005.c:510
error: hw/input/tsc2005.c: patch does not apply
error: patch failed: hw/input/tsc210x.c:1106
error: hw/input/tsc210x.c: patch does not apply
error: patch failed: hw/input/virtio-input-hid.c:16
error: hw/input/virtio-input-hid.c: patch does not apply
error: patch failed: hw/m68k/virt.c:271
error: hw/m68k/virt.c: patch does not apply
error: patch failed: hw/nvme/ctrl.c:6710
error: hw/nvme/ctrl.c: patch does not apply
error: patch failed: hw/nvram/fw_cfg.c:56
error: hw/nvram/fw_cfg.c: patch does not apply
error: patch failed: hw/pci-host/gpex.c:207
error: hw/pci-host/gpex.c: patch does not apply
error: patch failed: hw/ppc/e500plat.c:22
error: hw/ppc/e500plat.c: patch does not apply
error: patch failed: hw/scsi/mptconfig.c:189
error: hw/scsi/mptconfig.c: patch does not apply
error: patch failed: hw/scsi/scsi-bus.c:555
error: hw/scsi/scsi-bus.c: patch does not apply
error: patch failed: hw/scsi/scsi-disk.c:2395
error: hw/scsi/scsi-disk.c: patch does not apply
error: patch failed: hw/scsi/spapr_vscsi.c:713
error: hw/scsi/spapr_vscsi.c: patch does not apply
error: patch failed: hw/usb/dev-audio.c:73
error: hw/usb/dev-audio.c: patch does not apply
error: patch failed: hw/usb/dev-hid.c:63
error: hw/usb/dev-hid.c: patch does not apply
error: patch failed: hw/usb/dev-hub.c:104
error: hw/usb/dev-hub.c: patch does not apply
error: patch failed: hw/usb/dev-mtp.c:248
error: hw/usb/dev-mtp.c: patch does not apply
error: patch failed: hw/usb/dev-network.c:97
error: hw/usb/dev-network.c: patch does not apply
error: patch failed: hw/usb/dev-serial.c:119
error: hw/usb/dev-serial.c: patch does not apply
error: patch failed: hw/usb/dev-smartcard-reader.c:80
error: hw/usb/dev-smartcard-reader.c: patch does not apply
error: patch failed: hw/usb/dev-storage.c:47
error: hw/usb/dev-storage.c: patch does not apply
error: patch failed: hw/usb/dev-uas.c:171
error: hw/usb/dev-uas.c: patch does not apply
error: patch failed: hw/usb/dev-wacom.c:64
error: hw/usb/dev-wacom.c: patch does not apply
error: patch failed: hw/usb/u2f-emulated.c:386
error: hw/usb/u2f-emulated.c: patch does not apply
error: patch failed: hw/usb/u2f-passthru.c:531
error: hw/usb/u2f-passthru.c: patch does not apply
error: patch failed: hw/usb/u2f.c:46
error: hw/usb/u2f.c: patch does not apply
error: patch failed: include/hw/acpi/aml-build.h:4
error: include/hw/acpi/aml-build.h: patch does not apply
error: patch failed: include/hw/i386/pc.h:290
error: include/hw/i386/pc.h: patch does not apply
error: patch failed: include/hw/pci/pci.h:71
error: include/hw/pci/pci.h: patch does not apply
error: patch failed: include/standard-headers/linux/qemu_fw_cfg.h:71
error: include/standard-headers/linux/qemu_fw_cfg.h: patch does not apply
error: patch failed: migration/migration.c:1190
error: migration/migration.c: patch does not apply
error: patch failed: migration/rdma.c:248
error: migration/rdma.c: patch does not apply
error: patch failed: pc-bios/optionrom/optionrom.h:43
error: pc-bios/optionrom/optionrom.h: patch does not apply
error: patch failed: pc-bios/s390-ccw/virtio-scsi.h:25
error: pc-bios/s390-ccw/virtio-scsi.h: patch does not apply
error: patch failed: target/i386/kvm/kvm.c:1694
error: target/i386/kvm/kvm.c: patch does not apply
error: patch failed: target/s390x/tcg/misc_helper.c:322
error: target/s390x/tcg/misc_helper.c: patch does not apply
error: patch failed: ui/spice-core.c:807
error: ui/spice-core.c: patch does not apply
zhaodice commented 1 year ago

I found you had done twice applying, "git apply qemu7.0.0.patch" can only apply once unless undo it

kerimcancetin commented 1 year ago

I found you had done twice applying, "git apply qemu7.0.0.patch" can only apply once unless undo it

test@test-virtual-machine:~/qemu$ git apply qemu7.0.0.patch warning: unable to rmdir 'roms/edk2': Directory not empty

i get this error on first install After trying again it gives the following error

test@test-virtual-machine:~/qemu$ git apply qemu7.0.0.patch error: patch failed: block/vhdx.c:2005 error: block/vhdx.c: patch does not apply

zhaodice commented 1 year ago

warning: unable to rmdir 'roms/edk2': Directory not empty

it just a warning, don't care, you can pick up a file to check whether it has been modified by patch file!

kerimcancetin commented 1 year ago

warning: unable to rmdir 'roms/edk2': Directory not empty

it just a warning, don't care, you can pick up a file to check whether it has been modified by patch file!

When I checked the patch file, I realized that nothing changed because it gave an error. Can you share your address such as wechat, discord where I can reach you or add me discord: kerimcancetin#2531

this thing is starting to take a long time now

zhaodice commented 1 year ago

Screenshot_20230216_222935

FurkanCodes commented 1 year ago

I know this is closed, but for further reading, I get the same exact errors, but it successfully patches. I checked all the entries and they are there. Plus, copy and paste functions that come with spice-agent-tools dont work which proves that the patch actually works.

Samuil1337 commented 1 year ago

I know this is closed, but for further reading, I get the same exact errors, but it successfully patches. I checked all the entries and they are there. Plus, copy and paste functions that come with spice-agent-tools dont work which proves that the patch actually works.

Hey @FurkanCodes and @kerimcancetin,

this error happend, because you are using an old patch (7.0.0) on a newer source (7.2.x). As far as I know, a patch won't work, if even a single line is moved because all of the references will point to the old/wrong positions in the code. Yesterday, zhaodice merged my port for the newest stable QEMU version. Now it works, if you use the following commands: git clone --depth 1 --branch stable-7.2 https://gitlab.com/qemu-project/qemu.git cd qemu git apply path/to/qemu-7.2.patch sudo ./configure sudo make install -j$(nproc)

Hope it helps! Samuil