summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmds/service/service.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/cmds/service/service.cpp b/cmds/service/service.cpp
index 428b87cd51..09921e45d3 100644
--- a/cmds/service/service.cpp
+++ b/cmds/service/service.cpp
@@ -68,18 +68,12 @@ static String8 good_old_string(const String16& src)
int main(int argc, char* const argv[])
{
- sp<IServiceManager> sm = defaultServiceManager();
- fflush(stdout);
- if (sm == NULL) {
- aerr << "service: Unable to get default service manager!" << endl;
- return 20;
- }
-
bool wantsUsage = false;
+ bool wantsVendorServices = false;
int result = 0;
while (1) {
- int ic = getopt(argc, argv, "h?");
+ int ic = getopt(argc, argv, "vh?");
if (ic < 0)
break;
@@ -88,6 +82,9 @@ int main(int argc, char* const argv[])
case '?':
wantsUsage = true;
break;
+ case 'v':
+ wantsVendorServices = true;
+ break;
default:
aerr << "service: Unknown option -" << ic << endl;
wantsUsage = true;
@@ -95,6 +92,16 @@ int main(int argc, char* const argv[])
break;
}
}
+
+ if (wantsVendorServices) {
+ ProcessState::initWithDriver("/dev/vndbinder");
+ }
+ sp<IServiceManager> sm = defaultServiceManager();
+ fflush(stdout);
+ if (sm == NULL) {
+ aerr << "service: Unable to get default service manager!" << endl;
+ return 20;
+ }
if (optind >= argc) {
wantsUsage = true;