{"id":27132795,"url":"https://github.com/artehe/netimobiledevice","last_synced_at":"2025-04-07T22:26:46.196Z","repository":{"id":65794246,"uuid":"590825806","full_name":"artehe/Netimobiledevice","owner":"artehe","description":"A C#/dotnet implementation for working with iOS devices (iPhone, iPad, iPod).","archived":false,"fork":false,"pushed_at":"2024-05-14T08:55:00.000Z","size":1531,"stargazers_count":14,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-21T08:28:43.486Z","etag":null,"topics":["csharp","csharp-library","dotnet","dotnetcore","ios","ipad","iphone","ipod","library","lockdownd","usbmux","usbmuxd"],"latest_commit_sha":null,"homepage":"https://github.com/artehe/Netimobiledevice","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artehe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["artehe"]}},"created_at":"2023-01-19T09:55:34.000Z","updated_at":"2024-05-31T13:40:20.804Z","dependencies_parsed_at":null,"dependency_job_id":"5e8d18e4-caaa-4fba-b50e-3fe203fa9dce","html_url":"https://github.com/artehe/Netimobiledevice","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"7a38cf652969a2db6dd8b07b955ea7e7668be9e0"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artehe%2FNetimobiledevice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artehe%2FNetimobiledevice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artehe%2FNetimobiledevice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artehe%2FNetimobiledevice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artehe","download_url":"https://codeload.github.com/artehe/Netimobiledevice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247739548,"owners_count":20988036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","csharp-library","dotnet","dotnetcore","ios","ipad","iphone","ipod","library","lockdownd","usbmux","usbmuxd"],"created_at":"2025-04-07T22:26:45.583Z","updated_at":"2025-04-07T22:26:46.186Z","avatar_url":"https://github.com/artehe.png","language":"C#","funding_links":["https://github.com/sponsors/artehe"],"categories":[],"sub_categories":[],"readme":"# Netimobiledevice\n\nNetimobiledevice is a pure C# implementation for working with iOS devices (iPhone, iPad, iPod). Implements quite a lot of the services available from lockdownd and remoted. This library isn't a wrapper around the libimobiledevice library (but is inspired by it among others such as pymobiledevice3) and is designed to be used in .NET applications. It is a cross-platform library that can be used on Windows, Linux and MacOS.\n\n- [Netimobiledevice](#Netimobiledevice)\n    * [Features](#Features)\n    * [Installation](#Installation)\n    * [Usage](#Usage)\n    * [Services](#Services)\n    * [License](#License)\n    * [Contributing](#Contributing)\n    * [Acknowledgments](#Acknowledgments)\n\n## Features\n\n - Backup and Restore an iOS device in the normal iTunes way or as customised as you like. \n - Device discovery and connection via Usbmux.\n - Interact with iOS services using Lockdownd or Remoted\n - Handle all property lists files (.plist) whether they are in XML or Binary format\n - Use remoted Apples new framework for working with iOS devices. This uses the RemoteXPC protocol and you can read more about it [here](https://github.com/doronz88/pymobiledevice3/blob/master/misc/RemoteXPC.md)\n - TCP port forwarding\n - Viewing syslog lines\n - Profile management\n - Application management\n - File system management\n - Crash reports management\n - Notification listening\n - Querying and setting SpringBoard options\n\n## Installation\n\nTo install Netimobiledevice, you can use the following command in the Package Manager Console:\n\n```powershell\nInstall-Package Netimobiledevice\n```\n\nAlternatively, you can use the .NET CLI:\n\n```csharp\ndotnet add package Netimobiledevice\n```\n\n# Usage\n\nA few examples of how to use Netimobiledevice are below.\n\nGet a list of all currently connected devices using:\n\n```csharp\nusing Netimobiledevice.Usbmuxd;\n\nList\u003cUsbmuxdDevice\u003e devices = Usbmux.GetDeviceList();\nConsole.WriteLine($\"There's {devices.Count} devices connected\");\nforeach (UsbmuxdDevice device in devices) {\n    Console.WriteLine($\"Device found: {device.DeviceId} - {device.Serial}\");\n}\n```\n\nListen to connection events:\n\n```csharp\nUsbmux.Subscribe(SubscriptionCallback);\n\nprivate static void SubscriptionCallback(UsbmuxdDevice device, UsbmuxdConnectionEventType connectionEvent)\n{\n    Console.WriteLine(\"NewCallbackExecuted\");\n    Console.WriteLine($\"Connection event: {connectionEvent}\");\n    Console.WriteLine($\"Device: {device.DeviceId} - {device.Serial}\");\n}\n```\n\nGet the app icon displayed on the home screen as a PNG:\n\n```csharp\nusing (UsbmuxLockdownClient lockdown = MobileDevice.CreateUsingUsbmux(\"60653a518d33eb53b3ca2322de3f44e162a42069\"))\n{\n    SpringBoardServicesService springBoard = new SpringBoardServicesService(lockdown);\n    PropertyNode png = springBoard.GetIconPNGData(\"net.whatsapp.WhatsApp\");\n}\n```\n\nCreate an iTunes backup:\n\n```csharp\nusing (UsbmuxLockdownClient lockdown = MobileDevice.CreateUsingUsbmux(\"60653a518d33eb53b3ca2322de3f44e162a42069\")) {\n    using (Mobilebackup2Service mb2 = new Mobilebackup2Service(lockdown)) {\n        mb2.BeforeReceivingFile += BackupJob_BeforeReceivingFile;\n        mb2.Completed += BackupJob_Completed;\n        mb2.Error += BackupJob_Error;\n        mb2.FileReceived += BackupJob_FileReceived;\n        mb2.FileReceiving += BackupJob_FileReceiving;\n        mb2.FileTransferError += BackupJob_FileTransferError;\n        mb2.PasscodeRequiredForBackup += BackupJob_PasscodeRequiredForBackup;\n        mb2.Progress += BackupJob_Progress;\n        mb2.Status += BackupJob_Status;\n        mb2.Started += BackupJob_Started;\n\n        await mb2.Backup(true, true, \"backups\", tokenSource.Token);\n    }\n}\n```\n\nPair an iOS device asyncronously:\n\n```csharp\nusing (UsbmuxLockdownClient lockdown = MobileDevice.CreateUsingUsbmux(testDevice?.Serial ?? string.Empty)) {\n    Progress\u003cPairingState\u003e progress = new();\n    progress.ProgressChanged += Progress_ProgressChanged;\n    await lockdown.PairAsync(progress);\n}\n\nprivate void Progress_ProgressChanged(object? sender, PairingState e)\n{\n    Console.WriteLine($\"Pair Progress Changed: {e}\");\n}\n```\n\nGet structured logging information using the logger of your choice (provided it can interact with Microsoft.Extentions.Logging ILogger):\n\n```csharp\nusing Microsoft.Extensions.Logging;\n\nusing ILoggerFactory factory = LoggerFactory.Create(builder =\u003e builder.SetMinimumLevel(LogLevel.Debug).AddConsole());\nusing (LockdownClient lockdown = MobileDevice.CreateUsingUsbmux(testDevice?.Serial ?? string.Empty, logger: factory.CreateLogger(\"Netimobiledevice\"))) {\n    using (Mobilebackup2Service mb2 = new Mobilebackup2Service(lockdown)) {\n        await mb2.Backup(true, true, \"backups\", tokenSource.Token);\n    }\n}\n```\n\n## Services\n\nThe list of all the services from lockdownd which have been implemented and the functions available for each one. Clicking on the service name will take you to it's implementation, to learn more about it.\n\n- [com.apple.afc](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Afc/AfcService.cs)\n  * Interact with the publicly available directories and files\n- [com.apple.mobile.heartbeat](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Lockdown/Services/HeartbeatService.cs)\n  * A regular ping to used to keep an active connection with lockdownd\n- [com.apple.misagent](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Misagent/MisagentService.cs)\n  * Management for provisioning profiles \n- [com.apple.mobile.diagnostics_relay](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Lockdown/Services/DiagnosticsService.cs)\n  * Query MobileGestalt \u0026 IORegistry keys.\n  * Reboot, shutdown or put the device in sleep mode.\n- [com.apple.mobile.installation_proxy](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Lockdown/Services/OsTraceService.cs)\n  * Browse installed applications\n  * Manage applications (install/uninstall/update)\n- [com.apple.mobile.notification_proxy](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Lockdown/Services/NotificationProxyService.cs) \u0026 [com.apple.mobile.insecure_notification_proxy](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Lockdown/Services/NotificationProxyService.cs)\n  * Send and receive notifications from the device for example informing a backup sync is about to occur.\n- [com.apple.mobilebackup2](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Backup/Mobilebackup2Service.cs)\n  * Backup Creation\n  * Restore a backup to the iOS device\n  * Communication with the Backup service\n- [com.apple.os_trace_relay](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Lockdown/Services/InstallationProxyService.cs)\n  * Get pid list\n  * More structural syslog lines.\n- [com.apple.springboardservices](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/SpringBoardServices/SpringBoardServicesService.cs)\n  * Get icons from the installed apps on the device.\n- [com.apple.syslog_relay](https://github.com/artehe/Netimobiledevice/blob/main/Netimobiledevice/Lockdown/Services/SyslogService.cs)\n  * Stream raw syslog lines from the device.\n\n## License\n\nThis project is licensed under the [MIT LICENSE](https://github.com/artehe/Netimobiledevice/blob/main/LICENSE).\n\n## Contributing\n\nContributions are welcome. Please submit a pull request or create an issue to discuss your proposed changes.\n\n## Acknowledgments\n\nThis library was based on the following repositories with either some refactoring or in the case of libraries such as libusbmuxd translating from C to C#.\n\n- **[BitConverter](https://github.com/davidrea-MS/BitConverter):** Provides a big-endian and little-endian BitConverter that convert base data types to an array of bytes, and an array of bytes to base data types, regardless of machine architecture.\n- **[libimobiledevice](https://github.com/libimobiledevice/libimobiledevice):** A cross-platform protocol library to communicate with iOS devices\n- **[libusbmuxd](https://github.com/libimobiledevice/libusbmuxd):** A client library for applications to handle usbmux protocol connections with iOS devices.\n- **[MobileDeviceSharp](https://github.com/mveril/MobileDeviceSharp):** A C# object oriented wrapper around Libimobiledevice\n- **[PList-Net](https://github.com/PList-Net/PList-Net):** .Net Library for working with Apple *.plist Files.\n- **[pymobiledevice3](https://github.com/doronz88/pymobiledevice3):** A pure python3 implementation to work with iOS devices.\n- **[UniversalTunTapDriver](https://github.com/HBSnail/UniversalTunTapDriver/tree/master):** A driver for TUN/TAP devices to support basic operations on both linux and windows platform. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartehe%2Fnetimobiledevice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartehe%2Fnetimobiledevice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartehe%2Fnetimobiledevice/lists"}