What is necessary if I want to compile a ROM? - General Questions and Answers

Hi guys. 2 months ago I've came into Android World deeper than before and now I'm very fascinated. I downloaded linux, all the necessary files to compile a rom but I still don't understand some things.
My device is Redmi Note 2 and I use stock MIUI 7. As we all know mtk and/or xiaomi haven't released kernel sources (6795) so developers have to think hard how to make a rom. And there are my questions. Does kernel source is really necessary? What if I compile rom successfully and then port boot.img from stock? Will it work? However developers made some roms based on LP for this device. And I read that I need device tree and vendor, which doesnt exist for redmi note 2 or I still can't use github.
Second question which I have is: does compiling for 64 bit CPU differ from compiling for 32 bit CPU (like 6592)? If yes, could you give me some tips?
Ohh I think you can understand what I wrote
Thanks in advance and please dont blame me for silly questions

If you are looking to compile roms then you picked the wrong device to do it. They are the worst with kernel source. You can't completely compile a rom but use a patch system that does most of the work.
Yes it is different. There are some Tuts around but they are few as most don't use that type of chip.
If you really want to learn to develop then I would suggest getting a different device. One that respects the copyright and gpl laws.

zelendel said:
If you are looking to compile roms then you picked the wrong device to do it. They are the worst with kernel source. You can't completely compile a rom but use a patch system that does most of the work.
Yes it is different. There are some Tuts around but they are few as most don't use that type of chip.
If you really want to learn to develop then I would suggest getting a different device. One that respects the copyright and gpl laws.
Click to expand...
Click to collapse
Thank you for your advices. I have HTC desire 310 and I found the kernel sources. I know what I'll do in my free time

Monsterlevel said:
Thank you for your advices. I have HTC desire 310 and I found the kernel sources. I know what I'll do in my free time
Click to expand...
Click to collapse
To compile a rom u need kernel source, device tree and proprietary, bye

Related

Compiling Android + Kernel from Source.

Hi there,
Now, I understand that there's a thread or two and a few web pages directed at compiling Android and its kernel from source.
However, the thread in question is months old, and didn't fully explain the process.
As for the web pages, they are mostly outdated and don't include enough information, not to mention desire specific instructions.
I think that, properly explained, building Android shouldn't be daunting, and everyone should be able to attempt it, if they wanted to.
So, I hope to compose a comprehensive guide on how to do just that.
The problem is that I myself have not been able to put enough instructions together to be able to complete a build. And there is no point digging up old threads.
So, If anyone who knows the ropes (that is, compiling android and a kernel from source) would be willing to lead the way, I'd happily turn it into an easy to understand guide.
Josh.
fllash said:
Hi there,
Now, I understand that there's a thread or two and a few web pages directed at compiling Android and its kernel from source.
However, the thread in question is months old, and didn't fully explain the process.
As for the web pages, they are mostly outdated and don't include enough information, not to mention desire specific instructions.
I think that, properly explained, building Android shouldn't be daunting, and everyone should be able to attempt it, if they wanted to.
So, I hope to compose a comprehensive guide on how to do just that.
The problem is that I myself have not been able to put enough instructions together to be able to complete a build. And there is no point digging up old threads.
So, If anyone who knows the ropes (that is, compiling android and a kernel from source) would be willing to lead the way, I'd happily turn it into an easy to understand guide.
Josh.
Click to expand...
Click to collapse
I followed this guide here and successfully compiled a modified HTC Kernel and I had very little Linux and Android experience.
Obviously instead of cloning the Cyanogen git, you just use the gits you wish to compile
Mekrel said:
I followed this guide here and successfully compiled a modified HTC Kernel and I had very little Linux and Android experience.
Obviously instead of cloning the Cyanogen git, you just use the gits you wish to compile
Click to expand...
Click to collapse
Thanks for the link
Though i don't fully understand the whole 'git' thing. Where do i find them? And how to i know which ones are the ones i want to use?
Josh
EDIT: Also, how do you 'edit' the kernel (i imagine it is somewhat like make menuconfig?). Also:
- Are these sense kernels?
- How do you add modules like OC and UV?
fllash said:
Thanks for the link
Though i don't fully understand the whole 'git' thing. Where do i find them? And how to i know which ones are the ones i want to use?
Josh
EDIT: Also, how do you 'edit' the kernel (i imagine it is somewhat like make menuconfig?). Also:
- Are these sense kernels?
- How do you add modules like OC and UV?
Click to expand...
Click to collapse
A git is a repository for source code, developers upload their source code there and can commit changes. The commit can allow descriptions of what was changed and also details the files changed.
The git system allows other people to add to the source if they have permission, or allows others to read the changes and download the source code.
Git links are usually posted by people who release software, as Android is GPL licensed so people have to release their source code if they're distributing their work.
Editing the kernel, take a look into the git and the commits and it will show you which files were changed and how exactly they were changed. That will give you the best understanding.
UV/OC is done by changing the acpu table in the architectures files and changing the minimum/maximum voltage figures in the board_bravo.c file.
The Cyanogen kernels are not Sense kernels no, it's a modified Google Kernel.
Thanks for the explanation. I followed the guide and built the rom, and it works (always a plus )
Now, the next thing is the kernel. How do I build a kernel with the CM tweaks integrated? I understand that all i would be doing is rebuilding the same one that is already installed, but im doing it to learn.
So, if i synced the GIT, does that include the CyanogenMOD kernel source? If it does, where is it and how do i rebuild it. If not, where do i find it?
Thanks,
Josh.

[GUIDE] Custom ROM development for the rest of us [In Progress]

*** THIS IS NOT JUST ANOTHER EFFORT TO CREATE YET ANOTHER CUSTOM ROM***
Though Android is opensource, a lot of things are unknown regarding ROM development/modification. There are many custom ROMs available for Galaxy 3 (and also other phones) and lot of people are flashing them and making their phone more responsive, productive and faster; but very few people actually knew how to go about developing the ROM.
What I intend here is to find out and document correct way to build ROM for our favorite Galaxy 3, which is very popular in India.
The goal will be to develop the ROM from Android source + Drivers from stock ROM while documenting the process so that large number of people can contribute to the development.
I will shortly update the posts with what I have done.
Reserved
Can anyone help me convert system.img and userdata.img file into files flash-able by ODIN?
Thanks
Third post
Reserved for future use
Fourth post
Fourth post.. reserved
Fifth post
Reserved 5th post goes here...
looking forward to what you come up with
Making one aint difficult keeping it bug free might get sometimes
Thanks rudolf895
I have experience in Android SDK and NDK development, but I am a noob when it comes to ROM development. Thats why this effort.
I have fetched android source using repo as well as I have also downloaded source for I5801 from Samsung open source website. After this I will look into extracting drivers from stock ROM and successfully compiling it for Galaxy 3.
rudolf895 said:
looking forward to what you come up with
Making one aint difficult keeping it bug free might get sometimes
Click to expand...
Click to collapse
abhijeet.pathak said:
thanks rudolf895
i have experience in android sdk and ndk development, but i am a noob when it comes to rom development. Thats why this effort.
I have fetched android source using repo as well as i have also downloaded source for i5801 from samsung open source website. After this i will look into extracting drivers from stock rom and successfully compiling it for galaxy 3.
Click to expand...
Click to collapse
best of luck
Looking forward to it!
abhijeet.pathak said:
Thanks rudolf895
I have experience in Android SDK and NDK development, but I am a noob when it comes to ROM development. Thats why this effort.
I have fetched android source using repo as well as I have also downloaded source for I5801 from Samsung open source website. After this I will look into extracting drivers from stock ROM and successfully compiling it for Galaxy 3.
Click to expand...
Click to collapse
Do not fell shy to ask for help u need. Together we can make it better. We are with you whenever u need us.
ARMVK Dev Team
Thanks!
Thanks a lot for your support guys..
arunmcops said:
Do not fell shy to ask for help u need. Together we can make it better. We are with you whenever u need us.
ARMVK Dev Team
Click to expand...
Click to collapse
hehe, cant wait to see what you come up with, sounds promissing btw... i am also willing to help whereever i can, whereas this wont be too much in this case i guess.
good luck and thanx...
TY ..!
Thanx alot
This would be really helpful to alot of members here
interesting ! waiting ....
I applaud your thread, I myself was thinking about such a concept.
I wanna help, but I cant do that much (basic knowledge of C and basic/little knowledge of linux and adb).
I think first there should be a list of basic stuff. Like compiling the sources, extracting factoryrfs and co from your phone etc... Sometimes if you wanna start doing something and you dont know the basics you get scared off because of their apparent tremendous lack of knowledge.
I'd probably start dabbling if somebody told me how to compile the sources.
can you also specify your work environment, toolchain and such stuff, so anyone can start from zero? there is a kernel building vm image with all tools by sztupy somewhere on the forum that is eventually of interest, and there is also an extended version containing eclipse and some more tools for full android development:
http://forum.xda-developers.com/showthread.php?t=882010
hope this helps somebody...
Did you try using it? I think the scripts are specific and cant be used by us (without altercation)
no, i have absolutely no idea of kernel compilation and all that advanced stuff, but i guess it can be adapted for our use
Yup...me too in waitin line...Now i can say i dint made a mistake by buying it...
Sent from my GT-I5801 using XDA App
abhijeet.pathak said:
Can anyone help me convert system.img and userdata.img file into files flash-able by ODIN?
Thanks
Click to expand...
Click to collapse
maybe you can create a ".tar" package including all those files.. .tar is flashable in odin..

