aboutsummaryrefslogtreecommitdiffstats
path: root/extcap/androiddump.c
diff options
context:
space:
mode:
authorMikael Kanstrup <mikael.kanstrup@gmail.com>2018-03-26 11:22:53 +0200
committerRoland Knall <rknall@gmail.com>2018-03-26 15:03:52 +0000
commita37045adcd821b2ccbbd45597f25023a3141202d (patch)
treea694daff5c9fd451defffba7547f1ae5bba1754c /extcap/androiddump.c
parent789db1f15de6238c7b7b00662aeaedf8189eb962 (diff)
androiddump: Update ps command parameter for Android Oreo
ps command is used to find com.android.bluetooth process. From Android Oreo the ps command needs -A parameter for listing all processes. Change-Id: I1a547a0d61175c1e194823462661ec69e711ca50 Reviewed-on: https://code.wireshark.org/review/26652 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'extcap/androiddump.c')
-rw-r--r--extcap/androiddump.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c
index 8b55b0b5ae..db08dab0de 100644
--- a/extcap/androiddump.c
+++ b/extcap/androiddump.c
@@ -986,6 +986,7 @@ static int register_interfaces(extcap_parameters * extcap_conf, const char *adb_
const char *adb_ps_droid_bluetooth = "shell:ps droid.bluetooth";
const char *adb_ps_bluetooth_app = "shell:ps com.android.bluetooth";
const char *adb_ps_with_grep = "shell:ps | grep com.android.bluetooth";
+ const char *adb_ps_all_with_grep = "shell:ps -A | grep com.android.bluetooth";
char serial_number[SERIAL_NUMBER_LENGTH_MAX];
char model_name[MODEL_NAME_LENGTH_MAX];
int result;
@@ -1176,7 +1177,9 @@ static int register_interfaces(extcap_parameters * extcap_conf, const char *adb_
const char* ps_cmd;
disable_interface = 0;
- if (api_level >= 24) {
+ if (api_level >= 26) {
+ ps_cmd = adb_ps_all_with_grep;
+ } else if (api_level >= 24) {
ps_cmd = adb_ps_with_grep;
} else if (api_level >= 23) {
ps_cmd = adb_ps_bluetooth_app;