Replacing USB_SERVICE

27 views
Skip to first unread message

José Freitas

unread,
Nov 12, 2015, 10:06:09 AM11/12/15
to android-platform
Hello guys,

on SystemServer the android Platform instantiates and sets a USB_SERVICE that will handle permissions and other aspects of the usb connection.

I was wondering if, on a rooted device, I could replace the USB_SERVICE with my own service implementation using something like:
ServiceManager.addService(Context.USB_SERVICE, myOwnUsbServiceObject) 
But it seems to be not possible. Or is it and I am doing something wrong?

Is there any other way to replace a system service (on a rooted device)?

Thanks and Cheers


Satish Patel

unread,
Nov 13, 2015, 8:21:22 AM11/13/15
to android-...@googlegroups.com
On Thu, Nov 12, 2015 at 5:27 PM, José Freitas <joserodol...@gmail.com> wrote:
Hello guys,

on SystemServer the android Platform instantiates and sets a USB_SERVICE that will handle permissions and other aspects of the usb connection.

I was wondering if, on a rooted device, I could replace the USB_SERVICE with my own service implementation using something like:
ServiceManager.addService(Context.USB_SERVICE, myOwnUsbServiceObject) 
But it seems to be not possible. Or is it and I am doing something wrong?
​if you have sources, then nothing stop to replace system service with your own implementation.​
 

Is there any other way to replace a system service (on a rooted device)?

Thanks and Cheers


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To post to this group, send email to android-...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
satish patel
Reply all
Reply to author
Forward
0 new messages