Fix adb args error on newer versions of Android#39
Open
ikcii wants to merge 1 commit intogdzx:masterfrom
Open
Conversation
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.
Modern versions of Android changed how adb command arguments are interpreted. Putting multiple single letter args together, like
-tginstead of-t -gresults in an error on recent devices with new software version.I haven't found official docs mentioning this specificially, but all examples use only a single letter per dash with spacebars in between, and mention that arg parsing now works the same way as the ssh command, talking about how `"strings like these" are now interpreted as a single arg per word instead of one arg that's the entire string of text or whatever, though I guess I'm not sure if it's entirely related.
In any case, the solution is extremely simple, as can be seen in the diff of this PR.
Also to add further proof, here is an issue from another piece of software that I've found which discusses the same problem: novoda/gradle-android-command-plugin#108
The error there is the same one I was having with the current version of the audiosource script.
I already implemented this fix by patching the script when packaging this software for NixOS, and it's been working perfectly so far, so with the recent 1.5 update I thought it's about time I submit this fix upstream.