How to compile a kernel module for Droid 2 (linux-2.6.32.9-g59f0395)
I am starting this thread as both a cry out for help! And as a way to further document the process for compiling kernel modules specifically for the Droid 2. Please read though and comment about areas that I am lacking, flat wrong, or could use refinement.
My background is from Java software development in Windows land and am an admitted n00b to BOTH Android and Linux. As such, I have been trolling XDA and many other forums to glean the following tidbits. I regretfully did not record all of the threads that I pulled from and so can not fully give my credit. Any rate, a big thanks goes out to the community as a whole for rapidly documenting so much of their efforts!
Background about my environment, running Ubuntu 10.04 64-bit. So all console commends and environments are geared for this.
I am an utter n00b and have spent 45 min trying to sanitize my post of 'urls' even though there are none. So I have pasted my write up into the attached txt file. I assure you its plain text and nothing malicious.
Please download the txt file and review. Then comment about any tips or advice about how I can further debug or resolve this issue?
Best regards,
David Parrott
droid 2 specific kernel code on motorola site
download the kernel that Motorola released for the droid X since it is similar to droid 2. in the config folder there is a sholes_defconfig file. use that to generate the .config file by using the command "make sholes_defconfig"
link for the site
https://opensource.motorola.com/sf/go/projects.droidx/frs.droidx_source_froyo
plasmdude said:
How to compile a kernel module for Droid 2 (linux-2.6.32.9-g59f0395)
I am starting this thread as both a cry out for help! And as a way to further document the process for compiling kernel modules specifically for the Droid 2. Please read though and comment about areas that I am lacking, flat wrong, or could use refinement.
My background is from Java software development in Windows land and am an admitted n00b to BOTH Android and Linux. As such, I have been trolling XDA and many other forums to glean the following tidbits. I regretfully did not record all of the threads that I pulled from and so can not fully give my credit. Any rate, a big thanks goes out to the community as a whole for rapidly documenting so much of their efforts!
Background about my environment, running Ubuntu 10.04 64-bit. So all console commends and environments are geared for this.
I am an utter n00b and have spent 45 min trying to sanitize my post of 'urls' even though there are none. So I have pasted my write up into the attached txt file. I assure you its plain text and nothing malicious.
Please download the txt file and review. Then comment about any tips or advice about how I can further debug or resolve this issue?
Best regards,
David Parrott
Click to expand...
Click to collapse
In case you haven't noticed, you're in the wrong thread. This is for the Droid, A855. You're post has nothing to do with the Droid a855, you'll want to post this in the Droid 2 forums, Droid 2 is the A955 series from motorola.
Hi,
Sorry to bring this up, do you succeed in compiling a module for the droid2 ?
I'll think i'll try it to add rdnis_host.ko, cause the interface usbnet does not show up on my archlinux.
Thks
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 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.
So i might not have the tag on here but i have done dev work (rootzwiki is where i used to dev.) and i have created a small little guide for the BSOD fix for our nexus 5's. Which is actually what brings me here today. Im looking for someone that has coding knowledge (not android persay but someone that is good with commands and cmd prompt.) im currently working on a project and ive got the base of it down i just am needing a bit of help for auto input. If ANYONE is willing to help please let me know. I dont want to post me code here as this project is a milestone for me as so far ive written it all by myself.
Thanks in advance.
What is BSOD?
Gene Poole said:
What is BSOD?
Click to expand...
Click to collapse
Black Screen of Death. Its an issue i myself had and 1-3 others have had. Its very rare and only happened to me because i acidently flashed hells core (using the app from the playstore) and it flashed the nexus 4 kernel on my nexus 5 causing my device to not show anything on the screen NOR boot to either boot recovery OR the actual os.
wolfirotisha said:
So i might not have the tag on here but i have done dev work (rootzwiki is where i used to dev.) and i have created a small little guide for the BSOD fix for our nexus 5's. Which is actually what brings me here today. Im looking for someone that has coding knowledge (not android persay but someone that is good with commands and cmd prompt.) im currently working on a project and ive got the base of it down i just am needing a bit of help for auto input. If ANYONE is willing to help please let me know. I dont want to post me code here as this project is a milestone for me as so far ive written it all by myself.
Thanks in advance.
Click to expand...
Click to collapse
Well... I know the fundamentals of programming and I have participated in a programming contest (I'm 18) and also I am quite good with automation cause I needed it for my projects.
Below you can see my work on a .bat file I've made to make easier my work on a homebrew PSP game.
https://github.com/Leajian/cspsp-nightly/blob/master/jge/Projects/cspsp/CSPSPdevTools-1.0.bat
The same goes with linux related automation, as you can see below here, I've created an (unfinished and buggy) menu script for android which is modular and unfortunately kinda slow and incompatible with some devices, cause by the time I was writing it I had no particular knowledge about programming. I was self-taught and I had been using goto methods. :silly:
https://github.com/Leajian/xMenu
I don't know what exactly you're looking for, please be more specific. I think I can help, but after 29/5/2015 because at that day my finals end.
EDIT: As long as your device has intact bootloader partition and it boots to it, you can always flash a nexus 5 kernel and/or a recovery image. It is suggested that you flash a factory image afterwards.
wolfirotisha said:
So i might not have the tag on here but i have done dev work (rootzwiki is where i used to dev.) and i have created a small little guide for the BSOD fix for our nexus 5's. Which is actually what brings me here today. Im looking for someone that has coding knowledge (not android persay but someone that is good with commands and cmd prompt.) im currently working on a project and ive got the base of it down i just am needing a bit of help for auto input. If ANYONE is willing to help please let me know. I dont want to post me code here as this project is a milestone for me as so far ive written it all by myself.
Thanks in advance.
Click to expand...
Click to collapse
I can help u out depending on what ur looking for, I have experience in java, c++, c, c#, python, bash, html5 and php, lmk if I can be of assistance
There will be 3 pages in the android studio software. The first two pages will contain the name of 3 anime series each with little tumbnails with them and a button below to go to the next page. The 3rd page will contain a shot video of 10 second or a gif. To run these content what codes are needed?
sakib021 said:
There will be 3 pages in the android studio software. The first two pages will contain the name of 3 anime series each with little tumbnails with them and a button below to go to the next page. The 3rd page will contain a shot video of 10 second or a gif. To run these content what codes are needed?
Click to expand...
Click to collapse
Your question is not specific, it's hard to understand what you really want to know. If you don't have programming experience and want this job to be done by someone else, I can make this app for you. All graphic assets must be provided by you.
Unity Dev said:
Your question is not specific, it's hard to understand what you really want to know. If you don't have programming experience and want this job to be done by someone else, I can make this app for you. All graphic assets must be provided by you.
Click to expand...
Click to collapse
okay. it would be very helpful. actually i have an assignment and i know literally nothing about programming.
I think you'r not explaining in the right way but i can help you to solve your problem. i have 8 years experience in software development and i develop so many software for multilevel and small level industry. You can contact me. gadget bytes. in.
Hello I need some advice or help on android studio plug in. I actually received an e mail I will just Copy it here :
EMAIL :
Dear Android developer,
We invite you to participate in a research study being conducted at Saarland University in Germany. We found your email address as a professional developer on Google Play.
We have developed FixDroid, an Android Studio plugin to help you learn about different aspects of software security. We're excited to be able to share this with you!
FixDroid helps you to learn more about secure coding. As you write code it finds insecure practices and warns you about them. In some cases it will offer you more secure alternatives as a QuickFix.
FixDroid is, and will remain, free to use and we're delighted if you can use it. In return we'll collect anonymous information about your use of it - but never any of your code or anything to identify you or the code. Please visit https://userstudies.cs.uni-saarland.de/fixdroid/installFixDroid.html to get access to the plugin.
While you try it out, if you've time, please could you possibly participate in a brief scientific study to help us improve FixDroid for you and other users?
Visit https://userstudies.cs.uni-saarland.de/fixdroid/70333f6d4789/468180b5cdf9 for more information or simply reply to this email. We'll be glad to answer any questions. If you don't want to receive emails from us, please visit https://userstudies.cs.uni-saarland.de/fixdroidstudy-bl/new/70333f6d4789/468180b5cdf9 and we will never contact you again.
Our research relies on the generous help of interested developers, so thank you for your help and feedback!
----
END
Now has any one else got this? Is this really helpful? I am asking here because I never heard of fixdroid. I know it is an html plug in and if it really is what it is maybe it will help others. I am just a junior developer so any help from a developer is appreciated tnx.
Help needed please!!
Hello. I'm new in developing apps and trying to learn on Android Studio. I'm creating a app for calculate the percent. The code is done and the interface, but when I run the app in the emulator all the buttons and the layouts appear on the top left of the screen one over the other. I don't know what i'm doing wrong. Thanks for your help.
omaritoml said:
Hello. I'm new in developing apps and trying to learn on Android Studio. I'm creating a app for calculate the percent. The code is done and the interface, but when I run the app in the emulator all the buttons and the layouts appear on the top left of the screen one over the other. I don't know what i'm doing wrong. Thanks for your help.
Click to expand...
Click to collapse
Please post your layout's xml file. Maybe you are using ConstraintLayout as a parent view instead of LinearLayour?