Where to find info on Android's “service call” shell command?
service call notification 1
This will send an sms (doesn’t require
service call isms 5 s16 "PhoneNumber" i32 0 i32 0 s16 "BodyText"
Where can I learn more about
service call? I’ve found this question and appreciate the answer’s breakdown as to what everything means. But where can I find info on what method
notification 2 might be trying to call?
service call was incomplete and printed this usage:
Usage: service [-h|-?] service list service check SERVICE service call SERVICE CODE [i32 INT | s16 STR] ... Options: i32: Write the integer INT into the send parcel. s16: Write the UTF-16 string STR into the send parcel.
service list and it came back with 78 services for my device including
notification and for most services will print what seems to be a namespace (
notification). How can I use this information to find out what I can do with each of these services?
2 Solutions collect form web for “Where to find info on Android's “service call” shell command?”
Here is my post about Calling Android services from ADB shell. It includes a small bash script I use to automatically download the proper version of service source code for my specific device and then parse it to find out the transaction codes for all methods.
My first answer here so I hope will be useful for you.
To explain this small riddle let me use android 4.3.1. This link could be essential in your case. Scroll down the java code to line 669. There is waiting for you TRANSACTION block strictly related with
com.android.internal.telephony.ISms service and probably your answer what you can do more.
In your case you are invoking TRANSACTION_sendText. Explanation is in line 673 where you can find
static final int TRANSACTION_sendText = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);
The last part of code consist digit “4”. Each TRANSACTION number + 1 = the proper one. That is why
service call isms 5 is responsible for
sendText and not for
The same rule applies for all services.
I am sure that you find out how to check TRANSACTIONs for notification service now. Good fun.