database/database-info
Brief Overview of Various Databases in WeChat PC Client
- Description: Overview of decrypted content from various files under .../WeChat Files/wxid_xxxxxxxx/Msg
- In cases where no specific description is provided, "chat record data" refers to data structures similar to or identical to the complete chat record data in the 'Multi' folder.
- This document is for learning and exchange purposes only, strictly prohibited for commercial or illegal use. Consequences are the sole responsibility of the user.
Data related to WeChat Mini Programs, including but not limited to:
- Recently used mini programs (RecentWxApp)
- Starred mini programs (StarWxApp)
- Basic information of various mini programs (WAContact)
Not particularly useful, but it allows viewing of the names, icons, and AppIDs of the mini programs you've used.
BizChat
Enterprise WeChat contact data, including but not limited to:
- ChatInfo accessible in WeChat
- Some information about conversations (ChatSession; relationship with ChatInfo unconfirmed; the Content field likely caches recent messages for display)
- Identity information of all Enterprise WeChat users involved in chats, including group chats (UsrInfo)
- Identity of the WeChat account bound to Enterprise WeChat (MyUsrInfo)
- Special Description: It's not confirmed whether these chats include conversations initiated by regular WeChat accounts with Enterprise WeChat users, or if they only involve conversations between Enterprise WeChat identities.
BizChatMsg
- Chat record data of Enterprise WeChat, including all conversations with Enterprise WeChat.
- Similar to BizChat, it's uncertain whether the scope includes only Enterprise WeChat to Enterprise WeChat conversations or also includes regular WeChat to Enterprise WeChat.
- Additionally, unlike the Multi folder, the database here is not split.
OpenIM Prefix
- This is also Enterprise WeChat data, including contacts, company information, and messages with Enterprise WeChat contacts.
- This is data related to regular WeChat to Enterprise WeChat interactions. The 'biz' prefix represents Enterprise WeChat to Enterprise WeChat interactions.
- Not commonly used, and no new data structures are present, so I won't delve into details.
PublicMsg
- Appears to be notification messages from Enterprise WeChat, akin to enterprise application messages.
Emotion
As the name suggests, it's related to emoticons, including but not limited to:
- CustomEmotion: Manually uploaded GIF emoticons with download links, though seemingly encrypted (contains aesKey field, untested)
- EmotionDes1 and EmotionItem likely contain similar content, but not thoroughly researched
- EmotionPackageItem: Collection list of added emoticon packages (those downloaded from the store)
P.S.: Not very useful since the MSG folder in WeChat contains URLs for emoticons, directly retrievable from chat records.
Favorite
- FavItems: List of favorited message items
- FavDataItem: Specific data of favorited items. Haven't delved into its storage logic, but likely:
- Even simple favorites like a public account article have a corresponding record in FavDataItem
- For merged forwarded messages, each individual message within the merge has a separate record in FavDataItem
- FavTags: Tags added to favorited content
Misc
- Includes BizContactHeadImg and ContactHeadImg1 tables, likely containing binary format avatars.
Sns
Data related to WeChat Moments:
- FeedsV20: XML data of Moments
- CommentV20: Likes or comments on Moments
- NotificationV7: Notifications from Moments
- SnsConfigV20: Configuration information, notably includes your Moments background image
- SnsGroupInfoV5: Likely related to the visibility list for old versions of WeChat Moments
FTS (Search)
Databases prefixed with FTS likely relate to Full-Text Search, the search box in WeChat.
Several tables:
- FTSChatroom15_content and FTSContact15_content likely correspond to messages displayed in the "Chats" section (including public accounts, etc.) and all contacts appearing in the "Contacts" section (not all contacts appear in "Chats"), containing nicknames, aliases, and WeChat IDs, matching searchable fields in WeChat.
FTSFavorite
Index for searching favorited content.
- Naming similar to the previous item.
P.S.: For favorited content, text searches concatenate everything into a long string. While fine for text and links, it may result in the keyword "search [image]" for merged forwarded messages.
MultiSearchChatMsg
Despite the different database prefix, its content and structure likely relate to search, specifically files within chat records.
- Stores filenames and their associated chats.
- However, FTSMsgSearch18_content and SessionAttachInfo tables have significant differences in record counts, unsure if one is lacking or how it's related.
HardLink (File Disk Location)
Associates file/image/video filenames with the folder they're saved in (e.g., 2023-04), useful but sparse.
Possibly related to voice messages with tables like ChatCRVoice and MediaInfo.
A database, though it shouldn't be at the same level as the classification, its significance warrants a separate mention.
AppInfo (Table)
Introductions for some apps, likely about the source information appended to WeChat forwarded messages originating from certain phone apps.
Biz Prefix
Content related to official accounts (公众号), likely focused on the accounts themselves.
Confirmed is the BizSessionNewFeeds table, storing session information under the broad categories of subscription accounts, including avatars and the latest push message.
ChatInfo
Stores the last marked read time for each conversation in the "Chats" list.
ChatRoom and ChatRoomInfo
Stores information about group chats:
- ChatRoom: Stores user lists for each group chat (including WeChat IDs and nicknames) and personal group nicknames.
- ChatRoomInfo: Group chat details, primarily announcements, unrelated to members.
Side note: There's an anomaly in naming here; while other tables use the 'ChatRoom' prefix, suddenly there's one named 'ChatroomTool'.
As the name suggests, contacts. However, these aren't just your friends; they encompass all people you may come across, including strangers in group chats.
- Contact: Stores user basic information, including but not limited to WeChat IDs (visible even for strangers!), nicknames, aliases, labeled tags, and various generated fields like phonetic spellings, probably for easier searchability.
- ContactHeadImgUrl: Profile picture URLs.
- ContactLabel: Mapping of friend tag IDs to names.
- ExtraBuf: Stores additional information like location, phone numbers, and emails.
PatInfo
Stores some 'pat' suffixes of friends, though there are only a few. I recall seeing more 'pat' notifications on my computer, so this seems fewer than expected?
Session
The actual conversation list displayed in the "Chats" section, including special conversations like "collapsed group chats". Information includes names, unread message counts, and the latest message.
TicketInfo
Contains over a hundred rows in my case, but I haven't quite figured out