[Q] What device tree I can use for Qumo Quest phone

Hi there!
I want to compile CM 10.1 for my phone, but stucked with device tree and i don't know what tree to choose for this.
Phone mentioned in the subject is Qumo brending of chinese i9220 PAD 5" MT6575 (e1809c_v75) Android 4.0.3
Great thanks if anyone can help.
PS. Sorry for my English.
rippak said:
Hi there!
I want to compile CM 10.1 for my phone, but stucked with device tree and i don't know what tree to choose for this.
Phone mentioned in the subject is Qumo brending of chinese i9220 PAD 5" MT6575 (e1809c_v75) Android 4.0.3
Great thanks if anyone can help.
PS. Sorry for my English.
Click to expand...
Click to collapse
I dont think there is one for that as that is not an official version of Android. Very few China based Android phones are supported by AOSP. You may have to start it yourself if you want it. The first thing you will need to do is have the OEM post the kernel source code for the device. This will be your biggest challenge. As most China OEM dont respect the GPL laws
zelendel said:
I dont think there is one for that as that is not an official version of Android. Very few China based Android phones are supported by AOSP. You may have to start it yourself if you want it. The first thing you will need to do is have the OEM post the kernel source code for the device. This will be your biggest challenge. As most China OEM dont respect the GPL laws
Click to expand...
Click to collapse
Ok
What if there is no source of kernel? Can I use compiled kernel (3.0.13) from current firmware (4.0.3) or this is impossible?
rippak said:
Ok
What if there is no source of kernel? Can I use compiled kernel (3.0.13) from current firmware (4.0.3) or this is impossible?
Click to expand...
Click to collapse
Without kernel source your kinda out of luck. No that kernel will not work on AOSP as that 4.0.3 is not an official android version. It is a hacked together version. Your best bet would be to sell it and get something that is not a knock off.
zelendel said:
Without kernel source your kinda out of luck. No that kernel will not work on AOSP as that 4.0.3 is not an official android version. It is a hacked together version. Your best bet would be to sell it and get something that is not a knock off.
Click to expand...
Click to collapse
Just for fun: wrote to "developer" for sources.
rippak said:
Just for fun: wrote to "developer" for sources.
Click to expand...
Click to collapse
Got to write to the OEM. Only they will be able to release the kernel source. Good luck. Dont hold on to hope though. They are not forced to post kernel source like everyone else.
zelendel said:
Got to write to the OEM. Only they will be able to release the kernel source. Good luck. Dont hold on to hope though. They are not forced to post kernel source like everyone else.
Click to expand...
Click to collapse
Don't you know is it real to compile with another kernel for same CPU MT6575?
Found some links to kernel sources for other phones - seems to be working for different devices.

A Cheap Device to learn android ROM building[India]

