New versions of WhatsApp on recent versions of Android stores backup files in:
<INTERNAL_STORAGE>/Android/media/com.whatsapp/WhatsApp/Databases/msgstore.db.crypt15
The problem is that the folder /Android/media/com.whatsapp must be created by WhatsApp otherwise WhatsApp can access this folder.
So to restore WhatsApp local backup follow these steps on the new device:
- If WhatsApp is connected to Google Drive, disconnect WhatsApp from Google Drive (in Drive settings, using a PC browser)
- Install WhatsApp (reinstall if already installed)
- Open WhatsApp (now the folder <INTERNAL_STORAGE>/Android/media/com.whatsapp/WhatsApp is available and created by WhatsApp as we need)
- Wait before doing anything in WhatsApp, exit from WhatsApp open a file explorer (FX File Explorer) and create the folder Databases inside <INTERNAL_STORAGE>/Android/media/com.whatsapp/WhatsApp than copy the backup file msgstore.db.crypt15 in <INTERNAL_STORAGE>/Android/media/com.whatsapp/WhatsApp/Databases
- Go back to WhatsApp and complete the configuration, it will find the local backup