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>
This commit is contained in:
Mikael Kanstrup 2018-03-26 11:22:53 +02:00 committed by Roland Knall
parent 789db1f15d
commit a37045adcd
1 changed files with 4 additions and 1 deletions

View File

@ -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;