Skip to content

WaEnhancer Community 0.0.4

Choose a tag to compare

@github-actions github-actions released this 10 Sep 00:42
64098fa

WaEnhancer Community 0.0.4

SHA-256: 9fc80189dd92021bc43c0395aae41e31245895166d32e3e80f6b4791ab558e2d

Changes since v0.0.3.

What's changed

  • #17 Fix Stable/Beta update channels and Community release links
  • #18 docs: consolidate project plans and clean stale repository state
  • #19 ci: modernize Actions and generate PR-based release changelogs
  • #31 feat: port Element Inspector onto current master
  • #22 chore(deps): bump dev.rikka.rikkax.material:material from 2.7.0 to 2.7.2
  • #25 chore(deps): bump org.json:json from 20250517 to 20260814
  • #20 chore(deps): bump nav from 2.9.6 to 2.10.0
  • #33 chore(deps): bump com.google.auto.value:auto-value-annotations from 1.11.0 to 1.11.1
  • #36 chore(deps): bump androidx.fragment:fragment from 1.8.9 to 1.9.0
  • #39 chore(deps): bump org.bouncycastle:bcpkix-jdk18on from 1.83 to 1.84
  • #40 chore(deps): bump gradle-wrapper from 8.13 to 8.14.5
  • #41 Beta-10 Compatibility Fixes: HideSeen and DownloadViewOnce
  • #42 feat: Port selected Dev4Mod/WaEnhancer improvements
  • #44 Fix WhatsApp 2.26.33 compatibility and sync useful upstream fixes
  • #45 Fix PR #44 review findings
  • #46 Fix Android 17 manager startup crash

Full changelog

This section compiles the descriptions of the pull requests included in this release.

#17 — Fix Stable/Beta update channels and Community release links

Merged by contribution from @igorcv88.

Fixes the broken Community update flow and stale upstream links.

Changes:

  • point UpdateChecker and Changelog to igorcv88/WaEnhancerXCommunity releases
  • make release_channel the single Stable/Beta preference
  • allow the Home Stable/Beta selector to actually change update channels instead of forcing the installed build channel
  • keep automatic update checking and refresh immediately after channel changes
  • migrate the update settings screen away from update_alert_pref; hide the legacy Both option
  • point GitHub Issues/contributors links to the Community repository
  • remove Telegram from the visible Home/About UI
  • publish beta builds as normal GitHub Releases instead of GitHub Pre-Releases; beta identification remains based on the -beta- tag suffix, so updater filtering is unchanged

Update semantics:

  • Stable channel: stable tags only
  • Beta channel: beta tags only

The updater does not depend on GitHub's prerelease flag.

#18 — docs: consolidate project plans and clean stale repository state

Merged by contribution from @igorcv88.

What this does

Audits the planning/handoff documents against the current master, keeps only forward-looking work, and removes historical implementation journals from the repository root.

Documentation cleanup

  • adds ROADMAP.md as the single forward-looking plan
  • rewrites ARCHITECTURE.md to describe the architecture that exists now instead of the old A–F agent/block plan
  • rewrites MIGRATIONS.md around the implemented preference/database/full-backup model
  • updates PRIVACY.md to reflect that encrypted full backup is implemented, including Deleted for Me, schema-defined secrets, and optional preserved media
  • links the roadmap from the README
  • removes obsolete HANDOFF_*, PLAN_*, and REVIEW_FIXES_A_B.md files; the historical details remain in Git history

Repository hygiene

  • removes committed gradle_build.log, gradle_error.log, and the redundant SUMMARY
  • ignores *.log
  • removes the stale .gitignore comment that depended on HANDOFF_LIQUID_GLASS.md

Functional stale-link fixes found during the audit

  • ReleaseDetailsActivity now reads release details from igorcv88/WaEnhancerXCommunity instead of the old igorcv88/WaEnhancerX repository
  • the default NOTICES_URL fallback in app/build.gradle.kts now points to Community releases

What the audit classified as still real work

ROADMAP.md retains only:

  1. port the implemented Element Inspector from its stale feature branch onto current master, using the current SafePrefs/provider bridge and doing device validation;
  2. add the missing user-facing Tasker token/allowlist configuration UI;
  3. implement the semantic-theme per-token override editor;
  4. keep the You bottom-nav shortcut and orientation/quick-preset ideas deferred unless their UX value justifies additional hooks/migration complexity.

