Giter Site home page Giter Site logo

richinfante / iphonebackuptools Goto Github PK

View Code? Open in Web Editor NEW
309.0 309.0 50.0 534 KB

iOS Backup Data Extraction

Home Page: http://www.richinfante.com/2017/3/16/reverse-engineering-the-ios-backup

License: MIT License

JavaScript 100.00%
ios ios-backup iphone-backups reverse-engineering

iphonebackuptools's People

Contributors

aguerere avatar altin avatar denysvitali avatar grantbirki avatar kelvinn avatar richinfante avatar torarnv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iphonebackuptools's Issues

Error: EPERM: operation not permitted, scandir

I just downloaded the tool using npm i -g ibackuptool

When I run sudo ibackuptool -l, I receive the following error:

run backups.list
[cli.js] unhandled rejection { Error: EPERM: operation not permitted, scandir     '/Users/mitchelljeppson/Library/Application Support/MobileSync/Backup/'
    at Object.readdirSync (fs.js:786:3)
    at Promise (/usr/local/lib/node_modules/ibackuptool/tools/reports/backups/list.js:10:22)
    at new Promise (<anonymous>)
    at Object.run (/usr/local/lib/node_modules/ibackuptool/tools/reports/backups/list.js:9:12)
    at Promise (/usr/local/lib/node_modules/ibackuptool/tools/index.js:182:12)
    at new Promise (<anonymous>)
    at Object.runReport (/usr/local/lib/node_modules/ibackuptool/tools/index.js:159:10)
    at main (/usr/local/lib/node_modules/ibackuptool/tools/cli.js:196:37)
    at init (/usr/local/lib/node_modules/ibackuptool/tools/cli.js:136:3)
    at Object.<anonymous> (/usr/local/lib/node_modules/ibackuptool/tools/cli.js:91:3)
  errno: -1,
  syscall: 'scandir',
  code: 'EPERM',
  path:
  '/Users/mitchelljeppson/Library/Application Support/MobileSync/Backup/' }

Any thoughts on this? Thanks.

Message conversations extract with message contents & attachments

Currently, we can export photo locations with --photos.locations. I suppose this may be of some use, but I think that exporting the images themselves is beneficial, especially in conjunction with the messages. This way, when/if a front-end is ever made, conversations with a particular contact would be complete and have their own corresponding photos.

I understand that images can easily be accessed from the DCIM folder, but this isn't the case with third-party messaging apps like Viber (unless the user allows all received Viber photos to be sent to the camera roll).

Thoughts? I can implement this.

Partial backups

Hi @richinfante

If an iTunes backup is cancelled, some data may still be available for iphonebackuptools.
Currently, it looks like it always try to read the Manifest file and Info.plist . If either of them are not found, the process stops with errors.

Many of the available reports have known file hashes, so those checks could be skipped if the Manifest and Info files are not found and still try to access the file(s) the report needs and provide results if any are found.

Do you think we can fix/enable this for partial backups? We can do a pull request with the changes.
Cheers

Skype Support

It appears the skype options no longer work. I can't find main.db in the skype backup namespace.

Missing comma

The following line is missing a comma at the end:

'facebook_messenger_friends': require('./reports/facebook_messenger_friends')

This is probably a git merge mistake, but does prevent the tool from working at all. I created a couple of PRs for new reports that do fix this.

Expand Filters to allow regexes

does the optional '--filter' only take strings as is, or does it support regular expression?

Right now, I am using ibackuptool to extract one file in particular from iOS backup:
######_mihome.sqlite

This is created by Mi Home app, it contains the tokens for all the IoT devices setup in Mi Home. The tokens would then be used for configure Homebridge.

In each backup, the 'mihome.sqlite' part of the filename is constant, only the first 6 chars are different.

please use a git tag to make packaging easy

This is a really useful utility! Would you consider using a git tag with a version number to make packing for Linux distros eaiser?

tag=v0.550
git tag "$tag" -m "$tag"
git push --tags 

Changing dirs

ibackuptool --output C:\Users\username\Downloads\Backup


Options:
  -V, --version                   output the version number
  -l, --list                      List Backups
  -b, --backup <backup>           Backup ID
  -d, --dir <directory>           Backup Directory (default: C:\Users\username\Apple\MobileSync\Backup)
  -r, --report <report_type>      Select a report type. see below for a full list.
  -i, --id <id>                   Specify an ID for filtering certain reports
  -f, --formatter <type>          Specify output format. default: table
  -e, --extract <dir>             Extract data for commands. supported by: voicemail-files, manifest,
                                  addressbook
  -o, --output <path>             Specify an output directory for files to be written to.
  -v, --verbose                   Verbose debugging output
      --plugins <plugins>         List of pluging modules to use
      --filter <filter...>        Filters output for individual reports.
      --regex-filter <filter...>  Filters output for individual reports using a regular expression.
      --join-reports              Join JSON reports together. (available for -f json or -f raw only!)
      --no-color                  Disable colorized output
      --dump                      alias for "--formatter raw"
      --quiet                     quiet all messages, except for errors and raw output
      --available                 output a list of available reports
  -h, --help                      display help for command

