Skip to content

Support for multiple USB OTG + option to enable direct access to USB OTG#4649

Draft
TranceLove wants to merge 5 commits into
TeamAmaze:release/4.0from
TranceLove:feature/otg-improvements
Draft

Support for multiple USB OTG + option to enable direct access to USB OTG#4649
TranceLove wants to merge 5 commits into
TeamAmaze:release/4.0from
TranceLove:feature/otg-improvements

Conversation

@TranceLove

Copy link
Copy Markdown
Collaborator

Description

Enable multiple USB OTG plugged into device via USB hub.

With this changeset, it is possible to navigate across different USB storage plugged into the device via USB OTG.

Screenshot_20260616-215049_Amaze Debug

Aside, where VolumeManager access to USB storage is possible, added an option to enable direct access to USB storage via filesystem (java.io) APIs instead of Android's own Storage Access Framework.

Screenshot_20260616-215230_Amaze Debug

However, it does has a caveat: OTG I/O are synchronized while direct filesystem access is not. If you unplug the device without letting system to sync, files may or may not be gone. You have the responsibility to gracefully eject the device via pulldown or DocumentsUI. Therefore this option is off by default.

Issue tracker

Fixes #2633, #1256

Automatic tests

  • Added unit tests for specific individual functions
  • Added headless tests for new app functionality
  • Added emulator tests for new UI elements

Manual tests

  • Done

  • Device:

  • OS:

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

Generative code

  • This PR used generative code tools (GenAI, LLMs, etc.)

This implementation is completed with Copilot's help.

  • Model: Claude
  • Version: Sonnet 4.6
  • Provider: Github Copilot

@TranceLove

Copy link
Copy Markdown
Collaborator Author

User Acceptance Test

Operation Tested with OTG Tested with native filesystem access
Browse USB storage
Create file on USB storage root
Create file on USB storage subfolder
Create folder on USB storage root
Create folder on USB storage subfolder
Copy file from device to USB storage
Copy file from USB storage to device
Copy file from between USB storage devices
Move file from between USB storage devices
Move file from device to USB storage
Move file from USB storage to device
Delete folder from USB storage
Delete file from USB storage
Eject USB storage when native filesystem access is enabled N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multi function USB hubs

1 participant