[Q]Git, Gerrit and Repo - Samsung Galaxy R i9103

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!

Related

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.

[Q] Android Open Source Project

I am an undergrad student of computer science. I want to contribute to Android Open Source Project as my Final Year Project.
I have no idea at all what can i build. I am less informed about the components that other third parties have build for AOSP.
I wet through the source.android.com and found useful information on getting started.
I want some suggestions whether i should take this as my Final Year Project or not. What kind of challanges i will be facing if i go with it. And kindly do share your ideas about what can i build?
And tell where can i find the descriptions of components that other third parties have build for android.
Thanks in advance.

Opinions about open source

Hi,
I am accustomed to the habits of the Linux community. There, if you have created an app, the first thing you do is to provide a g'zipped archive file containing all source code, a README file, and a manual. Then you announce it in forums, get response and comments about your code. Everybody happy.
In the Android (and possibly other xda) communities the source code seems to be "top secret". There are many free apps but very few open source projects. Why is this? Why has every developer to reinvent the wheel?
As you might guess, I created an open source project. This is an audio app for Android tablets, it's a software instrument, and I was unable to announce it here because I have less then 10 posts. Please google for "One-Hand-Synth".
wboe

[Q] Android ROM/Application Source Code

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:

[GUIDE] How to upload repo with commit history

In the time I’ve spend dealing with open source projects and just being around fellow developers, I’ve found that there are a few things that should not happen but continue on happening.
Why does this happen?
Maybe a case of laziness, maybe they are trying to hide something….who knows but one thing that is sure is that it should not happen.
What I’m speaking of is people uploading repos without commit history. It bugs the living hell out of me. It does because sometimes I’m trying to learn how to do something and without commit history, is kind of difficult to do so. I mean, some brag that they’re 100 percent open source but I don’t think you can claim that without commit history in place.
Also, you can’t complain if you’re not willing to provide a solution to the problem….right?
Ok, well I will go ahead and provide a simple step by step way of uploading a repo with commit history as well as provide screenshots for those that learn by seeing.
So let’s say you want to upload a repo to your github but you don’t want to fork it for one reason or another.
I personally like to upload repos instead of forking them ONLY because I had a case back during Android 4.1.2 where I forked AOKP’s frameworks_base repo and some how it got corrupted and github claim that there was nothing they could do because it was a fork.
This made me mad and ever since I upload repos with commit history instead of just fork them on github.
Anyways, let’s start……
Find that repo and copy the HTTPS clone URL
Open up a terminal then type in "git clone + the https URL"
Press Enter and let it do it's thing
Now head over to github and create a repo, this is important
Now type in the name of the repo (whatever you want) and hit "Create repository"
You will be prompted with a screen like below, the bottom part is what we'll be using
Open up a terminal and navigate to the repo you git cloned above
Ok so when you fork a repo, you usually have a .git folder and with that it has a origin. Where it came from and what is used to know where to push to if you typed in something like git push origin or whatever. With that said, you have now git clone this repo and are wanting to upload it but yet keep commit history. So you need to type in the following command to remove the origin and have it pointing to your newly created repo
Keep in line with the step above, type in "git remote rm origin"
With all repos, you have branches. Branches are generally used to create snapshots of your work but sometimes used to work on other things while keeping the main goal in place and not having to create another repo. For example, if I had a repo that is used for KitKat 4.4.2 but Google decides to push 4.5 or 5.0 or whatever and I want to keep the work I did on 4.4.2, I would simply create another branch and use it for 4.5 or 5.0 or whatever.
With that said, you need to create a branch to start things off since this will a new repo....at least for you it is.
Type in "git branch master" and you'll find sometimes it exists, sometimes it doesn't. If it does then that's good......don't freak out! Just means you don't need to do this step
Ok after this you will need to go back to your github repo you created not so long ago and find the two lines I highlighted/had arrows pointing to and copy/paste them into terminal
Make sure you type in your Github username/password when prompted and the end result should look like this
ENJOY and hopefully this will help someone that doesn't exactly want to hide their kanging tracks but just doesn't know how to upload a repo with commit history!
Great guide. Hopefully many will put this to use.
Nice guide. :good:
Fine tutorial, bookmarked. :good:
Although most coders do prefer working with the command prompt, managing Git branches and working with a remote repository can become tedious. GitHub has great GUI clients for Windows and Mac. The clients make it incredibly easy to clone repos, make commits (and see past ones), manage branches, and sync back to GH.
saved to my bookmarks!
thanks
Mazda said:
I personally like to upload repos instead of forking them ONLY because I had a case back during Android 4.1.2 where I forked AOKP’s frameworks_base repo and some how it got corrupted and github claim that there was nothing they could do because it was a fork.
This made me mad and ever since I upload repos with commit history instead of just fork them on github.
Click to expand...
Click to collapse
This is a really terrible idea, and you definitely should not be recommending that anyone else do this, simply because you had one issue one time (and where was your local copy of this code if it was so important?).
Choosing to upload a new repository instead of forking has a number of bad side-effects:
You lose the trail of ownership
You lose the commit graph
You lose the ability to send pull requests
The first item is useful, because then people can see the provenance of the code, and understand where they should submit issues that are not related directly to just your commits.
The second item is useful for people wanting to merge multiple forks into their local fork, or looking for fixes/features that other people have implemented outside the upstream project.
And the last item is the most important: by uploading a brand new repository, you've completely broken what makes Github great - the ability to collaborate easily with other teams.
I'd also suggest you paste textual code fragments rather than uploading massive images that are mostly just the blank space in your terminal - the images make for very painful reading, and also ensures copy/paste doesn't work.
Thanks guys for the kind words, glad it has made it to the portal and hopefully it can help someone in need of this info
bsined said:
Although most coders do prefer working with the command prompt, managing Git branches and working with a remote repository can become tedious. GitHub has great GUI clients for Windows and Mac. The clients make it incredibly easy to clone repos, make commits (and see past ones), manage branches, and sync back to GH.
Click to expand...
Click to collapse
This is true, Github has made it easy here recently and for that I give them a thumbs up
This is awesome but the screenshots are kinda unreadable on tapatalk. Good enough you added textual descriptions so following this guide is not impossible
Gesendet von meinem ThinkPad Tablet mit Tapatalk
GottZ said:
This is awesome but the screenshots are kinda unreadable on tapatalk. Good enough you added textual descriptions so following this guide is not impossible
Gesendet von meinem ThinkPad Tablet mit Tapatalk
Click to expand...
Click to collapse
Yeah the screenshot are giant Maybe you could crop them, especially the ones with the terminal, so only the necessarity text is shown.
And btw, bookmarked, thank you !!
Now I have a awesome thread to link to some people @Mazda
#Arnav

Categories

Resources