The old broad Liquid Glass expansion and animated selected-tab indicator are not treated as missing work: later implementation/testing superseded those plans with selective measured surfaces, and the duplicated indicator design was explicitly removed.

#19 — ci: modernize Actions and generate PR-based release changelogs

Merged by contribution from @igorcv88.

Summary

  • updates actions/checkout to v7, actions/setup-java to v6, and gradle/actions/wrapper-validation to v6 without importing the stale release-version logic from the old Dependabot branch
  • replaces GitHub --generate-notes release bodies with a repository-owned changelog generator
  • release notes now list the merged PRs in the release interval and include a cleaned compilation of each PR description under an inline Full changelog section
  • direct commits without an associated PR are retained in a separate section so no change silently disappears
  • stable releases compare against the previous stable tag; beta releases compare against the immediately preceding beta/stable baseline
  • release generation refuses to publish if GitHub truncates the compare range or if the generated notes become abnormally large
  • removes the single catch-all Gradle Dependabot group so Gradle/Maven dependency updates will be opened independently instead of one 21-package PR

This intentionally does not upgrade AGP/Gradle/Kotlin or runtime dependencies. Those updates need isolated compatibility evaluation.

#31 — feat: port Element Inspector onto current master

Merged by contribution from @igorcv88.

Summary

Selectively ports the useful Element Inspector implementation from the stale feat/f2-element-inspector branch onto current master without merging its historical docs or unrelated branch state.

Ported

  • in-process inspector overlay attached to the current WhatsApp Activity window, with no SYSTEM_ALERT_WINDOW
  • NAVIGATE/PICK modes and a draggable inspector handle
  • deepest-view hit testing, view geometry, ID/class metadata, parent/child navigation and highlight border
  • selector generation compatible with the existing Custom CSS dialect
  • redaction of content descriptions by default, with explicit reveal
  • copy ID/class/selector/CSS-rule actions
  • companion-app arm/disarm button and secure per-session token
  • FeatureLoader and PreferenceSchema integration
  • JVM tests for session behavior, redaction, selector generation and hit testing

Modernized while porting

  • replaces the stale branch's XSharedPreferences clear no-op with the current SafePrefs/provider write bridge, so Exit/expiry can disarm the companion preference from inside WhatsApp
  • enforces the token|armedAtMillis timestamp: stale/restored sessions, future timestamps and malformed values are rejected instead of silently receiving a fresh 10-minute lifetime
  • adds a regression test for fresh/stale/future/malformed session formats

Intentionally not ported

  • historical HANDOFF_F2_ELEMENT_INSPECTOR.md and PLAN_F2_ELEMENT_INSPECTOR.md
  • the stale branch commit history itself

The inspector still installs no lifecycle listener when it is not armed; arming it requires opening/reopening WhatsApp, which is deliberate to keep the feature dormant when disabled.

#22 — chore(deps): bump dev.rikka.rikkax.material:material from 2.7.0 to 2.7.2

Merged by contribution from @dependabot[bot].

Bumps dev.rikka.rikkax.material:material from 2.7.0 to 2.7.2.


#25 — chore(deps): bump org.json:json from 20250517 to 20260814

Merged by contribution from @dependabot[bot].

Bumps org.json:json from 20250517 to 20260814.


#20 — chore(deps): bump nav from 2.9.6 to 2.10.0

Merged by contribution from @dependabot[bot].

Bumps nav from 2.9.6 to 2.10.0.
Updates androidx.navigation:navigation-fragment from 2.9.6 to 2.10.0

Updates androidx.navigation:navigation-ui from 2.9.6 to 2.10.0

#33 — chore(deps): bump com.google.auto.value:auto-value-annotations from 1.11.0 to 1.11.1

Merged by contribution from @dependabot[bot].

Bumps com.google.auto.value:auto-value-annotations from 1.11.0 to 1.11.1.


#36 — chore(deps): bump androidx.fragment:fragment from 1.8.9 to 1.9.0

Merged by contribution from @dependabot[bot].

Bumps androidx.fragment:fragment from 1.8.9 to 1.9.0.

#39 — chore(deps): bump org.bouncycastle:bcpkix-jdk18on from 1.83 to 1.84

Merged by contribution from @dependabot[bot].

Bumps org.bouncycastle:bcpkix-jdk18on from 1.83 to 1.84.


#40 — chore(deps): bump gradle-wrapper from 8.13 to 8.14.5

Merged by contribution from @dependabot[bot].

Bumps gradle-wrapper from 8.13 to 8.14.5.


#41 — Beta-10 Compatibility Fixes: HideSeen and DownloadViewOnce

Merged by contribution from @igorcv88.

Beta-10 Compatibility Fixes

Ports the useful WhatsApp/WB runtime fixes reconstructed from WaEnhancerX v1.7.1-beta-10, without the postponed libxposed/LSPosed API migration.

Hide Blue Ticks

  • adds an isolated Beta10Resolvers strategy for modern receipt dispatch
  • resolves dispatch candidates from receipt evidence (419, 89, and ConnectionWriter/sendReadReceipts) and accepts only methods with an exact android.os.Message parameter
  • extracts the Message argument by type instead of assuming args[0]
  • neutralizes only matching receipt dispatches with message.arg1 = -1
  • uses Others.propsBoolean[19148] = false only when the modern strategy is actually usable
  • falls back to the existing legacy receipt-caller strategy if the modern resolver is unavailable
  • preserves the existing ProtocolTree, MessageHistory, custom privacy, group/status, voice-note, view-once, ghost-mode, blue-on-reply, and manual-release behavior

Download View Once

  • prefers FMessage and Menu arguments by type, with the existing field-based fallback retained
  • adds a semantic resolver using the ic_viewonce resource together with the real MenuItem.setShowAsAction(int) invocation
  • falls back to the existing MediaViewFragment menu resolver when that semantic strategy misses
  • keeps MediaView and ViewOnceViewerActivity hooks isolated
  • prevents duplicate menu entries with the Community-specific MENU_ID_DOWNLOAD
  • tolerates missing icon resources without disabling the download action

Review hardening applied

  • removed unrelated compileSdk 37 / Java 21 bytecode changes; the project remains on its current build configuration (JDK/toolchain 21 with Java/Kotlin bytecode target 17)
  • removed unrelated whitespace churn from the original PR
  • restored Unobfuscator.java to master and isolated reconstructed beta-10 resolver logic in Beta10Resolvers.java
  • replaced broad simple-name Message matching with exact android.os.Message matching
  • replaced tests that duplicated helper logic with tests of the actual ReflectionUtils.getArg() implementation

Automated tests

Beta10CompatibilityTest now covers typed argument extraction, ordinal selection among repeated types, and missing/null arguments without adding Robolectric/Mockito dependencies.

Manual validation still required

HideSeen: direct chats, groups, statuses, voice notes, view-once media, ghost mode, custom privacy, blue-on-reply and manual blue-tick release.

Download View Once: image/video, MediaView and dedicated ViewOnce viewer flows, duplicate-entry check, actual file save, and WhatsApp Business if available.

#42 — feat: Port selected Dev4Mod/WaEnhancer improvements

Merged by contribution from @igorcv88.

Objective

Port selected useful changes from the current official Dev4Mod/WaEnhancer stream into WaEnhancerXCommunity, adapting them to Community-specific compatibility, settings, Tasker, and diagnostics behavior.

Implementations

  1. Status playback semantic index resolver — semantic DexKit lookup with guarded A02/A00 compatibility fallbacks and bounds-safe status selection.
  2. CallType rework — semantic outgoing-call hook, typed context/contact discovery, fail-open video-call handling, original-method invocation for WhatsApp calls, and a safer legacy fallback.
  3. MessageStore read/write separation — short-lived writable connections, busy_timeout, bounded lock retries, a serialized daemon write executor, and parameterized storeMessageRead() writes.
  4. ToastViewer lifecycle — thread-safe dedupe state, lazy single daemon cleanup task at 30-second intervals, while preserving Tasker viewed_message / viewed_status events even when visible toasts are disabled.
  5. Copy Selection from Message — semantic popup resolver, guarded one-time popup injection, module-themed dialog, and explicit copying of the selected substring only.
  6. MediaQuality CBR — applies BITRATE_MODE_CBR only when the selected encoder reports support; field-type/mapping changes fail open without breaking the constructor.
  7. Disable swipe-up in groups — preference plus semantic resolver for the WhatsApp group voice-chat gesture.

Review fixes applied after initial implementation

  • preserve Tasker events when both ToastViewer UI switches are off
  • serialize MessageStore writes and bind message IDs instead of concatenating SQL
  • do not silently treat an unresolved Status playback index as index 0
  • preserve index alignment for existing Status listeners that consume fMessageList.get(currentIndex)
  • harden CallType against argument-layout drift and remove temporary global BaseBundle hooks from the legacy fallback
  • make ModuleContextWrapper use the module package context as its real themed base
  • guard CopySelection popup casts, constructor-chain duplicate injection, and empty/invalid message arguments
  • add explicit Copy Selection action that leaves the clipboard untouched when no range is selected
  • register copy_selection_message and disable_swipe_up_in_group in the authoritative PreferenceSchema
  • make CBR assignment tolerate primitive/boxed integer mappings and fail open on incompatible future mappings

Build baseline

Preserve the current project baseline:

  • build/CI JDK: 21
  • Kotlin toolchain: 21
  • Java source/target bytecode: 17
  • Kotlin jvmTarget: 17
  • compileSdk: 36
  • Gradle wrapper: 8.14.5

JDK 21 is required to consume RikkaX Material 2.7.2 (Java 21 class files); this does not mean the app bytecode target should be raised to 21.

Validation

GitHub Actions has not produced a workflow run for this PR branch/head yet, so the post-review commits are not being claimed as CI-validated. Before merge, run:

./gradlew :app:testWhatsappDebugUnitTest :app:assembleWhatsappDebug

Runtime/device validation should cover Status actions/downloads, voice vs video CallType paths, SQLite lock/retry behavior, Tasker viewed events with visible toasts disabled, Copy Selection, HD video/CBR behavior, and the group swipe-up toggle on both WhatsApp and WhatsApp Business where applicable.

#44 — Fix WhatsApp 2.26.33 compatibility and sync useful upstream fixes

Merged by contribution from @igorcv88.

Goal

Restore reliable runtime behavior on WhatsApp 2.26.33.76 and pull in the useful compatibility fixes that landed upstream after the current Community baseline, without discarding Community-specific architecture.

Evidence from hardware

On SM-S938B / Android 17 / LSPosed 2.2.0, LSPosed is loading com.waenhancer.community correctly and invoking legacy XC_MethodHook callbacks. The installed Community 0.0.4-beta-2 then fails inside its own hooks with repeated Integer.intValue() NPEs plus stale resolver failures. This is therefore a WaEnhancer host-compatibility issue rather than an LSPosed injection failure.

What changed

Declared support for WhatsApp/Business 2.26.33.xx and 2.26.34.xx in values/arrays.xml.

Fixed the Integer.intValue() NPE at its source. An earlier revision of this branch added a second xposed_init entrypoint (Wa2633CompatEntry) that re-hooked the host method at PRIORITY_HIGHEST to route around the crash. That class was final with a private constructor, so Xposed's Class.newInstance() could never load it, and the approach would have short-circuited every lower-priority hook on that method. It is removed; SeenTick now resolves the status-page position by value/type and has the null, list-type and bounds guards it was missing.

Hardened hooks against reordered/null host arguments: ViewOnce, MediaQuality, ShowOnline (Context/View resolved by type), and SeenTick. HostArgCompat — previously reachable only from its own test — now backs those lookups and matches primitives to boxed arguments consistently.

Conversation row binding: conversationListeners moved to CopyOnWriteArraySet (it is iterated on the row-binding hot path while features register), the hook site now uses the ported unwrapBaseAdapter instead of unwrapping only HeaderViewListAdapter, getView is looked up through the class hierarchy, and listener failures are logged once per listener class instead of once per bound row.

Ported from upstream (audited 883041c6..4d91b33c):

  • Utils.getAccountDataDir() — multi-account data lives under accounts/<id>; MessageStore and the own-avatar lookup resolve through it. Single-account installs are unchanged.
  • WppCore.hookConversationUserJid() — reads the open conversation's JID from its Intent extras. The obfuscated delegate field moved on 2.26.33, so getCurrentUserJid() was falling through to a reflective object-graph walk on the UI thread. The existing chain stays as fallback.
  • HideSeen.hookEnforceHiding() — upstream 83ffa814's direct sendReceiptForIncomingMessage enforcement, using Community's own prefs, CustomPrivacy and MessageHistory, and fail-open. Plus upstream's guard that leaves status receipts to HideStatusView.

Rejected: the Java-to-Kotlin rewrites (ebba8110, no functional change), the CaptureDevice feature (ce90c7dd, a new Room-backed feature with its own prefs and translations — out of scope here), upstream's CDSharedPreferences XML prefs parser, and changelog-only commits.

