Hi people!
Here, we're going to post new versions of WhatsApp adapted for usage on GerdaOS and stock v13 firmware, since this WA topic is still popular in this forum. But also, we're going to post (and update) the guides of patching the stock version, so that anyone could do it themselves if needed.
Patching guide
So, for the current state of off-the-shelf app, patching process is as follows (you need a stock-flashed phone with WA installed (for 8110 - with v15 and above), a target phone and adb):
1. Gain the temporary root on the stock.
2. Create a directory and enter it, and then create another directory called application, for instance:
mkdir -p ~/wa-patch && cd ~/wa-patch && mkdir application3. Pull the contents of the WA application already installed on the rooted stock:
4. Unpack the contents and remove the archive itself:
cd application && unzip application.zip && rm application.zip
5. Remove META-INF directory (this is very important, otherwise signatures will not match): rm -rf META-INF
6. Find the line that looks like this in the page.js file (starts with if(!window.Intl)):
if(!window.Intl)throw f(856),new Error("os unsupported (Intl is missing)");
7. Replace this line with this:
if(!window.Intl)window.Intl=window.mozIntl;
Save the file.
7.1. (Optionally) remove the next statement after Intl-related (contains planned app expiration date) from the same page.js that looks like this:
if(Date.now()>=1569023999e3)throw f(414),new Error("expired app");
(in this case it's pointing to expire at September 21 2019)
Save the file.
8. If you want to, you may already deploy the patched version via old Firefox/PaleMoon/NewMoon WebIDE or XPCShell onto the target. If you wish to create the GerdaPkg/OmniSD-compatible package, proceed to the next step.
9. Staying within application directory, repack the application.zip:
zip -9r --exclude=*.git* --exclude=*.DS_Store* --exclude=README.md ../application.zip .
10. Go to the level above and create metadata.json:
cd .. && echo {\"version\": 1, \"manifestURL\": \"app://kaios.whatsapp.net/manifest.webapp\"} > metadata.json
11. Staying in the level above, pack the GerdaPkg package:
zip -9 whatsapp.gpkg.zip application.zip metadata.json
Now you can transfer, install and test the ready package (whatsapp.gpkg.zip) on the GerdaOS/v13 target. Don't forget to uninstall the previous version and reboot before installing the new one.
P.S. The steps are shown for Linux/Mac, for Windows you could use Cygwin/MSYS or WSL2 environment to use the same commands, or just replace them with their Win32 counterparts.
Ready version
And now, starting with ready-made patched versions (please verify on v13 or recent GerdaOS build before posting your own patched builds):
Have fun!