Skip to content

Add firmware 1.5.6 support - #3

Open
noon-at-cgn wants to merge 1 commit into
ScreenSensitive:mainfrom
noon-at-cgn:firmware/1.5.6
Open

Add firmware 1.5.6 support#3
noon-at-cgn wants to merge 1 commit into
ScreenSensitive:mainfrom
noon-at-cgn:firmware/1.5.6

Conversation

@noon-at-cgn

Copy link
Copy Markdown

Summary

  • Patches NotificationManagerService (classes2.dex inside services.jar) to disable notification blocking on Viwoods AiPaper firmware 1.5.6, following the same three filter points identified for 1.3.8/1.4.0 (checkDisqualifyingFeatures, PostNotificationRunnable.postNotification, enqueueNotificationInternal ALLOWED_PKGS), located by instruction pattern since offsets shift per firmware build.
  • Also patches a fourth, previously-unresolved block in enqueueNotificationInternal that hardcodes rejection of com.google.android.gms / com.google.android.apps.wellbeing notifications before the ALLOWED_PKGS check is even reached — this was left as an open limitation in the 1.3.8/1.4.0 notes.
  • Fixes post-fs-data.sh: it was chcon'ing $MODDIR/system/framework/services.jar, a path that was never created (missing mkdir -p + cp step), so the SELinux fix was silently a no-op.
  • Adds service.sh to whitelist all installed apps from battery optimization at boot, so backgrounded apps aren't killed before they can process push notifications.
  • Updates module.prop and README.md for 1.5.6.

Test plan

  • Decompiled/recompiled with apktool, re-decompiled the patched jar to confirm all four patches survived the round-trip
  • Flashed on a Viwoods AiPaper running firmware 1.5.6 via Magisk
  • Confirmed via adb logcat | grep eink that the "Blocked notification from package" log no longer fires
  • Live-tested: previously-blocked apps (e.g. WhatsApp) now show notifications on-device

Patches NotificationManagerService (classes2.dex inside services.jar) to
remove all notification-filtering mechanisms present in Viwoods firmware
1.5.6:

1. checkDisqualifyingFeatures(): removes the XOR inversion that inverted
   the areNotificationsEnabledForPackageInt() result, which caused
   non-whitelisted apps to be silently suppressed.

2. PostNotificationRunnable.postNotification(): forces the
   POST_NOTIFICATIONS permission check result to true, bypassing the
   per-app whitelist enforced via the Android permission system.

3. enqueueNotificationInternal(): replaces the ALLOWED_PKGS hardcoded set
   check with an unconditional goto, bypassing the eink-specific package
   whitelist that blocked non-approved apps at the entry point.

4. enqueueNotificationInternal(): also bypasses a separate hardcoded
   block that special-cased and dropped notifications from
   com.google.android.gms / com.google.android.apps.wellbeing before
   reaching the ALLOWED_PKGS check — a limitation still open even in the
   1.3.8/1.4.0 patches.

Standard Android per-app notification settings (isRecordBlockedLocked)
are preserved so users can still disable individual apps in Settings.

Also fixes post-fs-data.sh, which was chcon'ing a services.jar path that
was never actually created (missing the mkdir/cp step), and adds
service.sh to whitelist all installed apps from battery optimization at
boot so backgrounded apps aren't killed before they can receive push
notifications.

Verified on-device: notifications now arrive for previously-blocked
apps, confirmed via logcat (no more "eink project,Blocked notification"
entries) and live testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant