diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-12-09 15:45:46 -0800 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-12-13 11:37:19 -0800 |
commit | d86c724b74e6c04a89219d87559d0b580e100445 (patch) | |
tree | 8a12ffaa8445fd55f9683321b623c2ab085096dd /android/avd/util.c | |
parent | a743be75c49f94811e6c8960ee0d6a2d0a65c700 (diff) | |
download | external_qemu-d86c724b74e6c04a89219d87559d0b580e100445.zip external_qemu-d86c724b74e6c04a89219d87559d0b580e100445.tar.gz external_qemu-d86c724b74e6c04a89219d87559d0b580e100445.tar.bz2 |
Implement ADB communication over QEMU pipe
Change-Id: I62ff5898c7a955aaaa8af8f7ee7ed018af860f80
Diffstat (limited to 'android/avd/util.c')
-rw-r--r-- | android/avd/util.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/android/avd/util.c b/android/avd/util.c index 304b98f..82145b5 100644 --- a/android/avd/util.c +++ b/android/avd/util.c @@ -313,3 +313,24 @@ path_getBuildTargetApiLevel( const char* androidOut ) return level; } +int +path_getAdbdCommunicationMode( const char* androidOut ) +{ + char* prop = _getBuildProperty(androidOut, "ro.adb.qemud"); + if (prop != NULL) { + long val = 0; + char* end; + val = strtol(prop, &end, 10); + if (end == NULL || *end != '\0' || val != (int)val) { + D("Invalid ro.adb.qemud build property: '%s'", prop); + val = 0; + } else { + D("Found ro.adb.qemud build property: %d", val); + } + AFREE(prop); + return (int)val; + } else { + /* Missing ro.adb.qemud means "legacy" ADBD. */ + return 0; + } +} |