[Q] Android ROM/Application Source Code - General Questions and Answers

I am new to programming and understanding the concepts behind it and I was wondering if anyone could point me in the direction to some source code for the excellent ROM's I have seen on here or any applications which have been developed for the Android OS? The reason for this request, I need to see the code to understand what's going on behind the scenes to make a ROM/application function. I figure if I am able to study the code, I may actually be able to understand finally how to develop either an application or ROM. Thanks in advance. :good::good::good:

LivioDoubleFang said:
I am new to programming and understanding the concepts behind it and I was wondering if anyone could point me in the direction to some source code for the excellent ROM's I have seen on here or any applications which have been developed for the Android OS? The reason for this request, I need to see the code to understand what's going on behind the scenes to make a ROM/application function. I figure if I am able to study the code, I may actually be able to understand finally how to develop either an application or ROM. Thanks in advance. :good::good::good:
Click to expand...
Click to collapse
Most of the ROM's that are built from source either use AOSP source code which the source code can be found here, Cyanogenmod source code which can be found here, AOKP source code which can be found here, or Paranoid Android source code which can be found here, or the ROM's use a combination of all these listed and cherrypick there favorite features from each while adding there own. When it comes it seeing what other changes have been made by the developer the easiest way to look at the source code is looking at each developers github profile if available which can be accessed by usually searching for there username on github or clicking on there username here on XDA and selecting the "View Github profile" option. Let me know if you still have questions .

Thank you shimp208 for your expedient response on this issue. I will definitely be checking out the links you have provided and with hopes, gain a deeper understanding of the Android OS to become a developer myself.

LivioDoubleFang said:
Thank you shimp208 for your expedient response on this issue. I will definitely be checking out the links you have provided and with hopes, gain a deeper understanding of the Android OS to become a developer myself.
Click to expand...
Click to collapse
I wish you the best of luck man, these guides are also definitely worth taking a look for getting started with a variety of ROM development aspects http://xda-university.com/as-a-developer.
Sent from my SCH-I535 using xda premium

Thanks a lot
shimp208 said:
Most of the ROM's that are built from source either use AOSP source code which the source code can be found here, Cyanogenmod source code which can be found here, AOKP source code which can be found here, or Paranoid Android source code which can be found here, or the ROM's use a combination of all these listed and cherrypick there favorite features from each while adding there own. When it comes it seeing what other changes have been made by the developer the easiest way to look at the source code is looking at each developers github profile if available which can be accessed by usually searching for there username on github or clicking on there username here on XDA and selecting the "View Github profile" option. Let me know if you still have questions .
Click to expand...
Click to collapse
Thanks For Help i too had same Que.
Thank you very much :good:

Related

Quick Update From Cyanogen

I’ve been working on getting my source trees on Github in shape so that anyone can build a basic CyanogenMod system. Some small parts still need added but things are looking good there.
I’m also continuing to examine the backup/restore option for the proprietary bits necessary to operate your device, so I can simply ship open-source code only. I believe this is well within the license and the spirit of the ADP1 and ION devices.
A lot of people are helping to work many of these issues out, notably the guys from Google (Dan and JBQ) who manage the open-source project. Some great discussion and initiatives are happening like the Open Android Alliance and the Replicant projects. As much as it sucks to be sort of the “fall guy” for this, I can take it. Let’s fix the problems and move on.
Expect more from me by the weekend!
http://www.cyanogenmod.com/home/just-a-quick-update
keep it running! =)
That's Greeeeat!
I take my hat off to you sir!.
Excellent News...
it's nice to get updates, but i'm sure most of us are smart enough to visit the site directly for his updates or check his twitter.
no need to open new threads for this. -.-
thats the way more donating to you

Why Doesn't Anyone use Google Code for AOSP rom development?

As long as a Rom doesn't include googlebits it should be fine on google code right? It would be nice to use for bug tracking and a quick downloading service.
Doubt it, since I imagine that a lot of bits are closed-source and harvested from existing ROM dumps and so forth.
I believe quietblongs was the only dev here that actually built his roms from source. With that said. I mean the entire thing except some libs. But I'm not sure if anyone else is doing this. I think most of the aosp roms we have are ports with maybe compiled frameworks from source. Again that's just a guess.
But speaking of quietblongs... I wish he'd come back and make us a bad ass 2.1 aosp build.(a hint to quiet to build us another bare bones build)
I have a "generic" 2.1 AOSP build. The problem is getting the HTC vendor/oem stuff incorporated. I have tried following Cyanogen's lead with his "vendor overlay" in git, also borrowing from Lox's GSM hero stuff, but when I build it that way ((via "lunch htc_heroc-eng") I still end up needing to manually copy the proprietary files one-by one into build to get a resulting system.img. In other words, I'm missing a script that should do this during the build. Since nobody seems to be building for CDMA hero (I find directions for dream, magic, and nexus only), I basically don't trust my result enough to upload for others.
Building 2.1 as "generic-eng" is trivially easy, we could have a "nightly build" setup if we wanted. But getting the vendor stuff properly incorporated into the build (and having the build use these files to generate its source) is not a clear process to me yet. I'm learning but it takes time I don't always have.
On a side note, maybe someone could comment on whether a fresh build with the vendor stuff could/would solve ongoing issues like the camera or whether that is a 2.7/2.9 kernel issue that needs a backport.
5tr4t4 said:
I have a "generic" 2.1 AOSP build. The problem is getting the HTC vendor/oem stuff incorporated. I have tried following Cyanogen's lead with his "vendor overlay" in git, also borrowing from Lox's GSM hero stuff, but when I build it that way ((via "lunch htc_heroc-eng") I still end up needing to manually copy the proprietary files one-by one into build to get a resulting system.img. In other words, I'm missing a script that should do this during the build. Since nobody seems to be building for CDMA hero (I find directions for dream and magic only), I basically don't trust my result enough to upload for others.
Building 2.1 as "generic-eng" is trivially easy, we could have a "nightly build" setup if we wanted. But getting the vendor stuff properly incorporated into the build (and having the build use these files to generate its source) is not a clear process to me yet. I'm learning but it takes time I don't always have.
On a side note, maybe someone could comment on whether a fresh build with the vendor stuff could/would solve ongoing issues like the camera or whether that is a 2.7/2.9 kernel issue that needs a backport.
Click to expand...
Click to collapse
Yeah u will always need proprietary files to build aosp. That's what vendor is for. I've started gathering and trying to setup a community vendor for cdma heros. But just been to busy to finish. Will try soon though an put it on github for all to use.
But as for camera drivers and stuff like that. Ur gonna find that making libcamera build isn't gonna happen as of yet in 2.x aosp. Because it is broken as of the moment and doesn't make. The only solution to gettin camera into an aosp build is to use the libcamera and other camera libs from mine and Flipz HTC Rom. But even then ur gonna need a compatible kernel camera driver to work with it. As of now we haven't got that working fully. But also even once we get the driver working ur gonna have issues in aosp builds with camera as the gsm hero devs have found. As it stands now the aosp camera doesn't fully support our camera. Leaving them left with a 3m camera and I believe no video. It seems that HTC did some extra work in their camera.apk to finish up and give full support for our camera. The problem with that and aosp is like most HTC apks work in and with a HTC modified frameworks. So it goes deep into the framework.jar and many other frameworks files. I won't say it can't be hacked in some how but I will say it won't be easy. But if u manage to pull it of please share because a lot of devs have tried and haven't managed to pull it off as of yet.
Maybe you can point me in the right direction. Attached is my "vendor overlay" attempt. In the first case it's just Lox's stuff for hero with "heroc" in all the right places. The "extract" script is mine, modified by me given Cyanogen's nexus overlay example.
If you can create a git of a proper overlay, that would be great. Even if, as you say, it doesn't get us all the way to a working AOSP ROM.
Lox's language in his extract script is like Cyanogen's in his git repo, ie "who the hell knows if this is right, just guessing". So in that spirit, here is my attempt: a little experience mixed with vendor hatred mixed with voodoo
Feel free to correct me as you can, I would be grateful for a leg up from someone who has been at this longer.
P.S. I can't believe I had to "zip" up a tar.gz tarball to get it to attach to a dev forum (Invalid file). Man, I'm getting old.
P.S.S The included "kernel" file is a zImage I built from your toastcgh 2.7 sources in git. The wlan.ko was built against that...I should double-check that fact...
Ah well, maybe when they redo the forums here they'll think about bug tracking etc but I doubt it.
I did build my aosp rom from source, just built it using the gsm hero's vendor tree, made small adjustments to it for the heroc files. so yea, my rom is from google code to answer the OP's question.
darchstar said:
I did build my aosp rom from source, just built it using the gsm hero's vendor tree, made small adjustments to it for the heroc files. so yea, my rom is from google code to answer the OP's question.
Click to expand...
Click to collapse
EDIT: OHH, I completely misread your thread title, I probably could use google code for my aosp rom to track bugs
darchstar said:
EDIT: OHH, I completely misread your thread title, I probably could use google code for my aosp rom to track bugs
Click to expand...
Click to collapse
Right, I think we all misread it, I believe he was asking why we don't host our code somewhere, like Google Code, with a real bug tracking system, versioning controls, etc. He's got a great point, actually. It would be very nice to have a shared AOSP space, somewhere to see the files and track the issues and changes. ROM development based on AOSP could go on as usual on XDA with that base.
5tr4t4 said:
Right, I think we all misread it, I believe he was asking why we don't host our code somewhere, like Google Code, with a real bug tracking system, versioning controls, etc. He's got a great point, actually. It would be very nice to have a shared AOSP space, somewhere to see the files and track the issues and changes. ROM development based on AOSP could go on as usual on XDA with that base.
Click to expand...
Click to collapse
I got it
The issue is that Google Code won't allow you to host anything you don't have the right to distribute.
5tr4t4 said:
Right, I think we all misread it, I believe he was asking why we don't host our code somewhere, like Google Code, with a real bug tracking system, versioning controls, etc. He's got a great point, actually. It would be very nice to have a shared AOSP space, somewhere to see the files and track the issues and changes. ROM development based on AOSP could go on as usual on XDA with that base.
Click to expand...
Click to collapse
It would minimize on duplicate bug reports at least.
jonnythan said:
I got it
The issue is that Google Code won't allow you to host anything you don't have the right to distribute.
Click to expand...
Click to collapse
Understood, but the proprietary stuff can be pulled from the phone and/or from official releases for other HTC devices given the right script. That's why we need the vendor overlay.
I suppose the follow up question is, "why not just contribute to Android's AOSP core code in git, why create a forked AOSP repo?". That might be right, but we still need the overlay to pull the right files from the device. Perhaps taostcfh or quietblongs or darchstar already have this stuff ready and I'm just late to the game (probably ). Fine, I'd love to see that work so I can help out where possible.
<mini-rant>
This OEM/vendor crap really sucks...should I just repeat what has been said everywhere (and knocked down for very sound business reasons): Google should have released Android under GPL.
</mini-rant>
5tr4t4 said:
Right, I think we all misread it, I believe he was asking why we don't host our code somewhere, like Google Code, with a real bug tracking system, versioning controls, etc. He's got a great point, actually. It would be very nice to have a shared AOSP space, somewhere to see the files and track the issues and changes. ROM development based on AOSP could go on as usual on XDA with that base.
Click to expand...
Click to collapse
Exactly, thanks.
What keeps one of us from leasing a server to share for our (XDA) own CVS, bug-tracking and compiling?
ffolkes said:
What keeps one of us from leasing a server to share for our (XDA) own CVS, bug-tracking and compiling?
Click to expand...
Click to collapse
The fact that someone has to pay for it.
jonnythan said:
The fact that someone has to pay for it.
Click to expand...
Click to collapse
I've got a server but I'm not too familar with CVS, if anyone wants to lend a hand...
ffolkes said:
I've got a server but I'm not too familar with CVS, if anyone wants to lend a hand...
Click to expand...
Click to collapse
I have one too, but I would advocate for something more public, like git or sourceforge or Google Code, XDA, etc. You would want to make sure that you were gaining sharing capabilities and not just isolating yourself...either from upstream improvements or from other community stuff here and on other forums. A thousand people sharing is better than 10-20 people with a server, IMHO XDA has already proven that.
Plus, getting a development server going with all of the niceties of CVS et al is not easy...and there are ready-made solutions already available. None of this addresses jonnythan's point that some of this development is in legal limbo...what happens when someone , even by accident, pushes the google bits onto your public server?
...maybe you would get a cease and desist letter and become famous, LOL.
5tr4t4 said:
...maybe you would get a cease and desist letter and become famous, LOL.
Click to expand...
Click to collapse
Someone needs to combine the power of a forum with the legal protection of a public download site and the bug tracking of google code.
Apparently, I'm too lazy to code that all myself

TaintDroid source code released

Hi everyone,
I apologize if if this is not the appropriate place to post this info, but I thought it would be of interest to some people here. You may have seen stories in the news recently about the privacy-monitoring extension for Android called TaintDroid that was developed by researchers at Penn State, Intel Labs, and Duke University. An excellent summary can be found on Ars Technica.
The reason I'm posting to this forum is that we are proud to have made our source code available last night. If you want to play around with the code, you can find it at the TaintDroid website (search "taintdroid appanalysis"). Along with links to the source code, you will find instructions for getting the code up and running on a Nexus One. We have also set up a Google Group for users who want to discuss anything related to the project.
Our only caveats are that we are merely researchers so 1) you use the code at your own risk, and 2) we do not have the resources to offer proper support. We hope that by releasing the code to the public a self-sustaining community of interested users will form.
We hope that you find our code interesting and useful. Happy hacking!
-landon
Thanks for releasing the code. Look forward to using it on an incredible rom soon.
http://appanalysis.org/tdro1d.html
I'm assuming that's the link. Couple of questions.
1.I see it's on 2.1 rom, does it work with 2.2? Especially as it uses the 2.6.32 kernel.
2.Since the Desire is basically a Nexus One with sense, has it been tested on that platform or with sense?
Thanks for releasing the source and instructions!
This is what Android needs, as Google is not taking good care of the privacy of it's users.
It's impossible to install apps now, because most of them want really wide rights, but you have no idea what they do with those rights.
TaintDroid at least gives a possibility to peek into what is being leaked.
Soon some of the app makers will start to encrypt their calls to try and and mask what they are leaking. If/when this happens, it should be a warning sign to users about that particular app.

