# Validation record Validated locally on macOS with JDK 21, Gradle 8.11.1, AGP 8.10.1, Android SDK 36 and NDK 29.0.14206865. ## Commands completed ```sh ./gradlew check build :app:assembleRelease :app:lintRelease --offline --console=plain --warning-mode all python3 scripts/check_repository.py git diff --cached --check ``` - Native bspatch: 11 regression cases passed. - CLI: direct and relocated-distribution diff/patch, corrupt input and overwrite protection passed. - Debug/Release Android builds passed; Sample Debug/Release Lint: zero issues. - Sample APK ZIP alignment verified for 16 KB pages. - APK assets inspected: old.apk and update.patch only; all three configured native ABIs included. - APKs, local machine files and generated outputs are excluded from the commit. ## Real Taobao pair Source of truth: Apks/fixtures.json. Package: com.taobao.taobao. Old: 10.65.10 / 855. New: 10.65.20 / 856. - Patch: 62,029,138 bytes, SHA-256 d4053e4262db99842e2c07b2d70f1b95a2a2f43707eacbd3ec12426eb665e14a. - Reconstructed new APK: 94,692,038 bytes, SHA-256 24f8c5784857626f9fc784c9a8b8221779865ba01ddb15ef9670fcf14a4e77b4. - The reconstructed APK was compared byte-for-byte with the supplied new APK and matched. - Delta download is approximately 34.5% smaller than the new APK. Generated assets and metadata are under ApkPatchLibrarySample/app/build/generated/fixtures/. They are generated by verifyFixtures (also a dependency of the Sample build) and ignored by Git. ## Reliability follow-up The following checks completed locally after the JNI, worker lifecycle and fixture publication changes: ```sh ./gradlew fixtureScriptTest :server:check :apkPatchLibrary:hostJniTest :apkPatchLibrary:hostNativeTest --offline --console=plain ./gradlew check build :app:assembleRelease :app:lintRelease --offline --console=plain ``` - Fixture infrastructure: 11 tests passed, covering invalidation, concurrency, failure preservation and process cleanup. - JNI conversion-failure and worker timeout/interruption regressions passed. - The real APK pair was regenerated and reconstructed successfully with SHA-256 and byte equality checks. - Debug/Release builds passed; Sample Debug/Release Lint reported zero issues. - English and Chinese README links and command examples were checked for consistency. ## Device acceptance and CI scope The updated Debug Sample was installed and started on an Android 16 arm64 device, and on-device reconstruction was started. The installed target app was observed as version 10.65.20 / 856. The user confirmed successful manual launch and completed verification; further device checks were stopped at their request. An independent digest check of the on-device output was not completed. GitHub Actions is configured for public-source checks. These local results do not establish a remote CI result. Third-party APKs and generated binaries are excluded from Git. ## Public Sample and streaming reconstruction (2026-11-28) The default Sample was built from source with JDK 17. On an Android 14 arm64 emulator configured with two cores and 1536 MiB RAM (guest MemTotal 1,511,076 KiB), the Sample updated the project fixture from v1 to v2 via the system installer. The installed APK matched the locally built v2 byte for byte. The Android native comparison used two local APKs of 73,461,388 and 91,323,319 bytes. A single 71,845,578-byte BSDIFF40 patch was replayed in fresh standalone arm64 processes using the same NDK, optimization flags and emulator. Measurements use process peak RSS from getrusage and elapsed time through file synchronization. Each output matched the target SHA-256. These measurements exclude the Sample UI, Java runtime and installer. | Run order | Decoder | Peak RSS (KiB) | Time (s) | | --- | --- | ---: | ---: | | 1 | Previous | 110192 | 10.842 | | 2 | Streaming | 12324 | 7.055 | | 3 | Streaming | 12156 | 5.777 | | 4 | Previous | 109924 | 7.388 | The host regression generates its own 128 MiB input, checks the output SHA-256, and requires peak decoder RSS below 64 MiB. Run it with `sh ApkPatchLibrary/scripts/run-host-native-tests.sh`. ## Taobao 10.59 on a phone Supply the [three local files](Apks/README.md), unlock the test phone and put `adb` on PATH. The demo needs permission to request app installs. From the repository root run ```sh ./gradlew -PsampleFixture=taobao-10.59 :app:assembleDebug adb devices ANDROID_SERIAL=DEVICE_ID python3 scripts/smoke_taobao.py ``` Replace `DEVICE_ID` with the device ID from `adb devices`. The script installs the debug demo, checks the two version labels and starts reconstruction. It waits for a **new** committed session from the demo targeting `com.taobao.taobao` and the system installer in the foreground. It dismisses the prompt, opens **校验详情** and compares the SHA-256 shown for `rebuilt.apk` with the [case manifest](Apks/taobao-10.59/fixtures.json). On 2026-11-28 this check passed on a Xiaomi 14 Pro running Android 16. The demo rebuilt 10.59.40 from 10.59.20 and the supplied patch. The test ended after dismissing installation confirmation and verifying the digest. The [public emulator test](scripts/smoke_sample.py) separately completes installation of the project-owned fixture and checks the installed bytes.