Repository navigation
NEMESIS 1.17.2. Includes everything from 1.17.1. See the README changelog.
This release fixes a critical issue #120 which could brick HUs during installation of 1.17.1.
1.17.1 release has been removed to protect from future incidents.
Compatibility
NEMESIS 1.17 and later replace a critical system component (the app_process binary) for LivePatch. Before installing, every route checks the unit and stops without changing anything if:
- HMG-API older than 1.1.0-rc.10 is installed — update or uninstall HMG-API first. From rc.10 on, HMG-API coexists with LivePatch.
- No HMG-API, and
app_processhas already been modified — restore it to factory state first.
On a unit with NEMESIS 1.17 or 1.17.1, install the update from the Manager (NEMESIS OTA) or from USB.
1.17.2
- Safer
app_processreplacement (#117, #120). LivePatch now writesapp_process.realall the way to storage before it puts its start-up script in front of it, so losing power right after an install can no longer leave the unit unable to start Android. The script is installed only over a stockapp_process,.realis always copied fresh from it, and nothing is changed when both files are already modified. - USB sticks with Android down. The head unit only mounts USB sticks when Android asks for it. Now, once Android has been down for about 20 seconds and its system service is not running, NEMESIS mounts the stick itself (FAT32, exFAT or NTFS). If the USB port was left in device mode, which turns off USB power, NEMESIS switches it back to host mode first. Only a stick with
NEMESIS.emergencyis acted on. See 06 - Run Scripts. - The install queue no longer hangs after a package's hook starts a background program (#123). That program kept the queue's lock open, so the next install waited forever until it was stopped.
- Hook order.
preinstallnow runs before LivePatch ports the package, so a package that refuses to install says so right away instead of after the port. Uninstall runspreuninstallbefore re-porting the other packages, and restarts the package's services if the re-port fails. An update whose new version fails no longer leaves the old version's patches mounted. - Block OTA updates now also turns off OTAClient's start-up receiver, connection and service, not only its periodic check. A block set by 1.17.1 or earlier is extended once Android is up.
- Fingerprint packs (descriptor version 1.3). A LivePatch dex patch can now ship without any of the stock app's code: a fingerprint of the stock app plus only the edited lines. Such a pack is about a quarter of the size and ports the same as the full pack. Build one with
tools/porter.sh pack --fp, or convert an existing pack withtools/porter.sh convert. A package that carries one must declareversion=1.3, so older NEMESIS refuses it. See 09 - LivePatch. - Safe mode docs. Inserting a USB stick does not turn LivePatch safe mode on by itself. To recover a unit, the emergency stick's script runs
nemesis livepatch safe on; see 09 - LivePatch.
1.17.1
- NEMESIS 1.17 and later refuse to install over HMG-API older than 1.1.0-rc.10, or, without HMG-API, over a modified
app_process. The installer, the troubleshooter and the core update show why in a popup and change nothing. On a unit that already has NEMESIS 1.17, the popup also warns not to uninstall that HMG-API before updating it, as that would render the HU inoperable. - Blacklist. Package Manager refuses package versions known to break this NEMESIS, with a popup naming the package and its version. 1.17.1 blocks HMG-API 1.1.0-rc.9 and older (
hmgapipackage-version 1.0.99.9 and lower).nemesis blacklistprints the list. - Package Store shows "Retrieving data…" with a spinner until the list has fully loaded, instead of the connection error. The connection error is now laid out on separate lines.
- LivePatch safe mode no longer turns on after a single Android restart.
nemesis remount rw --bypass-livepatchlets a script outside NEMESIS write folders LivePatch serves read-only, such as/system/libwith Enhanced Projection installed. The nextnemesis remount roor boot puts LivePatch's view back. Packages use[file.N], and tools that manage files hand them to LivePatch where they can, because safe mode and uninstall can't undo files written to/systemdirectly.- "LivePatch engine missing". The 1.17 USB update package didn't install the LivePatch engine, and neither did the 1.17 in-app update on a unit coming from 1.16.x (the older updater skips the engine files). LivePatch packages with a dex patch then failed to install. The 1.17.1 USB package installs the engine, and the 1.17.1 update installs it from any 1.16.x or 1.17.
- NEMESIS uninstall from USB puts Android's start-up file back again. When the
nemesisbinary was already gone, the 1.17 script left NEMESIS's start-up script in place, because the head unit'smvrejects-f. - Tools that manage files, such as HMG-API, can hand their results to LivePatch instead of writing
/system. A package withlivepatch-first=1puts its[file.N]outputs under every other package's patches, andnemesis livepatch stockgives the stock bytes under any output. - A
[file.N]refused because another package is on the same file now names that package. - Sources. A fresh clone builds and passes its host tests again.
projection.tbtis removed;enhanced.projectionreplaces it.
1.17
- LivePatch. Packages can change stock files and system properties without writing
/system. The patched copy lives on/dataand is mounted over the stock file at boot, and uninstall brings stock back at once. Several packages can patch the same file. Conflicts are refused at install, and a safe mode boots stock after repeated failed boots. See 09 - LivePatch. - Packages.
adb.tcp,wireless.projection,voicehandler.vr-gates,carplay.sessionandenhanced.projectionnow use LivePatch. Uninstall their 1.x release before installing the new one. - Install queue. Installs and uninstalls now run one at a time from a queue, so a USB stick can be removed as soon as its packages are queued. A job cut off by a power loss or restart can be continued or deleted. If a script was running when the job stopped, the Manager warns that the head unit may need checking. CLI:
nemesis queue add|uninstall|resume|delete|list. - Package Manager. A new screen with Available updates, In progress, Interrupted and Installed sections replaces the Updates screen. It shows live install progress and lists the packages on a connected USB drive. When the queue is done, it counts down a single restart for everything that needs one, LivePatch packages included.
- Descriptor version 1.2.
NEMESIS.datahas aversionkey. A package written for a newer NEMESIS is refused, even with the risk accepted, and the Store asks you to update NEMESIS.1.2addsfavicon, an icon shown in the Store and package lists. - Package zips. A zip may keep its files inside one wrapper folder, and the metadata file may be spelled in any case (for example
nemesis.data). Scripts from zips made on Windows or macOS are now executable. - CLI. New
nemesis prop,nemesis livepatch,nemesis rebootandnemesis selinux cmdline. - Installer. The error screen now says which step failed, and a failed step no longer leaves the installer stuck on "Please wait".