Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ If this module saved you time or frustration, consider supporting development:

### ✅ Tested

* **Device:** Viwoods Reader
* **Firmware:** Viwoods software **1.1.0** and **1.2.3**
* **Device:** Viwoods Reader / Viwoods AiPaper
* **Firmware:** Viwoods software **1.1.0**, **1.2.3**, and **1.5.6**

### ⚠️ Untested

* Other Viwoods devices
* Other firmware versions

> **Important:** This module is verified **only on Viwoods firmware 1.1.0 and 1.2.3**.
> Other versions may have different code paths or offsets.
> **Important:** This branch (`firmware/1.5.6`) ships a `services.jar` patched specifically for firmware **1.5.6**.
> Other versions may have different code paths or offsets — use the matching branch/release for your firmware.

---

Expand All @@ -63,10 +63,15 @@ This Magisk module **patches `classes2.dex` inside `services.jar` systemlessly**

### Patch Summary

* Disables the notification whitelist check
* Allows all applications to post notifications
On firmware 1.5.6, three separate filter points in `NotificationManagerService` block non-whitelisted apps' notifications; this module neutralizes all three, plus a fourth hardcoded block that specifically drops GMS/Wellbeing notifications:

* `checkDisqualifyingFeatures()` — removed the XOR inversion that silently suppressed notifications
* `PostNotificationRunnable.postNotification()` — forces the per-app permission check to pass
* `enqueueNotificationInternal()` — bypasses the hardcoded `ALLOWED_PKGS` whitelist
* `enqueueNotificationInternal()` GMS/Wellbeing special case — no longer drops notifications from Google apps
* Applied systemlessly via Magisk
* Fully reversible by removing the module
* `service.sh` also whitelists all installed apps from battery optimization at boot, so backgrounded apps aren't killed before they can receive push notifications

---

Expand All @@ -78,11 +83,11 @@ This Magisk module **patches `classes2.dex` inside `services.jar` systemlessly**
* **Root access via Magisk**

* Root **requires patching `init_boot.img`** using the Magisk app
* Viwoods firmware **1.1.0 or 1.2.3**
* Viwoods firmware **1.1.0, 1.2.3, or 1.5.6**

### Steps

1. Download the module `.zip` from **Releases** Use the correct version for your FW version.
1. Download the module `.zip` from **Releases**, or build it from this branch (`firmware/1.5.6`). Use the correct version for your FW version.
2. Open **Magisk → Modules**
3. Select **Install from storage**
4. Choose the downloaded `.zip`
Expand All @@ -108,7 +113,7 @@ Since the Viwoods Reader **lacks a native pull-down notification tray**, it is *

## ⚠️ Warnings & Notes

* Designed specifically for the **Viwoods Reader firmware 1.1.0/1.2.3**
* This branch's `services.jar` is designed specifically for **Viwoods AiPaper firmware 1.5.6** — for 1.1.0/1.2.3 use `main`
* OTA updates may overwrite or invalidate the patch
* Low-level system service modification — proceed at your own risk

Expand Down
6 changes: 3 additions & 3 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=eink_notification_unblock
name=E-ink Notification Unblock v2
version=2.0
versionCode=2
version=1.5.6
versionCode=3
author=J
description=Removes notification blocking with proper SELinux context. Allows ALL apps to show notifications on e-ink devices.
description=Removes notification blocking with proper SELinux context. Allows ALL apps to show notifications on Viwoods AiPaper firmware 1.5.6, plus a battery-optimization whitelist so backgrounded apps keep receiving push notifications.
11 changes: 9 additions & 2 deletions post-fs-data.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#!/system/bin/sh
# E-ink Notification Unblock - SELinux Context Fixer
# This ensures the patched services.jar has the correct SELinux context
# E-ink Notification Unblock - Installation Script
# Copies the patched services.jar into place and fixes its SELinux
# context so Magisk's systemless overlay actually takes effect.

MODDIR=${0%/*}

# Ensure module directory structure exists
mkdir -p "$MODDIR/system/framework"

# Copy patched services.jar to the system framework directory
cp "$MODDIR/services.jar" "$MODDIR/system/framework/services.jar" 2>/dev/null

# Set proper SELinux context for services.jar
chcon u:object_r:system_file:s0 "$MODDIR/system/framework/services.jar" 2>/dev/null

Expand Down
16 changes: 16 additions & 0 deletions service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/system/bin/sh
# E-ink Notification Unblock - Boot service
# Disables battery optimization for all installed apps so they can
# receive and process push notifications without being killed in the
# background by Viwoods' aggressive power management.

# Wait for system to be fully booted
until [ "$(getprop sys.boot_completed)" = "1" ]; do
sleep 2
done

# Apply to every installed package (system + user, covers future installs on next boot)
pm list packages | cut -d: -f2 | while read -r pkg; do
cmd deviceidle whitelist "+$pkg" 2>/dev/null
cmd appops set "$pkg" RUN_ANY_IN_BACKGROUND allow 2>/dev/null
done
Binary file modified services.jar
Binary file not shown.