Preface#
As the title suggests, I don't know when it started, but after I updated my avatar using the TIM client, the avatar on the main panel and login page wouldn't update (in fact, it has already been uploaded to Tencent's server).
Then I tried using the built-in file cleaner, but it didn't work. I also tried using junk cleaners like Huorong, but it didn't help either.
Note
To save data: delete the Info.db
file in the TIM data directory and then log in again.
Ah, I know some people will ask why I'm still using TIM in the NTQQ era. My answer is: I'm used to it and I like it.
If you want to hear my analysis process, you can continue reading.
Analysis#
At first, I thought that the avatar was stored in the TIM data directory as an image file.
(If you haven't made any changes, it should be C:\User\<Username>\Documents\Tencent Files\
, and inside there is a folder with your QQ number.)
Then I tried searching using Everything.
I also deleted the entire Image
folder and logged in again, but it didn't work.
Then I thought: this directory doesn't take up any space until you log in, so maybe it's in the TIM installation directory.
I searched in the installation directory (there is nothing in other formats).
Then I found that these files seem to be closely related to TIM, so I didn't dare to delete them and gave up.
So it must be in the TIM data directory, I made a backup and then logged in and deleted the entire directory to see which files are being used.
You can't delete the directory, you have to go inside and delete it.
Finally, I deleted everything except for these files, you can say that I hardly made any progress.
If that doesn't work, I'll try binary search and see which files to delete to make the avatar change after logging in again.
The result is that I deleted the entire directory, but the avatar didn't change when logging in.
Note
Actually, every time I deleted something, I restarted TIM, logged in to take a look at the avatar, and then canceled. I didn't wait for it to log in.
Then I thought, hey, this doesn't seem right, it can't be in the installation directory.
And now I'm waiting for it to log in, WTF.
The avatar changed, which means it is indeed in the data directory.
Could it be that the pre-login avatar and the post-login avatar are stored in different places? Only when logging in to the main panel will the avatar be updated based on the avatar in the data directory.
Now, I deleted everything again, for nothing.
If that doesn't work, I'll try again, and...
Now I look like a clown.
Okay, I'll wait. I waited for about ten or twenty minutes, and voila, it came back to life.
In the end, I used binary search to narrow it down to the Info.db
file in the data directory.
Deleting it and logging in again will refresh the avatar on the main panel.
By the way, this db file cannot be opened with normal SQLite methods. I wonder if Tencent stores the avatar in base64 format inside it.

Conclusion#
Alright, that's it. If this article is helpful to you, remember to give it a thumbs up. If you have the means, you can also support me financially. Thank you, meow.
This article is synchronized and updated to xLog by Mix Space.
The original link is https://blog.nekorua.com/posts/technology/114.html