Acessing BlueStacks' application (WhatsApp) database

Antimony picture Antimony · Nov 3, 2013 · Viewed 52.9k times · Source

I am trying to get a dump of my contacts' user names, statuses and last seen data.

Since WhatsApp doesn't have an API, I installed it on BlueStacks and am trying to take a snapshot of the database where these details might be stored.

I have a couple of problems:

  1. Can't find the database. Where does BlueStacks store its Application data? More specifically, where can I find the WhatsApp user data?
  2. If this is not a feasible way to go about it, is there another way to programmatically extract the data I am looking for?

Thanks in advance!

Answer

Antimony picture Antimony · Nov 8, 2013

This does not exactly answer my question, but so far, this is the most that I have been able to get.

  1. WhatsApp stores a backup of all conversations in the SD Card. It can be accessed by doing the following:
    1. Install a File Manager such as Astro File Manager, on BlueStacks
    2. Navigate to sdcard/WhatsApp/Databases/
    3. The message history backups are stored here. Click down on the file msgstore.db.crypt, select Copy from the options that come up. Navigate to /sdcard/bstfolder/bstSharedFolder/ and paste the file.
    4. This file can now be accessed on the PC by navigating to C:/ProgramData/BlueStacks/UserData/SharedFolder.
  2. Now the messages can be accessed by decrypting the databases (this link tells you how)
  3. The generated HTML contains a table of users (no user names in my case though - but maybe because I hadn't saved the contacts with a name on the emulator), their statuses (though in my case, even when some contacts had statuses, it did not show up), last message times and message histories.

I still haven't been able to find a way to programmatically get last seen timestamps or statuses. :(