Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

init.rc: invalid service name

Trying to start a service via init.rc on Android.

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

Getting the following error:

init: Invalid service name name_of_my_service

like image 708
Mike Bjorge Avatar asked Mar 14 '23 12:03

Mike Bjorge


1 Answers

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 "-".

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

like image 112
Mike Bjorge Avatar answered Mar 25 '23 04:03

Mike Bjorge