diff options
author | rbox <androidrbox@gmail.com> | 2013-12-23 15:24:23 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-17 17:47:21 -0700 |
commit | b270c1c52a7c305bbdbf3b6cfa69a3876ef24bac (patch) | |
tree | 53f8a52e920d03b7ea0390ca820d819ead9f788c | |
parent | d0161f250e88e11b7c51d2544a76ce3677741c07 (diff) | |
download | system_core-b270c1c52a7c305bbdbf3b6cfa69a3876ef24bac.zip system_core-b270c1c52a7c305bbdbf3b6cfa69a3876ef24bac.tar.gz system_core-b270c1c52a7c305bbdbf3b6cfa69a3876ef24bac.tar.bz2 |
adb: Allow configuring the adb shell with a persistent property.
To set to bash: setprop persist.sys.adb.shell /system/xbin/bash
Change-Id: I24e65f4592aaf23356c13db02c9869076df3b841
-rw-r--r-- | adb/services.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/adb/services.cpp b/adb/services.cpp index 7f00cbc..e683028 100644 --- a/adb/services.cpp +++ b/adb/services.cpp @@ -409,7 +409,12 @@ static int create_subproc_thread(const char *name, const subproc_mode mode) arg0 = "-c"; arg1 = name; } - if (stat(ALTERNATE_SHELL_COMMAND, &st) == 0) { + char value[PROPERTY_VALUE_MAX]; + property_get("persist.sys.adb.shell", value, ""); + if (value[0] != '\0' && stat(value, &st) == 0) { + shell_command = value; + } + else if (stat(ALTERNATE_SHELL_COMMAND, &st) == 0) { shell_command = ALTERNATE_SHELL_COMMAND; } else { |