adb: Android serial numbers are not all 16 characters long, so accept other lengths.
I can't find any documentation of how long it should be. Hard to imagine it being shorter than 4 characters though, so put that in as a conservative lower bound. This commit was sponsored by Nick Piper on Patreon.
This commit is contained in:
parent
98168e8f2e
commit
90a3afb60f
4 changed files with 14 additions and 1 deletions
|
@ -236,7 +236,7 @@ enumerateAdbConnected =
|
|||
where
|
||||
parse l =
|
||||
let (serial, desc) = separate (== '\t') l
|
||||
in if null desc || length serial /= 16
|
||||
in if null desc || length serial < 4
|
||||
then Nothing
|
||||
else Just (AndroidSerial serial)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue