Rename package and APKs to NilsMG4, credit Fatih, add SPECS.md

- applicationId com.evsuite.abrp -> com.stinnesbeck.nilsmg4 (the car
  build is .unstable); the Java namespace is unchanged. Installs next to
  upstream's app rather than over it.
- APK names NilsMG4-*.apk, debug builds included; build-car follows.
- OTA install-result action, cache/download names, User-Agent and log
  tags follow the new name.
- About credits fatihdonmezdev / FatihsMG4.
- SPECS.md journals what changed and what is still to do, starting
  with pointing the About link and QR code at git.stinnesbeck.com/nils/mg4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 13:08:09 +02:00
co-authored by Claude Opus 5.5
parent 3da3fa9f49
commit a707b590f7
11 changed files with 90 additions and 32 deletions
@@ -102,13 +102,13 @@ public class OtaUpdaterTest {
@Test
public void versionIsReadFromTheAssetName() {
// The release tag is the constant "unstable", so the asset name carries the build.
assertEquals("1.0.42", OtaUpdater.versionFromAssetName("FatihsMG4-unstable-1.0.42.apk"));
assertEquals("1.0.100", OtaUpdater.versionFromAssetName("FatihsMG4-unstable-1.0.100.APK"));
assertEquals("1.0.42", OtaUpdater.versionFromAssetName("NilsMG4-unstable-1.0.42.apk"));
assertEquals("1.0.100", OtaUpdater.versionFromAssetName("NilsMG4-unstable-1.0.100.APK"));
}
@Test
public void assetNameWithoutAVersionIsIgnored() {
assertNull(OtaUpdater.versionFromAssetName("FatihsMG4-unstable.apk"));
assertNull(OtaUpdater.versionFromAssetName("NilsMG4-unstable.apk"));
assertNull(OtaUpdater.versionFromAssetName("unstable"));
}
@@ -125,14 +125,14 @@ public class OtaUpdaterTest {
public void sha256SidecarFormatsAreParsed() {
String hash = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
assertEquals(hash, OtaUpdater.parseExpectedSha256(hash,
"FatihsMG4-unstable-2.2.7.apk"));
"NilsMG4-unstable-2.2.7.apk"));
assertEquals(hash, OtaUpdater.parseExpectedSha256(
hash + " *FatihsMG4-unstable-2.2.7.apk\n",
"FatihsMG4-unstable-2.2.7.apk"));
hash + " *NilsMG4-unstable-2.2.7.apk\n",
"NilsMG4-unstable-2.2.7.apk"));
assertNull(OtaUpdater.parseExpectedSha256(hash + " another.apk",
"FatihsMG4-unstable-2.2.7.apk"));
"NilsMG4-unstable-2.2.7.apk"));
assertNull(OtaUpdater.parseExpectedSha256("not-a-hash",
"FatihsMG4-unstable-2.2.7.apk"));
"NilsMG4-unstable-2.2.7.apk"));
}
@Test
@@ -150,14 +150,14 @@ public class OtaUpdaterTest {
.put(release(true, asset("2.2.5")));
OtaUpdater.Update update = OtaUpdater.selectUpdate(releases, "2.2.2.0-unstable");
assertEquals("2.2.6", update.versionName);
assertTrue(update.apkUrl.endsWith("FatihsMG4-unstable-2.2.6.apk"));
assertTrue(update.apkUrl.endsWith("NilsMG4-unstable-2.2.6.apk"));
}
@Test
public void stableDraftForeignAndUnversionedAssetsCannotWin() throws Exception {
JSONObject foreign = asset("9.0.0").put("browser_download_url", "https://example.com/app.apk");
JSONObject unversioned = asset("9.0.0").put("name", "FatihsMG4-unstable.apk");
JSONObject stableName = asset("9.0.0").put("name", "FatihsMG4-stable-9.0.0.apk");
JSONObject unversioned = asset("9.0.0").put("name", "NilsMG4-unstable.apk");
JSONObject stableName = asset("9.0.0").put("name", "NilsMG4-stable-9.0.0.apk");
JSONArray releases = new JSONArray()
.put(release(false, asset("9.0.0")))
.put(release(true, asset("9.0.0")).put("draft", true))
@@ -216,7 +216,7 @@ public class OtaUpdaterTest {
}
private static JSONObject asset(String version) throws Exception {
String name = "FatihsMG4-unstable-" + version + ".apk";
String name = "NilsMG4-unstable-" + version + ".apk";
return new JSONObject().put("name", name).put("browser_download_url",
"https://github.com/fatihdonmezdev/FatihsMG4/releases/download/unstable/" + name);
}