Where to find info on Android's “service call” shell command?

Using adb shell or a terminal emulator on the device, entering this will clear all notifications (requires su)

service call notification 1

This will send an sms (doesn’t require su)

  • Notification throws error when using vector drawables
  • How can i keep one button as pressed after click on it?
  • The Completest Cocos2d-x Tutorial & Guide List
  • Android SimpleOnGestureListener.onFling getting a null MotionEvent
  • Android WebView Zoom out limited
  • ExpandableListView Slide animation on Group expand/collapse
  • 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?

    Running service call was incomplete and printed this usage:

    Usage: service [-h|-?]
           service list
           service check SERVICE
           service call SERVICE CODE [i32 INT | s16 STR] ...
       i32: Write the integer INT into the send parcel.
       s16: Write the UTF-16 string STR into the send parcel.

    I ran service list and it came back with 78 services for my device including isms and notification and for most services will print what seems to be a namespace (com.android.internal.telephony.ISms for isms and android.app.INotificationManager for notification). How can I use this information to find out what I can do with each of these services?

    Related posts:

    How to make TextInputLayout hint asterisk red for required fields
    Find all classes in a package in Android
    AppCompatDialogFragment issue with appcompat-v7:23.1.0
    Using navigator.geolocation.getCurrentPosition in WebView on Android 2.0+ (PhoneGap related)
    Android: How to release resources when the application terminates?
    How to enable auto start for my app in xiaomi programmatically
  • Android: Overlapping two views (intentionally!)
  • DatePicker having a background
  • Simple swipe gesture to activity tutorial?
  • Android - how to set the wallpaper image
  • ActionBarsherlock android.R.id.home <API 11
  • Android NDK R8E missing stdlib.h
  • 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 sendMultipartText.

    The same rule applies for all services.

    I am sure that you find out how to check TRANSACTIONs for notification service now. Good fun.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.