Tuesday, October 6, 2015

Two ADB Commands - dump system and the user dictionary

I have been doing a lot of Android eval work lately, and hunted for quite some time to find two nuggets of helpful information. Thought I'd write something up quickly so I have them for later.

System Package

The system package includes a ton of great configuration information, including a list of all intents and activities (by app) as well as a list of SecretCodeReceivers (keypad number combinations which, when dialed, result in an action occuring).

To get the system package, do the following:
  1. Open an ADB shell instance
  2. Navigate to a writable directory (/sdscard/Downloads works great)
  3. Enter the command adb dump system package > package.txt
  4. Exit the shell
  5. Pull the file you just created adb pull /sdcard/Downloads/package.txt
Now you have a ton of great system-wide info at your hands.

User Dictionary

Each device has a dictionary where custom words are stored. It's a SQLite database, located at /data/data/com.android.providers.userdictionary/databases/user_dict.db Just pull the file, open it in SQLite, and check out things the user has entered.

I remembered this while I was looking for the type-ahead cache. I still haven't found that.