Skip to content

A cross-platform software protocol library and tools to communicate with iOS® devices natively.

License

Notifications You must be signed in to change notification settings

qustodio/libimobiledevice-node

 
 

Repository files navigation

Node native add-on for libimobiledevice

IMPORTANT: this branch must be always rebased up to master.

Main workflow node python

The main focus of the library is with electron apps. More info in their official site libimobiledevice.org

Installation

Mac

$ yarn add libimobiledevice

Windows

Requeriments

For using libimobiledevice-node on windows the following requeriments are needed:

  • Install Visual Studio 2017 community.
  • Install Windows SDK 8.1.
  • Be sure Powershell command can be called from the command line.
  • Add msbuild.exe on windows PATH.
$ yarn add libimobiledevice

Todo

Binaries ported

  • idevice_id
  • idevicebackup
  • idevicebackup2
  • idevicecrashreport
  • idevicedate
  • idevicedebug
  • idevicedebugserverproxy
  • idevicediagnostics
  • ideviceenterrecovery
  • ideviceimagemounter
  • ideviceinfo
  • idevicename
  • idevicenotificationproxy
  • idevicepair
  • ideviceprovision
  • idevicescreenshot
  • idevicesyslog

Usage

const lib = require('libimobiledevice')

// List of devices
lib.id(data => console.log(data))

// Device info
lib.info({
	debug: true,
    simple: true,
    udid: 'string',
    domain: 'string',
	key: 'string'
}, (err, data) => console.log(err, data))

// Device backup
// Warning this are all the options that the method could take,
// don't use all at the same time, check the library documentation
// for more info [libimobiledevice.org](http://libimobiledevice.org)
lib.backup2({
	debug: true,
    udid: 'string',
    source: 'string',
    backup: true,
    restore: true,
    system: true,
    reboot: true,
    copy: true,
    settings: true,
    remove: true,
    password: 'string',
    cloud: 'on|off'
    full: false,
    info: false,
    list: false,
    unback: false,
    encryption: {
    	status: 'on|off',
    	password: 'string'
	},
    changepw: {
    	newpw: 'string',
    	backup_password: 'string'
	},
    interactive: true,
    backup_directory: 'backup path'
}, (err, data) => console.log(err, data), progress => console.log(progress))

Check examples

Run any of the examples in the path examples:

node examples/idevice_id

Windows (WIP)

IMPORTANT: Windows native compilation isn't longer available because libmobile libraries has changed to the oficial ones again.

Build

The following requeriments are needed:

  • Install msys2
  • pacman -S base-devel
  • pacman -S git
  • pacman -S mingw-w64-x86_64-gcc or mingw-w64-i686-gcc for win32.
  • pacman -S make
  • pacman -S libtool
  • pacman -S autoconf
  • pacman -S automake-wrapper

Finally run: ./scripts/install.py.

About

A cross-platform software protocol library and tools to communicate with iOS® devices natively.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 62.8%
  • JavaScript 25.2%
  • C++ 5.6%
  • Python 5.0%
  • Batchfile 1.4%