2021-01-03 21:55:15 +08:00
|
|
|
#ifndef SC_ADB_H
|
|
|
|
#define SC_ADB_H
|
|
|
|
|
2021-01-09 02:24:51 +08:00
|
|
|
#include "common.h"
|
|
|
|
|
2021-01-03 21:55:15 +08:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
2021-11-19 05:08:15 +08:00
|
|
|
#include "util/intr.h"
|
2021-01-03 21:55:15 +08:00
|
|
|
|
2021-11-12 00:48:41 +08:00
|
|
|
sc_pid
|
2021-01-03 21:55:15 +08:00
|
|
|
adb_execute(const char *serial, const char *const adb_cmd[], size_t len);
|
|
|
|
|
2021-11-19 05:08:15 +08:00
|
|
|
bool
|
|
|
|
adb_forward(struct sc_intr *intr, const char *serial, uint16_t local_port,
|
|
|
|
const char *device_socket_name);
|
|
|
|
|
|
|
|
bool
|
|
|
|
adb_forward_remove(struct sc_intr *intr, const char *serial,
|
|
|
|
uint16_t local_port);
|
|
|
|
|
|
|
|
bool
|
|
|
|
adb_reverse(struct sc_intr *intr, const char *serial,
|
|
|
|
const char *device_socket_name, uint16_t local_port);
|
|
|
|
|
|
|
|
bool
|
|
|
|
adb_reverse_remove(struct sc_intr *intr, const char *serial,
|
|
|
|
const char *device_socket_name);
|
|
|
|
|
|
|
|
bool
|
|
|
|
adb_push(struct sc_intr *intr, const char *serial, const char *local,
|
|
|
|
const char *remote);
|
|
|
|
|
|
|
|
bool
|
|
|
|
adb_install(struct sc_intr *intr, const char *serial, const char *local);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute `adb get-serialno`
|
|
|
|
*
|
|
|
|
* Return the result, to be freed by the caller, or NULL on error.
|
|
|
|
*/
|
|
|
|
char *
|
|
|
|
adb_get_serialno(struct sc_intr *intr);
|
|
|
|
|
2021-01-03 21:55:15 +08:00
|
|
|
#endif
|