From a1d1b7cfad363ce6f0559e1a5033285cda8ecbd0 Mon Sep 17 00:00:00 2001 From: NJL <23+njl@noreply.git.churchofmalware.org> Date: Sun, 12 Jul 2026 19:22:32 +0000 Subject: [PATCH] Update README.md --- README.md | 125 +++++++++++------------------------------------------- 1 file changed, 25 insertions(+), 100 deletions(-) diff --git a/README.md b/README.md index aec1a9a..f02ab5b 100644 --- a/README.md +++ b/README.md @@ -1,107 +1,32 @@ -======================================================== - THE 974-BYTE ANDROID APP — how I got this small -======================================================== +THE 974-BYTE ANDROID APP -I built a real, working Android app that is only 974 bytes. -For comparison, a single short text message is bigger than this -whole app. It installs from a tap, shows a window on the screen, -and runs on a normal, up-to-date phone. +I built a real Android app that is only 974 bytes. A single text +message is bigger than this whole app. It installs, opens, and +shows a window on a real phone. -It is built for ANDROID 14 (also called "API level 34"), which -is the current, fully modern version of Android. It is not aimed -at some ancient phone to cheat the size down — it is set to -Android 14 at BOTH ends: the oldest phone it allows AND the -version it is built against are both Android 14. I tested it on -a real Android 14 phone: it installed and opened with a window -on screen. So this is a genuine, present-day 974-byte app, not a -technicality that only works on outdated devices. +I did it by writing the app by hand, byte by byte. Normal tools +pad an app with tons of extra stuff. I placed every byte myself +and kept only what the phone truly needs. -The trick? I wrote the app by hand, byte by byte. Instead of -using the usual tools that pad an app with lots of extra stuff, -I placed every single byte myself and kept only what the phone -absolutely refuses to live without. +To get this small, I stripped it to four bare pieces: a short +note telling the phone the app's name, no code at all (I let the +app borrow a window the phone already has built in), the smallest +possible security seal the phone will still trust, and a wrapper +with every unnecessary field removed. +I tested every single cut on a real phone. If it complained, I +put the byte back. If it stayed happy, the byte was gone. I did +this hundreds of times until nothing else could come out. -HOW I SHRANK IT (in plain terms) --------------------------------- -Think of the app as a tiny box with four things inside: +The final clever move: I gave the app a name that lets it borrow +the phone's own built-in window with a tiny shorthand, instead of +spelling out a long one. - 1. THE INSTRUCTIONS — a note telling the phone what the app - is called and that it should show up on the home screen. - I trimmed this note down to the bare minimum wording. +It's built for Android 14, because that's the version my phone +runs. If you aim at an older version of Android, the rules are +looser and the app can get even smaller. Aim at a newer one and +it gets a little bigger. I chose 14 because it's what I could +actually test and prove works. - 2. THE CONTENTS — normally an app carries its own code. - Mine carries none. I told the phone "borrow a window you - already have built in," so the app needs no code at all. - That removed a big chunk in one stroke. - - 3. THE SEAL — every modern app must be sealed with a - tamper-proof signature so the phone trusts it. This seal is - mostly unavoidable math, but I used the smallest seal the - phone will still accept and stripped every optional scrap - of paperwork around it. - - 4. THE WRAPPER — the "envelope" that holds it all - together. I removed every field the phone doesn't actually - read, and kept only the ones it checks. - -I tested every single cut on a real phone. If the phone -complained, I put the byte back. If it stayed happy, the byte -was gone for good. I did this hundreds of times until nothing -else could come out without the phone rejecting the app. - - -THE CLEVER FINAL TRICK ----------------------- -The app needs to point at a "window" to display. Normally you'd -write out a long name for that window. Instead, I gave my app a -name that lets it borrow the phone's OWN built-in window using a -tiny shorthand — like signing a letter "-J." instead of your -full name because the reader already knows who you are. - - -CAN IT GO EVEN SMALLER? ------------------------ -Yes — but with a trade-off. - -This 974-byte app is locked to Android 14 (API 34). That choice -COSTS bytes, on purpose, so the result is honestly modern. - -A big part of what's left is the SEAL, and a big part of the -seal's size comes from a rule on today's phones: it must use a -fairly strong lock. Older versions of Android allowed a smaller, -weaker lock. If you aim the app at an OLDER Android version, the -phone accepts that smaller seal — and the app gets smaller. - -The same goes for a few of the phone's safety rules I had to -satisfy. Newer Android is stricter (more required bytes); older -Android is more relaxed (fewer required bytes). A few concrete -examples of where the version line changes things: - - - Android 12 (API 31) and up FORCES an extra "can other apps - open this?" setting to be spelled out. Below that, it's - optional — so aiming lower drops it and saves bytes. - - - Older Android accepts a weaker signing lock, which is - physically smaller than the one Android 14 demands. - -So: - - Want it EVEN smaller? -> Aim at an older Android (e.g. - API 30 or below) and drop the - stricter, bigger requirements. - - Want it fully modern? -> Aim at Android 14 (API 34) and - pay a few more bytes, like mine. - -I chose to keep it fully modern — Android 14, today's phones, -today's security — and it still fits in 974 bytes. - - -THE BOTTOM LINE ---------------- -I hand-placed 974 bytes. Every one of them is either something -the phone genuinely requires, or squeezed down as far as it can -go. It installs, it opens, it shows on screen — a complete app, -smaller than the words on this page. -======================================================== +974 bytes. It installs, it opens, it shows on screen. A complete +app, smaller than the words on this page.