NPatch-v1.0.7-769-release.apk
6.5 MB
feat(patch): optimize packaging pipeline with v1/v2/v3 signing and split apk sync
- Add full V1 + V2 + V3 signing support in apkzlib and patcher
- Synchronize manifest attributes across split APKs in app bundles
- Fix patched app detection and eliminate false positives on asset plugins
- Optimize XposedLogPrinter with asynchronous bounded queue
- Standardize APKS internal entry naming
👍29❤8🔥3🕊1🍌1👻1😡1
NPatch 的在線倉庫來自于 FunProject 的分發倉庫,再次致謝👍
Please open Telegram to view this post
VIEW IN TELEGRAM
Telegram
FunProject
此为版本更新频道
聊天群组: @QToolC
表情包转换机器人: @QToolHelperBot
聊天群组: @QToolC
表情包转换机器人: @QToolHelperBot
❤18👍3
NPatch-v1.0.7-783-release.apk
8.8 MB
chore: remove Firebase SDK
build: remove unused ProGuard obfuscation dictionary
fix(patch): Optimize split APK determination and inject isSplitRequired
feat(manager): Comprehensive optimization of gesture synchronization, selection contrast, and page safe margins for the liquid floating bottom bar
refactor(patch): Refactor sequential number allocation for --injectdex and dual-layer exemption for hidden APIs in Android 16
fix(loader): Improve cache integrity verification, atomic writing, and multi-process locking mechanism for origin.apk (fix #147)
build: remove unused ProGuard obfuscation dictionary
fix(patch): Optimize split APK determination and inject isSplitRequired
feat(manager): Comprehensive optimization of gesture synchronization, selection contrast, and page safe margins for the liquid floating bottom bar
refactor(patch): Refactor sequential number allocation for --injectdex and dual-layer exemption for hidden APIs in Android 16
fix(loader): Improve cache integrity verification, atomic writing, and multi-process locking mechanism for origin.apk (fix #147)
👍17❤3🔥3
NPatch-v1.0.7-792-release.apk
8.8 MB
在打包端方面,首先實裝了 ABI 感知的 SO 頁面對齊分流機制,將 64 位元架構(arm64-v8a、x86_64)對齊 16KB 以適配 Android 15 規範,32 位元則回退至 4KB 對齊,兼顧規範與安裝包體積。其次調整了 DEX 注入時序,改在複製來源 APK 其餘檔案前優先注入引導 DEX,確保 classes.dex 位於 ZIP 最前端以利系統解析;啟用 --injectdex 時,改由遍歷來源 APK 取得最大序號後遞增命名(classes{N+1}.dex),防止 DEX 排序混亂。此外,內嵌模組加入了基於 LinkedHashSet 的包名去重保護,自動忽略重複傳入的模組;同時移除 Split APK 中多餘的 minSdkVersion 設定,並將 AXML 的布林屬性顯式宣告為 Boolean.TRUE 物件,避免屬性映射異常。
在載入器方面,修復了 disableProfile 在讀取 splitNames 時因未校驗陣列長度與 null 所引發的空指標異常(NPE)。針對簽名繞過情境下原應用可能遺失原生庫的問題,新增了宿主路徑注入機制,透過 context.getPackageCodePath() 取得真實安裝 APK 路徑,並利用反射呼叫 ClassLoader 或 DexPathList 的 addNativePath 將 SO 路徑動態補入載入器。同時,路徑引用統一改由參數顯式傳遞 installedApkPath,避免靜態欄位引發重入問題;快取層面則新增對舊版 cache/native/host 目錄的清理邏輯。最後,在釋放 native bootstrap 檔案後追加了唯讀屬性防止意外篡改,並在 JNI 攔截白名單中忽略 libCrashGuard.so,避免簽名繞過模組與防崩潰組件互相干擾引發死鎖。
在載入器方面,修復了 disableProfile 在讀取 splitNames 時因未校驗陣列長度與 null 所引發的空指標異常(NPE)。針對簽名繞過情境下原應用可能遺失原生庫的問題,新增了宿主路徑注入機制,透過 context.getPackageCodePath() 取得真實安裝 APK 路徑,並利用反射呼叫 ClassLoader 或 DexPathList 的 addNativePath 將 SO 路徑動態補入載入器。同時,路徑引用統一改由參數顯式傳遞 installedApkPath,避免靜態欄位引發重入問題;快取層面則新增對舊版 cache/native/host 目錄的清理邏輯。最後,在釋放 native bootstrap 檔案後追加了唯讀屬性防止意外篡改,並在 JNI 攔截白名單中忽略 libCrashGuard.so,避免簽名繞過模組與防崩潰組件互相干擾引發死鎖。
❤22👍7🎉4🤔2
Forwarded from NPatch
The Patchwork Update has been officially released.
https://github.com/7723mod/NPatch/releases/tag/v1.0.8
https://github.com/7723mod/NPatch/releases/tag/v1.0.8
GitHub
Release v1.0.8 The Patchwork Update · 7723mod/NPatch
English
🔧 Patcher Overhaul
--injectdex DEX Injection: You can now inject a custom Loader DEX directly at patch time, backed by a dual-layer hidden-API exemption so injected code stays functional o...
🔧 Patcher Overhaul
--injectdex DEX Injection: You can now inject a custom Loader DEX directly at patch time, backed by a dual-layer hidden-API exemption so injected code stays functional o...
👍10❤3🔥1🎉1
jar-v1.0.8-813-release.jar
9.5 MB
Benchmark:
測試樣本:Bilibili
打包耗時:~70s ➔ 5s(14x 效能躍升)
核心成果
代碼極致瘦身:淨刪除 14,897 行(106 個檔案,+329 / -15,226)。
依賴單純化:拔除 vendored 的
速度躍升 14x 的背後原因
線性串流管線(消滅中繼 I/O):以
原包零拷貝內嵌(Zero-Copy):
壓縮與簽名解耦:打包完成後交由
簽名 API 收斂:多方案校驗收斂為
測試樣本:Bilibili
v9.13.0(典型 200MB+ 超大型複合 APK)打包耗時:~70s ➔ 5s(14x 效能躍升)
核心成果
代碼極致瘦身:淨刪除 14,897 行(106 個檔案,+329 / -15,226)。
依賴單純化:拔除 vendored 的
apkzlib 與 apksigner submodule,簡化為單一依賴 implementation("top.nkbe:NeoApk:1.0.1"),免除 submodule update。速度躍升 14x 的背後原因
線性串流管線(消滅中繼 I/O):以
ZipFile + ZipMaker 替代舊 ZFile 的隨機讀寫與 LRU 暫存塊機制,徹底抹平大檔案打包時的反覆磁碟寫入。原包零拷貝內嵌(Zero-Copy):
origin.apk 免重新 Deflate 直接透傳封裝,大包內嵌與去簽還原幾乎無計算開銷。壓縮與簽名解耦:打包完成後交由
V2V3SchemeSigner 一次性簽名,杜絕生命週期回呼的耦合等待。簽名 API 收斂:多方案校驗收斂為
ApkSignatureReader.getApkSignatures() 一行呼叫,邏輯更輕、維護更省力。👍27❤8
NPatch-v1.0.8-814-release.apk
6.4 MB
fix: 替換 SDK33 專屬 readAllBytes
InputStream.readAllBytes 僅 SDK33 以上可用,切換為 IOUtils.toByteArray 向下相容
InputStream.readAllBytes 僅 SDK33 以上可用,切換為 IOUtils.toByteArray 向下相容
❤10👍3🔥1
NPatch-v1.0.8-817-release.apk
6.4 MB
fix (manager): Optimize package parsing and repository download
Package parsing: Removed the
Repository download: Changed to atomic writing; first save to a
fix (sigbypass): Fixed crashes caused by ART14+/16 dex writability checks and the issue of SQLite misidentifying read-only databases
After generating the origin.apk cache, directly set it to read-only using chmod 444 to bypass the ART dex writability check from the source; added logic to delete old files to avoid permission errors when overwriting read-only files.
Removed the fstat identity spoofing hook and the corresponding (dev,ino) cache to resolve the bug where inode reuse caused SQLite databases to be incorrectly set as read-only; retained stat series path interception, using only file size information to pass checks. Corresponds to Issue #153 and #155, resolving the "Writable dex file ... is not allowed" crash.
Package parsing: Removed the
GET_SIGNING_CERTIFICATES flag and added a fallback parsing strategy to prevent parsing interruptions caused by APK signature anomalies or malformed Manifests, allowing normal processing of hardened / non-standard APKs.Repository download: Changed to atomic writing; first save to a
.tmp temporary file, then rename and overwrite after the download is complete, preventing corrupted repo.json cache and Gson parsing errors caused by network interruptions.fix (sigbypass): Fixed crashes caused by ART14+/16 dex writability checks and the issue of SQLite misidentifying read-only databases
After generating the origin.apk cache, directly set it to read-only using chmod 444 to bypass the ART dex writability check from the source; added logic to delete old files to avoid permission errors when overwriting read-only files.
Removed the fstat identity spoofing hook and the corresponding (dev,ino) cache to resolve the bug where inode reuse caused SQLite databases to be incorrectly set as read-only; retained stat series path interception, using only file size information to pass checks. Corresponds to Issue #153 and #155, resolving the "Writable dex file ... is not allowed" crash.
❤14👍5🔥1🎉1🍌1
manager-v1.0.8-819-release.apk
6.4 MB
🔨 2 new commits
feat(sigbypass): EXTREME Added new svc hook to prevent inlining bypass, HIGH leveled stability
fix(manager): API 102 module companion binder will not auto-repush after manager is killed
feat(sigbypass): EXTREME Added new svc hook to prevent inlining bypass, HIGH leveled stability
fix(manager): API 102 module companion binder will not auto-repush after manager is killed
👍14❤7🔥1🤔1