Android: opt-in flag for bsdiff patches - #43
Open
ofalvai wants to merge 1 commit into
Open
Conversation
ofalvai
force-pushed
the
android-opt-in-bsdiff
branch
from
August 24, 2026 15:49
fa5c3fb to
0c6be11
Compare
There was a problem hiding this comment.
Pull request overview
Adds opt-in Android support for applying bsdiff patches during CodePush differential updates.
Changes:
- Adds v2 diff-manifest parsing, SHA-256 validation, safe path resolution, and binary patch application.
- Introduces the
CodePushEnableBinaryDiffUpdatesAndroid resource flag. - Adds unit tests, fixtures, and documentation.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
docs/api-android.md |
Documents the opt-in flag. |
android/app/build.gradle |
Adds JSON test dependency. |
android/app/src/main/java/com/microsoft/codepush/react/CodePush.java |
Reads the resource flag. |
android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java |
Defines the patch directory. |
android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java |
Integrates v2 patch handling. |
android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java |
Uses parsed manifests and shared hashing. |
android/app/src/main/java/com/microsoft/codepush/react/diffpatch/BinaryDiffPatcher.kt |
Validates and applies patches. |
android/app/src/main/java/com/microsoft/codepush/react/diffpatch/DiffManifest.kt |
Parses diff manifests. |
android/app/src/main/java/com/microsoft/codepush/react/diffpatch/DiffPatch.kt |
Adds an injectable patch interface. |
android/app/src/main/java/com/microsoft/codepush/react/diffpatch/Sha256.kt |
Implements SHA-256 helpers. |
android/app/src/test/java/com/microsoft/codepush/react/diffpatch/BinaryDiffPatcherTest.kt |
Tests patching behavior and safety. |
android/app/src/test/java/com/microsoft/codepush/react/diffpatch/DiffManifestTest.kt |
Tests manifest parsing. |
android/app/src/test/java/com/microsoft/codepush/react/diffpatch/Sha256Test.kt |
Tests hashing behavior. |
android/app/src/test/resources/binarydiff/basic/old.dat |
Provides the source fixture. |
android/app/src/test/resources/binarydiff/basic/new.dat |
Provides the expected fixture. |
android/app/src/test/resources/binarydiff/basic/patch.bsdiff |
Provides the binary patch fixture. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ofalvai
force-pushed
the
android-opt-in-bsdiff
branch
from
August 25, 2026 10:20
0c6be11 to
36ca242
Compare
ofalvai
force-pushed
the
android-opt-in-bsdiff
branch
from
August 25, 2026 10:22
36ca242 to
4b8a0e1
Compare
ofalvai
marked this pull request as ready for review
August 25, 2026 10:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's probably a good idea to make #42 an opt-in behavior, at least initially.