Loading adb/client/commandline.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -762,6 +762,17 @@ static int adb_shell(int argc, const char** argv) { } } static int adb_abb(int argc, const char** argv) { static int adb_abb(int argc, const char** argv) { FeatureSet features; std::string error_message; if (!adb_get_feature_set(&features, &error_message)) { fprintf(stderr, "error: %s\n", error_message.c_str()); return 1; } if (!CanUseFeature(features, kFeatureAbb)) { error_exit("abb is not supported by the device"); } // Defaults. // Defaults. constexpr char escape_char = '~'; // -e constexpr char escape_char = '~'; // -e constexpr bool use_shell_protocol = true; constexpr bool use_shell_protocol = true; Loading adb/transport.cpp +3 −1 Original line number Original line Diff line number Diff line Loading @@ -68,6 +68,7 @@ const char* const kFeatureLibusb = "libusb"; const char* const kFeaturePushSync = "push_sync"; const char* const kFeaturePushSync = "push_sync"; const char* const kFeatureApex = "apex"; const char* const kFeatureApex = "apex"; const char* const kFeatureFixedPushMkdir = "fixed_push_mkdir"; const char* const kFeatureFixedPushMkdir = "fixed_push_mkdir"; const char* const kFeatureAbb = "abb"; namespace { namespace { Loading Loading @@ -1013,7 +1014,8 @@ size_t atransport::get_max_payload() const { const FeatureSet& supported_features() { const FeatureSet& supported_features() { // Local static allocation to avoid global non-POD variables. // Local static allocation to avoid global non-POD variables. static const FeatureSet* features = new FeatureSet{ static const FeatureSet* features = new FeatureSet{ kFeatureShell2, kFeatureCmd, kFeatureStat2, kFeatureFixedPushMkdir, kFeatureApex kFeatureShell2, kFeatureCmd, kFeatureStat2, kFeatureFixedPushMkdir, kFeatureApex, kFeatureAbb, // Increment ADB_SERVER_VERSION when adding a feature that adbd needs // Increment ADB_SERVER_VERSION when adding a feature that adbd needs // to know about. Otherwise, the client can be stuck running an old // to know about. Otherwise, the client can be stuck running an old // version of the server even after upgrading their copy of adb. // version of the server even after upgrading their copy of adb. Loading adb/transport.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,8 @@ extern const char* const kFeaturePushSync; extern const char* const kFeatureApex; extern const char* const kFeatureApex; // adbd has b/110953234 fixed. // adbd has b/110953234 fixed. extern const char* const kFeatureFixedPushMkdir; extern const char* const kFeatureFixedPushMkdir; // adbd supports android binder bridge (abb). extern const char* const kFeatureAbb; TransportId NextTransportId(); TransportId NextTransportId(); Loading Loading
adb/client/commandline.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -762,6 +762,17 @@ static int adb_shell(int argc, const char** argv) { } } static int adb_abb(int argc, const char** argv) { static int adb_abb(int argc, const char** argv) { FeatureSet features; std::string error_message; if (!adb_get_feature_set(&features, &error_message)) { fprintf(stderr, "error: %s\n", error_message.c_str()); return 1; } if (!CanUseFeature(features, kFeatureAbb)) { error_exit("abb is not supported by the device"); } // Defaults. // Defaults. constexpr char escape_char = '~'; // -e constexpr char escape_char = '~'; // -e constexpr bool use_shell_protocol = true; constexpr bool use_shell_protocol = true; Loading
adb/transport.cpp +3 −1 Original line number Original line Diff line number Diff line Loading @@ -68,6 +68,7 @@ const char* const kFeatureLibusb = "libusb"; const char* const kFeaturePushSync = "push_sync"; const char* const kFeaturePushSync = "push_sync"; const char* const kFeatureApex = "apex"; const char* const kFeatureApex = "apex"; const char* const kFeatureFixedPushMkdir = "fixed_push_mkdir"; const char* const kFeatureFixedPushMkdir = "fixed_push_mkdir"; const char* const kFeatureAbb = "abb"; namespace { namespace { Loading Loading @@ -1013,7 +1014,8 @@ size_t atransport::get_max_payload() const { const FeatureSet& supported_features() { const FeatureSet& supported_features() { // Local static allocation to avoid global non-POD variables. // Local static allocation to avoid global non-POD variables. static const FeatureSet* features = new FeatureSet{ static const FeatureSet* features = new FeatureSet{ kFeatureShell2, kFeatureCmd, kFeatureStat2, kFeatureFixedPushMkdir, kFeatureApex kFeatureShell2, kFeatureCmd, kFeatureStat2, kFeatureFixedPushMkdir, kFeatureApex, kFeatureAbb, // Increment ADB_SERVER_VERSION when adding a feature that adbd needs // Increment ADB_SERVER_VERSION when adding a feature that adbd needs // to know about. Otherwise, the client can be stuck running an old // to know about. Otherwise, the client can be stuck running an old // version of the server even after upgrading their copy of adb. // version of the server even after upgrading their copy of adb. Loading
adb/transport.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,8 @@ extern const char* const kFeaturePushSync; extern const char* const kFeatureApex; extern const char* const kFeatureApex; // adbd has b/110953234 fixed. // adbd has b/110953234 fixed. extern const char* const kFeatureFixedPushMkdir; extern const char* const kFeatureFixedPushMkdir; // adbd supports android binder bridge (abb). extern const char* const kFeatureAbb; TransportId NextTransportId(); TransportId NextTransportId(); Loading