New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
DKSL
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 23
Join Date: Feb 2012
Default Hacking MIC and GPS devices on Android

I would like to hack in to two andorid devices, mic and the GPS device. With the mic I want to get the back ground noise. Measure the intensity of sound for ex - lets say frequency or some dB value (which ever is supported). With GPS obviously the location cordinates.

On the android platform it will be easy to do this as an application. However I want to pass this data to the kernel..how to achieve that? a user space daemon polling the above sensors constantly(then agian how to write to the kernel space..), or can I get these values in the kernel space itself? (ex- as a bite stream from the device driver)

Appreciate any ideas about the matter..
 
showlyshah
Old
#2  
showlyshah's Avatar
Senior Member
Thanks Meter 316
Posts: 605
Join Date: Mar 2011
Location: kollam
I think the os can do realtime calculations. But kernal????, as of my knowledge kernal is a bridge that connects the hardware with the software( os here) and dnt think that kernal itself can do calculations, but kernal can adjust the o/p , i/p parameters to the os( for eg. Android kernal parameters can be adjusted by init.d or local.prop scripts. ) . But they are executed in os startup, and i think they are constant through out the operating time or untill next boot. So i think either of these scripts can be used to adjust some thing, but not in real time but in each boot.

So the idea is read the values via some app, use the app to generate the script with desired value, inject it to the system folder, and it will be executed on next startup.

Still i dont get the point, why do u want the kernal itself to do the things.

HD2 HYPERDROID EXTREME EDITION V6.0.1 @ FIKERT KERNAL.
I AM THE PROUD OWNER OF THE COOLEST ANDROID DEVICE ON EARTH... YAP.. U NAME IT.. THE HD2

PLEASE READ THIS B4 U ASK QUESTIONShttp://forum.xda-developers.com/showpost.php?p=18289016&postcount=1





HYPERDROID TEAM MEMBER...
 
Renate NST
Old
#3  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 481
Posts: 1,240
Join Date: Feb 2012
Location: Boston
I'm not sure why you're so big on doing this in kernel.
GPS data is so slow that you could easily handle it on a TRS-80.

Audio data is not a heap of work either.
Ok, I would write any heavy computations in a native lib (in user space).
I'm not sure if Android phones (versus other Android devices) use ALSA,
but I've written my own code for interfacing with ALSA directly and bypassing Android.