Android-cuttlefish cvd tool
|
#include "sysdeps.h"
#include "adb_client.h"
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <condition_variable>
#include <mutex>
#include <optional>
#include <string>
#include <thread>
#include <vector>
#include <android-base/file.h>
#include <android-base/no_destructor.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <android-base/thread_annotations.h>
#include <cutils/sockets.h>
#include "adb_io.h"
#include "adb_utils.h"
#include "socket_spec.h"
#include "sysdeps/chrono.h"
Macros | |
#define | TRACE_TAG ADB |
Functions | |
void | adb_set_transport (TransportType type, const char *serial, TransportId transport_id) |
void | adb_get_transport (TransportType *type, const char **serial, TransportId *transport_id) |
void | adb_set_socket_spec (const char *socket_spec) |
void | adb_set_one_device (const char *one_device) |
static std::optional< TransportId > | switch_socket_transport (int fd, std::string *error) |
bool | adb_status (borrowed_fd fd, std::string *error) |
static int | _adb_connect (std::string_view service, TransportId *transport, std::string *error, bool force_switch=false) |
bool | adb_kill_server () |
int | adb_connect (std::string_view service, std::string *error) |
static bool | __adb_check_server_version (std::string *error) |
bool | adb_check_server_version (std::string *error) |
int | adb_connect (TransportId *transport, std::string_view service, std::string *error, bool force_switch_device) |
bool | adb_command (const std::string &service) |
bool | adb_query (const std::string &service, std::string *result, std::string *error, bool force_switch_device) |
std::string | format_host_command (const char *command) |
const std::optional< FeatureSet > & | adb_get_feature_set (std::string *error) |
static void | error_exit_va (int error, const char *fmt, va_list va) |
void | error_exit (const char *fmt,...) |
void | perror_exit (const char *fmt,...) |
Variables | |
static TransportType | __adb_transport = kTransportAny |
static const char * | __adb_serial = nullptr |
static TransportId | __adb_transport_id = 0 |
static const char * | __adb_server_socket_spec |
static const char * | __adb_client_one_device |
#define TRACE_TAG ADB |
|
static |
|
static |
bool adb_check_server_version | ( | std::string * | error | ) |
bool adb_command | ( | const std::string & | service | ) |
int adb_connect | ( | std::string_view | service, |
std::string * | error | ||
) |
int adb_connect | ( | TransportId * | transport, |
std::string_view | service, | ||
std::string * | error, | ||
bool | force_switch_device | ||
) |
const std::optional< FeatureSet > & adb_get_feature_set | ( | std::string * | error | ) |
void adb_get_transport | ( | TransportType * | type, |
const char ** | serial, | ||
TransportId * | transport_id | ||
) |
bool adb_kill_server | ( | ) |
bool adb_query | ( | const std::string & | service, |
std::string * | result, | ||
std::string * | error, | ||
bool | force_switch_device | ||
) |
void adb_set_one_device | ( | const char * | one_device | ) |
void adb_set_socket_spec | ( | const char * | socket_spec | ) |
void adb_set_transport | ( | TransportType | type, |
const char * | serial, | ||
TransportId | transport_id | ||
) |
bool adb_status | ( | borrowed_fd | fd, |
std::string * | error | ||
) |
void error_exit | ( | const char * | fmt, |
... | |||
) |
|
static |
std::string format_host_command | ( | const char * | command | ) |
void perror_exit | ( | const char * | fmt, |
... | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |