Skip to content

[FEAT-2] Native diff applier: Android (jbsdiff) — implement, wire, device-test #2

@prasad-rently

Description

@prasad-rently

Part of FEAT-2 (PR #1). Critical path to diffs working on a phone.

android/.../CodePushDiffPatcher.java is a compile-clean placeholder (applyPatch throws → callers fall back to full download).

To do (see FEAT-2-NATIVE-INTEGRATION.md):

  • Add implementation("io.sigpipe:jbsdiff:1.0") to android/build.gradle.
  • Implement applyPatch(source, patch) via io.sigpipe.jbsdiff.Patch.patch(...); set IS_INTEGRATED = true.
  • Wire into CodePushUpdateManager download path: when diffUrl+sourceHash present and on-disk hash == sourceHash, download patch → apply → verify reconstructed hash == packageHash (CodePushUpdateUtils) → else full-download fallback.
  • JUnit/instrumented test: server patch applies → bytes == target; corrupt → fallback.

Acceptance: device on v_n applies a KB-scale patch, boots v_n+1; any failure falls back to full; classic path unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeat-2FEAT-2: differential JS bundle updatesneeds-device-ciRequires native build + on-device verification

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions