banner
libxcnya.so

libxcnya.so

Nothing...
telegram
twitter
github
email

Discussion on TIM not refreshing the main panel after changing the avatar

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.

0

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 changed it, it should be C:\User\<Username>\Documents\Tencent Files\, and there should be a folder with your QQ number inside.)
So I tried searching using Everything.

1

Then I deleted the entire Image folder and logged in again, but it didn't work.
Then I thought: maybe this directory doesn't take up space until after logging in. Maybe it's in the TIM installation directory.
I searched in the installation directory (other formats don't have anything).

2

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 logged in, and then deleted the entire directory to see which files were being used.

3

You can't delete the directory, you have to go inside and delete it.

4

Finally, I deleted everything except for these files. You can say that I barely 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.
In the end, I deleted the entire directory, but the avatar didn't change when logging in.

5

Note

Actually, every time I deleted something, I restarted TIM, logged in to take a look at the avatar, and then clicked cancel. I didn't wait for it to log in.

Then I thought, hey, this doesn't seem right. It can't really be in the installation directory, right?
Then I waited for it to log in, and WTF.

6

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? The main panel only updates the avatar when logged in, based on the avatar in the data directory.
Now, I deleted everything for nothing.
If that doesn't work, I'll try again, and...

7

Now I look like a clown.

Okay, I'll wait. I waited for about ten or twenty minutes, and finally, it worked.
After using binary search to narrow it down, it turned out to be 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 using normal SQLite methods. I wonder if Tencent stores the avatar in base64 format inside it.

:thinking

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 donate to me. 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


Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.