During the development reverse engineering process, unfortunately, it’s impossible to simply point to specific .smali
files to all WhatsApp versions, because they are volatile, so, here is the list of S;Z patches with their respective files/regex to find the correct files to patch.
First of all, you should decompile the base APK (use dev_builder.sh
to automate this process) and set base_dir
variable with generated directory’s name (it’s sandbox
by default)
./dev_builder.sh d
base_dir="sandbox"
After that, now you can study and test each Steins;Zapp patch by comparing the original files (inside sandbox/
directory) with the patched one (inside patches/
directory).
Read the following topics and subtopics to understand what behavior witch patch produces.
You might be thinking: “what this section is about?”. Well, here in Brazil, there are a weird specie called Trava zappers, so, those patches are designed to imunize WhatsApp against “”“attacks”“” from those guys.
Trava zapper, or WhatsApp “hanger” (in english), is a dumb annoying kid (or +40 years old adult) without any good to do, that likes to prank people with bloated messages called Travas de WhatsApp, or simply Travas, that can hang WhatsApp app (and thinks this is hacking and that he is a hacker).
This way, there are lots of WhatsApp hang species. Check them all below with their respective immunity patches. Tip: start with Text hang before any other.
Fun fact: Zap is a phoneme quickly pronounced by Brazilians to refer to WhatsApp. It’s origin is something like WhatsApp -> AtsApp -> TsAp -> Sap (pronounced as Zap). That’s why Trava zapper, is written this way (and if you think that is the reason for “Zapp” in Steins;Zapp name, you are right lol).
Text hangs are messages with a lot of numbers, symbols, emojis, Unicode, emphasis characters and invisible characters. This type of hang is the most common and it’s the base for almost all species of hangs, so it’s recommended to patch it before any other hang.
There are 3 text hang flavors:
If you don’t apply all text hang patches, do, at least, the “Read more” size, because it will significantly reduces lag in almost all hang types. The second most important immunity patch is the Generic text hang, because it’s, by far, the most common hang out there.
That isn’t exactly a hang to be patched, but, as was said above, before get into any specific text hang, you should apply this patch to get much better results.
Reduces when the “Read more” will appear in the messages, from 768 to 36 characters, making them shorter and much less laggy.
for a in $(grep -r -i "conversationrow" ./${base_dir} | cut -d ":" -f 1); do if [[ -n $(grep -i "0x300" $a) ]]; then echo $a; fi; done
The most common and generic hang that you can find, made with a lot of numbers, symbols, emojis, Unicode, emphasis characters and invisible characters to dedicate the entire WhatsApp reserved memory just to render those messages, causing the hang effect.
Stops rendering emphasized texts and highlights at numbers, mentions and links.
for a in $(grep -r -i "monospace" ./${base_dir} | cut -d ":" -f 1); do if [[ -n $(grep -i "0x7db" $a) ]]; then echo $a; fi; done
grep -r -i "7f0a0ad2" ./${base_dir} # regex is the "monospace" public id
grep -r -i "u200a\\\\\\\\u205f" ./${base_dir}
egrep -r -i '"seconds"|" milliseconds"|" nanoseconds "' ./${base_dir}
grep -r -i '"((?:\\\\' ./${base_dir}
grep -r -i "s\*=" ./${base_dir}
A message with a huge amount of invisible characters (usually) that slows message receiving (and sending) processment.
Skips the entire instruction-set of two methods responsible for reading and expanding a large message data at its receive (and send).
grep -r -i "insert into messages(" ./${base_dir}
grep -r -i "(@\\\\\\\\" ./${base_dir}
It’s like a fusion between generic text hangs and delay hangs. The messages usually contais just a dot and lots of invisible characters that, although now a days it’s considered a “deprecated hang”, it still can lag the app (usually on iOS devices) and delay message sending.
Skips the condicional verification to receive (or send) messages to a user even if WhatsApp doesn’t has its respective JID.
grep -r -i "sender receipts" ./${base_dir}
Basically a bloated vCard, filled with lots of symbols, emojis and Unicode characters (can be also filled with pre-existing text hangs) that cause the same text hang effect, but more laggy.
Skips the vCard information parsing and rendering instruction-set (except the contacts amount). Note: vCard information still can be read on WhatsApp Web.
grep -r -i "END:VCARD)" ./${base_dir}
grep -r -i "LX/1qM;->A01(Ljava/lang/String;LX/1qN;)V" ./${base_dir} # ".class public" of last regex search + "->" + ".method public" of virtual methods
Images, videos and even GIF’s that has extremely high resolutions to consume too much processing at preview thumbnail reading and generation (and, sometimes, they have a text hang on message description and/or media file name).
Returns a “null” value before the process of reading and generating medias thumbnail, resulting in presenting a default WhatsApp thumbnail.
grep -r -i "image-thumb" ./${base_dir}
WhatsApp can generate a preview thumbnail for certain file types (like PDF’s), so, using the same media hang principle, those files has extremely high resolution content to use lots of processing when it try to read and generate preview thumbnails.
Reduces files preview thumbnail area on length.
./${base_dir}/res/layout/conversation_row_document_left.xml
./${base_dir}/res/layout/conversation_row_document_right.xml
It’s a random location sharing, but with the place information, like name and street, filled with symbols, emojis, Unicode characters and, sometimes, text hangs, acting like contact hangs, but even more powerful, because of bloated place information and map rendering.
Reduces place information area size to zero on height and width.
./${base_dir}/res/layout/conversation_row_location_left_large.xml
./${base_dir}/res/layout/conversation_row_location_right_large.xml
./${base_dir}/res/layout/conversation_row_location_popup.xml
./${base_dir}/res/values/dimens.xml
This one uses the same location hang principle, but the bloated texts are filling catalog product information, instead place information, causing similar effects to the media hangs.
Skips the catalog product information return.
for a in $(grep -r -i "viewmessage/ from_me:" ./${base_dir} | cut -d ":" -f 1); do if [[ -n $(grep -i "textemojilabel;->" $a) ]]; then if [[ -n $(grep -i "charsequence;Ljava" $a) ]]; then echo $a; fi; fi; done
Also known as webpage preview hang or simply webpage hang, this one is a message with a link that can be previewed and, in its displayed preview, title, description and/or URL contains symbols, emojis and Unicode characters that causes similar effects to text hangs.
Reduces place location information area size to zero on length.
./${base_dir}/res/layout/web_page_preview_image_and_content.xml
By far, this was the most powerful one: it’s a random text message, but with 44
in its media_wa_type
ID, that is, this message will be interpreted as a orders cart, but without any order or data, crashing the app instantly, just by opening a chat with it. By the way, seems that WhatsApp devs identified this serious issue and fixed it, so you don’t need to (and shouldn’t) patch this hang anymore and, if you try, app crashes will back (I know, because I’ve tested xd).
Skips the entire instruction-set of orders cart information parsing.
After the official fix of this hang, the post-patch behavior basically turned itself into the original cart hang crash effect, so, again, don’t do it lol.
grep -r -i ", 0x7f120bc1" ./${base_dir} # regex is the "message_order_cta_business" public id
All S;Z features (besides its immunities) are here, from functionalities to themes. Note: WhatsApp Go (S;Z base) has a lot of built in features (e.g. pin up to 35 chats and forward messages up to 180 chats) that can be enabled in its menus.
If WhatsApp doesn’t get updated regularly, the installed version will stop working after some time (months), asking for the update.
Extends the current installed WhatsApp version util life.
grep -r -i "number format not valid" ./${base_dir}
When you send messages quickly, there is a queue that acts analyzing send jobs to send just one message at time.
Skips jobs queue, sending messages instantly, without any delay.
grep -r -i ', "ReadyJobsProducer"' ./${base_dir}
By default, when you forward messages in to the same chat, they are desselect after being sent.
Skips the deselecting message instruction.
grep -r -i "conversation/forward/failed" ./${base_dir}
At the voice notes bottom, there is its duration, measured in seconds, minutes and, even, hours.
Reduces the time measure units reference values to 1, causing a voice note duration spoof.
grep -r -i "voicenote/stopvoicenote duration" ./${base_dir}
This is the last, but most obvious feature: the S;Z custom theme.
It’s divided in two parts:
- Strings, responsible for changing most app words and texts, and
- Colors, responsible for change the S;Z color schemes (check out
visual_identity/color_schemes.org
to meet colors used)
Below is the keyword list to be replaced. Strings files are ./${base_dir}/res/values/strings.xml
and ./${base_dir}/res/values-v1/strings.xml
.
default_about_text
status_default_at_gym
Welcome to WhatsApp
WhatsApp
app_name
launcher_app_name
Message
message
"message"
settingDisabled_system
Steins;Zapp Business
Facebook
Instagram
Steins;Zapp Messenger
Messenger
Steins;Zapp Inc.
Steins;Zapp Support
Steins;Zapp secures
From Meta
Meta
Google
are private
are end
No one outside of this chat, not even Steins;Zapp can read
Steins;Zapp and third parties can't read
Steins;Zapp cannot
third parties can't
can't be seen by businesses or Steins;Zapp
Read our
read our
Steins;Zapp's terms
Below is the color code list to be replaced. Colors files are ./${base_dir}/res/values/colors.xml
and ./${base_dir}/res/values-night/colors.xml
.
027eb5
009de2
25d366
008069
splash
125c4e
00a884
111b21
202c33
splash
8696a0
182229
setting_icon