PH-DOC / 05

Follow one collection through the tree.

The programs are Go. The module in this repository says go 1.27.4, and the README says no C compiler is needed for the host tools. The device itself is C on ESP-IDF. Select a package, or walk the path a collection takes.

Walk 1 / 7

cmd/collect

Live collector

The program behind START-HERE and the pen-drive Collect.exe. It installs nothing and analyses nothing. It finds a device if one is attached, checks the licence, copies evidence, and seals. Flags include -root for a removed disk, -android, and -nodeep.

Open cmd/collect on GitHub

Evidence files

Files inside a collection
FileRole
system.jsonPC identity: name, maker, model, serial, disks, MACs, OS, accounts, encryption, Secure Boot, TPM, time zone.
live/Clipboard, processes, connections, DNS cache, software, tasks, USB history. Empty of those things in boot mode, because they are not on disk.
artifacts/Copied wallet, browser and user files, with original paths.
manifest.csvEvery copied file and its SHA-256. The analyzer reads this back and reports any change.
SEAL.sha256Seals the manifest and the case file.
DEVICE-SEAL.jsonPresent when a device signed the seal: ECDSA P-256 signature, counter, device ID.
case.jsonHolds the licence ID, licensee, expiry, and the device ID or pen-drive serial, which the reports also print.

Who checks the licence

CheckCollectorBoot systemAnalyzer
Signature matches the built-in public keyyesyesyes
Today is between issue and expiry, and the clock is not before the issue dateyesyesyes
A listed device answers the challengeyesyes—
Collection signed by a listed device——on import
Production key (efuse), unless allow_dev_keysyesyesyes
Pen-drive serial is listedyes——

Existing collections always open, even after a licence expires. Importing new ones needs a valid licence on a release build. Source builds without ENFORCE_LICENSE=1 do not check.

Boot chain files

boot/fetch-ubuntu.sh verifies each download: InRelease with gpgv against the Ubuntu archive keyring, Packages.gz against InRelease, every .deb against Packages. Nothing from those packages is modified. The exact versions ship as PocketHunter-Boot-Components-<version>.txt. The initrd holds static phboot and about 30 signed kernel modules, decompressed, because the signature covers the uncompressed file.

Versions and tests

Versions follow SemVer 2.0.0 and are computed from Conventional Commits by scripts/next-version.sh. A push to main publishes a beta pre-release after format check, vet, unit tests, end-to-end tests, a Secure Boot virtual-PC boot, and the firmware build plus its host tests. The collector's source default for collect.Version is 0.4.0-dev; release builds inject the real version. The firmware tree reports 1.0.0.

Third-party components

The program itself is AGPL-3.0-or-later, copyright © 2026 Kritarth Agrawal. If you modify it and distribute it, or offer it over a network, the same licence requires the modified source.