Repository navigation
ADB: Keep Self-ADB UTF-8 compatible with Android 4.1–4.3 - #1210
Merged
o-jcardenass merged 1 commit intoOct 30, 2026
Merged
Conversation
emotionbug
force-pushed
the
pr/legacy-self-adb-charset
branch
from
October 28, 2026 09:57
76797a0 to
de54ffd
Compare
Remove the Self-ADB client's dependency on StandardCharsets, which is
unavailable before API 19 and can fail AdbProtocol initialization on the
GitHub build's supported API 16-18 devices. Cache
Charset.forName("UTF-8") in the existing protocol class instead of
adding another transport helper or resolving the charset for each
operation.
Use the shared charset for the connection banner, OPEN destinations, RSA
public-key payloads, string stream writes and command-output decoding.
Keep the UTF-8 bytes, NUL termination, payload lengths and checksum
semantics unchanged across Android versions; the device's default
encoding is not a wire-format fallback.
Document the encoding invariant beside the shared value. Listener setup,
debugging authorization and connection lifecycle remain unchanged.
emotionbug
force-pushed
the
pr/legacy-self-adb-charset
branch
from
October 28, 2026 16:12
20268b2 to
d77e1fc
Compare
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.
StandardCharsetswas added in API 19, while the GitHub APK supports API 16. Referencing it fromAdbProtocolcan fail during class initialization on Android 4.1–4.3, before Self-ADB gets a chance to connect.Use one cached
Charset.forName("UTF-8")value for protocol payloads, public keys, stream writes and command-output decoding. UTF-8 bytes and the ADB wire protocol remain unchanged; there is no fallback to the device's default encoding and no change to listener setup or authorization.