简体   繁体   English

init.rc:服务名称无效

[英]init.rc: invalid service name

Trying to start a service via init.rc on Android. 试图通过Android上的init.rc启动服务。

service name_of_my_service /path/to/my/service
    user root

Getting the following error: 收到以下错误:

init: Invalid service name name_of_my_service init:无效的服务名称name_of_my_service

Your service name is too long (or contains invalid characters). 您的服务名称太长(或包含无效字符)。

Service names can be at most 16 characters long, and can contain alphanumeric characters, "_", and "-". 服务名称最多可包含16个字符,并且可以包含字母数字字符“_”和“ - ”。

https://android.googlesource.com/platform/system/core/+/android-4.2.2_r1.2/init/init_parser.c#411 https://android.googlesource.com/platform/system/core/+/android-4.2.2_r1.2/init/init_parser.c#411

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM