之前版本中通过属性来启动服务失效了
是在P上对属性名进行了规范,必现符合规则的才可以
diff --git[a/init/action_parser.cpp](https://android.googlesource.com/platform/system/core/+/dd85c74655400347aee5f6bfecd827a311f16ca4/init/action_parser.cpp)[b/init/action_parser.cpp]
(https://android.googlesource.com/platform/system/core/+/fa79ae87f12d2709482375f56a1c13737a8513f3/init/action_parser.cpp)
index 2d497b3..4f8bd16 100644
--- a/init/action_parser.cpp
+++ b/init/action_parser.cpp
@@ -40,6 +40,18 @@
return true; }
+ static constexpr const char* kPartnerPrefixes[] = {
+ "init.svc.vendor.", "ro.vendor.", "persist.vendor.",+ "vendor.", "init.svc.odm.", "ro.odm.",
+ "persist.odm.", "odm.", "ro.boot.",+ };
++ for (const auto& prefix : kPartnerPrefixes) {
+ if (android::base::StartsWith(prop_name, prefix)) {
+ return true;+ }
+ }
+ return CanReadProperty(subcontext->context(), prop_name); }
网友评论