-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find iPhone via network (idevice_id -n) #88
Comments
I am working on network/mDNS capabilities for the open source usbmuxd. This will still take some time to get it done properly. |
Hi, did you start your work on this? May I provide help and patches for it? |
Any update here? I'd love to get Wifi Sync working on Linux :) |
+1 |
hi @nikias, any progress on network/mDNS capabilities? would love to support you on this topic, but don't know where to start... are there any developer documentations or at least a high level architecture overiew of libimobiledevice? |
May I confirm with wi-fi sync only works in Mac but not Linux? |
@mcdull WiFi sync works on Mac and Win, but not yet on Linux as there is no open source version of usbmuxd yet which supports WiFi sync. |
I have managed to get it working via WiFi sync on a rPi although a little flaky sometimes. |
Wow, thanks @bentumbler for pointing out the re-implementation of usbmuxd by @tihmstar https://github.com/tihmstar/usbmuxd2 . Maybe @nikias can use it and include it in the original project 🥳 I'll give usbmuxd2 a try on the weekend. |
Hello guys, @bentumbler - i tried to build usbmuxd2 on a rPi, but somehow i cannot make it work. but when at the point of making usbmuxd2 i got following problem Client.cpp:274:50: error: ‘plist_to_bin_free’ was not declared in this scope; did you mean ‘plist_to_bin’? Do you have some information how you got it to work? Or any other advice Thanks |
It's possible some of the dependencies have moved on a version. Did you install them all, especially both the libplist dev dependencies
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: kozfogel ***@***.***>
Sent: Sunday, December 26, 2021 10:41:01 PM
To: libimobiledevice/libusbmuxd ***@***.***>
Cc: Ben Toner ***@***.***>; Mention ***@***.***>
Subject: Re: [libimobiledevice/libusbmuxd] Cannot find iPhone via network (idevice_id -n) (#88)
Hello guys,
@bentumbler<https://github.com/bentumbler> - i tried to build usbmuxd2 on a rPi, but somehow i cannot make it work.
I followed this tutorial:
https://www.numerousnetworks.co.uk/uncategorized/untether-ios-step-by-step/
but when at the point of making usbmuxd2 i got following problem
Client.cpp:274:50: error: ‘plist_to_bin_free’ was not declared in this scope; did you mean ‘plist_to_bin’?
274 | safeFreeCustom(plistbin, plist_to_bin_free);
| ^~~~~~~~~~~~~~~~~
Do you have some information how you got it to work? Or any other advice
Thanks
—
Reply to this email directly, view it on GitHub<#88 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AP4K3EN64D7HJUA5UXXGMNLUS6KX3ANCNFSM4KSEA5SA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
i installed libplist-dev and libplist++-dev (via apt-get) and builded libplist from git (because version 2.2.1 is needed) |
Hi kozfogel, installing the apt packages are unnecessary if you build libplist from git. the install step of the build process will install these. had the same issue with the plist_to_bin_free function. it has been dropped a few days ago: In order to solve this issue you should checkout commit a9e34bd29ae9dcdae55bdf5fb8a23c9b1c02eee9 |
Hi, i'm trying to build a docker image to run libimobiledevice and sync via Wifi every night. I got some issues when I build usbmuxd2.. I also tried to follow these guide : https://www.numerousnetworks.co.uk/uncategorized/untether-ios-step-by-step/ Here's my dockerfile :
Do you know where I misunderstood something ? |
|
I haven't tried to replicate your issue but I do see that you have not built libusbmuxd as per the instructions at https://www.numerousnetworks.co.uk/uncategorized/untether-ios-step-by-step/ Also, I found that to build usbmuxd2 with g++ 8.3 I needed to amend configure.ac with the following Try those suggestions. Also follow the build order in the guide. |
Here is my dockerfile which seems to work after a lot of fiddling and version matching.. https://gist.github.com/cemizm/07ed041d451c55e395856873f46f074f It uses a small bash script as an entrypoint in order to start the required services. furthermore for the first usage you need to (re-)start usbmuxd a few times in order to create the SystemConfiguration.plist (see issue tihmstar/usbmuxd2#6) for the network usage of a device you need to connect the device at least once trough usb, which means you need to pass the usb bus to the container and run it in privileged mode. the public and private keys after the pairing process are stored in the data folder and are persisted between startups. Usage: #build the container
docker build -t usbmuxd2
#run in default mode
docker run -it --rm --name imobiledevice -v $(PWD)/data:/var/lib/lockdown/ --network host usbmuxd2
#run with usb support and privileged mode
docker run -it --rm --name imobiledevice -v $(PWD)/data:/var/lib/lockdown/ --network host --privileged -v /dev/bus/usb:/dev/bus/usb usbmuxd2 |
Thanks a lot guys. I got it running on my PI4 now (i used the Docker script with some slightly changes for latomic) It works when i connect via USB - but Wifi sadly not. [16:28:02.685][3] TCP Connected to device |
it seems like you are not using the latest version (> 1.3.0) of libimobiledevice... please make sure that your are not using any packages (libimobiledevice, libplist, ...) from a package manager. can you post your dockerfile? |
I am not running docker. I builded all directly on the Pi - Raspbian GNU/Linux 11 (bullseye) - fresh install. if i am running somithing like this: should it be a higher version? |
Did you follow the instructions related to avahi? Network connections require mDNS. Your network also needs to support mDNS. Most home networks do
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: kozfogel ***@***.***>
Sent: Sunday, January 2, 2022 3:58:52 PM
To: libimobiledevice/libusbmuxd ***@***.***>
Cc: Ben Toner ***@***.***>; Mention ***@***.***>
Subject: Re: [libimobiledevice/libusbmuxd] Cannot find iPhone via network (idevice_id -n) (#88)
I am not running docker. I builded all directly on the Pi - Raspbian GNU/Linux 11 (bullseye) - fresh install.
if i am running somithing like this:
ideviceinfo --version
ideviceinfo 1.3.0
should it be a higher version?
—
Reply to this email directly, view it on GitHub<#88 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AP4K3EJNR5ZHNZ6W7Y2E6EDUUBY3ZANCNFSM4KSEA5SA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
yes, it should be 1.3.1, version 1.3.0 is year and half old, and supports only devices up to ios 13 |
V 1.3.0 works fine for my iOS 15 devices (at least for log capture, which is how I use it). You can move to a later version but I think you will need to ensure you build the libimobiledevice-glue library too. |
@bentumbler version 1.3.0 works only for limited set of features, some services changed their required protocol version (plus other minor changes), and those are updated in 1.3.1, screenshot is one of them, also backup, sync ... not sure what others. guess i should have written full support |
@kozfogel did you manage to resolve your issue? I'm having something similar:
Looks like the device is recognized, but errors out anyway. At least it's the correct UDID. @mexmer where can one obtain version 1.3.1?
looks like the version string is set using |
Hi all, not sure if this issue is still actively observed, but I've also got the same issue @dmitrym0 is experiencing. I am getting the same One thing I've noticed, even when I have usbmuxd running, with the below information:
I get this when I run
Is there anything we need to do with the client? I read somewhere that this might be an issue with
Thanks a lot and if we need any more information, please let me know and I'll find and provide it. |
@sepsky usbmuxd2 is reimplementation of usbmuxd with avahi support, so you need to direct any issue to author of usbmuxd2 |
@mexmer Thanks for the message. I Have added it there too, the error is the same as the one here, so thought to add mine as well, in case the last commenter found the fix for their issue (so I can try as well. |
on windows it works, so it's very likely something on usbmuxd2 side. although there have been some changes in source code, if you look at commits it's mostly cleanup, nothing that should cause communication break with usbmuxd (or usbmuxd2) |
Thanks @mexmer for the encouraging comment. I think I have found the issue, but still not sure about the solution :( So I think it's something to do with dns and socket configuration (either on pi, ATV or the network ?) I'm learning about that, but if you (or @bentumbler ) have any hints / help you think would be useful for that topic, I'd greatly appreciate it. |
[Thread debugging using libthread_db enabled] who can help me,i build it on ubuntu,but “failed to recv_data on client 9 with error=client 9 disconnected! code=6750218” |
I have the same issue @cl532257933. I followed https://www.numerousnetworks.co.uk/guides/untether-ios-step-by-step/ (I had to make some changes to the code because there were some duplication). However, that's also giving me the same error. How did you install dependencies? Was it a mix of I wonder if you also get the same error if you follow the above link? I'll update as soon as I found more. |
The instructions are a bit old and before the libimobiledevice-glue library was around so you need to add that.
Last time I did this (1 year ago), I found the need to use specific checkin for libplist and not the head as previously described.
Libplist checkout a9e34bd29ae9dcdae55bdf5fb8a23c9b1c02eee9
It may be different now. If I get a chance to try it again I’ll update the tutorial
|
yes, I installed dependencies mixed of
+enum plist_format_t1 {
-int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format); |
I didn't install libimobiledevice-glue, I will try it again by your guidance |
Thanks @cl532257933, I did something similar as well, I think one of them isn't actually used anywhere (I think it's the one in Util.c?) so I commented it out. I tried the same method (mix of apt-get and manual), as well as trying to build everything from repos, but that also failed with the exact same error. Also many thanks @bentumbler for the context and the commit you shared. Totally, I know it's been a while, and I encountered the failure for I will try the commit you suggested, will rebuild and update with the outcome 👍 |
Hi @cl532257933 so I followed the script you have, and everything was installed ok (there were some additional requirements, such as I've found a dockerfile, I've not tried it but I'll try it and will update the results as well as the dockerfile, in case you want to try it as well. Hi @bentumbler so I tried the commit you provided, and had the same issue. I checked the code in |
Did you install this on host or used a docker container? What version are you running?
|
Any news? FROM debian:11-slim
RUN apt-get update && apt-get install -y build-essential pkg-config checkinstall git autoconf automake
RUN apt-get install -y libtool-bin libssl-dev
RUN apt-get install -y libusb-1.0.0-dev libavahi-client-dev
ENV INSTALL_PATH /src
RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH
RUN git clone https://github.com/libimobiledevice/libplist.git \
&& cd /src/libplist \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/libimobiledevice/libimobiledevice-glue.git \
&& cd /src/libimobiledevice-glue \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/tihmstar/libgeneral.git \
&& cd /src/libgeneral \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/libimobiledevice/libusbmuxd.git \
&& cd /src/libusbmuxd \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/libimobiledevice/libimobiledevice.git \
&& cd /src/libimobiledevice \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/tihmstar/usbmuxd2.git \
&& cd /src/usbmuxd2 \
&& apt-get install -y clang \
&& ./autogen.sh \
&& ./configure CC=clang CXX=clang++ \
&& make \
&& make install
RUN apt-get -y install ideviceinstaller I followed this link to compile usbmuxd2: tihmstar/usbmuxd2#31 docker build -t libimobiledevice-image .
docker run -it -v /var/run:/var/run --network host libimobiledevice-image I ran the following commands in my container: usbmuxd -v
[09:07:50.612][3] starting usbmuxd2 version: 0.61-2ce399ddbacb110bd5a83a6b8232d42c9a9b6e84-RELEASE
[09:07:50.614][2] Failed to get doPreflight! setting it to default val
[09:07:50.615][2] sysconf_set_value: Reading SystemConfiguration failed! Regenerating!
[09:07:50.616][2] Failed to get enableWifiDeviceManager! setting it to default val
[09:07:50.617][2] Failed to get enableUSBDeviceManager! setting it to default val
[09:07:50.622][3] Loaded config
[09:07:50.622][3] starting usbmuxd2 version: 0.61-2ce399ddbacb110bd5a83a6b8232d42c9a9b6e84-RELEASE
[09:07:50.622][0] Another instance is already running (pid 0). exiting.
[09:07:50.623][4] main reached cleanup
[09:07:50.623][4] done! ideviceinfo --version
ideviceinfo 1.3.0-219-g3969bc9 idevicepair pair
SUCCESS: Paired with device 00008020-000815E82E06002E idevicepair pair --wireless
No device found. idevice_id
00008020-000815E82E06002E (USB) idevice_id -n
#no result I tried the dockerfile of @cemizm but it doesn't work for me. |
What wireless network is this?
mDNS is required to be supported and than can be blocked on many enterprise networks although it usually is enabled on a home network
Can you get Avahi to find the iPhone?
From: leodeve ***@***.***>
Date: Wednesday, 3 April 2024 at 10:54
To: libimobiledevice/libusbmuxd ***@***.***>
Cc: Ben Toner ***@***.***>, Mention ***@***.***>
Subject: Re: [libimobiledevice/libusbmuxd] Cannot find iPhone via network (idevice_id -n) (#88)
Any news?
I still cannot find my iPhone via network on my Linux (Linux Mint 21.3). It works well in USB.
I use the following docker container:
FROM debian:11-slim
RUN apt-get update && apt-get install -y build-essential pkg-config checkinstall git autoconf automake
RUN apt-get install -y libtool-bin libssl-dev
RUN apt-get install -y libusb-1.0.0-dev libavahi-client-dev
ENV INSTALL_PATH /src
RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH
RUN git clone https://github.com/libimobiledevice/libplist.git \
&& cd /src/libplist \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/libimobiledevice/libimobiledevice-glue.git \
&& cd /src/libimobiledevice-glue \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/tihmstar/libgeneral.git \
&& cd /src/libgeneral \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/libimobiledevice/libusbmuxd.git \
&& cd /src/libusbmuxd \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/libimobiledevice/libimobiledevice.git \
&& cd /src/libimobiledevice \
&& ./autogen.sh \
&& make \
&& make install
RUN git clone https://github.com/tihmstar/usbmuxd2.git \
&& cd /src/usbmuxd2 \
&& apt-get install -y clang \
&& ./autogen.sh \
&& ./configure CC=clang CXX=clang++ \
&& make \
&& make install
RUN apt-get -y install ideviceinstaller
I followed this link to compile usbmuxd2: tihmstar/usbmuxd2#31<tihmstar/usbmuxd2#31>
I ran my container with the following commands:
docker build -t libimobiledevice-image .
docker run -it -v /var/run:/var/run --network host libimobiledevice-image
I ran the following commands in my container:
usbmuxd -v
[09:07:50.612][3] starting usbmuxd2 version: 0.61-2ce399ddbacb110bd5a83a6b8232d42c9a9b6e84-RELEASE
[09:07:50.614][2] Failed to get doPreflight! setting it to default val
[09:07:50.615][2] sysconf_set_value: Reading SystemConfiguration failed! Regenerating!
[09:07:50.616][2] Failed to get enableWifiDeviceManager! setting it to default val
[09:07:50.617][2] Failed to get enableUSBDeviceManager! setting it to default val
[09:07:50.622][3] Loaded config
[09:07:50.622][3] starting usbmuxd2 version: 0.61-2ce399ddbacb110bd5a83a6b8232d42c9a9b6e84-RELEASE
[09:07:50.622][0] Another instance is already running (pid 0). exiting.
[09:07:50.623][4] main reached cleanup
[09:07:50.623][4] done!
ideviceinfo --version
ideviceinfo 1.3.0-219-g3969bc9
idevicepair pair
SUCCESS: Paired with device 00008020-000815E82E06002E
idevicepair pair --wireless
No device found.
idevice_id
00008020-000815E82E06002E (USB)
idevice_id -n
#no result
I tried the dockerfile of @cemizm<https://github.com/cemizm> but it doesn't work for me.
I also tried to use the multicast command of @cl532257933<https://github.com/cl532257933> but it doesn't work either.
I tried to connect my iPhone and PC to the same network.
I also tried to set up a wireless hotspot to share my PC connection to my iPhone.
Any help will be appreciated.
—
Reply to this email directly, view it on GitHub<#88 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AP4K3EKFA56HXU5K43IBSTTY3PGUHAVCNFSM4KSEA5SKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBTGQYTAOJYHA4Q>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thank you for your answer. I ran the following command in my container at home: avahi-resolve-host-name iPhone.local
iPhone.local 192.168.1.15 I added the line Link 3 (wlp2s0)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 2a01:cb05:83d1:be00:3ab5:c9ff:fe0c:9480
DNS Servers: 192.168.1.1 2a01:cb05:83d1:be00:3ab5:c9ff:fe0c:9480
DNS Domain: home I can enable it with the |
I kept digging into my problem. I ran the commands from my dockerfile directly in a real debian 11 and it worked. I connected my iPhone and my PC to the same network. Then, I could see my device with the |
to discover devices over network, program needs to send multicast (bonjour discovery) to network, this is not possible from docker, because docker doesn't have direct access to your network. you can imagine docker image to be computer behind router, that does NAT (in this case router is your computer). full virtualization (like vmware or proxmox), can have access to network trough virtual interface, but containers do not have direct access to network, they are always proxied trough docker service. |
or you just use host network mode for your container: |
I am already using it. Here is the command I use to run my container: docker run -it -v /var/run:/var/run --network host --privileged libimobiledevice-image By the way, I need to use the volume /var/run. Otherwise I cannot detect my iPhone via USB. |
i see, thanks for clarification. i'm using docker only for running containers under k9, so had not need for this option, and didn't know it exists tbh. |
usbmuxd stores pid.run file into /var/run, if you have that folder inside your container, and is writeable by usbmuxd, it should be enough, you should check usbmuxd or usbmuxd2 manual, there should be all commandline parameters, and probly location of files it writes, or check in source code. |
I don't have a pid.run file into /var/run in my container and in my host. |
by pid.run file i did mean usbmuxd.pid, i'm lazy to search code for exact name 😸 now i'm honestly lost in what you are actually trying to do. |
Firstly, I wanted to find my iPhone with the |
libusbmuxd (and tools build on top of it, which includes ideviceid) connect to usbmuxd trough socket, since you are running usbmuxd2 in container, you not only need to run docker container with usbmuxd in hostnetwork mode, but you also need to expose ubsmuxd2 listening port normaly socket is /var/run/usbmuxd, but usbmuxd can be also built to listen to request on TCP port 27015 (this is port of apple service)
see Line 161 in a7f0543
on windows it's the only way, because that's how AMDservice on windows works. for you it did work for you trough usbmuxd2 running on host, because ideviceid connected trough unix socket (read from /var/run) what i would do is to sharing socket between docker containers is working method that is commonly used, althought from security standpoint it's not best solution (since socket is also accessible from host, not just from containers) |
Sorry for taking so long to reply. Here is what you suggest if I understood well:
docker run -it -v /var/run:/mydocker/sharedrun --network host --privileged libimobiledevice-image
Is that right? |
Has someone got working now? |
Hello, |
I finally got it working inside docker. Inside my local network I can backup my iPhone wirelessly on my server running docker, exactly what I wanted. The only thing I haven't found out yet is how to backup the iPhone if it's not in the local network. I thought I could just connect the Phone over VPN and backup from somewhere else. |
@Blackspell01 That's a great accomplishment! Would you consider sharing your Docker image? |
Yes of course, here you are:
The only problem is, that my plan was to be able to perform Backups from outside of the network. Unfortunately, the iPhone doesn't support mDNS over VPN apparently. In case someone knows more, I would be interested! |
That's fantastic thanks @Blackspell01. I will give this a go. Related question: has anyone had an opportunity to restore from one of these backups? Did it work? |
I saw in https://github.com/libimobiledevice/libusbmuxd/blob/master/NEWS that network support was added to libusbmuxd and I'm super happy about that fact 👍
However, I don't get it working. I've compiled and installed the latest version of all the needed libraries (libimobiledevice, libplist, libusbmuxd, usbmuxd) from source on my Raspberry Pi 4 (OS: Debian Buster).
Via USB the IPhone shows up. So I connected the iPhone via USB and paired it (idevicepair pair) before I tried to connect via network.
However, after unplugging the iPhone from USB and trying to connect to it via the network I didn't get any result:
Further infos:
Would be super nice if you can help me :) Or could it be that the open source version of usbmuxd does not support network connections and only the proprietary one from Apple (on Windows and MacOS) supports it which is used by libusbmuxd when available?
The text was updated successfully, but these errors were encountered: