Repository navigation
feat(terminal): upload files into selected distro - #40
Open
mohit-kota wants to merge 4 commits into
Open
mohit-kota wants to merge 4 commits into
mohit-kota wants to merge 4 commits into
Conversation
SaicharanKandukuri
requested changes
Nov 8, 2026
mohit-kota
force-pushed
the
feat-add-new-terminals
branch
from
November 14, 2026 11:12
9fb3577 to
5c5afed
Compare
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.
Description
What does this PR do?
Adds a visible Upload file action to the active terminal toolbar. The action opens Android’s system document picker and copies one selected file into
~/Uploadsinside the Linux distro associated with the terminal that initiated the upload.The upload runs outside the UI thread, displays progress and success/failure feedback, creates imported files with
0600permissions, avoids overwriting existing files, and removes incomplete files after normal I/O failures.Why is this change necessary?
Users need a simple way to import scripts, PEM files, configuration files, archives, and other files already stored on their Android device. Previously this required downloading the file again or using a separate transfer mechanism.
The initiating terminal’s root filesystem is captured before the picker opens, so switching tabs while choosing a file cannot redirect the upload into another distro.
Closes #37
Behavior and scope
This PR intentionally supports one file per upload. Folder uploads, batch uploads, exports, and a full file manager remain out of scope.
Reviewer guide
Suggested review order:
TerminalFileImporter.kt— filename handling, permissions, collision behavior, and safe copyMainActivity.kt— document picker, captured distro target, and background executionTerminalPage.kt— visible upload action, progress indicator, and result messageTerminalFileImporterTest.kt— isolation, cleanup, permissions, and overwrite protectionNo new dependency, Android storage permission, service, or cross-distro mount is introduced.
How Has This Been Tested?
Automated Tests
./gradlew :app:testDebugUnitTest :app:lintDebug0600permissions, failed-copy cleanup, and overwrite protection.Manual Verification
udroid-upload-test.shthrough Android DocumentsUI~/Uploads-rw-------Screenshots
Checklist