Firefox OS Architecture and Collaboration Opportunities w/ Asa Dotzler – XDA:DevCon 2014

We were privileged to host many presentations … more

Unofficial Android 4.4 Lands on Three Mediatek Devices

For the last few years, devices with MTK systems-on-chip haven’t received much … more

MultiImagePicker Library for Multiple Image Selection

App developmentcan be done in more than a handful of ways. You can write every single … more

Shoot Troubles, Not Users w/ Alex Boag-Munroe – XDA:DevCon 2014

In presenting the various sessions from XDA:DevCon 2014, weve mainly … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Do I need to write drivers?

OP cnayan

22nd February 2014, 12:32 AM   |  #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, 10: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, 11: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 12:09 PM.
22nd February 2014, 07: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, 10: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, 12:32 PM   |  #6  
nikwen's Avatar
Recognized Contributor
Thanks Meter: 1,412
 
2,821 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, 11: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