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>
|
|
|
|
|
|
|
|
#include "util/process.h"
|
|
|
|
|
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-12 00:48:41 +08:00
|
|
|
sc_pid
|
2021-11-18 04:53:11 +08:00
|
|
|
adb_execute_p(const char *serial, const char *const adb_cmd[], size_t len,
|
|
|
|
sc_pipe *pout);
|
2021-10-17 22:14:33 +08:00
|
|
|
|
2021-11-12 00:48:41 +08:00
|
|
|
sc_pid
|
2021-11-19 04:47:17 +08:00
|
|
|
adb_exec_forward(const char *serial, uint16_t local_port,
|
|
|
|
const char *device_socket_name);
|
2021-01-03 21:55:15 +08:00
|
|
|
|
2021-11-12 00:48:41 +08:00
|
|
|
sc_pid
|
2021-11-19 04:47:17 +08:00
|
|
|
adb_exec_forward_remove(const char *serial, uint16_t local_port);
|
2021-01-03 21:55:15 +08:00
|
|
|
|
2021-11-12 00:48:41 +08:00
|
|
|
sc_pid
|
2021-11-19 04:47:17 +08:00
|
|
|
adb_exec_reverse(const char *serial, const char *device_socket_name,
|
|
|
|
uint16_t local_port);
|
2021-01-03 21:55:15 +08:00
|
|
|
|
2021-11-12 00:48:41 +08:00
|
|
|
sc_pid
|
2021-11-19 04:47:17 +08:00
|
|
|
adb_exec_reverse_remove(const char *serial, const char *device_socket_name);
|
2021-01-03 21:55:15 +08:00
|
|
|
|
2021-11-12 00:48:41 +08:00
|
|
|
sc_pid
|
2021-11-19 04:47:17 +08:00
|
|
|
adb_exec_push(const char *serial, const char *local, const char *remote);
|
2021-01-03 21:55:15 +08:00
|
|
|
|
2021-11-12 00:48:41 +08:00
|
|
|
sc_pid
|
2021-11-19 04:47:17 +08:00
|
|
|
adb_exec_install(const char *serial, const char *local);
|
2021-01-03 21:55:15 +08:00
|
|
|
|
2021-11-18 01:47:20 +08:00
|
|
|
/**
|
|
|
|
* Execute `adb get-serialno`
|
|
|
|
*
|
|
|
|
* The result can be read from the output parameter `pout`.
|
|
|
|
*/
|
|
|
|
sc_pid
|
2021-11-19 04:47:17 +08:00
|
|
|
adb_exec_get_serialno(sc_pipe *pout);
|
2021-10-17 22:30:07 +08:00
|
|
|
|
2021-01-03 21:55:15 +08:00
|
|
|
#endif
|