Identify publisher-verified self-update sessions accurately
This commit is contained in:
parent
c04dcca60d
commit
97bc3465a0
7 changed files with 10 additions and 9 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
A native, remote-first launcher built for the onn. 4K Plus Streaming device (Android 14, 2 GB RAM). It is installed alongside Projectivy as `tv.luma.launcher`. Home now opens Luma; Projectivy remains installed and enabled as a fallback.
|
||||
|
||||
Version **1.1.3** adds updates directly from the TV and includes the wake fix introduced in 1.0.1. Every resume restores missing images, including when Android briefly pauses the launcher without stopping it. Already-loaded tiles and images are kept on pause-only resumes; leaving the launcher still releases image memory.
|
||||
Version **1.1.5** adds updates directly from the TV and includes the wake fix introduced in 1.0.1. Every resume restores missing images, including when Android briefly pauses the launcher without stopping it. Already-loaded tiles and images are kept on pause-only resumes; leaving the launcher still releases image memory.
|
||||
|
||||
## Use it
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ The default public HTTPS feed is:
|
|||
https://git.elijahkuntz.com/Elijah/Luma/raw/branch/main/output/update.json
|
||||
```
|
||||
|
||||
No SSH key or Forgejo account token is stored on the TV. For branch-based Forgejo URLs, Luma resolves the branch to a commit first, then reads both the manifest and APK from that immutable commit. It bounds metadata to 64 KiB and APK downloads to 32 MiB. Before opening the installer, it checks the expected SHA-256 and file size, package name, increasing version code, Android compatibility, and the installed signing certificate. A different signing key is rejected. The verified APK is copied into a private Android PackageInstaller session marked as a downloaded file, with user confirmation required. Interrupted downloads are removed; completed APKs are removed after the updated app starts.
|
||||
No SSH key or Forgejo account token is stored on the TV. For branch-based Forgejo URLs, Luma resolves the branch to a commit first, then reads both the manifest and APK from that immutable commit. It bounds metadata to 64 KiB and APK downloads to 32 MiB. Before opening the installer, it checks the expected SHA-256 and file size, package name, increasing version code, Android compatibility, and the installed signing certificate. A different signing key is rejected. The verified self-update is copied into a private Android PackageInstaller session with user confirmation required. Interrupted downloads are removed; completed APKs are removed after the updated app starts.
|
||||
|
||||
### Publish an update
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ android {
|
|||
applicationId 'tv.luma.launcher'
|
||||
minSdk 26
|
||||
targetSdk 34
|
||||
versionCode 6
|
||||
versionName '1.1.3'
|
||||
versionCode 8
|
||||
versionName '1.1.5'
|
||||
}
|
||||
compileOptions { sourceCompatibility JavaVersion.VERSION_1_8; targetCompatibility JavaVersion.VERSION_1_8 }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="tv.luma.launcher" android:versionCode="6" android:versionName="1.1.3">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="tv.luma.launcher" android:versionCode="8" android:versionName="1.1.5">
|
||||
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="34" />
|
||||
<uses-feature android:name="android.software.leanback" android:required="true" />
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ public final class UpdateInstaller extends BroadcastReceiver {
|
|||
if (Build.VERSION.SDK_INT >= 31)
|
||||
parameters.setRequireUserAction(PackageInstaller.SessionParams.USER_ACTION_REQUIRED);
|
||||
if (Build.VERSION.SDK_INT >= 33)
|
||||
parameters.setPackageSource(PackageInstaller.PACKAGE_SOURCE_DOWNLOADED_FILE);
|
||||
// This is a verified self-update from our configured publisher, not a user-selected APK file.
|
||||
parameters.setPackageSource(PackageInstaller.PACKAGE_SOURCE_OTHER);
|
||||
int id = installer.createSession(parameters);
|
||||
boolean committed = false;
|
||||
try (PackageInstaller.Session session = installer.openSession(id)) {
|
||||
|
|
|
|||
BIN
output/Luma.apk
BIN
output/Luma.apk
Binary file not shown.
Binary file not shown.
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"schema": 1,
|
||||
"packageName": "tv.luma.launcher",
|
||||
"versionCode": 6,
|
||||
"versionName": "1.1.3",
|
||||
"versionCode": 8,
|
||||
"versionName": "1.1.5",
|
||||
"minSdk": 26,
|
||||
"apk": "Luma.apk",
|
||||
"size": 2753622,
|
||||
"sha256": "e7fb522d03db6e30f57abfde5424f34516229eac90c4c148aef283de2528d6a3",
|
||||
"sha256": "9556c053f5c1ebb7e7b9414596ee2b2185a37161044538617490713bb9dd8228",
|
||||
"notes": "Adds scheduled update checks, TV notifications, and downloading/installing Luma updates directly from Settings. Includes the fix for missing app images and wallpaper after TV wake. Your appearance, screensaver, app order, and Home routing settings are preserved."
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue