foxlet / vmra1n

Guide on setting up checkra1n in QEMU.
63 stars 24 forks source link

usb going through on clover but not the actual mac #3

Open OddSlay3r opened 4 years ago

OddSlay3r commented 4 years ago

well the title says it all. when i run sudo ./basic.sh it opens clover and my phone then gets the charging notification. but as soon as i select mac the phone stops charging and no connection is made.

foxlet commented 4 years ago

What controller, CPU, and distro are you using?

OddSlay3r commented 4 years ago

im using Ubuntu and i assume by controller you mean the usb controller which is: IOMMU Group 7 00:12.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller [1022:7908] (rev 49)

and my cpu is a: AMD FX-8800P Radeon R7, 12 Compute Cores 4C+8G

foxlet commented 4 years ago

That is an USB 2.0 controller. You may need to pass an USB 3.0 controller instead, or use USBInjectAll inside macOS to enable USB 2.0 support.

evaan commented 4 years ago

what would it be? i’m having the same issue

OddSlay3r commented 4 years ago

ok i will try to use USBinjectAll because i only have usb 2.0 on my pc

OddSlay3r commented 4 years ago

actually how do i use USBinjectAll is it something in mac or is it something to do with the virtual machine?

foxlet commented 4 years ago

In the virtual machine, it's a kext you drop its EFI partition. Inside the VM, open Terminal, run sudo diskutil list Look for EFI on a 250MB hard disk, then run sudo diskutil disk0s# From there you can copy the kext into it.

OddSlay3r commented 4 years ago

ok i will try it

foxlet commented 4 years ago

Are you also sure there's only USB 2.0? That CPU is new enough to have USB 3 support, in the controllers list it would appear as XHCI (3.0) instead of EHCI (2.0).

OddSlay3r commented 4 years ago

wait like this??? IOMMU Group 5 00:10.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:7914] (rev 20) i guess im just dumb lol

OddSlay3r commented 4 years ago

umm so i changed the rebind.sh and the basic.sh to use the usb 3.0 port but now when i run sudo ./basic.sh it just sits on this screen Screenshot from 2019-11-13 17-20-39

foxlet commented 4 years ago

What is the contents of basic.sh?

OddSlay3r commented 4 years ago

!/bin/bash

OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" VMDIR=$PWD OVMF=$VMDIR/firmware

export QEMU_AUDIO_DRV=pa

QEMU_AUDIO_DRV=pa

qemu-system-x86_64 \ -enable-kvm \ -m 2G \ -machine q35,accel=kvm \ -smp 4,cores=2 \ -cpu Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc \ -device isa-applesmc,osk="$OSK" \ -smbios type=2 \ -drive if=pflash,format=raw,readonly,file="$OVMF/OVMF_CODE.fd" \ -drive if=pflash,format=raw,file="$OVMF/OVMF_VARS-1024x768.fd" \ -vga qxl \ -device ich9-intel-hda -device hda-output \ -usb -device usb-kbd -device usb-mouse \ -netdev user,id=net0 \ -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \ -device ich9-ahci,id=sata \ -drive id=ESP,if=none,format=qcow2,file=ESP.qcow2 \ -device ide-hd,bus=sata.2,drive=ESP \ -drive id=InstallMedia,format=raw,if=none,file=BaseSystem.img \ -device ide-hd,bus=sata.3,drive=InstallMedia \ -drive id=SystemDisk,if=none,file=MyDisk.qcow2 \ -device ide-hd,bus=sata.4,drive=SystemDisk \ -device pcie-root-port,bus=pcie.0,multifunction=on,port=1,chassis=1,id=port.1 \ -device vfio-pci,host=00:10.0,bus=port.1 \

foxlet commented 4 years ago

Is it exactly formatted like that? The \ at the end of each line is missing. Otherwise it looks fine.

For the issue at hand, it's freezing during UEFI/DXE mode. It may be down to hardware incompatibility, or odd behavior from the USB controller. You can try

-device vfio-pci,host=00:10.0 \

removing the existing root-port and vfio-pci lines, and see if that changes anything.

OddSlay3r commented 4 years ago

no it didn't change anything. but i can try to do this process on a different pc if its a hardware issue

foxlet commented 4 years ago

Yeah, I'd try on another machine since the controller is behaving badly.

SlugZzSs commented 4 years ago

2F35F6F6-9741-40D9-8776-16E26F970379

I don’t know how to make it connect to my iPhone. Nothing happens when it’s plugged in and it’s charging.