Version: 4.0.1

Run ibackuptool --available for a listing of report types.

If you're interested to know how this works, check out my post:
https://www.richinfante.com/2017/3/16/reverse-engineering-the-ios-backup

Issue tracker:
https://github.com/richinfante/iphonebackuptools/issues

Same goes for specifying the Backup Directory
My username has no space in it and I'm using the global command line tool.

ERROR: Couldn't run 'backup.files'.

I am getting the current output as an error on the terminal.

Couldn't run 'backup.files'.
ERROR! Error: Could not find a manifest.
at /opt/homebrew/lib/node_modules/ibackuptool/tools/reports/backup/files.js:94:12

Idea: configure databases with human readable filenames

Configuring databases with hashes is not so easy to read. Maybe it's better to specify the databases with filenames? As we know them from the manifest.

When I do reverse engineering myself I rename them all and then use the filenames.

Example:
ade0340f576ee14793c607073bd7e8e409af07a8 => /SystemConfiguration/com.apple.wifi.plist

how to use on windows

can u tell me axactly how to use on windows i dont have mac devices
and i dont too much about javascript

install problem

npm is installed -- installed node -- but can't get ibackuptool installed.

OSX 10.11.6

/usr/local/bin/ibackuptool -> /usr/local/lib/node_modules/ibackuptool/tools/cli.js

[email protected] install /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-pre-gyp: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/darin/.npm/_logs/2019-10-05T05_41_57_384Z-debug.log

Report for Instagram users

There is a cache of Instagram at /Documents/recent-users.coded.

I guess it's not top priority for you, so we could implement report for instagram_users.

Facetime call log for iPad backups

I am utilizing the iphonebackuptool to generate a report on facetime calls from an unencrypted backup of an 7th gen ipad updated to the latest OS. The phone.calls report fails because neither the '2b2b0084a1bc3a5ac8c27afdf14afb42c61a19ca' or 'CallHistory.storedata' files exist for an ipad backup.

Is there an additional location that call history data is stored for ipads?

Collaborators

We are planning to use this software as part of an art project. As we have many upgrades in mind, it would make sense to add the functionality to this repo as well. Would you be interested in managing the code? Then you could also lead it in a way that makes sense to the original idea. For example how to name command line flags etc.

Fails to Install through Terminal

When using the command "sudo npm install --unsafe-perms -g ibackuptool" it gives me a error that I have copy and pasted below. I have given it Full Disk Permission through System Preferences

npm WARN deprecated [email protected]: Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/keshavmadhavan/.npm/_logs/2020-08-18T23_53_20_930Z-debug.log
keshavmadhavan@keshavs-mbp ~ % sudo npm install --unsafe-perms -g ibackuptool

npm WARN deprecated [email protected]: Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.
/usr/local/bin/ibackuptool -> /usr/local/lib/node_modules/ibackuptool/tools/cli.js

[email protected] install /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/Users/keshavmadhavan/Library/Caches/node-gyp/12.18.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp'
gyp ERR! System Darwin 20.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/ibackuptool/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 20.0.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/ibackuptool/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.18.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/keshavmadhavan/.npm/_logs/2020-08-18T23_53_43_226Z-debug.log
keshavmadhavan@keshavs-mbp ~ % node-pre-gyp install --fallback-to-build
zsh: command not found: node-pre-gyp
keshavmadhavan@keshavs-mbp ~ % npm i -g ibackuptool

npm WARN deprecated [email protected]: Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/keshavmadhavan/.npm/_logs/2020-08-18T23_55_03_663Z-debug.log
keshavmadhavan@keshavs-mbp ~ % sudo npm i -g ibackuptool

npm WARN deprecated [email protected]: Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.
/usr/local/bin/ibackuptool -> /usr/local/lib/node_modules/ibackuptool/tools/cli.js

[email protected] install /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/Users/keshavmadhavan/Library/Caches/node-gyp/12.18.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp'
gyp ERR! System Darwin 20.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/ibackuptool/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 20.0.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/ibackuptool/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.18.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/keshavmadhavan/.npm/_logs/2020-08-18T23_55_23_984Z-debug.log
keshavmadhavan@keshavs-mbp ~ % sudo npm i -g ibackuptool

