This guide will live with the documentation at https://matrix.org/docs/guides/whatsapp-bridging-mautrix-whatsapp, but you can find the text below.
an open standard for interoperable, decentralised, real-time communication.In this article we'll benefit from all three of these attributes:
... and re-running the setup:
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all
Either way, you will soon have a functioning Matrix Synapse homeserver and mautrix-whatsapp installed with it. Next, we will set up an Android VM.
Once installed, run AVD manager by choosing
Tools -> AVD Manager from the menu.
Follow the steps to create a new virtual machine, in this example I have a Nexus 5X running Android 9, but almost any configuration is fine here. Make sure that you give the device access to the Play Store.
You will be asked to verify your phone number, use your number on another device to complete this step.
Per the instructions at mautrix-whatsapp/wiki, you must start a new chat with @whatsappbot:<yourdomain>. Type
login to begin the authentication process.
mautrix-whatsapp operates by using the WhatsApp Web feature of WhatsApp - which means it uses a QR code that you must now scan on the device running WhatsApp - which in your case is the AVD. In order to scan the presented QR code, set your AVD camera to passthrough the camera device on your host machine - see the images below.
Once this is complete, you can type
sync, to start bridging contacts, and
sync --create to automatically create room invites.
And that's it! You may need to take a little time to watch the sync happen, particularly if you have a very large number of chats on the WhatsApp side, but there is no further configuration needed.