Repository navigation
fork phone build: count only the <application> updates entry (#879) - #1370
Merged
Merged
Conversation
The APK's updates-off check read expo.modules.updates.ENABLED from every meta-data element in the manifest. expo-updates reads only the one directly under <application> and treats a missing entry as on, so a false entry under an <activity> with none under <application> passed while updates were on. xmltree_metas now tracks each element's path by aapt2's indent and keeps only manifest/application/meta-data; prepare's early check reads application/meta-data only. Tests cover a false entry under an activity, a service and the manifest root (all refused), and an on entry under an activity next to the application's false one (passes). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 30, 2026
Open
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.
Part of #879 (item 16, the fork Android APK). Follow-up to #1339: the security lens round-2 minor
(#1339 (comment)).
What was wrong
The updates-off check (build job's "Check the APK", and
sign/sign_check) tookexpo.modules.updates.ENABLEDfrom anymeta-datain the APK's manifest. expo-updates readsonly the one directly under
<application>, and a missing entry there means updates are on. Soa manifest with no application entry and
ENABLED=falseunder an<activity>passedverify-apkand
sign, while the app had updates on.Change
xmltree_metastracks each element's path from aapt2's indentation and returns onlymanifest/application/meta-data. An activity's, a service's or a root-levelmeta-datais not read.prepare's early check on the generated manifest reads onlyapplication/meta-data(same rule).ENABLEDentry, equal tofalse.docs/fork/phone-build.mdsays which entry counts.Tests (written first, failed before the fix)
VerifyApk.test_only_the_application_entry_counts:falseunder an activity, a service,as a string under an activity, or under
<manifest>itself, with none under<application>:each refused with "ENABLED is not set". A
trueentry under an activity next to the application'sfalsepasses (the application entry decides).Prepare.test_a_false_entry_outside_the_application_is_refused: the same for the source manifest.xmltreenow indents like real aapt2 output (application under manifest, auses-sdksibling), so the path tracking is tested against the real shape.
Ran locally:
python3 -I .github/scripts/fork-android.test.py(46 OK),vp run check:changed(pass).No workflow file changed. The fork change entry (
docs/fork/changes/repo/879-fork-phone-build-android.md) lists this PR.State question
<application>, has no entry, so it isrefused (as before). An APK built before this change that had its entry under
<application>passes the same as before; only the nested-only case changes, from pass to refused.
Left on #879: the other items of the issue; this PR covers only the item 16 security minor.
🤖 Generated with Claude Code