Update README.md

This commit is contained in:
NJL
2026-07-12 19:22:32 +00:00
parent a8e43136e8
commit a1d1b7cfad
+25 -100
View File
@@ -1,107 +1,32 @@
======================================================== THE 974-BYTE ANDROID APP
THE 974-BYTE ANDROID APP — how I got this small
========================================================
I built a real, working Android app that is only 974 bytes. I built a real Android app that is only 974 bytes. A single text
For comparison, a single short text message is bigger than this message is bigger than this whole app. It installs, opens, and
whole app. It installs from a tap, shows a window on the screen, shows a window on a real phone.
and runs on a normal, up-to-date phone.
It is built for ANDROID 14 (also called "API level 34"), which I did it by writing the app by hand, byte by byte. Normal tools
is the current, fully modern version of Android. It is not aimed pad an app with tons of extra stuff. I placed every byte myself
at some ancient phone to cheat the size down — it is set to and kept only what the phone truly needs.
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.
The trick? I wrote the app by hand, byte by byte. Instead of To get this small, I stripped it to four bare pieces: a short
using the usual tools that pad an app with lots of extra stuff, note telling the phone the app's name, no code at all (I let the
I placed every single byte myself and kept only what the phone app borrow a window the phone already has built in), the smallest
absolutely refuses to live without. 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) 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
Think of the app as a tiny box with four things inside: spelling out a long one.
1. THE INSTRUCTIONS — a note telling the phone what the app It's built for Android 14, because that's the version my phone
is called and that it should show up on the home screen. runs. If you aim at an older version of Android, the rules are
I trimmed this note down to the bare minimum wording. 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. 974 bytes. It installs, it opens, it shows on screen. A complete
Mine carries none. I told the phone "borrow a window you app, smaller than the words on this page.
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.
========================================================