diff options
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; + } +} |