Skip to content

Fix Shizuku Android/data hangs and broken ls parsing - #4

Open
softwaregames1 wants to merge 2 commits into
SysAdminDoc:mainfrom
softwaregames1:claude/focused-allen-3fdu1l
Open

softwaregames1 wants to merge 2 commits into
SysAdminDoc:mainfrom
softwaregames1:claude/focused-allen-3fdu1l

Conversation

@softwaregames1

Copy link
Copy Markdown

Summary

Fixes four bugs in the Shizuku backend used for Android/data and Android/obb.

  • Android/data loads forever (roadmap P1, upstream issue Shizuku Access - Android - Data it keeps loading #3): Shizuku commands had no time limit. The UserService now kills a command after 30 seconds, and the app stops waiting 5 seconds after that and shows an error. Copy, move, delete, size, search and checksum keep no limit. This adds the timeout from the roadmap; it does not fix whatever stalls the listing on Android 16.
  • Names with spaces were cut off: toybox ls prints YYYY-MM-DD HH:MM dates, so My Game Saves was listed as Game Saves. Parsing moved to ShizukuLsParser with unit tests.
  • Create folder, create file, rename and search always failed: getFileInfo read the name column of ls -ld <path>, which is the full path, and the safety check rejected it. Only the last segment is kept now.
  • No recovery after a bind timeout: a timed-out bind is cleared so the next call binds again, and a cached service is dropped after a RemoteException.
  • Shell output is decoded once, so multi-byte UTF-8 split across reads stays intact.
  • The UserService version is bumped because the AIDL signature changed.

Testing

  • The new ShizukuLsParser and the rewritten ShizukuShellService were compiled with a standalone Kotlin compiler; 10 checks passed (parser cases, timeout, exit code and UTF-8 output, no-limit mode, output cap).
  • Not run: the Gradle build and the Android test suite, because the Android SDK could not be downloaded in the build environment. ShizukuManager.kt and ShizukuFileRepository.kt have not been compiled yet.
  • Before merging: run gradlew test, then open Android/data through Shizuku on a device and create, rename and search a folder whose name contains spaces.
claude and others added 2 commits October 24, 2026 20:55
- Bound Shizuku commands: the UserService enforces a deadline on the shell
  process, and the app stops waiting on the binder call shortly after it,
  so a stuck listing shows an error instead of loading forever. Copy, move,
  delete, size, search and checksum keep no limit.
- Clear a timed-out pending bind so the next call binds again, and drop a
  cached service after a RemoteException.
- Parse toybox ls dates (YYYY-MM-DD HH:MM) so names with spaces are no
  longer cut to their last word.
- getFileInfo read `ls -ld <path>` output, whose name column is the full
  path, and rejected it; this made create folder, create file, rename and
  search through Shizuku always fail. Keep only the last segment.
- Decode shell output once so multi-byte UTF-8 split across reads stays
  intact.
- Bump the UserService version because the AIDL signature changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NykuhG95j3ExRJKcr1t1m3
Co-authored-by: softwaregames1 <167585946+softwaregames1@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XMu2a6fbN4HHvm1kbQGLrp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants