Repository navigation
K2GO-588 fix(download): the rootfs download is HTTP only, never BitTorrent - #813
Open
luisguzman-adfa wants to merge 3 commits into
Open
luisguzman-adfa wants to merge 3 commits into
luisguzman-adfa wants to merge 3 commits into
Conversation
…rrent The published .meta4 carries a torrent <metaurl>, and aria2 turned the download into a BitTorrent session (it ended in the SEED state on a 7T). --follow-torrent=false does not stop it (ADR-K2GO-554 A4). The app now gives aria2 a local copy of the .meta4 without the metaurl (MetalinkHttpOnly), and runs it with DHT, LPD and peer exchange off. The IPv4 profiler uses the same copy. A .meta4 that cannot be read is reported as a network problem, and a stop latched in that window is still honored.
….torrent The builder deletes the mkmetalink .torrent and removes the <metaurl> line before the bake signs the .meta4. Old .torrent files on R2 are pruned with their tarball.
This branch has not been deployed
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.
What changes
The rootfs download is HTTP only. No BitTorrent, no DHT, no LPD, no peer exchange.
Aria2Manager): the app already fetches the.meta4once. It now writes a local copy without the<metaurl>elements (MetalinkHttpOnly, pure domain) and gives aria2 that copy (--metalink-file), so aria2 does not read the URL again. aria2 runs with--enable-dht=false --enable-dht6=false --bt-enable-lpd=false --enable-peer-exchange=false.--seed-time=0anddht.datare removed; a leftoverdht.datis deleted. The IPv4 profiler uses the same copy and flags..meta4that cannot be read is reported as a network problem (Aria2Exit6, TRANSIENT), so the caller offers a retry as before. It does not fall back to the URL, because that path is BitTorrent. A stop that the user latched in that window is still honored (sharedpostLatchedStop)..torrentand removes the<metaurl>line before the bake signs the.meta4. New bakes publish an HTTP-only.meta4, so its sha-256 in the signed manifest matches the copy that aria2 reads (ADR A6 stays possible)..torrentfiles on R2 are still pruned with their tarball.Why
K2GO-588: no data leaves the phone except what the user starts. The published
.meta4carries<metaurl mediatype="torrent">, and aria2 turns the download into a BitTorrent session (tracker announce, DHT, LPD).--follow-torrent=falsedoes not stop this (measured in ADR A4).Steps to QA
adb logcat | grep IIAB-Aria2: the progress lines have noSD:field and the run never showsSEED. The log ends withIntegrity verified ... sha-256 OKandSignature check ...: TRUSTED.Verifications
:app:lintStandardDebug,:app:testStandardDebugUnitTest,:app:assembleStandardDebug,:app:compileFdroidDebugJavaWithJavac: pass.MetalinkHttpOnlyTest(5 cases: the published metaurl, the parsed result keeps mirrors/size/hash, self-closing and multiline metaurls, no metaurl, null)..meta4read would drop a latched pause or cancel; fixed with a shared helper. Pass 2: no new state (the local copy is rewritten for each download, in the cache); the.meta4is fetched once instead of twice.latest_basic_arm64-v8a.meta4(build 2026.321):[#70181c 537MiB/1.4GiB(35%) CN:1 SD:0 DL:48MiB]. TheSD:field exists only in a BitTorrent session. An earlier full download with the old build ended inSEED(0.0).[#cfc8b4 562MiB/1.4GiB(37%) CN:1 DL:49MiB]. Same speed, noSD:.SD:, aria2 exit 0,Integrity verified ... (1590750919 bytes, sha-256 OK),Signature check ...: TRUSTED usize=2924728320..meta4files have no metaurl (checked 2026-11-20). No change there.Notes
main).