Smartphone users are often faced with the need to save important correspondence or restore chat history after resetting their settings. However, standard cloud backups are not always convenient, especially when you need to pull out a specific file or transfer data to another device manually. To do this, you need to understand the physical structure of data storage within the operating system. Unlike cloud services, local messenger files are located in protected system directories, access to which is limited without special rights.
By default Viber database hidden in system folders that are not visible to a regular file manager without granting special permissions. Starting with Android 11, Google's security policy has become more stringent, and access to the directory Android/data has become much more difficult. This is designed to protect personal information from malware, but makes life more difficult for those who want to manage their archives themselves. Understanding exactly where these files are located is critical for advanced users.
In this article we will look in detail at the path to the files, how to retrieve them, and the nuances of working with encrypted databases. You will learn how to find a file viber.db or its encrypted equivalent, and what to do if standard access methods are blocked by the system. We will also look at the differences in folder structure on different versions of the operating system.
Folder structure and physical path to data
The main storage of all application files, including media and text history, is located in the internal memory of the device. The traditional path, which was used in older versions of Android, looked like /Viber at the root of the internal memory. Folders with pictures and videos were stored there. However, the database itself with the text was always deeper. On modern devices, the structure has changed and now follows the rules of Scoped Storage.
The current path to the technical application folder is as follows: /storage/emulated/0/Android/data/com.viber.voip/files/. It is within this directory that there are subfolders responsible for caching and storing databases. Inside you will find a folder viber_data, which is key to accessing the history. It is important to note that on some firmware, for example from Xiaomi or Samsung, the path may have slight differences in prefixes, but the final folder com.viber.voip remains unchanged.
Access to this zone now requires the use of special file managers, such as Files by Google or third-party solutions like Total Commander s plugins for accessing system folders. Standard Explorer often simply does not display the contents of the directory Android/data, showing it empty. This is not an error, but a deliberate protection of the system.
โ ๏ธ Attention: Directly deleting files from a folder
Android/datacan lead to complete inoperability of the Viber application and loss of the entire correspondence history without the possibility of recovery. Proceed with extreme caution.
Database file types and their encryption
Inside the data directory you will find several files with the extension .db. The main file containing text messages is usually called viber.db. However, in modern versions of the messenger, this file is often replaced with an encrypted version or has a name like viber_enc.db. This is done so that even if an attacker obtains root access, he cannot simply read the correspondence.
In addition to the main database file, the folder contains auxiliary files necessary for the operation of the SQLite DBMS. These are transaction log files that have extensions -wal and -shm. They may contain data that has not yet been finally written to the main database file. When copying a backup, it is extremely important to take all three files at the same time, otherwise the database may become corrupted.
Database encryption is tied to the device's unique ID and keys stored in a secure area of โโthe Android Keystore. Simply copying the file viber.db to another phone and opening it through a database viewer will not work - you will only see a set of unreadable characters. Decryption requires either the Viber application itself on the same device, or complex brute force key procedures, which is not available to the average user.
How to find the database version?
Open the database file using any HEX editor on your computer. At the very beginning of the file (the first bytes) there is often an SQLite header, which can indicate the version of the database format. However, useful information about the version of Viber itself is stored in the preferences file, and not in the message database itself.
Below is a table describing the main files that can be found in the messenger data folder:
| File name | Extension | Description content | Importance |
|---|---|---|---|
| viber.db | .db | Main database of text messages (on older versions) | Critical |
| viber_enc.db | .db | Encrypted message database | Critical |
| account.db | .db | Information about your account and profile settings | High |
| call_log.db | .db | History of incoming and outgoing calls via Viber | Medium |
Access to files on Android 11, 12 and later
Starting with the eleventh version of the operating system, Google has implemented strict restrictions on access to shared folders. Now, even when you connect your smartphone to your computer via USB in file transfer mode, the folder Android/data will appear empty. This causes confusion among many users who are accustomed to freely copying files.
To bypass this limitation without obtaining root access, you can use the built-in file settings manager. To do this, you need to go to Settings โ Applications โ Viber โ Storage. Although you can't directly copy a file from here, some file managers allow you to navigate to the system folder through a special menu. For example, in the application Files from Google you need to click on three dots in the menu and select the option "Show system files", after which access to Android/data can be opened.
Alternative and a more reliable way is to use the utility adb (Android Debug Bridge) on your computer. This method requires you to enable USB debugging in the developer menu. Using the command adb pull you can copy the entire data folder to your computer, bypassing the restrictions of the smartphone interface. This is the most professional approach to backup.
If you do not have a computer at hand, try installing the "Material Files" application from the Play Market. It has a built-in mechanism for requesting special permissions to access the Android/data folder, which works more stable than standard explorers.
Backup and history transfer
The most reliable way to save messages is to use Viber's built-in backup function to the Google Drive cloud. This eliminates the need to dig into the file system. However, if you want to make a local copy "just in case", manually copying the database files is the only option. The process requires care and adherence to the sequence of actions.
To create a manual backup copy, follow these steps:
- ๐ Open a file manager with access rights to system folders.
- ๐ Follow the path
/Android/data/com.viber.voip/files/viber_data. - ๐ Copy the files
viber.db(orviber_enc.db), as well as accompanying files-waland-shm. - ๐ Keep them safe a place, for example, on a memory card or in a cloud storage other than Google Drive.
When restoring data on a new device or after reinstalling the application, the files must be returned to the same directories. It is important that the version of the Viber application on the device from which the copy was made and on the recovery device match or be as close as possible. Otherwise, the database structure may not be suitable, and the application will throw an error when launched.
โ๏ธ Preparing for manual backup
โ ๏ธ Attention: Restoring a manual copy of a database over an existing one may lead to a version conflict. It is recommended that you first completely delete the Viber application, clear its cache in the Android settings, and only then insert the backup files before the first launch.
Search for media files: photos and videos
Unlike a text database, media files (photos, videos, voice messages) are stored in a more accessible place. Previously, they were located in the root of the internal memory in the folder Viber. Nowadays, the bulk of media is stored on the path /Android/media/com.viber.voip/ or inside a shared folder Pictures/Viber i DCIM/Viber.
Voice messages often have a specific extension or are stored encrypted inside the application cache, which makes it difficult for third-party players to listen to them. Videos and photos, as a rule, are saved in standard formats .jpg, .png and .mp4, which allows you to open them on any device. If you don't see the files in the gallery, check the presence of the file .nomedia in the folder with images - deleting it will force the system to re-index the media.
To free up space on your smartphone, it is the folders with media files that are the priority for cleaning. A text database takes up only a few megabytes, while an archive with photos and videos can grow to several gigabytes. Regularly cleaning the folder Downloads/Viber helps maintain device performance.
Viber media files are duplicated in the general Android gallery, while the text message database is isolated in a protected system directory and is not visible in the gallery.
Access problems and error resolution
A common problem is the message "File not found" or lack of read permissions when trying to open a folder com.viber.voip. This is due to the fact that different smartphone manufacturers (Samsung, Xiaomi, Realme) use their own add-ons for Android, which can additionally hide system partitions. In such cases, standard methods may not work.
If you are using a Xiaomi smartphone with MIUI or HyperOS, you may need to grant the file manager app the special permission โAccess all filesโ in the privacy settings. Without this checkbox, even advanced explorers will see an empty folder. On Samsung smartphones, you may need to enable developer mode to access via ADB.
In some cases, database files may be damaged due to incorrect shutdown of the smartphone or flash memory failure. If you see a database error message when you launch Viber, try renaming the file viber.db to viber.db.bak. When launched, the application will detect the absence of a database and try to create a new one or request recovery from a cloud copy of Google Drive.
โ ๏ธ Attention: Settings interfaces and file paths may vary slightly depending on the firmware version of your smartphone. If the specified path is not suitable, use the file search inside the manager by entering the name
viber.db.
Frequently asked questions (FAQ)
Can I read the viber.db file on a computer without a phone?
No, the file is encrypted with a unique key tied to a specific device. Without the decryption keys, which are stored in the Android system partition, you will only see a meaningless set of data. To read, you need to use the application itself on your smartphone.
Where are stickers and GIF animations from Viber stored?
Stickers and animations are usually cached in a folder cache inside the application directory (/Android/data/com.viber.voip/cache). They often have non-standard extensions or are stored as sets of images in subfolders with hash names.
Deleting the Viber folder will delete my messages?
Yes, deleting a folder viber_data or database file will result in a complete loss of chat history if you do not have an up-to-date backup copy in Google Drive. The next time you start the messenger, it will be empty.
How to transfer Viber to a new phone while preserving the history?
The easiest way is to use the built-in โData Transferโ function in the Viber settings (Viber โ More โ Settings โ Account โ Data Transfer). Manually copying database files to a new phone often does not work due to differences in hardware encryption keys.