Repository navigation
Conversation
…V with network ADB Android TV can not pair wireless debugging: the pairing code can only be typed into a heads up notification, Google TV hides developer options from accessibility services, and the pairing port closes when leaving the pairing screen. Use network ADB on port 5555 instead when it is open on a TV. The first connection shows the system "Allow debugging?" prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Auto start gave up straight away if the shared storage was not mounted yet and nothing triggered it again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes #2237.
Problem
On Android TV the Expert Mode setup gets stuck at "Pair wireless debugging", so Expert Mode can only be started manually with
adb shelland never auto starts after a reboot.I looked into why on a Xiaomi TV Box S (3rd gen, Google TV, Android 14):
com.android.settings, and Android TV usescom.android.tv.settings. Even after adding that package, Google TV hides the developer options screens from accessibility services.rootInActiveWindowisnullon bothDevelopmentActivityand Xiaomi'sMiDevelopmentActivity, while the main Settings screen is readable.Change
Android TV devices often keep network ADB (
adb tcpip 5555) on, which is how Shizuku starts on TV ("5555" button).AdbClientalready supports the non-TLS handshake with RSA auth, so on Android TV Key Mapper now uses127.0.0.1:5555when that port is open:AdbManager.executeCommandconnects to port 5555 instead of discovering the wireless debugging port. The first connection shows the system "Allow debugging?" prompt with Key Mapper's key, and the user accepts it with the remote ("Always allow"). Expert Mode already setsadb_allowed_connection_timeto 0, so the authorization doesn't expire.UI_MODE_TYPE_TELEVISION), so phones that haveadb tcpipturned on behave the same as before.Separate small fix: after booting, auto start ran before shared storage was mounted (
Not auto starting with ADB because the storage is unavailable) and never retried, because the eligibility flow doesn't emit again.SystemBridgeAutoStarternow waits for storage with the same 6 × 10 s retry thatSystemBridgeConnectionManageralready uses to refresh the starter script.Testing
On a Xiaomi TV Box S (3rd gen), Android 14,
cibuild:ktlintCheckpasses, andSystemBridgeSetupUseCaseTestandSystemBridgeAutoStarterTestpass. I added one test for each change.CHANGELOG updated.
🤖 Generated with Claude Code