-
Notifications
You must be signed in to change notification settings - Fork 16
Feat: Add in-app logs screen and export feature #370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
BraCR10
wants to merge
16
commits into
MostroP2P:main
Choose a base branch
from
BraCR10:feat/br/logs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
292079b
Adds in-app logs screen and export feature
BraCR10 e4ae9ce
fix : analyze warning
BraCR10 f82679f
fix : background isolated logs
BraCR10 3c9ff4f
enhancement : UI changes and logs filter
BraCR10 b7f6187
Merge branch 'main' into feat/br/logs
BraCR10 49594e1
Solving merging conflicts
BraCR10 d073238
feat: background logs through send port
BraCR10 9062a65
fix: unsanitized messages
BraCR10 6698ea8
fix : Unsafe buffer trimming
BraCR10 4228737
fix(logger): logging release issue
BraCR10 eb3c085
fix(logger): handle errors in background logging
BraCR10 e0cde07
fix(logger):ignore prints
BraCR10 6a55bd3
fix(logger): save logs file
BraCR10 1560eb9
fix(logger):logs txt
BraCR10 fd173f8
fix(logger):deleting unused validation
BraCR10 45f841b
Merge branch 'MostroP2P:main' into feat/br/logs
BraCR10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: MostroP2P/mobile
Length of output: 814
🏁 Script executed:
Repository: MostroP2P/mobile
Length of output: 138
🏁 Script executed:
Repository: MostroP2P/mobile
Length of output: 3686
🏁 Script executed:
Repository: MostroP2P/mobile
Length of output: 5491
🏁 Script executed:
Repository: MostroP2P/mobile
Length of output: 3260
🏁 Script executed:
Repository: MostroP2P/mobile
Length of output: 2342
The manifest permission is correct but the implementation has critical Android 13+ compatibility issues.
The
WRITE_EXTERNAL_STORAGEpermission withmaxSdkVersion="32"correctly limits the legacy permission to Android 12L and below. However, the log export implementation has a critical flaw for Android 13+ devices.The
_shareLogs()function works correctly—it uses FileProvider to securely provide access to files across app boundaries on Android, which is compatible with all Android versions.The
_saveToDevice()function will fail on Android 13+ (API 33+). The code:getExternalStorageDirectory()with manual path string manipulation to access the Downloads folderDirect access to shared/external storage is deprecated; when an app targets API level 29+, paths returned by getExternalStorageDirectory() are no longer directly accessible. On Android 11+, MediaProvider becomes the file system handler for external storage via FUSE and can intercept kernel calls to ensure file operations are privacy-safe. This blocks the direct file operations the current implementation attempts.
Migrate the
_saveToDevice()logic to use MediaStore.Downloads collection (available on Android 10+), which requires no storage permissions for files the app creates, or implement version-specific logic that uses the Storage Access Framework for Android 13+.🤖 Prompt for AI Agents