How to run an apk with UID root

by ksk » Mon, 22 Feb 2010 06:36:44 GMT


Sponsored Links
 Hi,

          I have an application(apk) which normally gets uid as
app_16. Internally it calls a Shared library, which tries to write to
HCI socket(bluetooth socket). Here the socket which is created has
bluetooth UID and GID. It is not allowing to write to that socket.

Can any body give me suggestion what all permissions should be given
in manifest file to make it work. I have bluetooth and bluetooth admin
in Manifest file.

or Any thing should be added to framework such that my apk and library
gets permissions to aceeses HCI socket.

regards
KSK.



How to run an apk with UID root

by Dianne Hackborn » Mon, 22 Feb 2010 20:09:32 GMT


 Sorry, no .apk can run as root.  The android system is designed carefully to
run very few things as root, and that is way lower level than an .apk.  Not
even the system process (hosting the package manager, activity manager,
window manager, and various other essential system services) runs as root or
can cause something else to run as root.

Typically how device access is handled is by defining a uid that the device
is a group of and a permission in permissions.xml mapping to that uid, so an
.apk can use <uses-permission> to be included in that uid group.







-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


Sponsored Links


Other Threads

1. Android doesn't support ICC Profile related API?

No, and no.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~

2. android_on_davinci

Is anyone have interest on davinci platform?:)

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. com.android.layoutlib.bridge.BridgeCanvas has a bug when drawing a round rect

4. Re-installation failed due to different application signatures

5. Android doesn't support ICC Profile related API?

6. com.android.layoutlib.bridge.BridgeCanvas has a bug when drawing a round rect

7. Context Menu calling Activity.onMenuItemSelected() instead of Activity.onContextMenuItemSelected()