diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2015-10-19 14:03:43 +0200 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2015-11-20 12:14:33 +0000 |
commit | 01cdabb63ba5314a8ced0aa33f082874737471dd (patch) | |
tree | a980b56a0a91de853f1965e44ecdcf486ae88ca1 /extcap/androiddump.c | |
parent | 0ae19656e12089271ea5941bcb4663bedc337b69 (diff) |
androiddump: Add Bluetooth support for Android M
In real it is a fix, because the only change is new name of
process of the same application on Android.
Change-Id: I69d1362e9f11967ec1127ff89c7b45299d291fe8
Reviewed-on: https://code.wireshark.org/review/11984
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'extcap/androiddump.c')
-rw-r--r-- | extcap/androiddump.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c index 0aa8df65a4..6c1359b691 100644 --- a/extcap/androiddump.c +++ b/extcap/androiddump.c @@ -566,6 +566,7 @@ static int add_android_interfaces(struct interface_t **interface_list, const char *adb_api_level = "0022""shell:getprop ro.build.version.sdk"; const char *adb_hcidump_version = "0017""shell:hcidump --version"; const char *adb_ps_droid_bluetooth = "0018""shell:ps droid.bluetooth"; + const char *adb_ps_bluetooth_app = "001E""shell:ps com.android.bluetooth"; const char *adb_tcpdump_help = "0010""shell:tcpdump -h"; char serial_number[512]; int result; @@ -833,7 +834,6 @@ static int add_android_interfaces(struct interface_t **interface_list, return 1; } - response = adb_send_and_read(sock, adb_ps_droid_bluetooth, helpful_packet, sizeof(helpful_packet), &data_length); closesocket(sock); if (!response || data_length < 1) { @@ -913,8 +913,10 @@ static int add_android_interfaces(struct interface_t **interface_list, return 1; } - - response = adb_send_and_read(sock, adb_ps_droid_bluetooth, helpful_packet, sizeof(helpful_packet), &data_length); + if (api_level >= 23) { + response = adb_send_and_read(sock, adb_ps_bluetooth_app, helpful_packet, sizeof(helpful_packet), &data_length); + } else + response = adb_send_and_read(sock, adb_ps_droid_bluetooth, helpful_packet, sizeof(helpful_packet), &data_length); closesocket(sock); if (!response || data_length < 1) { if (verbose) { |