Deploy

We can now build, push, and start the service:

  1. m birthday_server
  2. adb push "$ANDROID_PRODUCT_OUT/system/bin/birthday_server" /data/local/tmp
  3. adb root
  4. adb shell /data/local/tmp/birthday_server

In another terminal, check that the service runs:

  1. adb shell service check birthdayservice
  1. Service birthdayservice: found

You can also call the service with service call:

  1. adb shell service call birthdayservice 1 s16 Bob i32 24
  1. Result: Parcel(
  2. 0x00000000: 00000000 00000036 00610048 00700070 '....6...H.a.p.p.'
  3. 0x00000010: 00200079 00690042 00740072 00640068 'y. .B.i.r.t.h.d.'
  4. 0x00000020: 00790061 00420020 0062006f 0020002c 'a.y. .B.o.b.,. .'
  5. 0x00000030: 006f0063 0067006e 00610072 00750074 'c.o.n.g.r.a.t.u.'
  6. 0x00000040: 0061006c 00690074 006e006f 00200073 'l.a.t.i.o.n.s. .'
  7. 0x00000050: 00690077 00680074 00740020 00650068 'w.i.t.h. .t.h.e.'
  8. 0x00000060: 00320020 00200034 00650079 00720061 ' .2.4. .y.e.a.r.'
  9. 0x00000070: 00210073 00000000 's.!..... ')