mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 22:30:38 +01:00
Recognising iPhone device connected to USB #33
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @osmooth on GitHub (Jun 12, 2020).
USB devices are not recognised, a major part of my work requires iPhone connected to device and use it for side loading apps. So I've opened this issue. We are running Qemu inside docker for me "-privileged -v /dev/bus/usb:/dev/bus/usb" didn't work...
@sickcodes commented on GitHub (Jun 12, 2020):
Yes I am aware of this issue.
If you have a developer cert you can SCP/rsync/sftp the signed ipa back to an nginx server or something and install over the air using manifest.plist.
You can pass the usb iPhone thru but what I’ve noticed is it seems to reject the iPhone until the passcode is entered. Correct me if I’m wrong but there’s a small race to enter the trust this device pin.
You may be on the right track, check out this comment https://sick.codes/how-to-install-macos-virtual-machine-on-linux-arch-manjaro-catalina-mojave-or-high-sierra-xcode-working/#comment-41151
That is all until I add it natively which I aim to do as soon as I finish other work on my plate.
EDIT: see below!
@peterandrewd commented on GitHub (Jun 14, 2020):
Tbh I think this should be worked on as a priority. Let’s face it, most people that want to use macOS want to use it simply for Xcode and to sideload.
@peterandrewd commented on GitHub (Jun 14, 2020):
would be a great set of instructions....except there is no OSX-KVM folder in home/user...
@sickcodes commented on GitHub (Jun 14, 2020):
Misclicked, will work on this one! It’s doable with the new arguments. Taking a break until mid-week.
@peterandrewd commented on GitHub (Jun 16, 2020):
Well well after a lot of tinkering I figured out a way to mount USB devices in QEMU (not virt(shit) manager) WITHOUT having to create a new container each time and it’s not just for 1 time use only. You can disconnect it, replug it and still access it. I tested it with 2 different USB drives.
As you can see in the screenshots, the USB drives show up.
Still can’t get iPhone mounted though but at least USB drives mount easily now.
@sickcodes commented on GitHub (Jun 16, 2020):
That’s also where I got stuck @peterandrewd
I can mount it but it doesn’t seem to pass through. However, I can pass it through on VirtualBox windows and sideload apps in Windows.
Have you tried the method I described at the start?
You don’t need to connect the USB you can sign it and then install OTA
https://dantheman827.github.io/ios-app-signer/
Sign with that
Then put your IPA on any SSL domain and do an OTA install manifest.plist
https://gist.github.com/hramos/774468
<a href="itms-services://?action=download-manifest&url=https://your.domain.com/your-app/manifest.plist">Awesome App</a>If you don’t have an SSL domain use this https://github.com/bumaociyuan/ios-ipa-server
@peterandrewd commented on GitHub (Jun 16, 2020):
Ok so I can create a Windows VM and sideload apps that way? How do you sideload using Windows without Xcode?
Or are you saying you have a MacOS VM in Windows?
I had tried the OTA method but it seemed too complicated and didn’t work. I got stuck.
I’ll try again though but I would appreciate to be guided through it step by step if I get stuck.
@peterandrewd commented on GitHub (Jun 17, 2020):
Ahhh my iPhone doesn't let me enable full trust certificates in settings. There is no option for it.
--EDIT-- nvm I THINK I got it working. Just have a question. I used the ios ipa server git instructions, and was able to sign and then sideload apps without creating a manifest file as outlined in your first step.
So what's the manifest file for if I can sideload using the ios ipa server method? And did I miss something?
@sickcodes commented on GitHub (Jun 17, 2020):
Oh nice, how’d you side load it? Drag into iTunes?
@sickcodes commented on GitHub (Jun 17, 2020):
So the Chinese repo skipped everything?? If so that awesome 😂
@peterandrewd commented on GitHub (Jun 17, 2020):
No. I didn’t use anything but iOS app signer.
I just logged into the server ip:port it created on my phones browser and selected the apps to install...?
I guess you can try it yourself and verify that it works and that I’m not making any mistake.
@peterandrewd commented on GitHub (Jun 17, 2020):
Was I right? lol
@peterandrewd commented on GitHub (Jun 17, 2020):
Once again
@sickcodes commented on GitHub (Jun 18, 2020):
😂 I really liked that repo. It looks like a 1 click signer! I should take some of their code and implement it in this one for a full CI/CD solution.
@peterandrewd commented on GitHub (Jun 18, 2020):
Sounds good to me. Or update the repo. Cos it doesn’t like look it’s still maintained
@sickcodes commented on GitHub (Jun 18, 2020):
Good idea
@peterandrewd commented on GitHub (Jun 18, 2020):
Im full of good ideas
@peterandrewd commented on GitHub (Jun 22, 2020):
Docker rhymes with Coc*er
@reinismu commented on GitHub (Aug 11, 2020):
Seems like on solution is to do it like this https://www.reddit.com/r/hackintosh/comments/f31wx0/macos_on_kvm_and_xcode_and_iphone_usb_passthrough/
Sad thing I have only one USB Controller and it is not an option for me :(
@VitaminCpp commented on GitHub (Sep 11, 2020):
Any news on how to get XCode <-> IPhone USB debugging working? Thanks!
@sickcodes commented on GitHub (Sep 11, 2020):
I'm pretty sure it can do done.
However, I just add my UDID to my developer account, use https://dantheman827.github.io/ios-app-signer/ and then make a manifest plist and I'm good to go.
This looks like it's the correct answer https://www.reddit.com/r/hackintosh/comments/f31wx0/macos_on_kvm_and_xcode_and_iphone_usb_passthrough/
@sickcodes commented on GitHub (Sep 11, 2020):
It can be done, checkra1n can do it https://downthecrop.xyz/blog/checkra1n-on-pc-linux-via-qemu-macos-virtualization/
@VitaminCpp commented on GitHub (Sep 11, 2020):
Yeah, but this way you only can deploy to your IPhone but not debug your app. Am i correct?
@VitaminCpp commented on GitHub (Sep 11, 2020):
This sounds interesting! Thanks for that hint. I'll have a look onto it. ;-)
@mikob commented on GitHub (Feb 21, 2021):
Tried this. Used this script: https://raw.githubusercontent.com/andre-richter/vfio-pci-bind/master/vfio-pci-bind.sh and
intel_iommu=yes, but getting this error when starting the container 😢:@reinismu commented on GitHub (Feb 21, 2021):
I think I had the same issue and I solved it with setting soft/hard memlock to -1
example:
It could be you need to set it on your main machine as well. Can't remember, but if everything with IOMMU groups are correct then that is next thing to look at
@sickcodes commented on GitHub (Feb 23, 2021):
Great notes @mikob & @reinismu, I'll try adding the iPhone passthrough from your links & code. Aiming for seamlessly using an environment variable. Just fixing up iMessage as we speak!
@mikob commented on GitHub (May 18, 2021):
@reinismu, @sickcodes btw, I can only get this working by binding my single usb controller to vfio (which means I lose connection to all my peripherals on the host, including bluetooth which goes through that usb controller) I use the last line you have there commented out
-device vfio-pci,host=00:14.0Do any of these other lines you have commented out work? Curious why they are there. Is it possible to pass a single USB port and not the whole pci controller? So I can retain usage of some peripherals on the host? I tried the README's passthrough method but that didn't work.
@reinismu commented on GitHub (May 18, 2021):
@mikob That was just my testing stuff. I can get it to work only that way as well. (Binding usb to vfio)
@sickcodes commented on GitHub (May 21, 2021):
iPhone passthrough has been solved here: https://github.com/sickcodes/Docker-OSX/issues/133#issuecomment-836855901
I am yet to try it but it is confirmed working.
@mikob commented on GitHub (May 21, 2021):
@sickcodes yes, that's the same thing we've done here, but @reinismu did it first 😛 The shortcoming is that you lose the whole USB controller, and eg. on my laptop there's only one, which apparently has the bluetooth internally routed too. External USB hubs don't show up as different controllers either. So I sacrifice my connection to all the peripherals on the host.
@itsam commented on GitHub (May 22, 2021):
Are you able to debug iPhone apps via xcode? Thank you in advance
@mikob commented on GitHub (May 22, 2021):
@itsam yes. Just follow the instructions very carefully here.
@Silfalion commented on GitHub (Aug 5, 2021):
hey @reinismu @mikob sorry to ping you but writing a PR for iphone passthrough, is it okay if I credit both of you?
@mikob commented on GitHub (Aug 5, 2021):
@Silfalion fine with me!
@reinismu commented on GitHub (Aug 5, 2021):
@Silfalion Ye sure
@Silfalion commented on GitHub (Aug 5, 2021):
Thank you both! Here is the repo:
https://github.com/Silfalion/Iphone_docker_osx_passthrough
Its only very temporary while Sick.Codes checks it to merge it with docker osx.
@sickcodes commented on GitHub (Aug 27, 2021):
Full OTA iPhone passthrough done too using usbfluxd, today was a good day...
I've added it to the AUR: https://aur.archlinux.org/packages/usbfluxd/
Adding instructions tomorrow...
Wish I had recorded my reaction @peterandrewd
@mikob commented on GitHub (Aug 31, 2021):
@sickcodes saw the docs, looks easy to setup. Does this mean that the host no longer needs to sacrifice a USB controller like with the old method?
@sickcodes commented on GitHub (Aug 31, 2021):
Yes it does :)
@Abdelkader-gnichi commented on GitHub (Dec 25, 2021):
hi @sickcodes please can u please help me it's about sosumi the snap package i use it to make a catalina qemu and all it's fine but i have a small issue when i plugged in my iphone it does not appear in catalina qemu and i google the problem and i find a solutin but it does't work for me which is https://stackoverflow.com/questions/67279997/connect-iphone-via-usb-to-sosumi-qemu/70474415#70474415
i fellow it but nothing happen
-device usb-host,vendorid=0x05ac,productid=0x12a8,guest-reset=false,id=iphone \ i put this line in the launch file in the end
and i use this command in my fedora terminal
sudo chmod a+w /dev/bus/usb/001/009 of course with the right /usb/00X/00X usb port
and i have this result in the sosumi terminal window while execution :
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/047: Operation not permitted
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/047: Operation not permitted
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/047: Operation not permitted
then i find ur video on YouTube u really doing a good job bro but i'am stuck here with sosumi really i want to try ur solution and i will try it but i want to make it work to do something important then i will switch to ur solution it's mind blowing bro
@sickcodes commented on GitHub (Jan 5, 2022):
https://github.com/sickcodes/Docker-OSX#usbfluxd-iphone-usb---network-style-passthrough-osx-kvm-docker-osx
https://www.youtube.com/watch?v=kTk5fGjK_PM
@wpyoga commented on GitHub (Jun 16, 2023):
I have a simpler solution, no need to pass-through the whole USB controller: https://github.com/foxlet/macOS-Simple-KVM/issues/221#issuecomment-1594563753 . Basically, we only need to disable usbmuxd.
I came to this issue looking for a solution, and now I'm contributing back. Hope this helps!
@Abdelkader-gnichi commented on GitHub (Jun 16, 2023):
Nice bro i really appreciate it, thank you so much.
@iamcsharper commented on GitHub (Jul 3, 2025):
Hi! Is there a planned fix, or I have to follow one of the workarounds above?