If I want to create a new device, conforming to Android HAL, I should use one of the following approaches: 1. App - Runtime Service - lib 2. App - Runtime Service - Native Service - lib 3. App - Runtime Service - Native Daemon - lib Except for the existing devices, it is not easy to identify all the files which need to be modified for adding a new one. I am also interested in writing a User-Mode Driver, instead of using a Kernel-Mode Driver model. For now, I want to make it work in the emulator.
My fake device will be similar to "sensor" device. I tried to create a library calling it "fake" and managing all necessary features. I put them into /hardware/libhardware/fake, /hardware/libhardware/ include/fake, with its Android.mk. It relies on /dev/fake and /dev/input/fake (one for data, the second one for control). First question. There's a standard way in Android Project Group for adding a new device (kernel and/or user model)? (Folders where files should be placed, tips for makefiles, etc? The device /dev/input/ compass is managed by which driver?) There's a stub for implementing a new device and related Manager/ Services, to higher levels up to Application? Thank you in advance, Luca Belluccini On Dec 8, 6:46 pm, "Dianne Hackborn" <[email protected]> wrote: > On Mon, Dec 8, 2008 at 4:50 AM, Luca Belluccini > <[email protected]>wrote: > > > How to define a group statically? (Maybe editing kernel files? Is > > there any file containing group ids?) > > The meaning of groups is purely defined by user space. There is a > system/init header that defines the standard groups. > > > > and add an item in the frameworks AndroidManifest.xml describing that > > > permission. > > This one? frameworks/base/core/res/AndroidManifest.xml > > Yep. > > Oh one thing to note -- if you are planning on submitting a patch for this, > please keep in mind that these permissions need to be something that a > normal user can understand. It makes no sense to warn them about something > that they don't understand. :) > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support. All such questions should be posted on public > forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
