Calling service intent fails with "not found" I want to start a service intent of an application (com.urbandroid.lux). According to the developer, there is a service intent "com.urbandroid.lux.TwilightService" which can be called with extra "toggle"/"toggle" (string).

But no matter what I do, I always get a "Not found" error. For example, using adb as root:

# am startservice -c "" --es toggle toggle com.urbandroid.lux com.urbandroid.lux.TwilightService
Starting service: Intent { act=android.intent.action.MAIN cat=[] pkg=com.urbandroid.lux (has extras) }
Error: Not found; no service started.
#


I also tried using Tasker. With "adb logcat" I get a similar error:

W/ActivityManager( 1402): Unable to start service Intent { act=com.urbandroid.lux.TwilightService pkg=com.urbandroid.lux (has extras) } U=0: not found


Now I used "aapt dump xmltree lux.apk AndroidManifest.xml" to verify the existence of the intent. As can be seen, it is indeed there (line 55-57):

http://pastebin.com/31NqrSuN

I tried any combinations (leading/trailing slashes/points, different calls, ...) I could possibly think. But the error is always the same.

Is there something in particular I am doing wrong?
WHAT exactly is not found here? The app? The process? The service? The entry point/method?
The component name is specified as the package name, then a slash, then the name of the class. So in this case, the command you want is:-

am startservice --es toggle toggle com.urbandroid.lux/.TwilightService


For future reference, and to help avoid confusion: the intent is the name of the message you're sending to start the service. The thing that you want to start is a service, not a "service intent", and the thing you found in the manifest is a service, not an intent.