3

How do I access text messages on my rooted device using the command line?

I specifically want to extract a text transcript, without using any cloud services and thereby exposing sensitive or personal info.

1

1 Answer 1

3

Requirements:

  1. Linux terminal (may work on other systems; untested).
  2. adb installed.
  3. "USB Debugging" enabled.
  4. Rooted Android device (may work on unrooted; untested).

Sequence:

  1. Plug in device.
  2. Put device in "File Transfer" mode.
  3. Start session with root access: adb root.
  4. Accept prompt on device to allow USB debugging.
  5. Start interactive shell at root dir (/): adb shell.
  6. Locate database file using ls, find, and whatever tools you see fit. Mine was: /data/data/com.android.messaging/databases/bugle_db.
  7. Exit the shell with exit or Ctrl-d.
  8. Pull the file onto your local machine: adb pull <file> ~/texts.db.
  9. Run this script to extract messages: python3 extract_convo_from_textdb.py ~/texts.db "<convo-name>".
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .