Releases: 7723mod/NPatch
v1.0.2 Color Update
Color Update
English
Release v1.0.2 is the official release of the NPatch "Color Update". This update not only integrates the complete theme customization system, dynamic color extraction, and custom background functionalities from the pre-releases, but also fully refactors the global UI rendering architecture. In this final release, underlying dependencies have been upgraded to Miuix v0.9.0 and Android TargetSdk 37.
New Features
- Interface and Theme System
- Monet Dynamic Color
- Added Android 12+ dynamic color support, automatically generating an adaptive UI color palette based on the system wallpaper.
- Provides an independent toggle switch; when enabled, it automatically overrides the currently selected built-in theme color.
- Built-in Theme Colors and Picker Optimization
- Added 10 independent theme colors, fully supporting auto-adaptation for light/dark modes.
- Optimized the color picker UI: Adjusted color options to a vertical layout (palette + text), and refactored the picker layout to support horizontal scrolling for an improved visual and interactive experience.
- Custom Backgrounds
- Fully implemented the custom background functionality, providing the global background path via
CompositionLocalwithinMainActivity. - Utilized
Crossfadeto ensure smooth transition effects when switching backgrounds.
- Fully implemented the custom background functionality, providing the global background path via
- Monet Dynamic Color
- Underlying and UI Architecture
- System Upgrades: Upgraded to Miuix v0.9.0 and updated Android TargetSdk to 37.
- Global Rendering Refactor: Introduced cross-module
Miuix ScaffoldandNPatchScaffoldwrappers to unify the management of popup views and dialog frameworks within the Manager UI. - UI Element Migration: Fully migrated elements across various pages (Home, Main, Manage, NewPatch, Repository, AppItem, SuperSearchBar, etc.) to the
NPatchScaffold. When a custom background is enabled, components automatically apply background-aware colors, haze styles, and the global transparency constantBG_SURFACE_ALPHA.
- Internationalization (i18n)
- Added multilingual support and localization adaptations for search functionality, module information, and time formatting.
Changes
- Management Page and Display Logic
- Optimized display logic for the Management page and unified "Local Rolling" tags.
- Incremented the
MIN_ROLLING_VERSION_CODEbaseline to 580, establishing it as the new standard for local mode display rules. - Refactored the trigger conditions for the loader update recommendation icon (KeyboardCapslock).
- Reconstructed the summary row layouts using
RowandSpacerto ensure precise alignment of text and icons.
- Visuals and Detail Optimization
- Manager Icon: Changed the Manager icon to PNG format (Rootless To NPatch).
- Improved the color contrast for the "Integrated" mode when using the dark theme.
- Fine-tuned UI visual details (e.g., Slot alpha adjustments) and applied
backgroundAwareCardColorsto multiple Card components. - Localization refinements:
Repository.getRelativeTimenow receivesContextand utilizes localized string resources andDateFormatfor accurate time formatting.
- Architecture and State Management
- Cleaned up
ThemeConfiglogic and completedDataStoreinitialization. - Added a
MainViewModelskeleton to facilitate future state management.
- Cleaned up
Fixes
- Fixed an issue where Xposed module selection behaved abnormally.
- Optimized module detection logic.
- Fixed insufficient text contrast in dark mode on certain devices.
- Fixed memory leaks and thread pool exceptions caused by Activity binding in specific scenarios.
- Tweaked background scheduling strategies to improve module stability and execution efficiency.
Issues
- Breaking Change: This update involves a destructive refactoring of the database structure.
- Upgrading directly from v1.0.1 via overwrite is not supported.
- Users must clear application data or perform a clean reinstall after upgrading.
- Failure to do so will result in an inability to read patched applications and frequent application crashes (force closes).
中文
Release v1.0.2 是 NPatch「色彩更新 (Color Update)」的正式版本。此次更新不僅整合了預發佈版中的完整主題自訂系統、動態取色與自訂背景圖片功能,還重構了全域 UI 渲染架構,並在最終版本將底層依賴升級至 Miuix v0.9.0 與 Android TargetSdk 37。
新內容
- 介面與主題系統
- Monet 動態取色
- 新增 Android 12+ 動態色彩支援,可跟隨系統桌布顏色自動生成適配的介面色調。
- 提供獨立開關控制,啟用後將自動覆蓋當前所選的內建主題色。
- 內建主題色與選擇器優化
- 提供多達 10 種獨立主題色(包含冷淡藍、清爽綠、優雅紫等),全面支援淺色/深色模式自動適配。
- 優化顏色選擇器 UI:調整顏色選項為垂直佈局(色盤+文字),並重構選擇器佈局以支援橫向滾動,提升視覺與互動體驗。
- 自訂背景圖片
- 完整實作自訂背景功能,透過
CompositionLocal於MainActivity提供全域背景路徑。 - 使用
Crossfade實現平滑的背景切換過渡效果。
- 完整實作自訂背景功能,透過
- Monet 動態取色
- 底層與 UI 架構
- 系統升級:升級至 Miuix v0.9.0 並更新 Android TargetSdk 至 37。
- 全域渲染重構:引入跨模組的
Miuix Scaffold與NPatchScaffold封裝,統一管理 Manager UI 的彈出視窗與對話框架構。 - 介面元件遷移:全面將各頁面元件(Home, Main, Manage, NewPatch, Repository, AppItem, SuperSearchBar 等)遷移至
NPatchScaffold。當啟用自訂背景圖時,會自動套用背景感知(Background-aware)的顏色、haze 樣式與全域透明度常數BG_SURFACE_ALPHA。
- 國際化 (i18n)
- 新增多語系支援,包含搜尋功能、模組資訊與時間格式化的在地化適配。
更改
- 管理頁面與顯示邏輯
- 優化管理頁面顯示邏輯並統一「Local Rolling」標籤。
- 將
MIN_ROLLING_VERSION_CODE基準提升至 580,作為本地模式顯示邏輯的新標準。 - 重構載入器更新推薦圖示 (KeyboardCapslock) 的觸發條件。
- 使用
Row與Spacer重構摘要列佈局,確保文字與圖示精準對齊。
- 視覺與細節優化
- Manager 圖示:Manager 圖示改用 PNG 格式 (Rootless To NPatch)。
- 優化內嵌模式 (Integrated) 在深色主題下的顏色對比度。
- 微調 UI 視覺細節(如 Slot alpha 調整),以及為多個 Card 元件套用
backgroundAwareCardColors。 - 在地化細節優化:
Repository.getRelativeTime改為接收Context,並使用在地化字串資源與DateFormat進行時間格式化。
- 架構與狀態管理
- 清理
ThemeConfig邏輯並完成DataStore初始化。 - 新增
MainViewModel骨架以利後續狀態管理。
- 清理
修復
- 修復了 Xposed 模組選取行為異常的問題。
- 優化了模組檢測邏輯。
- 修復了部分設備上深色模式下文字對比度不足的問題。
- 修復部分場景 Activity 綁定引發的記憶體洩漏與執行緒池異常;微調後台排程策略,提升模組穩定性與執行效率。
問題
- 破壞性變更:本次更新涉及資料庫結構的破壞性重構。
- 不支援從 v1.0.1 透過直接覆蓋進行升級。
- 使用者升級後必須清除應用程式資料或進行全新安裝。
- 若未清除資料,將導致無法讀取已修補的應用程式,並引發應用程式頻繁崩潰(閃退)。
v1.0.1
English
First of all, wishing all users a Happy International Labor Day 5.1! Thank you for your continued support, feedback, and patience 🎉
We previously released v1.0.0 on our Telegram channel, but later discovered severe bugs affecting core functionality. We immediately pulled the version from GitHub and did not publish an official release for it. We strongly advise all users against using v1.0.0. This v1.0.1 release fully inherits all architectural upgrades and new features from v1.0.0, and completely fixes all critical issues, making it the first stable and usable official version of the v1.0 series.
We would also like to express our special thanks to community users who have long supported v0.7.4. As a long-term community-recommended stable build, it has been validated in extensive real-world scenarios and laid a solid foundation for project iteration. NPatch v1.0.1 delivers a full-dimensional leap forward, bringing a transformative interactive experience, stronger core capabilities, and more stable performance.
🎨 【Core Major Upgrade】Full Interface Reconstruction Based on Miuix (Inherited from v1.0.0)
This is the most representative upgrade of the v1.0 series. We have completely rebuilt the entire manager interface from scratch and fully migrated to the Miuix design system, delivering a unified, modern, and smooth visual and interactive experience:
- Full design system overhaul: Refactored the homepage, patching page, app management page, module management page, settings page, repository page, and all other core pages based on Miuix. Unified visual specifications, corner radius constants, spacing standards, and component styles to eliminate the cluttered design of the old version.
- Page architecture and logic decoupling: Split the heavily coupled code of the old NewPatchScreen, fully separated UI rendering from business logic, and extracted DoPatchBody and PatchOptionsBody as independent modules. Greatly improved page rendering performance, code maintainability, and future iteration efficiency.
- State management and lifecycle optimization: Refactored the full-page state management mechanism and elevated Scaffold to the top level of NewPatchScreen to fix black screens during state switching. Improved DisposableEffect and BackHandler lifecycle control to automatically clean up temporary files and patching configurations asynchronously on page exit, preventing memory leaks and state residue. Refactored embedded module state management with
by mutableStateOfto ensure Compose fully tracks state changes and resolves state loss. - Core interaction upgrade: Refactored the search component on the app selection page; added a 300 ms click cooldown to prevent rapid repeated taps and duplicate dialogs; supported RTL layout, replaced global back icons, and completed accessibility descriptions; added component clipping to fix visual overflow of rounded corners for polished details.
- Full refactor and standardization of base components: Refactored core base components including AppItem, SuperSearchBar, SelectionColumn, and SelectionItem to unify design language and interaction behavior; added a global super search bar for fast app and module searching, significantly improving operational efficiency.
🔌 【v1.0.1 Core Focus】Full Vector Framework Compatibility & Underlying Adaptation
v1.0.1 prioritizes full integration of the Vector framework, with end-to-end adaptation and optimization. We unified underlying dependencies, build processes, and runtime compatibility to resolve multiple compilation and runtime anomalies caused by framework integration:
- Underlying code adaptation: Fixed architectural compatibility issues in the C++ code of patch-loader, adjusted core definitions in config_impl.h and patch_loader.h, and resolved JNI runtime crashes and logic errors.
- Build process compatibility: Corrected CMake parameter passing and legacy dependency resolution failures, ensuring Vector dependencies link and compile correctly across all build modes.
- Project-wide package and namespace unification: Fully adopted the org.lsposed.npatch package convention, updated imports and references across manager, patch, and patch-loader modules to eliminate namespace conflicts and ensure full Vector compatibility.
- Upper-layer call logic adaptation: Updated core calling logic between the Patcher and ViewModel layers to align with Vector framework API specifications, ensuring stable execution of the entire patching workflow without parameter or call exceptions.
🚨 【v1.0.1 Core Fixes】All Critical Bugs in v1.0.0 Resolved
We have fully fixed the severe usability-breaking bugs that led to the retraction of v1.0.0, guaranteeing 100% stability of core processes:
- Fixed Dex loss and startup crashes in low-level signature modes: Corrected the logic in
NPatch.javathat unconditionally removed original classes*.dex during packaging. Removal now only occurs when sigBypassLevel ≥ 2; original dex files are preserved in lv0/lv1 modes to ensure native app execution. - Fixed LSPApplication startup crashes: Added protection for origin.apk extraction in lv0/lv1 modes to resolve IOException crashes caused by attempting to extract a non-existent installation package.
- Optimized Metaloader injection: Adjusted loader dex naming to append as classes{N+1}.dex in lv0/lv1 modes to avoid conflicts with original dex files; fixed injectProvider’s dependency on origin.apk by extracting provider.dex to a dedicated fixed path, ensuring normal injection functionality across all signature levels.
- Fixed patching config parameter sync issues: Corrected the PatchConfig constructor logic to properly synchronize the outer sigBypassLevel to the inner LSPConfig, fully resolving the bug where the signature bypass level incorrectly reverts to lv0 when generating config.json.
- Fixed embedded module dialog display anomalies in Miuix: Resolved SuperDialog visibility issues caused by Composition-scope isolation by moving the dialog into the Scaffold content scope, ensuring state changes properly trigger page recomposition.
- Fixed page state race conditions: Resolved the unexpected file picker opening when returning from SelectAppsScreen; optimized page back navigation and state cleanup triggered by BackHandler and TopAppBar actions to prevent memory leaks and state residue.
🔐 Core Engine & Signature Bypass Capability Upgrade (Inherited from v1.0.0)
- Refactored signature bypass tiered architecture: Added a new LV3 "IO Redirection" signature bypass scheme, integrated the SRPatch tech stack for deep Context spoofing, PackageInfo interception, and Java framework path redirection; renamed the original LV3 (SVC/Seccomp Hook) to LV4, fully supporting configurable 0–4 level bypass capabilities.
- Added advanced protection bypass: LV3/LV4 modes now support appComponentFactory detection bypass with a dynamic attribute restoration mechanism, perfectly defending against static file reading on stubs and dynamic API query detection.
- Adjusted system version requirement: Raised the minimum supported version to Android 9.0 (API 28) to improve signature verification removal effectiveness; Android 8.1 is no longer supported.
- Underlying stability optimization: Rewrote SVC redirection logic using async-signal-safe primitives instead of non-signal-safe synchronization to fully resolve deadlocks and undefined behavior; fixed JNI compilation and linking errors, optimized Native Library loading to resolve failures caused by permission denials.
- Compatibility extension: Adjusted .so file alignment in APKs from 4 KB to 16 KB to meet Android 15+ 16 KB page alignment requirements; optimized DexFile and XResources calls via reflection to fix class resolution failures and deprecated API compatibility issues on newer Android versions.
🆕 New Features (Inherited from v1.0.0)
- Complete online module repository: Full-featured module repository including list, detail pages, GitHub Markdown rendering, version history, and contributor display; one-click installation of high-quality community Xposed modules to complete the ecosystem.
- Native MicroG support: Added lightweight MicroG integration and GMS request redirection; patched Google apps run properly with community MicroG; automatically injects required permissions and components for signature spoofing, enabling full-link interception and redirection for Intent, ContentResolver, and PackageManager.
- In-app language switching: Added a language selector in Settings, supporting system default and 40+ languages; changes take effect immediately with a page restart (no app restart required).
- Experience improvements: Auto-refresh module list after app uninstall; redesigned homepage layout with improved patching guidance and status feedback; fixed non-responsive embed button; standardized global code structure and import ordering.
🛠️ Engineering System & Code Optimization
- Unified logging specification & storage: Added XLog utility with improved whitelist filtering, standardized project-wide logging; all NP startup, patch debugging, and module runtime logs are stored in
/sdcard/Android/media/{PackageName}/npatch/log/for centralized management and faster troubleshooting; removed redundant manual log prints. - Standardized troubleshooting guide: For crashes in apps patched with old versions, first re-patch with v1.0.1; if issues persist, enable logging and submit the latest log archive from the above path for quick diagnosis.
- Dependency & build optimization: Cleaned up Version Catalog, removed obsolete dependencies such as Accompanist; upgraded Gradle to 8.14.4 and Kotlin to 2.3.21; optimized build rules and excluded redundant artifacts to reduce APK size.
- Multilingual completion & standardization: Completed translations for logging, module repository, homepage tags, covering 12+ major languages; unified...
v0.7.4
中文
統一介面風格並優化佈局
導入 ARM64 專用的 SVC/Seccomp 內核級簽名繞過 (Level 3),並全面強化檔案 I/O 重定向機制。
移除非 64位 架構的支持
优化 Manifest 权限与 authority 映射
修復 arsc 的正確壓縮和對齊
在 ZFileOptions 中為 .arsc 檔案添加 4 字節對齊規則,並在新增條目時將 resources.arsc 處理為原生程式庫。確保 resources.arsc 的正確對齊。
修復本地模式沙盒限制
引入 ConfigProvider 機制: 用 ConfigProvider,繞過 Android 應用沙盒的數據隔離限制,確保被修補應用能即時獲取配置。
- 重構加載邏輯: 將
NeoLocalApplicationService的讀取方式從SharedPreferences改為動態查詢ConfigProvider。 - 動態 APK 路徑解析: 透過
PackageManager實作模組 APK 路徑的動態解析,取代原有的靜態路徑,並強化錯誤日誌以利偵錯。
更新內核與依賴項
- 同步 LSPosed 內核至 v1.11.0: 解決 Android 10 以及 OnePlus 裝置上的特定兼容問題。
- 重構 Dex2Oat 邏輯: 消除 Missing Symbols 錯誤,並顯著提升裝置運行穩定性與處理速度。
解決 x86_64 架構構建與 SVC 問題
- 修正編譯錯誤: 解決
bypass_svc在 x86_64 環境下的編譯失敗問題,確保開發環境與模擬器的構建順暢。 - 架構隔離與 Stub 實現: 為非 ARM64 架構提供 Stub 空實現,防止連結階段出現未定義符號錯誤。
- 符號範圍優化: 將狀態變數
g_is_hook_active移至全域作用域,解決跨架構編譯時的符號可見性問題。 - 強化架構守衛: 針對 ARM64 特有的 Syscall 邏輯加入精確的架構守衛標籤。
優化效能與啟動速
- Gson 改為靜態單例,減少記憶體開銷。
- 配置保存改用異步 apply(),避免 I/O 阻塞主線程。
- 完善資源管理: 修復了 Provider Dex 注入流程中的文件檢查邏輯,並加強異常日誌輸出。
- 強化 NPE 防護: 針對模組列表、資源流讀取增加多處空指標檢查,杜絕啟動崩潰風險。
English
Unified ui style and layout optimization
Introduce ARM64-specific SVC/Seccomp kernel-level signature bypass (Level 3), and comprehensively enhance file I/O redirection mechanism.
Remove support for non-64-bit architecture
Optimize Manifest permissions and authority mapping
Fixing arsc's correct compression and alignment
Add a 4-byte alignment rule for .arsc files in ZFileOptions, and treat resources.arsc as a native library when adding entries. Ensure the correct alignment of resources.arsc.
Update core and dependencies
- Sync LSPosed kernel to v1.11.0: Resolve specific compatibility issues on Android 10 and OnePlus devices.
- Refactor Dex2Oat logic: Eliminate Missing Symbols errors, and significantly improve device stability and processing speed.
Fix Local Mode Sandbox Restrictions
Introduce ConfigProvider mechanism: Use ConfigProvider to bypass Android app sandbox data isolation restrictions, ensuring the patched app can instantly access configurations.
- Refactor loading logic: Change the loading method of
NeoLocalApplicationServicefromSharedPreferencesto dynamically queryConfigProvider. - Dynamic APK path resolution: Implement dynamic resolution of module APK paths via
PackageManager, replacing the original static paths, and enhance error logging for debugging.
Solving x86_64 Architecture Build and SVC Issues
- Fix compilation errors: Resolve the compilation failure issue of
bypass_svcin x86_64 environment, ensuring smooth build of development environment and simulator. - Architecture isolation and Stub implementation: Provide Stub empty implementations for non ARM64 architectures, preventing undefined symbol errors during linking stage.
- Symbol scope optimization: Move the state variable
g_is_hook_activeto global scope, addressing symbol visibility issues during cross-architecture compilation. - Strengthen architecture guard: Add precise architecture guard labels for ARM64-specific instruction set logic (Syscall).
Optimize performance and startup speed
- Gson changed to static singleton to reduce memory overhead.
- Configuration saving switched to asynchronous apply(), avoiding I/O blocking the main thread.
- Improved resource management: Fixed the document check logic in the Provider Dex injection process and enhanced exception log output.
- Strengthened NPE protection: Added multiple null pointer checks for module lists and resource stream reading to eliminate startup crash risks.
v0.7.3
中文
重命名部分組件
更新部分依賴
將所有 'lspatch' 轉為 'npatch' 以规避部分關鍵詞檢測
manager 新增簽名驗證防篡改(僅 java 讀取 hashCode )
支援手動重載列表
- 當卸載後重新整理程式清單
- 可手動下拉刷新應用列表與模組列表
優化應用列表取得
- 安裝及卸載應用後將重新獲取應用列表,應用本身會定期重新獲取應用列表(實驗性)
更嚴格的權限檢查
- Android 11 以上:檢查 Environment.isExternalStorageManager(),如果沒有權限,則跳轉到「所有檔案存取權」設定頁面。
- Android 10 及以下:檢查並請求 WRITE_EXTERNAL_STORAGE 和 READ_EXTERNAL_STORAGE 權限。
修復: 正確設定共享偏好設定鍵並提升加載穩定性
- 修正了 SharedPreferences 鍵配置錯誤,確保模組緩存能正確加載。
- 優化檔案注入器:減少 ZipFile 重複 I/O,提升啟動效率。
- 優化 profile 禁用:採用冪等性檢查和 Truncate 替代 Delete/Create 流程,增強對系統監控的穩定性,避免用戶配置意外清除。
- 代碼精簡:改進了變數命名和程式碼結構。
修復安裝完成提示(部分情況)
修正了某些裝置上注入載入器的 Crash 問題
English
Rename some components
Update some dependencies
Replace all 'lspatch' with 'npatch' to bypass some keyword detection
Manager adds signature verification to prevent tampering (only Java reads hashCode)
Support manual reload of list
- Reload program list after unloading
- Manually pull down to refresh the app list and module list
Optimize Application List Retrieval
- After installing or uninstalling an application, the application list will be re-fetched. The application itself will periodically re-fetch the application list (experimental).
More Strict Permission Checks
- Android 11 and above: Check Environment.isExternalStorageManager(). If no permission is granted, navigate to the "All File Access Permissions" settings page.
- Android 10 and below: Check and request WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE permissions.
Fix: Correctly set shared preference keys and improve loading stability
- Corrected SharedPreferences key configuration error to ensure module caching can be loaded correctly.
- Optimized file injector: Reduce repeated I/O of ZipFile, improve startup efficiency.
- Optimize profile disabling: Adopted equivalence checks and Truncate as an alternative to Delete/Create processes, enhancing the stability of system monitoring and preventing accidental user configuration deletion.
- Code Simplification: Improved variable naming and code structure.
Fix installation completion prompt (partial cases)
Fixed crash issues related to injection loaders on some devices
v0.7.2
中文日志见 NPatch-Telegram
✨New Features
New method to obtain the app list via Shizuku.
Supports injection of MT Manager DocumentsProvider.
Supports using a custom new package name for app patching.
Optimized the core signature verification bypass mechanism.
Improved log output and error messages, and supports logging to the Android/media directory.
Automatically clean up profile files to prevent expired archives from interfering with operation.
Streamlined the application mode description text, enhancing readability.
🐛Fixes & Improvements
Enhanced compatibility with some A15 devices.
Improve assets handling and error checks.
Fix memory leak issue caused by JNI global references not being released.
Optimize the service binding timeout logic, fallback mechanism, and module loading stability.
Correct the getPrefsPath path acquisition logic.
Special prompts added for MIUI desktop uninstall scenarios, improving user experience.
⚙️Refactor & Core
All metadata and names related to LSPatch are fully migrated/renamed to NPatch.
Refactor the RemoteService and APK signature parsing logic.
Add null checks for some method parameters to prevent exceptions and crashes.
Synchronize updates to the Core component.
🛠️Build Workflows
Migrate the runtime environment to Ubuntu and simplify the build cache configuration.
Join our Telegram
v0.7.1
What's New:
API 100 support (core only)
Full support for Android 15
Full support for Android 16
Compatibility with special hardening
Modifiable output path
Allows installation using system APIs
Minimizes file size of packaged files
Explicit manager package name in the config file
Allows users to select whether to inject loader dex
Optimized signature bypass (Hook) and patching logic
Join our Telegram