If you look at how the wifi drivers get loaded, you can see that they load them via hardware/libhardware_legacy/wifi/wifi.c which is called from a jni that the framework uses.

You can follow a similar route.

A simpler alternative that I use is to write a script to load the module and set a property when it is done, add this script as a service in init.rc, then get whatever java code (app or framework or whatever) to start the service when required and wait for the property to be set from the script to indicate that it has finished.

If you find that your java code cannot set the property to start the service, then you can either change the permissions for that property (I cant remember where that is done), or use a property that can be set by anyone and use the init.rc on propterty trigger to start the service when it is set by the java code.

Regards,

Bob




perumal316 wrote:
Sorry,

But I thought by placing it in init.rc it will load when android boots
up. I am writing an Android App and I want the module to load when the
user starts this app.

Can it be done this way? Or I have to load it when android boots up.

Regards,
Perumal

On Mar 26, 12:46 pm, Tirtha Kanti Ghosh <gtir...@gmail.com> wrote:
To load a module you need to do "# insmod path/file.ko"

Now, you can load it when android boots up...placing this call in init.rc
or else you can make piece of code to do them same whenever you require
it...

regards,

On Fri, Mar 26, 2010 at 10:06 AM, perumal316 <perumal...@gmail.com> wrote:
Hi All,
I am having an Android Developer Phone. Is it possible for me to load
my kernel module in the phone itself? I tried it in terminal emulator
but cannot be done.
I want the module to load itself when user starts my application. Is
it possible? I read that in Android each application is 'sandboxed' so
it can't have root access. But not sure whether this can be done in
the the developer phone.
Regards,
Perumal
--
unsubscribe: 
android-kernel+unsubscr...@googlegroups.com<android-kernel%2bunsubscr...@googlegroups.com>
website:http://groups.google.com/group/android-kernel
To unsubscribe from this group, send email to android-kernel+
unsubscribegooglegroups.com or reply to this email with the words "REMOVE
ME" as the subject.


--
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

To unsubscribe from this group, send email to android-kernel+unsubscribegooglegroups.com 
or reply to this email with the words "REMOVE ME" as the subject.

Reply via email to