Skip to content

Instantly share code, notes, and snippets.

@phx
Last active November 23, 2020 17:38
Show Gist options
  • Save phx/6473644 to your computer and use it in GitHub Desktop.
Save phx/6473644 to your computer and use it in GitHub Desktop.
Dump iOS SMS/iMessage database to CSV.
#/bin/bash
# not an actual script - these are only commands, but the script would be basically the same.
# requires jailbroken iOS device
# get into the filesystem
ssh root:alpine@iphone
# update your package list, and install sqlite
apt-get update
apt-get install sqlite
# navigate to sms db directory
cd /var/mobile/Library/SMS
# drop the kids off at the pool
sqlite3 sms.db
# the following is for better illustration (the prompts will cause the "script" to fail):
sqlite> .mode csv
sqlite> .headers on
sqlite> .out message.csv
sqlite> select * from message;
# voila.
# write bash script using awk/grep and launchd (iOS/OSX crontab); sky's the limit.
@phx
Copy link
Author

phx commented Nov 17, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment