0

Since Android is open-source, I am considering developing a custom API on it, mainly for implementing a web portal login module.

Basic functions should include:

  • Obtaining the wireless clients' MAC addresses;
  • Redirecting their HTTP requests;
  • Port/DNS filtering/blocking based on MAC addresses;
  • And, wrapping all these functions into a custom API so that it may be provided to potential customers.

Is it possible to develop such a custom API on Android? If so, how?

Any reasonable comments are welcome. Thank you.

Kazzantra
  • 3
  • 2

1 Answers1

2

Some of your goals would require root access at the very least, or some kind of user interaction for set up.

All in all, it is possible. You'd have to end up writing your own app that reads the relevant data, uses root to modify IP Tables, and has the user set up a proxy service to intercept HTTP traffic.

Once you have this set up, you can expose it via your own application to third parties.

If you plan on doing this without user interaction, or needing another app installed on the device, you will have to do it in source code and rebuild the Android image for every device you want to run it on, and will require any potential users to flash your Android ROM image onto their device before using it.

Raghav Sood
  • 81,899
  • 22
  • 187
  • 195
  • Thank you Raghav. Rebuilding/flashing ROM images is okay, while user interaction is not expected. So, it seems that I need to tweak the Android source code. Any tutorials on that? I have only developed apps before but not touched the source code yet... – Kazzantra Jun 06 '14 at 02:49
  • There's an entire guide on compiling Android from source on the developer portal. XDA and Cyanogen has a bunch of them too. They'd be your best starting points – Raghav Sood Jun 06 '14 at 03:00
  • Thanks. I'm setting out to read the manuals on developer portal first. – Kazzantra Jun 06 '14 at 06:59