Hello Guys.
I want to Buy a Cheap Device(Which have available sources) to learn android ROM Building.
My Budget is Very Tight:crying: Rs.8000
Please Suggest me a Good Device.
Thanks in Advance.:good:
Rumorbox33 said:
Hello Guys.
I want to Buy a Cheap Device(Which have available sources) to learn android ROM Building.
My Budget is Very Tight:crying: Rs.8000
Please Suggest me a Good Device.
Click to expand...
Click to collapse
Lol, You call Rs. 8000 budget a tight budget??
That's more than enough..
Nowadays, most devices release their kernel source including device trees (Though not proper)..
As far as I can remember, I'll suggest you to buy Yu Yunique, which is quite new as of now and has very less custom ROMs as of now and has sources released..
Or you can choose any other device as you wish.
All you should do is search hard if the source is released for that phone. (All u need to do is Google to find out)
And, there are many tutorials in XDA which will easily help you learn about ROM development.
Note:
ROM development needs some/little Android knowledge depending upon what you're going to do.
To build CM from source, you need a hell lot of knowledge.
You also need a hell lot of time and patience.
To build a custom ROM based on CM, you more or less just need to follow the instructions given in that custom ROM's website.
Also you'll need a fast internet to download sources which will be like 13-16GB (this is for each ROM base)
But, porting a ROM can be quite easy compared to building from source..
So, if you're kind of new, better learn something about Android and how it works, before you buy a phone simply for development purpose, to avoid repenting in the future that you've wasted your money..
GokulNC said:
Lol, You call Rs. 8000 budget a tight budget??
That's more than enough..
Nowadays, most devices release their source including trees (Though not proper)..
As far as I can remember, I'll suggest you to buy Yu Yunique, which is quite new as of now and has very less custom ROMs as of now and has sources released..
Or you can choose any other device as you wish.
All you should do is search hard if the source is released for that phone. (All u need to do is Google to find out)
And, there are many tutorials in XDA which will easily help you learn about ROM development.
Note:
ROM development needs some/little Android knowledge depending upon what you're going to do.
To build CM from source, you need a hell lot of knowledge.
You also need a hell lot of time and patience.
To build a custom ROM based on CM, you more or less just need to follow the instructions given in that custom ROM's website.
Also you'll need a fast internet to download sources which will be like 13-16GB (this is for each ROM base)
But, porting a ROM can be quite easy compared to building from source..
So, if you're kind of new, better learn something about Android and how it works, before you buy a phone simply for development purpose, to avoid repenting in the future that you've wasted your money..
Click to expand...
Click to collapse
I have knowledge about android That's why i am asking:good:
So,What about Redmi 1S ?
Should i buy That ?
Rumorbox33 said:
I have knowledge about android That's why i am asking:good:
So,What about Redmi 1S ?
Should i buy That ?
Click to expand...
Click to collapse
Yes, it's OK.
Kernel sources are released: http://en.miui.com/thread-73469-1-1.html

How to create android kernel if I am creating a new android device

I am creating a new android device and want to create a kernel for it, how can I create it? Almost every guide and tutorial suggests to download a kernel source from the device's developer site for the particular device, but what if I want to create a new one?And how can I do it?
yuvraj_reckon said:
I am creating a new android device and want to create a kernel for it, how can I create it? Almost every guide and tutorial suggests to download a kernel source from the device's developer site for the particular device, but what if I want to create a new one?And how can I do it?
Click to expand...
Click to collapse
Wait.. So you're​ telling​ that you are creating your own phone?
psxda97 said:
Wait.. So you're​ telling​ that you are creating your own phone?
Click to expand...
Click to collapse
Exact sir
yuvraj_reckon said:
Exact sir
Click to expand...
Click to collapse
First, you need to decide exactly which hardware components to use, then find out which Linux kernel drivers those components require. How the kernel is built and what it contains depends on the hardware in the device.
Really, it would be better to ask this question somewhere else other than XDA, XDA deals with custom development and modifying existing stock firmwares, not with building source code for a device from scratch.
Sent from my SM-S903VL using Tapatalk
Droidriven said:
First, you need to decide exactly which hardware components to use, then find out which Linux kernel drivers those components require. How the kernel is built and what it contains depends on the hardware in the device.
Really, it would be better to ask this question somewhere else other than XDA, XDA deals with custom development and modifying existing stock firmwares, not with building source code for a device from scratch.
Click to expand...
Click to collapse
Thank you sir..... I have started building it

Categories

Resources