Repository navigation
Conversation
Loukious
force-pushed
the
fix/handshake-list-shell-fallback
branch
from
September 9, 2026 20:12
69707b2 to
56028ac
Compare
getListFiles() returned an empty list when File.listFiles() came back null - e.g. when all-files-access was denied - so the Handshakes menu showed an empty screen even though captures existed in /sdcard/Stryker/captured. The doc comment already promised that paths the app cannot read "fall through to the shell"; the code never did. Keep the app-process listing as the primary path (it is what makes the UI agree with what the user sees in a file manager, since plain su stays outside the app's mount namespace) and only fall back to the root shell - listing the host path it resolved - when the app-side listing fails.
Loukious
force-pushed
the
fix/handshake-list-shell-fallback
branch
from
September 9, 2026 20:13
56028ac to
3dd2bfd
Compare
Owner
|
not the right fix |
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.
Problem
The Handshakes menu showed an empty screen even when captures existed in
/sdcard/Stryker/captured.Reproduced on a device where the
MANAGE_EXTERNAL_STORAGEappop had been denied:File.listFiles()on the share returnsnullwhen the app process can't read the directory, andgetListFiles()turned that into an empty list — no error, no fallback.The method's own doc comment already promised the opposite:
The code never implemented the fallback.
Fix
Keep the app-process listing as the primary path (it's what makes the UI agree with what the user sees in a file manager — plain
sustays outside the app's mount namespace), but whenlistFiles()returnsnull, fall through to the root shell and list the host path it resolved, instead of silently returning empty.With the fix, a device with storage access denied still lists the captures via root; a device with access granted behaves exactly as before.
Verification
On the affected device (all-files-access denied at the time):
Note for users hitting this: the app already prompts for all-files-access (
requestAllFilesAccess()); denying that prompt is what triggers the fallback path.