[HELP]AOSP

Hello,
Here I have a small question since AOSP ROMs are most popular with Nexus phones.
I have worked around with custom ROMs..now if I want to try AOSP...
Can anyone just give me a brief explanation on how I can compile AOSP from source.. Lets take nexus s as an example...
Also is C++ or any other programming language necessary?
Thnks in advance for helping!
Sent from my GT-I9003 using XDA App
I am also interested in learning to compile AOSP from source. If there is a dev out there willing to help us out that would be awesome!
I have done work with Custom ROMs .. Just wanna learn aosp..
Sent from my GT-I9003 using XDA App
You'll want to know java.
And you'll want to read thru the stuff on source.android.com
As for setting up from source, start here: Initializing a Build Environment
As for guides, there's literally hundreds of them - excluding the one off of the Official google source site. Search xda, google, etc.
Here's just one example: [TUTORIAL] Setting up and Compiling ICS from AOSP (for the galaxy nexus) which follows the guide found on -> How to Compile ICS (Ubuntu)
Catch my drift the information is all out there. You just have to take the time to search and read.
One last thing, for setting up for dev environment. A lot of people seem to go for ubuntu (my recommendation so it might be the most user friendly.
Personally I use arch linux so the w/e flavor you choose shouldn't hinder you.
kyouko said:
You'll want to know java.
And you'll want to read thru the stuff on source.android.com
As for setting up from source, start here: Initializing a Build Environment
As for guides, there's literally hundreds of them - excluding the one off of the Official google source site. Search xda, google, etc.
Here's just one example: [TUTORIAL] Setting up and Compiling ICS from AOSP (for the galaxy nexus) which follows the guide found on -> How to Compile ICS (Ubuntu)
Catch my drift the information is all out there. You just have to take the time to search and read.
One last thing, for setting up for dev environment. A lot of people seem to go for ubuntu (my recommendation so it might be the most user friendly.
Personally I use arch linux so the w/e flavor you choose shouldn't hinder you.
Click to expand...
Click to collapse
Thanks man! I have my computer set up so it dual boots Windows and Ubuntu, so I'm going to try my hand at this!
Thanks man ! Will give it a try ..
Still learning Java Though
Sent from my GT-I9003 using XDA App

[Q]Git, Gerrit and Repo

This goes out to all the dev's working on OSP's or directly with source files and have used Git n Github. I have been trying to setup the development env on my m/c. I am really confused regarding how Git, Gerrit and Repo relate to each other. I know that Git is a VCS, Gerrit is a Code review system, No idea about Repo. I would be really grateful if one of the devs could take time out to explain how these technologies interface with each other using simple eg like the on going CM development. I'm not asking for precise commands, I'll learn that...just wanted to know the high-level working.
Thnx!
Git is a VCS. It was created and is developed mainly by Linus Torvalds, originally for helping in Linux kernel development. It is now very widely used (e.g. GitHub) for open and closed source projects.
Repo is a Python script created by Google for Android. Some would say it's just a wrapper around Git, but it's not so simple. AOSP (and others based on it) consists of many separate projects. All of these are in a specific Git repository so that separate development can go on in each of these without creating merging conflicts or some other bad things. These projects all have a manifest file that describes all of the Git servers, repositories and project paths. You can see the differences in manifest files e.g. among this (CM), this (AOSP) and this (LiquidSmooth).
Gerrit is a code review system also developed by Google for Android. It is like a clone of the mainline source (all of the projects tracked in repo) with an addition of it being open to anybody (registered users in most cases). When you have a good idea, fix or improvement, you start a local branch in your synced repo directory and push them for review. You can ask a developer to review your code and he/she will tell his/her opinion about it either by asking you to upload a new patchset, implementing and adding it to mainline with some modified code or not accepting it because of some issue. Or just somebody finds it useful and looks into it. (Example: My patch for Samsung OMX. My change committed into CM repo.)
TIA! Can't wait buddy!
OT: Don't stress urselves too much man! TC
EDIT: In the meantime I've setup git on my system, and also created a Github account and created a demo repository to play with. After following a few guides at codeschool and git-immersion, I now understand the basics of git, but still confused regarding gerrit and repo. Eagerly waiting for ur reply bro!
I edited my first post. You can find my answer there.
That's a pretty good explanation bro. Thanx for taking time to explain at length!
Thanx!
Tapatalked from my Galaxy R GT-I9103 using XDA Premium App
I don't go to sleep until I utilize my quota of 8 thanx a day!

Categories

Resources