Dharam's Kernel Development Tutorials
Since many of the S2 Kernel Developers have moved on or will be moving on to the Galaxy S3, I feel we need more developers for the S2. No offence to those who have moved on, even I would have done the same if I could afford one
Anyways, there will be many people who will have the knowledge of coding and stuff, just wont know how to build kernel's and all...
So here I present the Kernel Development Tutorials for the Galaxy S2. It will be similar for many other devices and so you can refer the same also if you are developing for any other device
The thread will be similar to my previous tutorials for the Galaxy 3, but based on MOD's for the S2.
I do not present myself as an expert of things, there are many great developers for the device including codeworkx, chainfire, gokhanmoral, simone201 and many many others which I am just skipping for the time being. Credits for their work will be provided as and when refered to.
I am also learning stuff myself, and so I maybe wrong at many places. I would request other developer's to keep a look on this thread and help out me and others whenever required. You guys have better knowledge, and it is a great thing to share the knowledge.
I will explain everything Step by Step.
If you got time to learn/develop join in.
If you get some step working and a fellow developer cant get it, please help each other by answering everyone's doubts.I cant reply to each and every query always.
Most of the code is to be run in the terminal. So I wont be mentioning to Open terminal every time.
I would like to thank marcellusbe who was the first one to make a proper custom Kernel for Galaxy 3, who taught me how to build a kernel, and also lot of other help
Note:
Please do not post useless messages.
If you dont know coding, please learn that first.
Do not flood my inbox with PM's. I will not respond to PM's regarding Kernel Development. Please post in the thread, so that everyone can learn.
[*]I AM NOT RESPONSIBLE IF YOU HARDBRICK YOUR PHONE, DOING ANY OF THE FOLLOWING STEPS
A request to all the people, please do not vote down this thread directly. It will take some time to build the tutorials step by step. If you have any doubts, then this thread will be similar to http://forum.xda-developers.com/showthread.php?t=1186409
I have got many requests to do a similar series for the S2, and so I am doing it.
This series will also be posted at www.androidnova.org - Checkout the website for latest Android News, Reviews and other cool stuff
Step 1: Setting Up The Build Environment
Installing Ubuntu.
1. Download Ubuntu x64 from http://www.ubuntu.com/download/desktop
2. Install Ubuntu directly or as a Virtual Machine ( I prefer direct installation)
3. If setup is Virtual Machine, Please dedicate enough RAM and processor for the Kernel to build fast, else it will take ages
Logging In As Root
1. When Ubuntu first boots, login with the username and password you mentioned while installing.
2. Open Terminal
3. Use following command.(Always the code after $/# is the one to be used. The one before that just specifies [email protected]:~)
## Anything after ## is a comment by me.
Code:
[email protected]:~$ sudo passwd
[sudo] password for dharammaniar: ## Enter password which you used to login.
Enter new UNIX password: ## Enter Password for root(it can be same as your prev password)
Retype new UNIX password: ## Re-Enter Password for root
passwd: password updated successfully
[email protected]:~$ su
Password: ## Enter the root password
[email protected]:/home/dharammaniar#
4. Once you get the last line as above means you now have root access.
5. Now logout from this user and login with username as root
6. On starting Terminal now, you should get
Code:
[email protected]:~#
Setting Up Build Environment
1. You should always be running as root.
2. Go To System->Administration->Synaptic Package Manager
3. Search for ncurses-devel
4. Install libncurses5-dev.
5. Download the toolchain. You can find it in the AOSP Source. I will also upload it soon enough.
Downloading Source
Downloading The Source
1. Download the Update4 Source from http://opensource.samsung.com/ or https://github.com/CheckROM/DK_S2_ICS_KERNEL/tree/5ec9752c34cedf3e8df9e887ecad6db9337de927
2. Download the initramfs from https://github.com/CheckROM/DK_S2_ICS_INITRAMFS/tree/d85b2201b79588e70387d3df0ffd2f83d741c4ac or maybe request some developer to post how to extract initramfs from stock samsung kernel. Even I am trying to figure that out...
(If any developer is reading this, and can help out, We would be grateful)
3. Create a folder named S2.
4. Inside that have 2 folders, 1) Kernel 2) initramfs
5. Kernel folder should have the source e.g. arch, drivers and all
6. initramfs folder should have the files init.rc and stuff
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Last Reserved... I will make use of these posts as and when required, so request the MOD's not to delete any of the above posts
Sure thing i got all the time i need. I was waiting for someone explain this xD
Nice to see this post. .Sir,I have send you PM if you don't mind please see it .
Really nice iniciative
Good luck !
Setting Up The Build Environment is done...
Checkout first page...
Awesome mate that is what i was looking for!
I really appreciate this
this will be the hugest tutorial in know.
but very helpfull for some peoples.
rly nice
Can I follow this tutorial (codes and everything) with mint 13?
Cristiano Matos said:
Can I follow this tutorial (codes and everything) with mint 13?
Click to expand...
Click to collapse
I think it should work, but cant guarantee...Try it and let me know
Dude, it's really nice. But one question. After that, are we going to have a brick wave? I think that unexperienced people like me will have some trouble when trying to build. Your tutorial will be brick safe if we follow all steps? If yes, I will try to do something.
Ics opensource update 4. is believed to be safe,so people will be "brick-safe".
This thread will be handy for disscussions when we get ICs successor,and samsung presents us a new "virgin" kernel source.
Also,u can find 6 toolchains in this repository- https://github.com/sakindia123/Android_Toolchains
Related
please, Please, PLEASE - can someone post a fairly comprehensive explanation/set of instructions for the installation and use of custom ROMS, kernels, and patches. Explain such things as:
Roms: Is it as simple as putting the .zip at the top of the SDcard and rebooting into recovery?
Kernel: what is it, is it part of a Rom, is the installation process the same as above?
Patch: see above
Alternatively - If someone could point me to a reference guide - Hacking your android phone for dummies maybe - I could figure it out. I think most of us that ask are smart enough to get the mechanics, just missing the theory and background. I wasn't programming linux at 10 like some of you developers were.
Bonus: 1 sticky at the top of the forum would probably shut us all up and we could get to the fun stuff!
answered some of my own question...
http://forum.xda-developers.com/showthread.php?t=502010
http://forum.xda-developers.com/showthread.php?t=532719
And another one
http://forum.xda-developers.com/showthread.php?t=517874
First of all, I'm not a total newbie to this kind of stuff. I've already been creating firmwares for Different mobile Phones, some Linux-running routers and the Sony PSP, but this is my first try on Android.
At first I wanted to start off simply: compile the source on my Ubuntu and flash it - that's how I would start with any open-source 'from the scratch'-project. So I got repo, set it up and synced it, compiled it and created a zip with the rom kitchen to try if it even boots. Well it didn't (this is a bit more complicated than flashing a linux firmware to a router). Then I've taken a look a the update-script and modified it. The rom now installs successfully, but still doesn't boot. Wel my questions are:
1. Are there any guides on properly setting up the update-script? I didn't find anything, but maybe I didn't look in the right places.
2. I probably did everything wrong with the compiling. what are the options I get when I enter 'lunch' for? They should change settings for the compilation right? Am I good with the HTC passion option or do I need anything different?
Finally don't be angry because of my grammar/spelling, I'm from germany and don't get mad because of possibly 'noobish' questions, I promised I searched the forums and giyf.com
CrisisCorE said:
1. Are there any guides on properly setting up the update-script? I didn't find anything, but maybe I didn't look in the right places.
Click to expand...
Click to collapse
I too have searched for this with little to no success, so +1 on this...
Im also in need of a guide how to completely demolish/rebuild the update-script.
Someone who can point a finger?
Nobody? nothing?
I am a new owner of an Acer a100(16GB) (currently 1.018.05_COM_GEN2) Android v3.2 and wanted to introduce my self and offer my assistance with A100 development in any way.
I'm an Android noob, but I use Linux and have done some shell scripting(Perl, Bash, Sed, Awk, a little javascript), and I am in the process of learning Java. I have also modded other devices before like PS2, PSP. So I am looking forward to learning more about Android and since I have an a100 this seems like a good place to spend some time.
So far I have just rooted my device via the Terminal Emulator method(I do have Eclipse IDE with Android SDK, ADT installed and working and should be setup help compile), got superuser, busybox, titanium, Avast installed. I also made a backup of my recovery image with dd in a shell, and did the AND to WIN hex edit(w/ Bless) of libflashplayer.so for Flash 11 so I can watch hulu, etc via Dolfin HD. I also made a Bash(run via Terminal IDE) script to re-apply the modified file after a shutdown which for now I have installed into /data/data/com.spartacusrex.spartacuside/files/bin (aka: ~/bin).
I will probably post my hulu script and lib file with some instructions later. It's basic but effective script that does some file checks and error correcting before it catenates the source file and redirects to destination. Later I may add a few more checks like making sure its running as superuser, and some post file mod checks.
Im still trying to figure out what else we can do, and how to do various things within Android at this point. So far its a fun little setup.
I wanted to say THANKS to everyone here. This place is a great resource. Special thanks to everyone that has been working on the Development end. I look forward to trying to make my self useful.
Welcome Hope you enjoy this device as much as I do.
As far as helping development, you should really check out the bypassing the bootloader thread in this forum, that's where the brainstorming is taking place atm.
Yes, we are *trying* to bypass the bootloader somehow, Crossix is getting a working kernal going while others are looking into methods of applying a work around. Your help will be much appreciated. Welcome to the Forums, and as stated above, the A100 is a great device that has a lot going for it if we can get some work done on it.
As far as helping development, you should really check out the bypassing the bootloader thread in this forum, that's where the brainstorming is taking place atm.
Click to expand...
Click to collapse
Yep I have been reading it and looking around trying to get an idea of what the typical solutions/workarounds are used on other Android devices.
I don't think I have access yet to the developer area yet.
Welcome to the a100 forums, it's always nice to have another dev working on this thing!
Development forums require 10 posts to be able to use them, so just remain active in general/QA and you'll have access in no time.
Congrats on your New Tab
Below is a format that should be used as an example of how a rom thread should look. It doesnt have to be exact. I suggest that you stay creative and use all the features in the advanced panel when creating a thread.
1. Name of rom, team, etc
2. Introduction
3. Changelog in code or php tags
4. What's included in the rom in the (apps, tweaks, scripts, addons, mods) in code of php tags
5. What works/what doesn't work in code or php tags
6. Credits (Users name-with link to (profile/github/or thread u got tweak from embedded), and what they did to help you)
7. Screenshots (2-10 different screenshots of different aspects of rom)
8. Kernel with either link to thread you got it from or github (if stock sense or cm please state that and that is enough)
9. Instructions on how to install the rom (also if special instruction for a2sd or beats audio...etc)
10. Do's and Don'ts of the rom
11. Questions & Answers section (I find this helpful to write out asked questions with solutions at the bottom of the op. I find that it cuts down on the question being asked a million times)
12. Finally the dl link
13. Additional add-ons (this can go into first post or reserved posts after)
I find the embedded link looks and feels better throughout the op if possible.
All sections should have a header with enlarged text and spaced out so people can read it easily.
I am hoping that this helps to make this section a little cleaner and easier. enjoy
The way I look at this is that it takes US weeks/days/hours to make these roms....we can take the time out to make sure that the op looks professional and clean
Also Make sure the op is fully ready before posting. I know we all get excited to release a rom but stating that half the stuff will be updated as time permits just shows that you are lazy and in a hurry which doesnt look good cause if thats the case then how does your rom run....
No posting a a rom thread without a DL link either
Continuing the discussion from Firefox OS is the way to go!
Hi guys!
I am new to xda-devs, but have been visiting it for useful information in the past.
I own a FP1 (First Edition) and am seeking to port FFOS to the FP1.
I do not have any developing experience, I have just done C and Java and I am comfortable with Linux's CLI.
I am following this guide: Porting Firefox OS
Currently I am stuck at the following: Create a manifest for the new device
[edit]
Which changes do I have to make to the hamachi manifest mentioned there?
I figured out, that most of the stuff is hamachi-specific and thus not required. My current manifest is attached. Could you please take a look and tell me, if this is enough?
These files are at hand:
madde on Fairphone Forum said:
Well there already is a recovery file for the fp1 + fp1u by chrmhoffmann up and running. The MTK6589 source code is kind of released and there has been a lot of work on the android code by the omnirom project, which might come in handy.
Should be definitely manageable to build and try out Firefox OS on the FP1. UnfortunatelyI'll just don't have the time to really dig into that. Maybe someone with a bit more experience can give it a shot. I'd love to see and try out the result...
Click to expand...
Click to collapse
I am inviting @madde-, @_keesj and @chrmhoffmann, I hope you, or others, can help me out.
Thanks in advance, Stefan
PS.: As I am new to xda-devs, I do not know, if my thread is in the right position and/or tagged correctly. Please give some advice on how to improve my original post.
Edit: My current manifest is attached.
I'm very interested by a portage of Firefox OS to the Fairphone
Don't have enought time to test for now, but I stay connected
Newluck77 said:
Continuing the discussion from Firefox OS is the way to go!
Hi guys!
I am new to xda-devs, but have been visiting it for useful information in the past.
I own a FP1 (First Edition) and am seeking to port FFOS to the FP1.
I do not have any developing experience, I have just done C and Java and I am comfortable with Linux's CLI.
I am following this guide: Porting Firefox OS
Currently I am stuck at the following: Create a manifest for the new device
[edit]
Which changes do I have to make to the hamachi manifest mentioned there?
I figured out, that most of the stuff is hamachi-specific and thus not required. My current manifest is attached. Could you please take a look and tell me, if this is enough?
These files are at hand:
I am inviting @madde-, @_keesj and @chrmhoffmann, I hope you, or others, can help me out.
Thanks in advance, Stefan
PS.: As I am new to xda-devs, I do not know, if my thread is in the right position and/or tagged correctly. Please give some advice on how to improve my original post.
Edit: My current manifest is attached.
Click to expand...
Click to collapse
Did you try your file out? I's think it's probably best to cut down on just the relevant settings.
madde- said:
Did you try your file out? I's think it's probably best to cut down on just the relevant settings.
Click to expand...
Click to collapse
Yes, the config.sh got stuck at like 93%.
Also I have no idea, what exactly I have to include into the manifest file. I think I need a toolchain, but I am not sure where to get one, and how to apply it. (I somehow know what it is though, I think... )
Ok, running the config.sh comes at the very end, so I probably should continue with the configuration tree[1]...
Does everything in here [2](@chrmhoffmann's repo android_device_fp_FP1) go to the configuration tree?
[1]: https://developer.mozilla.org/en-US/Firefox_OS/Developing_Firefox_OS/Porting#Create_a_configuration_tree_for_the_new_device
[2]: https://github.com/chrmhoffmann/android_device_fp_FP1
PS.: Sorry, not allowed to post links...
Newluck77 said:
Yes, the config.sh got stuck at like 93%.
Also I have no idea, what exactly I have to include into the manifest file. I think I need a toolchain, but I am not sure where to get one, and how to apply it. (I somehow know what it is though, I think... )
Ok, running the config.sh comes at the very end, so I probably should continue with the configuration tree[1]...
Does everything in here [2](@chrmhoffmann's repo android_device_fp_FP1) go to the configuration tree?
[1]: https://developer.mozilla.org/en-US...reate_a_configuration_tree_for_the_new_device
[2]: https://github.com/chrmhoffmann/android_device_fp_FP1
PS.: Sorry, not allowed to post links...
Click to expand...
Click to collapse
any progress on that? Might be able to help you a little bit in the next few weeks.
Cheers!
madde- said:
any progress on that? Might be able to help you a little bit in the next few weeks.
Cheers!
Click to expand...
Click to collapse
No haven't been able to work on this.
I still have no idea, where and how to build this configuration tree. Do you have advice on this?
Thank you, Stefan
Fyi, a build is now available. As a new user on XDA, I can not post link here (what a ****ty rule), but check bug 1139642 on bugzilla and search Fairphone on the Mozilla Developer Network (MDN) to have more info.
Wrong phone (FP1(U) vs FP2)
The build, you are referring to, is for FP2, not for FP1.
A Firefox OS for FP1 could possibly be built using the source by @chrmhoffmann: http://forum.xda-developers.com/fairphone/orig-development/rom-fairphone-fp1-kitkat-4-4-2-t3243623