system/corennnnn
リビジョン | 0f83253596e7c23c98c141224238841a3102e5f6 (tree) |
---|---|
日時 | 2009-08-27 04:56:58 |
作者 | Mike Lockwood <lockwood@andr...> |
コミッター | Android Git Automerger |
am a3e8a6ad: adb: Fix emulator support.
Merge commit 'a3e8a6ad56d60d2ad6c580004f86920d73acc62c' into eclair-plus-aosp
* commit 'a3e8a6ad56d60d2ad6c580004f86920d73acc62c':
@@ -851,7 +851,7 @@ int adb_main(int is_daemon) | ||
851 | 851 | HOST = 1; |
852 | 852 | usb_vendors_init(); |
853 | 853 | usb_init(); |
854 | - local_init(); | |
854 | + local_init(ADB_LOCAL_TRANSPORT_PORT); | |
855 | 855 | |
856 | 856 | if(install_listener("tcp:5037", "*smartsocket*", NULL)) { |
857 | 857 | exit(1); |
@@ -923,13 +923,15 @@ int adb_main(int is_daemon) | ||
923 | 923 | ** is not set, otherwise start the network transport. |
924 | 924 | */ |
925 | 925 | property_get("service.adb.tcp.port", value, "0"); |
926 | - if (sscanf(value, "%d", &port) == 0) { | |
927 | - port = 0; | |
928 | - } | |
929 | - if (port == 0 && access("/dev/android_adb", F_OK) == 0) { | |
926 | + if (sscanf(value, "%d", &port) == 1 && port > 0) { | |
927 | + // listen on TCP port specified by service.adb.tcp.port property | |
928 | + local_init(port); | |
929 | + } else if (access("/dev/android_adb", F_OK) == 0) { | |
930 | + // listen on USB | |
930 | 931 | usb_init(); |
931 | 932 | } else { |
932 | - local_init(port); | |
933 | + // listen on default port | |
934 | + local_init(ADB_LOCAL_TRANSPORT_PORT); | |
933 | 935 | } |
934 | 936 | init_jdwp(); |
935 | 937 | #endif |
@@ -33,7 +33,7 @@ | ||
33 | 33 | #define ADB_VERSION_MAJOR 1 // Used for help/version information |
34 | 34 | #define ADB_VERSION_MINOR 0 // Used for help/version information |
35 | 35 | |
36 | -#define ADB_SERVER_VERSION 24 // Increment this when we want to force users to start a new adb server | |
36 | +#define ADB_SERVER_VERSION 25 // Increment this when we want to force users to start a new adb server | |
37 | 37 | |
38 | 38 | typedef struct amessage amessage; |
39 | 39 | typedef struct apacket apacket; |
@@ -360,7 +360,7 @@ typedef enum { | ||
360 | 360 | #define ADB_PROTOCOL 0x1 |
361 | 361 | |
362 | 362 | |
363 | -void local_init(); | |
363 | +void local_init(int port); | |
364 | 364 | int local_connect(int port); |
365 | 365 | |
366 | 366 | /* usb host/client interface */ |