Add adb devices parser
Add a parser of `adb device -l` output, to extract a list of devices with their serial, state and model. PR #3005 <https://github.com/Genymobile/scrcpy/pull/3005>
This commit is contained in:
@@ -5,6 +5,19 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "adb_device.h"
|
||||
|
||||
/**
|
||||
* Parse the available devices from the output of `adb devices`
|
||||
*
|
||||
* The parameter must be a NUL-terminated string.
|
||||
*
|
||||
* Warning: this function modifies the buffer for optimization purposes.
|
||||
*/
|
||||
ssize_t
|
||||
sc_adb_parse_devices(char *str, struct sc_adb_device *devices,
|
||||
size_t devices_len);
|
||||
|
||||
/**
|
||||
* Parse the ip from the output of `adb shell ip route`
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user