| 44 | } |
| 45 | |
| 46 | bool Connection::connect() |
| 47 | { |
| 48 | LogFunc; |
| 49 | |
| 50 | bool is_remote = adb_serial_.find(':') != std::string::npos; |
| 51 | |
| 52 | if (is_remote) { |
| 53 | if (!connect_remote()) { |
| 54 | LogInfo << "failed to connect remote"; |
| 55 | return false; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | if (!test_connection()) { |
| 60 | return false; |
| 61 | } |
| 62 | |
| 63 | start_monitor(); |
| 64 | |
| 65 | return true; |
| 66 | } |
| 67 | |
| 68 | bool Connection::kill_server() |
| 69 | { |