I am analyzing a custom Android device. I tried to enumerate services running in the system (adb shell service list
) and I found out that there is a service (let's call it MyService
) that I would like to analyze more in depth. It might be a privileged (system) service, if that is a relevant information.
When I run adb shell service list | grep MyService
, it returns something like aaa.bbb.ccc.ddd.MyService
. I would like to get the code/binary/APK of this service. However, when I run adb shell pm path aaa.bbb.ccc.ddd.MyService
, it returns error code 1 and doesn't print any path. The same situation occurs when I execute adb shell pm list packages | grep -i XXX
, where XXX
is any of aaa
,bbb
,ccc
,ddd
or MyService
(for the record, aaa
and bbb
return some packages, but they do not have anything in common with the specific service).
My question is: How can I extract the code/binary/APK/... of the service? How do I find where it is installed?
If root access is needed, that shouldn't be a problem.