goadb
goadb copied to clipboard
ListDevices Error
Hello,when i launch 3 emulator i received error from ListDevices function while in terminal adb devices command working nice. When i run 2 device there is no like issue Any help about this problem? My code for listing devices
client,err := adb.New()
if err != nil {
fmt.Fprintf(os.Stderr, "error New adb: %v\n", err)
return
}
b_devices,err := client.ListDevices()
if err != nil {
fmt.Fprintf(os.Stderr, "error ListDevices adb: %v\n", err)
return
}
received error message
error ListDevices adb: ParseError: error performing ListDevices on *adb.Adb (&{server:0xc0001320f0})
@zach-klippenstein
Hi, @0xhex . I'm recently using goadb, and I found that your reported errror occured because the length of the response was clipped to MaxMessageLength = 255 but each deviceinfo is almost 100-bytes, so this error occured when a deviceinfo was clipped. To solve this, you can change it to MaxMessageLength = 65536 or a bigger value that ensures your deviceinfo can be fully displayed.
Same issue reported in #26 . Mind me sending a pr? @zach-klippenstein
Go ahead.
Hi, @0xhex . I'm recently using
goadb, and I found that your reported errror occured because the length of the response was clipped toMaxMessageLength = 255but each deviceinfo is almost 100-bytes, so this error occured when a deviceinfo was clipped. To solve this, you can change it toMaxMessageLength = 65536or a bigger value that ensures your deviceinfo can be fully displayed.Same issue reported in #26 . Mind me sending a pr? @zach-klippenstein
Hi @zhongqin0820 I'm stuck on the same problem, I read the source and @zach-klippenstein indicated that the 255 number is following Google adb implementation, any idea on this?