Adding APIs to Android: modifying SDK, system and kernel? - General Questions and Answers

I'm sorry if this is a really basic question or has been answered elsewhere before, but I couldn't find how to do it after a lot of searching on this forum, so here goes:
I'm developing an app that requires advanced networking functionality, and am trying to modify the wifi driver on Android to expose a custom API to my Android app (in Eclipse/Java) that isn't part of the stock Android SDK. I've managed to successfully compile a new kernel with my driver modifications (on Nexus S/Jellybean) so that part's good, but I also need to add the API to the Android OS and SDK, recompile and flash them, and then get my Eclipse/Java project to compile and link against the custom version of Android I've built.
Does anyone know what the best way to add a custom API to Android is, or could they point me to a step by step guide if this has been answered before? In particular, once I've built a new version of the Android kernel, the system and the SDK and flashed the custom ROM that supports this API to my phone, how do I get Eclipse/Android apps that I write to link against my new API/modified SDK?
Thanks a lot!

Related

Question about building Android 1.5 source for emulator

I just had a quick question, haven't been able to find any answers elsewhere. Figured I'd ask it here. I Was wondering if it's possible to build the Android source so that the resulting Android Emulator disk images contains all of the apps of a normal Android 1.5 system?
I've tried building the source twice now but, the disk images are just the normal emulator disk images (missing most of the default apps & some of the graphical improvements of the 1.5 update). I feel like it must be some sort of setting in the makefile to say what platform to build for.
Any help would be greatly appreciated.
Do I need to follow the instructions listed here? Will this enable the build process to build the emulator disk images so that they mimic the G1 completely (including all default Android apps, etc) ?
http://source.android.com/documentation/building-for-dream
Those apps you are referring to are closed source and no matter how you build it, they won't show up in the emulator. You could possibly install them after the fact, but that is truely hit or miss.

Android Image Building

Hi. I am a developer interested in Android.
More specifically, I am interested in building a custom Android image, not just developing applications (i.e. I want to modify the OS/framework itself).
I was wondering, though, whether ppl who build custom ROMs (ION, HERO, etc) use and modify binary images or build their own custom ROMs from the source and potentially add some binary only stuff (e.g. HTC POP3/IMAP, HTC Pdf Reader,etc.) from the binary ROMs.
I don't know what is prevalent and why?
Another related question, where does one find directions to build and most importantly install a custom ROM on an Android device (mine is Magic). Google obviously has info on that, but I want to know if I'm going to have problems with differences between ADP1 (official guide) and my own device.

[Q] Why is it so much work to enable a rom for a device?

When I look at the architecture of Android I would expect that the updated Android version lives in all the layers exept for the Linux Kernal. This would mean that upgrading would be as easy as overwriting the layers with the new ones.
Only when the way the drivers are called is changed would a rom require an update on the Linux Kernal.
As it takes a long time to enable updated roms for devices either the architecture picture is incorrect (or the ideal picture that can't always apply due to technical restrictions) or my understanding of it is incorrect.
Could someone please explain?

[idea] package manager based Android development

Coming from the Linux world, I'm horrified by how Android development is structured. Each ROM is a "big" project, with its specifications.
And it's basically impossible to "merge" features from different ROMS without building a whole Android rom, for noobs and non-dev users (like me until little time ago).
Linux distros use a package manager and each part of the OS is a package, with its own Git history and its own devs, and you can easily replace a package with another (but with better features, more up-to-date, etc). The package manager asks a distant repository which packages are available to install and if another package is in conflict or required (i.e Wayland backend is required for some features).
Using a package manager allows to :
Separate the development of each feature of a ROM
Simplify the integration in a rom of a feature
Simplify the merge of ROMS by users (maybe even install packages while Android is running ?)
Have less fragmentation in the Android ROM features
Faster ROM dev
Any feature developper can provide a package without having its own ROM
Less "i've merged this and that rom" ROMs
Probably easier installation of things like XPosed (no uninstall zip)
I just don't understand why noone has already integrated a package manager in Android.
To be fair I don't understand why Google does not already uses a package manager in Android as it would just destroy the android versions fragmentation.
Some very good package managers already exist in the wild, the best I know is Pacman (Arch Linux, also used as a MSWindows package manager), (with makepkg to locally build packages).
Right now I'm waiting for the initial Android checkout to finish then I'll see how that's possible. But I'm no Android dev so if anyone likes the idea, that'd be great.
Salamandar

Compile app from AOSP and sideload to phone

Hey,
Is it possible to compile just one application from AOSP (Pixel Experience) and install it on the phone? Let's say I want to add my settings to the "Settings" app and modify the system through it - currently my internet is too slow to download the whole AOSP and my computer is too weak to compile the whole ROM by the end of the year.
If its possible - how can I do this and will I be able to use Android Studio to compile? Will I have correct syntax, code suggestion?
My rooted phone is Samsung A505FN/DS if its important.

Categories

Resources