WhatsApp is unfortunately the messenger of choice with a lot of my friends and family, many of whom I would struggle to move over to telegram or signal, so not having WhatsApp is blocking me from even trying out my pinephone as a daily driver.
The KaiOS version is particularly attractive as it's designed for low-spec feature phones, which means if it runs at all on pinephone it should run very smooth.
I started trying to coax it into running on my laptop (PBP). So far:
- I've struggled to get an up-to-date copy of the app. I've failed to find a download from the official kaios store and also failed to get the KaiOS store to run in the official simulator.
- I've got an old copy from the jbjio store anyway.
- I've unzipped all the zips, and found that it's basically a website, as expected for an OS forked from Firefox OS. It's also minified and seems to be deliberately obfuscated as well, so reading the source is a little hard-going.
- I've loaded it up in a web browser, and patched out the obvious 'Expired app' version check so it'll at least try to load.
- Patched again to enable error logging to the browser console, which seems to be off by default.
- The app makes use of a few old Firefox OS APIs like `navigator.mozSettings`, so these would need to be re-implemented or polyfilled in some way. These seem to be documented, albeit archived, on the Mozilla Developer Network site.
- It also makes use of some undocumented (or at least not publicly documented) features, like fetching some built-in javascript libraries from the device, and a websocket server running on localhost to do some secret token stuff
```
...
"http://127.0.0.1:8081/api/v1/shared/core.js",
"http://127.0.0.1:8081/api/v1/shared/session.js",
"http://127.0.0.1:8081/api/v1/libsignal/service.js",
"http://127.0.0.1:8081/api/v1/tcpsocket/service.js",
...
t.open(
"websocket",
"localhost:8081",
"secrettoken",
{
onsessionconnected() {
...
```
If I make any more progress I'll write it up somewhere. I suspect that modifying their code in any way violates their ToS, so a solution which requires no modification to the official application code might be necessary. I've seen on other efforts like Yowsup that they don't take particularly kindly to modification or reverse engineering, and are not afraid of simply permanently banning your number, so caution is advised.
https://www.jbjiostore.com/2019/10/whats....html#more
https://www.androidcentral.com/heres-how...-app-kaios
https://sites.google.com/view/bananahack...-firmwares
https://developer.kaiostech.com/getting-.../simulator
https://github.com/tgalal/yowsup/issues/2829