summaryrefslogtreecommitdiff
path: root/init/service_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'init/service_parser.cpp')
-rw-r--r--init/service_parser.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/init/service_parser.cpp b/init/service_parser.cpp
index e7808a999..e6a341d77 100644
--- a/init/service_parser.cpp
+++ b/init/service_parser.cpp
@@ -560,6 +560,11 @@ Result<void> ServiceParser::ParseSection(std::vector<std::string>&& args,
str_args[0] = "/system/bin/watchdogd";
}
}
+ if (SelinuxGetVendorAndroidVersion() <= __ANDROID_API_Q__) {
+ if (str_args[0] == "/charger") {
+ str_args[0] = "/system/bin/charger";
+ }
+ }
service_ = std::make_unique<Service>(name, restart_action_subcontext, str_args);
return {};