Add README.md

This commit is contained in:
NJL
2026-07-12 19:08:39 +00:00
parent 5aca5d2316
commit a8e43136e8
+107
View File
@@ -0,0 +1,107 @@
========================================================
THE 974-BYTE ANDROID APP — how I got this small
========================================================
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.
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.
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.
HOW I SHRANK IT (in plain terms)
--------------------------------
Think of the app as a tiny box with four things inside:
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.
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.
========================================================