I create simple android application which contains one activity and service. The service is defined by aidl file and can receive calls from the activity via Binder. Everything works as expected.
Now I deploy the application on device (also I've tried an emulator) and I want to send message to the service via adb:
$ adb shell service call \
com.example.gluttton.dummyandroid/.DummyService 0 STR "Bingo!"
and got message that such service doesn't exist:
service: Service com.example.gluttton.dummyandroid/.DummyService does not exist
I try to check is my service launched:
$ adb shell service list
or
$ adb shell service check com.example.gluttton.dummyandroid/.DummyService
and got similar result.
But at the same time I cat see my service using dumpsys:
$ adb shell dumpsys activity services Dummy
ACTIVITY MANAGER SERVICES (dumpsys activity services)
User 0 active services:
* ServiceRecord{a1627b5 u0 com.example.gluttton.dummyandroid/.DummyService}
intent={act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.gluttton.dummyandroid/.DummyService}
packageName=com.example.gluttton.dummyandroid
processName=com.example.gluttton.dummyandroid
baseDir=/data/app/com.example.gluttton.dummyandroid-1/base.apk
dataDir=/data/data/com.example.gluttton.dummyandroid
app=ProcessRecord{114da04c 20168:com.example.gluttton.dummyandroid/u0a126}
createTime=-21m40s817ms startingBgTimeout=--
lastActivity=-21m40s816ms restartTime=-21m40s816ms createdFromFg=true
startRequested=true delayedStop=false stopIfKilled=false callStart=true lastStartId=1
Also I can start my service:
$ adb shell am startservice com.example.gluttton.dummyandroid/.DummyService
Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.gluttton.dummyandroid/.DummyService }
and stop it:
$ adb shell am stopservice com.example.gluttton.dummyandroid/.DummyService
Stopping service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.gluttton.dummyandroid/.DummyService }
Service stopped
So my question is where is my mistake and how to send message to my service via adb?

service listadb shell am startserviceworks then use it to pass the message to your servicestartservice?