npm WARN deprecated [email protected]: Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.
/usr/local/bin/ibackuptool -> /usr/local/lib/node_modules/ibackuptool/tools/cli.js

[email protected] install /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/Users/keshavmadhavan/Library/Caches/node-gyp/12.18.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp'
gyp ERR! System Darwin 20.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/ibackuptool/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 20.0.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/ibackuptool/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.18.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/keshavmadhavan/.npm/_logs/2020-08-18T23_57_18_007Z-debug.log
keshavmadhavan@keshavs-mbp ~ % sudo npm install --unsafe-perms -g ibackuptool

Password:
npm WARN deprecated [email protected]: Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.
/usr/local/bin/ibackuptool -> /usr/local/lib/node_modules/ibackuptool/tools/cli.js

[email protected] install /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/Users/keshavmadhavan/Library/Caches/node-gyp/12.18.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp'
gyp ERR! System Darwin 20.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/ibackuptool/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 20.0.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/ibackuptool/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.18.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/keshavmadhavan/.npm/_logs/2020-08-19T00_20_02_376Z-debug.log
keshavmadhavan@keshavs-mbp ~ %

How to find group chat from call history

Hey! Super cool library! I was just wondering if you figured out how to find out the group chat a call belonged to for a group face time call? I can't seem to discern from the schema. Thanks!

Format MAC address in Wifi report

We need to use the mac address, but the format is not great. Change formatting like this:

el.BSSID.split(':').map((hex) => zpad(hex)).join(':') + '',

We have a feature here, but it changed places a few times. Maybe it's better to add straight to your code.

timotoots@a0bdc46

notes report does not run with ios 17 backup

Notes are there for sure, I have the encryption password and shareware Iphone Backup Extractor sees notes and extracts few samples, but iphonebackuptool does not. Have no IOS device to check if this is related to backup encryption or not.

$ ibackuptool -l
run backups.list

udid                      | encrypted | date                   | deviceName | serialNumber | iOSVersion | backupVersion
------------------------- | --------- | ---------------------- | ---------- | ------------ | ---------- | -------------
00008020-000E40D60E51002E | true      | 9/20/2023, 11:35:35 PM | iPhone     | ************ | 17.0       | 3.3          

$ ibackuptool -b 00008020-000E40D60E51002E -r notes
run notes
ERROR! Couldn't run 'notes'.
ERROR! Error: Couldn't find any known notes database in the system.
    at /usr/local/lib/node_modules/ibackuptool/tools/reports/notes/notes.js:59:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Trying install on brand new up to date OSX system

It seems to require a later version of sqlite3 and node than is available.

[darin@server ~ ] sudo npm i -g ibackuptool
Password:
/usr/local/bin/ibackuptool -> /usr/local/lib/node_modules/ibackuptool/tools/cli.js

[email protected] install /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding'
gyp WARN EACCES user "nobody" does not have permission to access the dev dir "/Users/darin/Library/Caches/node-gyp/12.11.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/.node-gyp'
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
gyp ERR! node -v v12.11.1
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/ibackuptool/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/ibackuptool/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/ibackuptool/node_modules/sqlite3/lib/binding/node-v72-darwin-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/darin/.npm/_logs/2019-10-05T15_22_33_444Z-debug.log
[darin@server ~ ] sqlite3 -v
sqlite3: Error: unknown option: -v
Use -help for a list of options.
[darin@server ~ ] sqlite3 -ver
sqlite3: Error: unknown option: -ver
Use -help for a list of options.
[darin@server ~ ] sqlite3 -version
3.24.0 2018-06-04 14:10:15 95fbac39baaab1c3a84fdfc82ccb7f42398b2e92f18a2a57bce1d4a713cbaapl

Combined reports

We would need a report that combines all reports together in one big export to be used in another software for further analysis. It would make sense to add possibility to include and exclude some reports if needed.

We have an alpha version here:

dc101b1

Should we do pull request for this version or you implement it yourself?

License

Is there a plan to release it under open source license?

photos recovery from backup

I have 14.65GB in backup. iTunes is not recognizing the backup.
I need to recover the photos from the backup.

Any help will be greatly appreciated.

Report for Safari

It would include:

  • bookmarks "/Library/Safari/Bookmarks.db"
  • history "/Library/Safari/History.db"
  • browser state "/Library/Safari/BrowserState.db"
  • something else?

We would do it, but we are wondering how should we create the report?

I think it would be too much to add report for each database. The report list might get a bit too long. Maybe there could be an extra flag for sub-report? Or there are several tables/json objects coming out from one report?

What do you think @richinfante ?

Installation on Ubuntu 22.10

This project has been my first (and second, third and fourth) foray into node.js, and everything about it is clear as mud (especially the error messages). But I have an old ios backup that most other utilities completely fail and only one or two can pull limited information, so I have kept coming back to iphonebackuptools.

Long story short:

install nvm;

use nvm to install node;

sudo apt install python-is-python3; and finally

use npm to install iphonebackuptools per instructions.

That's it! For whatever reason, the error message simply wasn't clicking in my head that this was yet another example of the python/python3 issue, but once it did and I installed the old standby python-is-python3, it was a smooth process.

Not really an issue, but I wanted to make sure that other node neophytes see it.

Use os.homedir() instead of process.env.HOME

As a Windows 10 user, process.env.HOME returns undefined for me (seems like this is default behavior), which throws an error.

os.homedir()is preferred because it is more portable than process.env.HOME for locating the home directory.

var backupDirectory = path.join(process.env.HOME, '/Library/Application Support/MobileSync/Backup/')

this.path = path.join(process.env.HOME, '/Library/Application Support/MobileSync/Backup/', id)

base = path.join(process.env.HOME, '/Library/Application Support/MobileSync/Backup/', id)

const base = path.join(process.env.HOME, '/Library/Application Support/MobileSync/Backup/')

trying to run on windows 10 but got The "path" argument must be of type string

installed using
npm i -g ibackuptool

when run ibackuptool with any arg this error happens

ibackuptool -l
internal/validators.js:118
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:118:11)
at Object.join (path.js:375:7)
at Object. (C:\Users\secre\AppData\Roaming\npm\node_modules\ibackuptool\tools\index.js:9:28)
at Module._compile (internal/modules/cjs/loader.js:1144:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
at Module.load (internal/modules/cjs/loader.js:993:32)
at Function.Module._load (internal/modules/cjs/loader.js:892:14)
at Module.require (internal/modules/cjs/loader.js:1033:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (C:\Users\secre\AppData\Roaming\npm\node_modules\ibackuptool\tools\cli.js:9:14) {
code: 'ERR_INVALID_ARG_TYPE'
}

Report call history

Some enhancements would be nice:

The "calls" report could return human readable "type" of the call. At the moment it's defined by numbers. It would be better if we decode it to "missed", "blocked" etc.

Also I get "RecentsNumberLocationNotFound" on some locations. Might be good idea to make it an empty string.

We could round the duration to two points of decimal for easier reading.

couldn't run system.wifi

$ ibackuptool -b ade0340f576ee14793c607073bd7e8e409af07a8 --report system.wifi -f csv -o exported

run system.wifi
ERROR! Couldn't run 'system.wifi'.
ERROR! Error: Could not find a file needed for this report. It may not be compatibile with this specific backup or iOS Version.
    at Backup.getFileName (C:\Users\Ryzen\.npm-global\node_modules\ibackuptool\tools\backup.js:102:11)
    at C:\Users\Ryzen\.npm-global\node_modules\ibackuptool\tools\reports\system\wifi.js:23:31
    at new Promise (<anonymous>)
    at Object.run (C:\Users\Ryzen\.npm-global\node_modules\ibackuptool\tools\reports\system\wifi.js:20:12)
    at C:\Users\Ryzen\.npm-global\node_modules\ibackuptool\tools\index.js:190:12
    at new Promise (<anonymous>)
    at Object.runReport (C:\Users\Ryzen\.npm-global\node_modules\ibackuptool\tools\index.js:167:10)
    at main (C:\Users\Ryzen\.npm-global\node_modules\ibackuptool\tools\cli.js:201:37)
    at init (C:\Users\Ryzen\.npm-global\node_modules\ibackuptool\tools\cli.js:137:3)
    at Object.<anonymous> (C:\Users\Ryzen\.npm-global\node_modules\ibackuptool\tools\cli.js:92:3)

Pls explain if we need to replace $UDID with the original file name like in your web : https://www.richinfante.com/2017/3/16/reverse-engineering-the-ios-backup?

Report for all conversations

At the moment it's implemented to be interactive reading conversations of specific id. We would need a dump for all.

We have implemented alpha version for just the dump. Should me merge or you plan to implement it yourself?

663ce04

Windows

Hello the path on windows seems to be wrong, to fix it on my side I needed to execute this powershell command as admin:

New-Item -ItemType SymbolicLink -Path "C:\Users\USERNAME\Apple" -Target "C:\Users\USERNAME\AppData\Roaming\Apple Computer"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.