Post Reply

[Q] Do I need to write drivers?

OP cnayan

21st February 2014, 11:32 PM   |  #1  
cnayan's Avatar
OP Junior Member
Thanks Meter: 0
 
8 posts
Join Date:Joined: Jul 2012
More
I have fair number of years of programming behind me. But I haven't tried anything for Android, as I dislike Java.

But I want to try. I want to make something that works at low level, say, like a firewall. It acts as a filter between two communicating parties/devices.

To write anything like that, can someone suggest which is the best approach - code in Java (if it can perform such a feast) or code driver in C?

Thanks much!

Regards,
Nayan


Sent from my Micromax A117 using xda app-developers app
22nd February 2014, 09:48 AM   |  #2  
Member
Thanks Meter: 21
 
88 posts
Join Date:Joined: Sep 2013
The interesting thing in such low level projects is the entry point: So for a firewall you only have to acces iptables because android has linux kernel. So no C-part, no drivers, only plain java. See AFWall, it's an open source firewall.
The Following User Says Thank You to EmptinessFiller For This Useful Post: [ View ]
22nd February 2014, 10:50 AM   |  #3  
cnayan's Avatar
OP Junior Member
Thanks Meter: 0
 
8 posts
Join Date:Joined: Jul 2012
More
Quote:
Originally Posted by EmptinessFiller

The interesting thing in such low level projects is the entry point: So for a firewall you only have to acces iptables because android has linux kernel. So no C-part, no drivers, only plain java. See AFWall, it's an open source firewall.

Excellent! I would certainly study AFWall. Thanks for the reference.

But actually, my quest doesn't stop here. I am exploring Android, and Google's restriction of "UI to be built only via Java". (I am not interested in scripting and widgets for now, unless they are absolutely needed.)

I want to know the answers for same question (driver or app) for the following:
* Network Filter [EmptinessFiller, you already answered this as Java]
* Disk (SD cards) (for many various purposes) - file system should not block the intention, hopefully.
* USB filter
* SMS filter

I am still thinking of other categories. Will write more later.

Please suggest and refer. Thanks again!
Last edited by cnayan; 22nd February 2014 at 11:09 AM.
22nd February 2014, 06:40 PM   |  #4  
Member
Thanks Meter: 21
 
88 posts
Join Date:Joined: Sep 2013
General answer: Your app is always built in java. (It's UI components, it's LifeCycle (Activity, Service, Broadcastreceiver))
You may include native code, but that does not have more possibilities. It's only a little bit quicker.


Forgotten: If you have root, you may want to change some binaries, because you can't change things in an app. There you need native code of course.
The Following User Says Thank You to EmptinessFiller For This Useful Post: [ View ]
22nd February 2014, 09:41 PM   |  #5  
cnayan's Avatar
OP Junior Member
Thanks Meter: 0
 
8 posts
Join Date:Joined: Jul 2012
More
Quote:
Originally Posted by EmptinessFiller

You may include native code, but that does not have more possibilities. It's only a little bit quicker.

Shame, isn't it? Too much power in Java's hand

Quote:
Originally Posted by EmptinessFiller

Forgotten: If you have root, you may want to change some binaries, because you can't change things in an app. There you need native code of course.

My point exactly! Low level stuff is best written in native code.

But right now, I am learning how to.
23rd February 2014, 11:32 AM   |  #6  
nikwen's Avatar
Recognized Contributor
Thanks Meter: 1,377
 
2,764 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by cnayan

Shame, isn't it? Too much power in Java's hand


My point exactly! Low level stuff is best written in native code.

But right now, I am learning how to.

Have a look at the Android NDK and this guide about the development of root apps.
23rd February 2014, 10:05 PM   |  #7  
cnayan's Avatar
OP Junior Member
Thanks Meter: 0
 
8 posts
Join Date:Joined: Jul 2012
More
Quote:
Originally Posted by nikwen

Have a look at the Android NDK and this guide about the development of root apps.

Thanks for the link. Good stuff, but won't help in my targets... unless an example is seen.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Java for Android App Development by ThreadRank