Files transferred by Viber are stored on ~/Documents/ViberDownloads by default. How is it possible to change the destination to a location under ~/Downloads?

up vote 6 down vote accepted

This is a complimentary answer to AliNa's.

If you want to move your previously downloaded files to the new location follow below steps:

  1. Backup your downloaded files
  2. Backup .ViberPC folder
  3. Open ~/.ViberPC/{your-phone-number}/viber.db with sqliteman
  4. Paste below query to query edit area:

    Update messages set PayloadPath = replace(PayloadPath, "Documents/ViberDownloads", ".viberdownloads") where PayloadPath is not null and PayloadPath <> '';

What this does is; replaces text Documents/ViberDownloads with .viberdownloads in PayloadPath field of messages table. I typed ".viberdownloads" because I wanted my downloads in /home/user/.viberdownloads folder. Change these strings according to your use.

  1. Click Run(F9)

Make sure you carefully backup .ViberPC folder, if something goes wrong you will lose all your message history on this machine.

Viber preferences are stored as ".db" files under ~/.ViberPC/. You should have installed an extra application in order to open or edit them; for example, Sqliteman which is available from Software Center.

To edit the location of downloads folder, open the following file:

~/.ViberPC/{your-phone-number}/viber.db

On the left sidebar of Sqliteman, open Tables > Settings. You can see the setting entitled DownloadFolder on the bottom right. Double click on its value to change the location as you wish.

Sqliteman window

If you have downloaded some files before you change the setting, you won't be able to open them from Viber afterwards. To solve this, @HeyYo have a great answer.

  • If the table to the right doesn't show up, enter in the textbox above it the following query: SELECT * FROM settings; (then press the green play button and wait a bit). Next, if double-clicking the table cell doesn't allow to change its value, enter in the same top textbox the following query: UPDATE settings SET SettingValue="/path/to/new/directory" WHERE SettingTitle="DownloadFolder";. – Nadjib Mami Jul 3 at 14:47

In OSX you can find ViberPC folder here /Users/<Username>/Library/Application Support/ViberPC

The above didn't work for me (in version 6.5.5), so I temporarily fixed it by hacking the main viber binary, the sed below replaces ViberDownloads with .viberDownload:

sudo -i
cd /opt/viber
cp -a Viber Viber.original
hexdump -ve '1/1 "%.2X"' Viber.original | sed "s/5669626572446F776E6C6F616473/2E7669626572446F776E6C6F6164/g" | xxd -r -p > Viber
  • You could probably do sudo sed -i.original 's/ViberDownloads/.viberDownload/g' /opt/viber/Viber; the string exists as-is in the executable. – muru Oct 2 '17 at 3:09
  • Yes, the straight sed works too. Note to anyone attempting this: the replacement string must not be longer than the original. But it can be shorter, just pad with NULLs. – nightshift Oct 3 '17 at 14:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.