I don't know if this is the right place to ask but I think I'll post here instead of development. I want to get into making my own slightly tweaked kernels but I really know nothing about whets where in the repository (like what file I would look in for clocks or voltages). I was just wondering if someone could point me toward some documentation so I can at least have a but of an idea. Thanks!
Developing anything is pretty complicated without some codding skills so I would advise against trying to code your own kernel although if you want to I can't stop you but in your position I would have posted in android development section you may get faster results.
I have experience in coding in c++, html, some assembly, wrote a very basic bootloader that doesn't really do much for a pc. I'm just looking to make some minor changes. (clocks or voltages)
# include <iostream>
using namespaces std;
void main()
{
cout <<"Well in that case I guess you could but like I said you'll probably get more responses in the android development section then nexus one Q&A.\n\nBTW I'm no expert in c++ just wanted to do this as a little joke all I know are the basics ";
cin.get();
}
NOTE: I know code is not supported in most forums so if a mod wants to delete this feel free it was just a joke so.
Very nice but unfortunately wouldn't compile in my compiler thanks to microsoft requiring include stdfax or whatever it is that I have to add up there with precompiled headers.... A pain but I never really learned gcc and its rules
Will post in dev section thanks for the suggestion!
Oh well I just noticed something and I'm going to guess that's why it didn't compile for you I made a typo up there it's not "namespaces" it's "namespace".
meltbox360 said:
I have experience in coding in c++, html, some assembly, wrote a very basic bootloader that doesn't really do much for a pc. I'm just looking to make some minor changes. (clocks or voltages)
Click to expand...
Click to collapse
All you have to do is browse some of the repositories here in the dev section. Click the GitHub link to pershoot or intersects repository. Then go to the kernel project/source and click "commits" at the top. Look thru each commit to get an idea of what's going and being changed in the kernel. The good stuff will be from months ago so you'll have to keep going back far thru the commits to find the significant changes.
Then setup your own build environment. Cyanogen wiki has a step by step tutorial guide that's straight forward and rather easy to get going.
When done that, just practice making some tiny code changes to the kernel, something that interests you, and try to compile it. You'll prob get an error so tweak it till it compiles with no error, then flash it to your device and see if it works.
It's fun to do and you can get setup pretty quickly with all the info available to us.
Related
Considering the state of flux we are in with the roms, I think it would be really kewl for one of the guys to cook up a quick rom building guide. The main objective would be to allow user to replicate the rom build of their own accord. Many projects have taken the "you build it" approach to avoid the pitfalls of distributing closed source.
Look at something like Microsoft Core Fonts in linux. No distribution will ship with the fonts, but they all provide a package, even gnu pure Debian, that will pull the exe files from the web and unpack/install them for you. Same thing goes for flashplayers.
If someone would make a script/guide for making saayyy Cyanogen 4.0.4, by pulling the source from google, adding a modpack, and compiling on their own machine, then Cynan and the other would be clear from any wrong doing. Leave it to the community to distribute and get the roms out. Bittorrent/newsgroups/whatever, they can't stop us all, and they dare not pull a RIAA to hunt people down.
I think its something that maybe worth considering. The stuffer methods are great, but I would personally like to be able to build the rom as it should be, with all the fixings.
One
http://www.johandekoning.nl/index.php/2009/06/07/building-android-15-build-environment/
Two
http://github.com/cyanogen/android
three
http://source.android.com/download
you can add the other junk by following guides on the forums here, or pushing your own apps etc...
Thanks for the clear and concise answers. The first site has some very detailed info. I will give it a go, the Kitchen Rom Builder cooker back from my wizard days has me spoiled, but this looks pretty straight forward I just needed some direction.
helfrez said:
Thanks for the clear and concise answers. The first site has some very detailed info. I will give it a go, the Kitchen Rom Builder cooker back from my wizard days has me spoiled, but this looks pretty straight forward I just needed some direction.
Click to expand...
Click to collapse
http://www.jukie.net/~bart/blog/20090830174551 this one helps out too, but the manifest from cyanogen's github is out of date, it's 4.1 at time of writing this.
This is posted in the wrong area
as post like this are every week
jdk5 is no longer available for download on 9.10 x64 systems. Anyone know of a way around this?
Couldnt you add one of the older repositorys and add it that way?
Its one of the reasons i dont use the x64 build, too many incombatabilitys.
You could always vmware an x86 machine
Yea, I'm just now building a virtualbox x86 machine. I'm going to strip it down to essentials and then install everything needed for android building.
I'm posting this in the Development section because that is what I am trying to learn about. Please move me if I am mis-posting this.
I'm greatly interested in the the Roms people are making and everything that is being done on these forums. If someone wanted to start to learn about these things, developing and such, where should they start? Do I need to learn Java? Are there certain books I should be reading?
I can flash my phone like its my day job now, and I haven't come across any major problems I couldn't solve by reading, but I have no idea where to start to be able to develop things myself. If any developers here could maybe throw out a few tips on how to get started, what someone should focus on learning, etc., it would be greatly appreciated! I have plenty of time and a great desire to learn so I'm not intimidated by having to do the work, I just have to have some things to focus on. Thank you in advance for any help/advice you can give me!
I always wanted to know how make roms also I was looking around the internet but couldn't find anything that will describe it step by step word for word.
Maccie
It will be a huge writeup.But im sure someone will do it. I am still learning myself. There are some good topics around but different from what we have now
topshelf95 said:
I'm posting this in the Development section because that is what I am trying to learn about. Please move me if I am mis-posting this.
I'm greatly interested in the the Roms people are making and everything that is being done on these forums. If someone wanted to start to learn about these things, developing and such, where should they start? Do I need to learn Java? Are there certain books I should be reading?
I can flash my phone like its my day job now, and I haven't come across any major problems I couldn't solve by reading, but I have no idea where to start to be able to develop things myself. If any developers here could maybe throw out a few tips on how to get started, what someone should focus on learning, etc., it would be greatly appreciated! I have plenty of time and a great desire to learn so I'm not intimidated by having to do the work, I just have to have some things to focus on. Thank you in advance for any help/advice you can give me!
Click to expand...
Click to collapse
There are a number of aspects to android development you have to learn to know how to build a full ROM from scratch. C is of course required for kernel building, and apps are built from java in the dalvik-vm, but can be built against sun java.
of course, to get started, you would need the android sdk available here: http://developer.android.com/sdk/index.html
then there's the cloning of the android git:
http://android.git.kernel.org/
and, specifically for the captivate, there's the captivate source code:
http://opensource.samsung.com/
then there's pulling off the vendor proprietary libs from your phone (which is a ***** and I believe you can grab them from wes's github, though I can't speak for their accuracy) here:
http://github.com/wesgarner/proprietary_vendor_samsung
building the entire android OS from source is a challenge, especially compensating for some changes Samsung has introduced. this is what a real ROM is. now if you're talking about "ROM"s like Cognition and Shep's and even Eugene's Hybrid/Frankin-Twiz... they aren't comparable. Not to belittle any of their efforts, but this is simple "drag and drop" from stuff built by Samsung. While they're very useful tools, there is little actual development going on in them. There are improvements and tweaks, for sure... but it isn't a *true* ROM. All these releases by DesignGears, Eugene, and Shep are good and effective, but it'd be a shame if they weren't because they are just files thrown together from Samsung's already compiled ROM(s). Even the AOSP Beta 3 (which I have a qualm with the name, because it isn't actually AOSP, it's files pulled from an already built AOSP tossed onto Samsung's ROM again) is just modifying binaries (decompile, edit, recompile).
for those, it's as simple as extracting the zip, replacing the files you want, and rezip it. modifying the update-script inside meta-inf if there's something you want to add.
Awesome post Kaik, thanks, I was wondering some of those too.
Thx that explained a bunch
Maccie
Thank you for taking the time to post that Kaik! It's nice to have a place to start! Anyone else have any tips or things they think might be good to check out?
last, but certainly not least and I can't believe I forgot this, is Unhelpful's toolchain to compile against:
http://forum.xda-developers.com/showthread.php?t=761923
he did a lot of testing with various combinations, and this was the best he found to reduce wakeup lag and other issues
Wow. Kaik. That was the most awesome response to that question I have ever seen. Most people just point to developer.android.com and say go learn to program and come back in 5 years.
Thank you for this very useful information. Your the man now dog.
johnyhoffman said:
Most people just point to developer.android.com and say go learn to program and come back in 5 years.
Click to expand...
Click to collapse
Devs are not being mean or pissy, they are being honest and realistic. If development was just "point and click" XDA would not even be here. Give the devs/veterans a break and take it upon yourself to learn the basics and do some searches, if you are that interested.
I would love to just start making my own Android OS just the way I like too but to do that will require much more reading and learning, trying and failing.
You will probably not find "the answer" you are looking for but if you search, read and most importantly, respect the time, energy and anguish people have put into this site you will find the means to get where you want.
Otherwise you can expect... "Let me just glance and peek to see how to do this. Damn what the hell does that mean? Oh well here is a modded ROM. I'll try that. Jeez, that sucks. How do I make my own? Let me just glance and peek to see how to do this. Damn what the hell does that mean? Oh well ..." It is an endless cycle.
I'm not saying this to belittle anyone. Most have been there, including myself. I say this as a vote of confidence to all.
Hang in there, do the work, break some phones, read some books. Really! You have to!
koe1974 said:
Devs are not being mean or pissy, they are being honest and realistic. If development was just "point and click" XDA would not even be here. Give the devs/veterans a break and take it upon yourself to learn the basics and do some searches, if you are that interested.
I would love to just start making my own Android OS just the way I like too but to do that will require much more reading and learning, trying and failing.
You will probably not find "the answer" you are looking for but if you search, read and most importantly, respect the time, energy and anguish people have put into this site you will find the means to get where you want.
Otherwise you can expect... "Let me just glance and peek to see how to do this. Damn what the hell does that mean? Oh well here is a modded ROM. I'll try that. Jeez, that sucks. How do I make my own? Let me just glance and peek to see how to do this. Damn what the hell does that mean? Oh well ..." It is an endless cycle.
I'm not saying this to belittle anyone. Most have been there, including myself. I say this as a vote of confidence to all.
Hang in there, do the work, break some phones, read some books. Really! You have to!
Click to expand...
Click to collapse
this times one thousand. I linked you guys to some very useful sites when it comes to actually putting android together... but understanding how it all works, actually getting a successful build, fixing bugs, etc... I can't even begin to pretend to be able to help with that. if you have little to no experience in C and Java, these things will basically be useless to you. dev's aren't being mean when they brush you off like that, but usually if you can't figure out how to google what to do with the code, they don't have high hopes for what you'll be able to do with it once you find the code.
the idea isn't to be like "f*** off" when they say that, it's more of a "we'll help you when you learn, but you're the one who needs to take the first steps and you need to take the responsibility of learning on yourself."
I was actually referring to the fact that someone like me, a hobbyist programmer for about 10 years now, can make sense of his reply and use it to go forth and actually do something. Most of the guides you find on here that are supposedly pointed at noobs, do not layout things as easily as his post did.
Wasn't criticizing anyone, but I have seen less patience nowadays for any posts such as these.
Was just saying it was a gem of a post for me personally. Maybe it doesn't help the ultra noobs and the more experienced people see it as useless, but for someone with little time right now, it was a perfect post for me.
I have started looking at the sources of Android (the main source tree of the operating system not the Android project that opens up in Eclipse) and was able to successfully compile it for my N1. However, I was wondering if there is tutorial out there that tells provides an overview of the source tree. If someone was not involved in embedded development, how does one go about understanding the source tree?
Where it concerns the apps, the tree is pretty much straightforward. The rest is mostly understandable by names, but I don't know if there's any guide out there. I'd like to know too.
Oops.. sorry. I was not talking about application development. I have some experience with that. I am talking about the sources we checkout using git. I hardly have any experience with compiling code for embedded devices so I was looking into what each folder does. For instance, frameworks, libcore, vendors etc.
Big part of the sources in git repo are system apps - that's what I've meant.
Unfortunately, I don't have experience with system side of things.
vendors - collection of scripts with settings for each phone of each vendor (compilation settings, switches, etc).
i looked for the same thing when i first looked at the github tree, it was a bit overwhelming. no walk thru exists that i know of. i just learned to search each branch from the main page, i.e. the msm family for qualcom cpu phones, the samsung kernel, etc. wish it was a bit clearer.
Thanks! I am sure the community would be interested in such a documentation except that it will be terrible if I start writing it though I can make an initial attempt in doing so. I will see if xda has a wiki where I can put this stuff. But please do let me know if XDA provides us with such a wiki already.
EDIT: Never mind. I found the wiki here. I will try to fit it somewhere.
Hi guys, I have a quick question and I don't know how well this will go down but I thought I'd ask anyways....
Since we can decompile .apk's can we also cut and paste functions as well as pre-compiled bins?
I'm really interested in the cross compiled bins since it would be easier grabbing something that has already been done ( it sounds lazy but I'm only just beginning with Android app inventor and a couple of android books.)
again i'm really noob and don't want to offend anyone because of the hours of work that goes into development, but I feel the tool would be a great way to learn both code and structure..
cheers for any help and please understand i'm just curious
Sorry.. It isn't that easy. there are just binaries, no code.
But there are a lot of websites like http://www.anddev.org/ that have lots of code snippets and tutorials (I mean REALLY lots, tons, millions) you just have to look a little bit around... they are really good, for beginners too
But I'd recommend very basic hello world tutorials first and then a little later use the codesnippets and play around with them... understanding your code is important, otherwise you will get stuck when your code crashes and you have no idea why... and that sucks when you already have several thousand lines of code.
Trial and error and basic steps...
I'm just sayin'
nice site cheers
thanks for that, I am on my way to better understanding things now.
PS when you said just binaries you were talking about the .dex files not the actual linux bins correct?
'cause if there is a way to just yoink them it would be gr8
thnaks for the help
If you are interested in learning java and android programming head over to http://www.thenewboston.com/
This guy has some awesome tutorial videos (hundreds). I am learning from these!
There are java decompilers which can be used together with dex2jar. http://code.google.com/p/dex2jar/
Hi,
First of all thank you so much for starting a forum for learning the Android Development.
I am very much interested in learning android, and i have gone through the official android developers site, and downloaded the SDK.
But i am stuck there, coz i am very new to the Linux/Unix part. I would like to learn more about that, but i do not want to learn programming unless it's necessary. I know it will take a long long time to learn that. So can anyone help me with the app development or fixing/understanding ROM/Kernels.
Sorry if i am being too much jumpy in the starting itself, It's because i do not know where/how to start.
Thanks,
Les
lesfauves said:
Hi,
First of all thank you so much for starting a forum for learning the Android Development.
I am very much interested in learning android, and i have gone through the official android developers site, and downloaded the SDK.
But i am stuck there, coz i am very new to the Linux/Unix part. I would like to learn more about that, but i do not want to learn programming unless it's necessary. I know it will take a long long time to learn that. So can anyone help me with the app development or fixing/understanding ROM/Kernels.
Sorry if i am being too much jumpy in the starting itself, It's because i do not know where/how to start.
Thanks,
Les
Click to expand...
Click to collapse
Unfortunately without learning programming, you will find it difficult to do any app development and kernel understanding or fixing.
Programming is key to both of these. So although you don't want to, have a look at some of the resources out there on how to learn to program.
Apps are written in java, kernel code is mostly C.
Maybe this helps? I think failing to start by learning to program will just leave you disappointed.
If it's okay, I'd like to suggest something.
@lesfauves
For kernel development, you really need to learn C, C+, C++ etc. C is the most important language here. However if you're gonna build vanilla kernels (with no modifications whatsoever), a simple guide should do it. Modifying source code requires knowledge of C (and maybe some other languages) as pulser_g2 has said.
For app development, you need to know the basics of Java. It's a must. Otherwise you'll end up getting nowhere.
For ROMs, you need to have a good understanding of both Java and C (and some other languages).
You can learn these online. I'm learning C myself. It's really easy.
Hope I helped.
sgt. meow
I too want to learn android development, just dont know where to start. Been waiting for xda university to open up for this very purpose. now I went through the site and still have a couple questions. I see that learning C is fundamental, where would you guys suggest would be the best place to learn? i was hoping for something like codeacademy, they dont have C though. Also, which distribution of linux would you guys suggest to install?
If you just want to dive in, and have fun creating small Android apps, learning Android concepts as you go, I highly recommend MIT App Inventor (AI): http://appinventor.mit.edu/ . It used to be Google AI but Google wanted to focus on other things.
I have decades of experience in Unix & Linux low level mostly C software development, but was new to Android & Java in Feb. 2011. App Inventor was a great intro to Android concepts, but it seems almost impossible to make commercial quality apps of any size with it.
So after a few months I dove into Java with the Android SDK & the concepts I learned with AI transferred well.
If you want to run Linux on your PC, which is a great way to learn Linux in general, Ubuntu remains quite popular, but a lot of us techy types have moved to Mint. I'm still on Ubuntu but will likely try Mint at some point.
The original and seminal book on C language is this: http://en.wikipedia.org/wiki/The_C_Programming_Language . It was a great intro for me back in the 1980's. But many C++ people will tell you learning C first may mess you up for C++. I never really caught on to C++ and don't care now as Java is IMO better.
This is the seminal book for C++: http://en.wikipedia.org/wiki/The_C++_Programming_Language
In general I think C is better for kernel and low level Android NDK stuff; C is the language of the kernel. For higher level Java of course, using Eclipse as an IDE since it still is the most widely used IDE I think.
Any good sites or tutorials for learning Linux????????????/
l0lh4rd said:
Any good sites or tutorials for learning Linux????????????/
Click to expand...
Click to collapse
http://www.ee.surrey.ac.uk/Teaching/Unix/
sgt. meow said:
If it's okay, I'd like to suggest something.
@lesfauves
For kernel development, you really need to learn C, C+, C++ etc. C is the most important language here. However if you're gonna build vanilla kernels (with no modifications whatsoever), a simple guide should do it. Modifying source code requires knowledge of C (and maybe some other languages) as pulser_g2 has said.
For app development, you need to know the basics of Java. It's a must. Otherwise you'll end up getting nowhere.
For ROMs, you need to have a good understanding of both Java and C (and some other languages).
You can learn these online. I'm learning C myself. It's really easy.
Hope I helped.
sgt. meow
Click to expand...
Click to collapse
I wanted to to help my phone community and my self of course...from where you can learn c online??i know my way with pc i make some roms from my community but i need to start learning to compile from source!!! share your links if you can thanks!!
Lynda.com
pikachukaki said:
I wanted to to help my phone community and my self of course...from where you can learn c online??i know my way with pc i make some roms from my community but i need to start learning to compile from source!!! share your links if you can thanks!!
Click to expand...
Click to collapse
A great site that I use to learn with for web design and development is Lynda.com which has a good amount of C tutorials and learning. It isn't free but a subscription is worth the site. There is a huge amount of information, tutorials, and learning that can be done there.
Go look at my post in this forum section.! May help you
Sent from my PG86100 using xda app-developers app
Thats great but remember that i study pc hardware and i dont have none of programming knowlage at all!!!i once try to learn basic but i get bored cause i dont needed then
pikachukaki said:
Thats great but remember that i study pc hardware and i dont have none of programming knowlage at all!!!i once try to learn basic but i get bored cause i dont needed then
Click to expand...
Click to collapse
Aaaaaah gotcha
Sent from my PG86100 using xda app-developers app
Search for newboston.org in Google it has tutorial + forums for every language + android app development too must see website for me! Enjoy development
Sent from my GT-S5360 using xda premium
Ok lets say i want to learn how to make a device tree for my device cause noone make it...then compile aosp or cm and make it a usable rom for a device...to go to a bookstore to buy a book in my language to remove the possibility of wrong learning...what book to buy??java, c , c++??
This is a great idea, and as i have just started learning C at university (And Java next year woo!) i will be visiting this alot for reference and tutorials. I still find C hard to get grips with but i do have a basic understanding of it. I also like messing around with kernel's and stuff on android and really want to make my own ROM or kernel soon!
So thanks XDA and everyone involved in this !
pikachukaki said:
Ok lets say i want to learn how to make a device tree for my device cause noone make it...then compile aosp or cm and make it a usable rom for a device...to go to a bookstore to buy a book in my language to remove the possibility of wrong learning...what book to buy??java, c , c++??
Click to expand...
Click to collapse
If you want to learn how to make a device tree check outthis guide, then when your ready to try compiling AOSP and Cyanogenmod check out this guide. If you want to learn to compile ROM's and then I would recommend a book on Linux and C for programming kernels such as C All-in-One Desk Reference. On the other hand if you want to program applications a good Java book is important and I would recommend Head First Java. Hope this clears things up, let me know if you still have questions.
shimp208 said:
If you want to learn how to make a device tree check outthis guide, then when your ready to try compiling AOSP and Cyanogenmod check out this guide. If you want to learn to compile ROM's and then I would recommend a book on Linux and C for programming kernels such as C All-in-One Desk Reference. On the other hand if you want to program applications a good Java book is important and I would recommend Head First Java. Hope this clears things up, let me know if you still have questions.
Click to expand...
Click to collapse
My point is basically to learn how to create the device tree and then compile any rom i can and hope that i can use fixes from others and hints from others...im not really interesting of making an application!!
can read my guide here
mithun46 said:
can read my guide here
Click to expand...
Click to collapse
Please stop spamming your link across each thread. And tone down the MASSIVE text in the thread - it just looks unprofessional.
so, where do I start? C or C++?
Sent from my R800i