To this day, I've never used WhatsApp on my phone. On the topic of security and privacy, WhatsApp has a long and checkered history, worthy of a special page on Wikipedia. For instance, earlier this year the company found themselves in the news again when they gave their users an ultimatum: hand over your data to Facebook or stop using WhatsApp. That's the kind of demand that sends people running. Nevertheless, people around the world continue to use WhatsApp.
While other free software advocates have a strong desire to impose their values on other people, I do not. I try to flex once in a while. Recently, I joined a book club with members who use WhatsApp to communicate between meetings. In similar situations in the past, when I was part of a group that was looking to add a new communication tool, I strongly suggested we use Signal instead. But this book club was already using WhatsApp. While I was unwilling to install WhatsApp on my phone, I had sufficient determination to find a workaround. I came up with a solution that is far from perfect, but that works for me: install WhatsApp in a virtual phone on my laptop.
Installing WhatsApp in a virtual environment on my laptop feels safer than installing it on my phone. This method still requires proprietary software, but the software has access to significantly less personal information. Most of the time, the application is not running on my laptop, but I have the ability to check in once in a while. That's good enough for me.
Before I got it running in Anbox, I tried some other methods that I did not like. For instance, I thought Android Studio might provide a good emulator, but the user experience felt less than ideal. It took a long time to download and install everything, occupied many gigabytes of space, and required a Google account to login and access WhatsApp through the Play Store in the virtual device. The result was functional, and I got WhatsApp installed, but the biggest problem was the small screen size.
Installing Anbox on Debian and getting WhatsApp installed on Anbox was not straightforward. If you just install Anbox on Debian 10 (Buster) it won't just work. Here are the steps I followed to get this working:
- Add required kernel modules.
sudo modprobe ashmem_linux
sudo modprobe binder_linux
- Install Anbox
sudo apt install anbox`
- Download an Android image and make it available to Anbox
sudo cp android_amd64.img /var/lib/anbox/android.img
- Start the anbox-container-manager.service
sudo systemctl start anbox-container-manager.service
- Start the anbox-session-manager.service
systemctl --user start anbox-session-manager.service
- Install Android Debug Bridge
sudo apt install android-tools-adb -y
- Download the latest x86 release of WhatsApp from APKMirror. Be sure to select the
- Start Anbox. Search for the graphical application in your launcher.
- Start the ADB server
- Install the WhatsApp apk in Anbox
adb install com.whatsapp_*.apk
- Open WhatsApp in Anbox. You do not need to login with a Google account and it won't have access to your contacts. It will, however, require your phone number.
- How To Install Anbox and Run Android Apps In Linux