No Updates, Please: Preserving WINE Compatibility with DNS Sinkholing
About The Project
The reMarkable Paper Pro is a premium e-reading and note-taking device that allows you to read, take notes, and not much of anything else. It’s the perfect distraction-free device to dive into books and academic papers and has become my go-to note-taking device for graduate school.
One obstacle with the reMarkable ecosystem is that the desktop application does not support Linux. While you can use the web app for everything, the desktop application offers a better user experience. Fortunately, WINE compatibility with the desktop application enables seamless syncing of books and notes across Linux devices. Well, this was the case until an update broke that compatibility.
Upon reaching out to customer service to download an older version, I received the following response:
Hi Jared, Thank you for reaching out. I understand that you’ve been using Wine on your Linux laptop to run reMarkable.exe, and it seems that the latest update has caused issues with compatibility. Unfortunately, with the most recent update, the desktop app is no longer compatible with Linux, and there is no option to revert to an older version or access a previous release. At this time, we do not have an alternative solution for syncing via the desktop app on Linux. However, you can still use the reMarkable web app or the mobile app to sync your documents and interact with your reMarkable device. We sincerely apologize for the inconvenience, and we appreciate your understanding. If there’s anything else I can assist you with, please don’t hesitate to let me know.
10/10 customer support answer, and if they’re reading this, thank you for the prompt response!
This is also where the quest to restore compatibility began!
A Scavenger Hunt for an Older Version
When I’m looking for a file that used to exist on the big bad internet, I go to The Way Back Machine at archive.org. Searching “download.remarkable.com” led me to multiple hits where The Way Back Machine has previously crawled, but unfortunately it did not archive any of the actual executables.
It did, however, give me the original links to the reMarkable.exe files which were still active! Check and mate support e-mail!
With an older version obtained, I can now focus on preventing updates to ensure no breaking changes.
No Updates, Thanks!
With WINE applications, one can leverage LD_PRELOAD to load their own shared objects. At DEF CON in 2023, I gave a presentation on how defenders can use this feature with WINE to instrument malware execution, and obtain parameters from Win32 API functions such as registry keys. I initially considered leveraging my own shared objects to patch out network communication to an update API. To do this, I would first have to identify the update endpoint and also where in the binary this functionality lived. However, upon launching Wireshark and filtering on DNS traffic, the reMarkable.exe
executable, was communicating to two different sub-domains. One sub-domain for file syncing API endpoints and another for updates. This made it incredibly easy to simply modify /etc/hosts
to sinkhole only the update domains.
With all three update-related domains pointing to 127.0.0.1
in /etc/hosts
I now only get a brief popup saying update failed.
At this point, stability is regained and functionality restored on Arch Linux.
The Big API in The Sky & 3rd Party Applications
Let’s say the above methodology failed. What now? Googling around for alternative solutions to the desktop application led me across multiple (1, 2, 3) projects that enable end users to download, upload, and sync files to their reMarkable account without the use of the official application. reMarkable themselves have documentation for building custom application for the device, but not much about syncing APIs. Reviewing the 3rd party applications revealed that ultimately there are a handful of key API endpoints to hit and then you too can build your own application for syncing your files.
Conclusion
Most homelab enthusiasts are familiar with DNS sinkholing via Pi-hole. While pi-hole can help you limit ads, the same technique can be useful in the rare situation where you don’t want to update a particular application. Like your favorite e-reader desktop application! I’m a huge fan of the reMarkable suite of products and hope they offer main line Linux support in the future. Thanks for reading!