Fixed a red test suite. :app:testWhatsappDebugUnitTest was failing on master too, which went unnoticed because the CI workflow had been disabled manually — it is re-enabled. The Xposed API was compileOnly, so ReflectionUtils could not load in the JVM test runtime; and once loadable, getArg returned null for every lookup because it built android.util.Pair instances whose constructor is a no-op in AGP's mockable android.jar. getArg now scans the argument array directly (also cheaper on the hook hot path) and tolerates a null array. RuntimeDiagnostics' snapshot keys are registered in PreferenceSchema.

Also removed a committed editor backup, AutoStatusForward.java.orig.

API 102 / libxposed

No change. The public upstream trees contain groundwork for a provider/generic-SharedPreferences core but no complete migration to the modern libxposed entrypoint. This PR does not replace the known-working leg

Description truncated; open the PR for the remaining detail.

#45 — Fix PR #44 review findings

Merged by contribution from @igorcv88.

Follow-up to merged PR #44, applying both late Codex P1 findings:

  • HideSeen.hookEnforceHiding() now suppresses the direct sendReceiptForIncomingMessage path when either Hide Seen or Hide Receipt/custom receipt privacy applies, instead of checking only HideReceipt.
  • MessageStore now binds its persistent read handle to the active account database path and recreates/closes the instance when app_account_switching/active_account changes, keeping reads and the already account-aware short-lived writes on the same account.

This PR is intentionally narrow. CI should run the existing :app:testWhatsappDebugUnitTest :app:assembleWhatsappDebug validation before merge.

#46 — Fix Android 17 manager startup crash

Merged by contribution from @igorcv88.

Root cause

The Android 17/One UI 9 hardware logs show the hooked WhatsApp process working, while every attempt to start the companion app creates a fresh com.waenhancer.community process and immediately logs Failed to save active Xposed API version in manager: java.lang.reflect.InvocationTargetException before dying.

The manager self-hook still forced PreferenceManager.getDefaultSharedPreferencesMode() to deprecated MODE_WORLD_READABLE and globally bypassed ContextImpl.checkMode(). That legacy bridge is no longer safe on Android 17: App.onCreate() immediately calls PreferenceManager.getDefaultSharedPreferences(), so the self-hook can kill the standalone app even though WhatsApp hooks continue working.

Fix

  • Keep manager self-hooking narrow: ModuleStatus.isModuleActive() plus optional Bootloader Spoofer only.
  • Remove the manager-wide ContextImpl.checkMode() interception.
  • Remove the PreferenceManager.getDefaultSharedPreferencesMode() -> MODE_WORLD_READABLE replacement.
  • Save active_xposed_api_version directly to the normal MODE_PRIVATE default preference filename, avoiding reflective PreferenceManager access during Application.onCreate.
  • Keep XSharedPreferences.makeWorldReadable() only as a best-effort legacy fallback. The hooked host already has the UID-validated HookProvider / ProviderSharedPreferences fallback when direct disk access is unavailable.

This is intentionally isolated from the WhatsApp 2.26.33 hook fixes in PRs #44/#45.

Other changes

These commits reached master without an associated merged pull request:

  • 0d52223 Keep beta releases out of Latest
  • 4743ec1 Use Community contributor stats and cache
  • eb69765 Use compact README badges
  • 3f9d933 Normalize README badges
  • 6645e3c Improve feature coverage and stars badge
  • b0fc389 Update WaEnhancer X source URL
  • ac2de44 chore(deps): remove unused Compose and FlatBuffers catalog entries
  • a1c0b4f chore(deps): apply reviewed safe dependency updates
  • 980d6a8 fix(deps): pin OkHttp to API 36 compatible 5.4.0
  • 6326b5b ci: mark beta releases as prereleases
  • 98f1207 ci: block OkHttp versions requiring API 37
  • 87ef34a ci: use Maven range syntax for OkHttp ignore
  • 5fb8ae4 ci: defer dependency upgrades requiring toolchain migration
  • 507fa6d build: remove unused FilePicker dependency
  • c6e90bc build: stop linking unused FilePicker library
  • 7edafe2 build: compile with JDK 21 toolchain
  • 27757ea ci: run Android builds on JDK 21
  • 349ef75 ci: use JDK 21 for signed release builds
  • 2f963fa build: keep Kotlin bytecode target at Java 17
  • 3f338d5 fix(HideSeen): persist receipts suppressed by modern dispatch