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