Repository navigation
HMG-API is separating from NEMESIS #444
Pinned
VysseCodes
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
A note from the HMG-API maintainers.
HMG-API is going to become a standalone mod manager, and having both HMG-API and NEMESIS installed will soon no longer be supported. This post explains why, what happened with NEMESIS 1.17 this week, and what comes next.
This week, units running HMG-API and NEMESIS 1.17 together stopped starting Android in certain scenarios. We know of at least 2 real head units in cars that are dead, and one that is being replaced by the dealer. To those owners: we're sorry.
Why we're separating
HMG-API and NEMESIS have different views on who should own the files that start a head unit, how changes to them should reach people's cars, and how system modification as a whole should be handled. We think those files should belong to one tool, change rarely, and only change after a preview, a heads-up to the projects that depend on them, and testing on cars. NEMESIS 1.17 took a different path. Two tools can't both own the same start-up files safely, and this week showed what happens when they try. That difference, not this week's bugs, is why we're going our own way. Our goal stays the same: a community-driven way for owners to take control of what their HMG head units can do.
What happened
HMG-API has wrapped
/system/bin/app_process, the program that starts Android, since its inception. Before 1.17, NEMESIS never touched that file. LivePatch, the tool introduced in 1.17, had been mentioned, but not that it would replaceapp_processor how. NEMESIS 1.17 replaces app_process with its own script on every boot, and it was released without a heads-up to us and without a chance for us to test its interaction with HMG-API, one of the most widely used packages on NEMESIS.Every HMG-API release before 1.17 came out before NEMESIS's LivePatch and app_process wrapper existed, so their uninstall scripts weren't designed to handle their presence. On a unit running 1.17, uninstalling HMG-API could then leave app_process broken, and Android unable to start. One of our maintainers, zpoon, found the risk by reading NEMESIS 1.17's source code soon after it was released. Within three hours of the release they had a fix merged (#396) and a warning posted for owners (#397). That quick work likely kept more units from being bricked.
From then on we were in triage, shipping fixes within hours for a change we hadn't seen coming, and not every fix was perfect. Older releases let owners force past our check for an unknown
app_process, which on 1.17 would then save NEMESIS's script as our stock copy. rc.9 didn't account for those forced installs, and so updating would write over the last stock copy on the unit. rc.10 fixed this the next day, and the owner-facing force is gone.Where we see things differently
1. Compatibility should be checked before a release, not after.
app_processis the one file where a mistake means Android doesn't start, and on these units an owner often can't recover that without a dealer. A change to it needs a preview build and a heads-up to the packages that touch it, so they can test and adapt before owners get it. We appreciate how fast 1.17.1 came, but fast fixes after the fact don't help an owner whose head unit already won't start.2. More than one person should check each change.
NEMESIS provides root on these units, runs the package store, decides what gets installed, and now sits in front of Android's start-up. We believe an app with that much control over the system should have outside review before a change ships. That isn't a knock on anyone's skill. It's about how much one person can safely carry, and whether owners can see and check what changes on their car.
3. Our rule on manufacturer code.
Projects draw this line in different places. Some NEMESIS packages include the manufacturer's own app code: stock APKs and libraries, and LivePatch packs built from the stock apps' decompiled code. HMG-API's rule is that we publish no manufacturer apps or libraries, only checksums, small binary patches made against the owner's own files, and our own code. That keeps the project on safer legal ground, and it means a change is checked against the exact build on your car rather than ported across builds. In our own audit we also found something to fix on our side: part of one of our older patch sets came from NEMESIS's patched library, so we're rewriting it from our own source and adding the attribution in the meantime.
What we've already done
app_process, and checks every backup byte for byte before writing anything.FORCE. An unrecognised build is refused with nothing changed, and the message asks for an issue so we can check that build.What we're doing
These changes are coming in upcoming releases, and we're still working on them, especially making HMG-API fully standalone and the structural changes that go with it. Look out for further announcements as each one is ready.
app_process,install-recovery.shand the other start-up files can't be changed by mods or other tools. Mods ask the core for what they need, and the core makes the change, checks it, and can undo it.We've reported the specific issues to the NEMESIS developer directly and will keep doing so. NEMESIS got a lot of people started, and that work deserves credit. Our disagreement is about process, not people: changes to the parts of a car that decide whether it starts deserve a preview, testing, and more than one person checking them.
— The HMG-API maintainers
All reactions