[Q] Build ROM with AOSP-Code - Nexus 4 Q&A, Help & Troubleshooting

Hiho,
Yes I have one .... and it is nice but ....
Can someone explain/write how to compile the working rom with the aosp-code?
I just want the feature - long press to skip music ... maybe later more. But I dont know anything about how to build the code.
I have the Master branch on my pc and followed the AOSP-Guide till "Building the System". But I dont know how to include and dumb the needed system files.
It would be nice if someone could help me out
Thx lexXxel

PUSH PUSH
Is nobody out there who can help me out?
Do you understand my question, because my english ins't .... as well as needed

lexxxel said:
Hiho,
Yes I have one .... and it is nice but ....
Can someone explain/write how to compile the working rom with the aosp-code?
I just want the feature - long press to skip music ... maybe later more. But I dont know anything about how to build the code.
I have the Master branch on my pc and followed the AOSP-Guide till "Building the System". But I dont know how to include and dumb the needed system files.
It would be nice if someone could help me out
Thx lexXxel
Click to expand...
Click to collapse
Compiling the code is the easy part. Do you know how to write code to get what you want to achieve?
Sent from my Nexus 4 using xda premium

Yes I know how to write code ... if it will work.... we will see! So could u please explane me how to compile the code? and flash it on my device ... because till know iam not able to get my modified SystemUI.apk working.... Pls help me!

ATM the nexus 4 isn't part of AOSP - it will be soon.
Once in your source dir try this
. build/envsetup.sh
lunch (choose device)
make -j8 otapackage
flash with cwm
next time GOOGLE IT! or at least search xda
FYI: -j8 can be sth else - you can find out with a little searching
EDIT: This is also in the wrong area - but w/e

minooch said:
ATM the nexus 4 isn't part of AOSP - it will be soon.
Once in your source dir try this
. build/envsetup.sh
lunch (choose device)
make -j8 otapackage
flash with cwm
next time GOOGLE IT! or at least search xda
FYI: -j8 can be sth else - you can find out with a little searching
EDIT: This is also in the wrong area - but w/e
Click to expand...
Click to collapse
I GOOGLED IT ! and this isnt working! I thought that the Nexus 4 is part of the AOSP, but the binarys arent available now. So I just wanna know how and which files are needed from a N4 and where to put them to get a working build. and how to make a zip that I can flash. The built emulator doesnt boot, too.
At the moment I just want to get a modified SystemUI.apk on my phone. But its not possible with adb push or install right know. Even with a new unmodified version. So something must be wrong during the compilation.
PS: What is the right area for this question?

lexxxel said:
I GOOGLED IT ! and this isnt working! I thought that the Nexus 4 is part of the AOSP, but the binarys arent available now. So I just wanna know how and which files are needed from a N4 and where to put them to get a working build. and how to make a zip that I can flash. The built emulator doesnt boot, too.
At the moment I just want to get a modified SystemUI.apk on my phone. But its not possible with adb push or install right know. Even with a new unmodified version. So something must be wrong during the compilation.
PS: What is the right area for this question?
Click to expand...
Click to collapse
This is the right area
Why don't you compile for the GN & then just pull SystemUI.apk?
Even if you compiled for the Nexus 7, it's still going to be the same file

I will try it. Thanks for Ur help. I will install a new 10.04 and start again (was on 12.04) .

lexxxel said:
I will try it. Thanks for Ur help. I will install a new 10.04 and start again (was on 12.04) .
Click to expand...
Click to collapse
NP,
10.04 is preferred ATM. If you run into problems getting Java, try this:
sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo update-java-alternatives -s java-6-sun

Related

Samsung Captivate Froyo AOSP [In Development]***WE HAVE LIFT OFF*** 04/19/2010

I am Developing an AOSP Froyo build for the Samsung Captivate.
It is being built from the ground up and will be missing many of the
bells and whistles that this community has grown accustom to.
NO samsung or att bloat
although that also means no samsung goodies.
I also won't be including google apps. (this can easily be added in later)
This is not a CM build. although a lot of help comes from that arena.
I feel it would be better to build from a pure AOSP base.
knowing that it was created and fully compatible with the device that
it is being used on.
from there, all the optional extras can be added.
for now it will need to be built from source
here is some reading material for those that don't know how...
http://forum.xda-developers.com/showpost.php?p=6243873&postcount=1
http://help.github.com/
http://www.cmsgs.com/mediawiki/index.php?title=Howto:_Install_the_Android_SDK
http://developer.android.com/sdk/index.html
http://source.android.com/source/index.html
some helpful sources
www.github.com/CyanogenMod
www.github.com/teamhacksung
www.github.com/cmsgs
these are just a few I had immediately available.
IF ANYONE HAS BETTER SUGGESTIONS PLEASE LET ME KNOW AND I WILL ADD IT HERE.
what doesn't work:
cell network...( probably just needed to flash a modem)
wifi...
bluetooth
sdcard (internal & external)
audio
camera
gps
accelerometer/sensors
keymapping incorrect Fixed 4/21/2011
what works:
boots up
most apps that I had installed (I didn't wipe data so it kept all my apps)
live wallpapers
crazy fast graphics (next time I will run some benchmarks to compare)
the dim settings for brightness was a TON dimmer than stock (most likely better on battery)
touchscreen very responsive/accurate.
I am looking for any assistance on this. I have a lot that I plan on doing still but I don't have a lot of time to work on it.
So the more help I get the faster it gets done.
HOW TO BUILD FROYO FOR CAPTIVATE
After reading the reference material above
I use Ubuntu 10.04 32bit at ubuntu.com
10.04 is a LTS release (long term support) so even though there are newer releases I would stick to that one.
you will need java5 NOT 6 so if you have 6 installed already you should uninstall it.
(there is a way to have both at the same time but I don't recall the steps at the moment)
Code:
sudo apt-get install sun-java5-jdk
some extra stuff you will need
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind
make sure you are in your home directory (~/ = home directory)
Code:
cd ~/
create a working directory and go into it
Code:
mkdir mydroid
cd mydroid
copy my repo to your computer
Code:
git clone git://github.com/aosp4captivate/froyo.git
once that is done. (takes a while)
download this captivate_update.zip
and this initramfs.zip
Place the captivate_update.zip in the ~/mydroid/froyo folder.
Extract the initramfs folder from the initramfs.zip into ~/mydroid/froyo/device/samsung/captivate
there seems to be a permissions issue transferring from github
for now here is a quick fix for this
Code:
cd ~/mydroid
chmod -R 777 froyo
go into the captivate folder and run unzip script
Code:
cd ~/mydroid/froyo/device/samsung/captivate
. unzip-files.sh
yes that is a period before unzip-files.sh
now from the froyo directory setup the build
Code:
cd ~/mydroid/froyo
. build/envsetup.sh
lunch
select the captivate build
then
Code:
make -j4
I use 4 because my computer can handle 4 Jobs at once
just leave the -j4 off if you have a slow single processor.
this takes a LOOOOOOOONG time
for me an initial build takes about 1 hour.
subsequent builds are faster.
the result is in ~/mydroid/froyo/out/target/product/captivate
this is just off the top of my head so again
IF YOU HAVE ANY BETTER BUILD INSTRUCTIONS PLEASE LET ME KNOW...
Hey Man before you put all of this work in, why dont you make a gingerbread asop rom. I dont see the point in putting all of this work into an outdated os
bpodz34 said:
Hey Man before you put all of this work in, why dont you make a gingerbread asop rom. I dont see the point in putting all of this work into an outdated os
Click to expand...
Click to collapse
why don't you?
bpodz34 said:
Hey Man before you put all of this work in, why dont you make a gingerbread asop rom. I dont see the point in putting all of this work into an outdated os
Click to expand...
Click to collapse
Froyo is easier at this point.. and im sure some people prefer aosp over touchwiz
a.vandelay said:
why don't you?
Click to expand...
Click to collapse
No need to be a ****, just trying to help
bpodz34 said:
Hey Man before you put all of this work in, why dont you make a gingerbread asop rom. I dont see the point in putting all of this work into an outdated os
Click to expand...
Click to collapse
I already addressed this statement in the OP...
a.vandelay said:
why don't you?
Click to expand...
Click to collapse
bpodz34 said:
No need to be a ****, just trying to help
Click to expand...
Click to collapse
please don't clutter this up with this nonsense!!!
An AOSP Froyo build would be an important step for the Captivate community, good luck with your work!
good luck, look forward to it.
Appreciate your work. Good luck.
Awesome. Looking forward to it.
Sent from my liberated Captivate via XDA App.
Good idea ! I can help with testing if you like.
Sent from my SGH-I897 using XDA App
Sign me up for testing I actually am in the minority for working GPS so I can test that
I'm glad to hear that!
I'm in for testing as well if you need help.
Good luck!
Yes please.
And I'm DTT.
Down To Test.
not a troll, or hater, or dev but I thought an asop build was not possible because the touchwiz framework is tied in to deep and no open source drivers..
best of luck to you, im here to help test if needed
Grandelama said:
An AOSP Froyo build would be an important step for the Captivate community, good luck with your work!
Click to expand...
Click to collapse
I fail to understand this statement please explain ?
g0dzilla32 said:
not a troll, or hater, or dev but I thought an asop build was not possible because the touchwiz framework is tied in to deep and no open source drivers..
Click to expand...
Click to collapse
everything is possible , not that I understnad the need for it ...
mnjm9b said:
I was going to get involved with the CM builds but
I feel it would be better to build from a pure AOSP base.
knowing that it was created and fully compatible with the device that
it is being used on.
Click to expand...
Click to collapse
Maybe im misquoting you , and dont get me wrong here , any captivate development is good , but I fail to understand why starting form CM is a bad idea and even why we need to work of ( like fork roms of ) something that was AOSP build for samsung while you already stated that :
mnjm9b said:
the only captivate roms are actually hacks from the samsung builds.
Click to expand...
Click to collapse
we woudl then be makin roms 'ripped ' from CM like sooooo many other phone ..
IMHO , your work is redoing what CM is doing for many phones already , wouldnt it be much easier / not to mention rewarding for the community to just try and build cm 'from source' for the samsung captivate ?
g0dzilla32 said:
not a troll, or hater, or dev but I thought an asop build was not possible because the touchwiz framework is tied in to deep and no open source drivers..
Click to expand...
Click to collapse
Naw, I'm running an AOSP build myself right now. While the drivers aren't opensource for the Captivate, do you remember that there is a little phone called the Nexus S that has almost IDENTICAL hardware? Everything from the Nexus is opensource (pretty sure...) and the drivers are compatible with our Captivates. The only thing that we have that they don't is the second SD Card, which is an easy hack-in, and the audience noise-canceling mic (also easy, as the Nexus 1 has the same mic/chip.)
did the OP's cappy blow up or something, the accounts disabled >,> ~inches back~ joke aside, if you do have any thing needed testing give me a shout looking for something built off the cappys them selfs to though I must admit there is a (explicit) ton of roms for nomage as it is from the vibs source that are all well and good. Good luck, well back to flashing

[Script] Build ICS/JB Kernel

Thanks to the amazing work of mapkel you can now use this script to compile and pack the kernel!
UPDATE: read mapkel's post here: http://forum.xda-developers.com/showpost.php?p=43419784&postcount=45
Thank him here.
This is an informative guide and I decline responsibility for any damage to your device.
Do not attempt to build this kernel if you are going to complain to devs about issues.
That being said, mapkel has made this so that even those with little knowledge can build the kernel without any issues. If you do have any issues, post here and I will try to assist you.
The following is a complete tutorial to building the kernel.
Credits:
Kernel Devs: krystianp, lehjr, Epinter, and mmontuori for making this kernel; without them there is no kernel.
Big thanks to mapkel for this amazing script.
Another big thanks to benouch for the original idea.
A final big thanks to zen25205 for help with building the kernel and getting the Linaro Toolchain.
Kernel Kitchen
I suggest building this with the latest CM9 MROM until the public beta is released.
You need to install Ubuntu 12.04 64bit (Google for instructions)
Prerequisites:
Open a terminal and run the following commands the first time:
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
Code:
sudo apt-get install git
If there are any issues with this guide, or if you have any issues building the kernel, post here and I will assist you as best I can.
Stage 1 (start at stage 2 if you have already built the kernel using this script:
Code:
cd ~
Code:
wget https://www.cubby.com/pl/kernel_script.zip/_25f010125b924ec7a42fe1d66245f36a
Code:
unzip ${HOME}/kernel_script.zip -d ${HOME}
Stage 2:
Code:
cd kernel
Code:
./script
There will be 4 choices to make throughout the script:
Clean install y/n (choose "n" on first run of script)
What defconfig? (Usually it is MROM but in the last update it is temporarily MROM2)
Compile CM9 or CM10 kernel? (self explanatory)
Name of config (Any name works. I chose "olympus".)
enjoy)
Built but cam not working
paladin881 said:
Built but cam not working
Click to expand...
Click to collapse
cameras disabled due to battery drain
Click to expand...
Click to collapse
https://github.com/CyanogenMod-Atrix/android_kernel_motorola_olympus/commits/master
Post here if it worked well for you. Give some feedback for mapkel.
No Wifi
Cheers, the script works great on Ubuntu 11.10, without a hic.
However, upon flashing the kernel, I get no wifi. I'm going to try your step by step tutorial...
Edit: I built the kernel using MROM2 defconfig and for CM10, and flashed "someone's" CM10
Newbleeto said:
Cheers, the script works great on Ubuntu 11.10, without a hic.
However, upon flashing the kernel, I get no wifi. I'm going to try your step by step tutorial...
Edit: I built the kernel using MROM2 defconfig and for CM10, and flashed "someone's" CM10
Click to expand...
Click to collapse
Strange..
The modules should copy with this.
Try CM9
atrix4g18 said:
Strange..
The modules should copy with this.
Try CM9
Click to expand...
Click to collapse
I'm updating Ubuntu, maybe the problem is on my end. Will try CM9 in the meanwhile and let you know!
Newbleeto said:
I'm updating Ubuntu, maybe the problem is on my end. Will try CM9 in the meanwhile and let you know!
Click to expand...
Click to collapse
You won't be able to do both.
If you compiled the kernel for CM10 you will only be able to use it on CM10.
Unless you are able to update Ubuntu as you compile the kernel for CM9.
atrix4g18 said:
You won't be able to do both.
If you compiled the kernel for CM10 you will only be able to use it on CM10.
Unless you are able to update Ubuntu as you compile the kernel for CM9.
Click to expand...
Click to collapse
It's impossible to compile while updating, didn't remember that, silly me :silly:
Anyhoot, wifi still doesn't work in Ubuntu 12.04. Fresh install on a different PC, way faster than updating
I'll try CM9 tomorrow, should've been asleep for a while
Can anyone or everyone list sites that work with a direct link.
That means I go to www.sitename/filename.zip and it starts downloading.
All I can think of right now is a cloud storage like Dropbox or Google Drive. I know Dropbox has a traffic limit for public files. Don't know about Google drive
Sent from my MB860 using xda app-developers app
upndwn4par has unlimited bandwidth, iirc. Maybe you can contact him and ask if you can host that one tiny script file there?
Or you could sign up with a free webhost and upload it there. There are several free webhosts with unlimited bandwidth (with a very limited space as trade-off, but I think it's more than enough for the script file).
If it's just a single script, maybe something like pastebin.com or similar might be an option? A little inconvenient since you have to copy and paste content instead of just download, but AFAIK it does have unlimited bandwidth.
atrix4g18 said:
Can anyone or everyone list sites that work with a direct link.
Click to expand...
Click to collapse
Maybe copy.com? Here is my ref for extra 5 GB: https://copy.com?r=qfhUoV
If this does not solve the problem, I can provide space for the script on my own server with a separate FTP account.
priard said:
Maybe copy.com? Here is my ref for extra 5 GB: https://copy.com?r=qfhUoV
If this does not solve the problem, I can provide space for the script on my own server with a separate FTP account.
Click to expand...
Click to collapse
Doesn't have a direct download link.
quetzalcoatl2435 said:
Doesn't have a direct download link.
Click to expand...
Click to collapse
Not quite. You can still download a file, for example using wget.
If You have a short public link, for instance: copy.com/PJzYgAUKECQm, You need to open it and copy the full link. In this case: copy.com/s/PJzYgAUKECQm/BetterBatteryStats_xdaedition_1.13.4.0.apk
then:
wget copy.com/s/PJzYgAUKECQm/BetterBatteryStats_xdaedition_1.13.4.0.apk
and done.
I will look at all the suggestions later today.
Thank you.
Delete

Porting ROMs

How does one port ROMs to another phone? I'm looking to try and port Xylon to the Find 5.
Sent from my X909 using xda app-developers app
it's really not that difficult. just have to adjust some overlays, change some stuff in vendor and maybe grab the camera from CM if the changes haven't been made to that ROM.
if you are building from source:
Find the 4.2.2 source code of the ROM you want to port
Get the manifest.
Add the CM10.1 device/kernel tree and proprietary libs in the .repo/local_manifest/roomservice.xml
sync all the repos
(do whatever the source might need you to set up: EG paranoid android, need you to setup your device properly in vendor/pa/* files)
compile. Fix any problems(maybe missing files, etc)
you could try a non-4.2.2-based ROM to port, but you'll run into more incompatibility issues to fix
mbh87 said:
it's really not that difficult. just have to adjust some overlays, change some stuff in vendor and maybe grab the camera from CM if the changes haven't been made to that ROM.
Click to expand...
Click to collapse
So would you say just use this
http://forum.xda-developers.com/showthread.php?t=2232773
And the CM10 for our Oppo?
Sent from my X909 using xda app-developers app
newbcake said:
So would you say just use this
http://forum.xda-developers.com/showthread.php?t=2232773
And the CM10 for our Oppo?
Sent from my X909 using xda app-developers app
Click to expand...
Click to collapse
No, build from source since it's available.
mbh87 said:
No, build from source since it's available.
Click to expand...
Click to collapse
You mean Oppo's source or AOSP from Google? I presume AOSP
Sent from my X909 using xda app-developers app
assuming this is the one you want to port (it is using 4.2.2, so hopefully it'll be easier)
read their README: https://github.com/XYAOSP/buildscripts
use repo and checkout this manifest
https://github.com/XYAOSP/platform_manifest/blob/jb4.2/default.xml
use repo and sync all the repos
then see how I get the device specific files here? do the same https://git.ngvincent.com/projects/oppo-x909-cm10/wiki/Build#Get-device-specific-sources-and-build
then follow whatever instructions needed to build. if it uses CM based building (which i think they do here, then do
. build/envsetup.sh && brunch
select the find5 entry (if it;s not there, then do lunch, select find5, mka)
wait for it to fail. read error message. fix error message. repeat last 3 steps .. Google is your friend... learn to love google
---------------------------------------
you should try building CM10.1 first. there will hopefully be no errors, and you learn how to use brunch/lunch/breakfast / etc
https://git.ngvincent.com/projects/oppo-x909-cm10/wiki/Build
paperWastage said:
assuming this is the one you want to port (it is using 4.2.2, so hopefully it'll be easier)
read their README: https://github.com/XYAOSP/buildscripts
use repo and checkout this manifest
https://github.com/XYAOSP/platform_manifest/blob/jb4.2/default.xml
use repo and sync all the repos
then see how I get the device specific files here? do the same https://git.ngvincent.com/projects/oppo-x909-cm10/wiki/Build#Get-device-specific-sources-and-build
then follow whatever instructions needed to build. if it uses CM based building (which i think they do here, then do
. build/envsetup.sh && brunch
select the find5 entry (if it;s not there, then do lunch, select find5, mka)
wait for it to fail. read error message. fix error message. repeat last 3 steps .. Google is your friend... learn to love google
---------------------------------------
you should try building CM10.1 first. there will hopefully be no errors, and you learn how to use brunch/lunch/breakfast / etc
https://git.ngvincent.com/projects/oppo-x909-cm10/wiki/Build
Click to expand...
Click to collapse
Is there something wrong with the Xylon repo? I keep getting this:
Code:
Cannot fetch htc-msm8960/[some path here]
newbcake said:
Is there something wrong with the Xylon repo? I keep getting this:
Code:
Cannot fetch htc-msm8960/[some path here]
Click to expand...
Click to collapse
use google and your own intuition to help you (this is why you should build the Cm10.1 ROM first.... the knowledge you gain will help you)
most likely either github is down, or the path referencing it is invalid, or something......
but the question is, do we need htc-msm8960? most likely no, since the oppo kernel is self contained
^^^ all this comes from experience.... seriously, go build cm10.1 for the find 5 first
paperWastage said:
use google and your own intuition to help you (this is why you should build the Cm10.1 ROM first.... the knowledge you gain will help you)
most likely either github is down, or the path referencing it is invalid, or something......
but the question is, do we need htc-msm8960? most likely no, since the oppo kernel is self contained
^^^ all this comes from experience.... seriously, go build cm10.1 for the find 5 first
Click to expand...
Click to collapse
we probably dont need it, but a lot of ROMs make you download ALL their devices and corresponding files.
Well, I removed the HTC lines from manifest.xml (maybe not a good idea?) but anyway, it finished syncing after.
mbh87 said:
we probably dont need it, but a lot of ROMs make you download ALL their devices and corresponding files.
Click to expand...
Click to collapse
yeah... it's a problem with a simple fix.... if the error was something like "packages_mms_app", then it's a more serious problem.....
does removing that repo mask a larger problem? that's why I'm pushing for OP to start small first by building CM10.1, and learn the environment (instead of posting every single problem he encounters here, and asks for help)
I've only started playing with android source code in March/early april... and these are things that I've learned/picked up since then.
paperWastage said:
yeah... it's a problem with a simple fix.... if the error was something like "packages_mms_app", then it's a more serious problem.....
does removing that repo mask a larger problem? that's why I'm pushing for OP to start small first by building CM10.1, and learn the environment (instead of posting every single problem he encounters here, and asks for help)
I've only started playing with android source code in March/early april... and these are things that I've learned/picked up since then.
Click to expand...
Click to collapse
Understood. I'm syncing up the Cm10 now. Thanks!
Is is best to do this all on Linux, Mac, or Windows?
It isn't possible to do it on windows so one of the other two.
mbh87 said:
It isn't possible to do it on windows so one of the other two.
Click to expand...
Click to collapse
Cool thanks. I just "finished" my compile on my Mac 10.7.8 but there was something about gcc422 not found. I have the latest XCode installed along with Dev tools. So can anyone help cause I didn't see anything with a Google.
I presume a clean Ubuntu is preferred
Sent from my X909 using xda app-developers app
newbcake said:
Cool thanks. I just "finished" my compile on my Mac 10.7.8 but there was something about gcc422 not found. I have the latest XCode installed along with Dev tools. So can anyone help cause I didn't see anything with a Google.
I presume a clean Ubuntu is preferred
Sent from my X909 using xda app-developers app
Click to expand...
Click to collapse
it's preferable
even on ubuntu, you still have to get specific packages: need oracle version of jdk, not openjdk, need to remove some incompatible stuff
heres a guide for ubuntu 12.10
https://git.ngvincent.com/projects/oppo-x909-cm10/wiki/Android-setup
paperWastage said:
it's preferable
even on ubuntu, you still have to get specific packages: need oracle version of jdk, not openjdk, need to remove some incompatible stuff
heres a guide for ubuntu 12.10
https://git.ngvincent.com/projects/oppo-x909-cm10/wiki/Android-setup
Click to expand...
Click to collapse
I tried compiling CM10, and am even having problems with that. Google did not seem to help for this. Here is what I did:
I did the mka, then mka otapackage, and NOTHING is appearing. No zips at all.
Code:
hardware/qcom/media/mm-video/vidc/vdec/src/omx_vdec.cpp:9925:138: warning: format '%d' expects argument of type 'int', but argument 5 has type 'OMX_U32 {aka long unsigned int}' [-Wformat]
make: *** wait: No child processes. Stop.
That is the last fine before it gives me control of terminal again.
newbcake said:
I tried compiling CM10, and am even having problems with that. Google did not seem to help for this. Here is what I did:
I did the mka, then mka otapackage, and NOTHING is appearing. No zips at all.
Code:
hardware/qcom/media/mm-video/vidc/vdec/src/omx_vdec.cpp:9925:138: warning: format '%d' expects argument of type 'int', but argument 5 has type 'OMX_U32 {aka long unsigned int}' [-Wformat]
make: *** wait: No child processes. Stop.
That is the last fine before it gives me control of terminal again.
Click to expand...
Click to collapse
a few tips
typically, compilers only stop when there's an error, not warnings (unless you set flags like -Werror )
compiling is parallelized.... let's say you have a quad core, you can compile 4 projects simultaneously... when you have an error on the first make file, it stops.... but the other 3 projects will continue compiling and outputting logs until they're done (then the scheduler sees the first make file has an error, doesn't execute any more make builds and halts), so the last log file/line might not be showing you the error
For CM10.1, find5 is official now... you can just use brunch instead of breakfast/lunch & mka
paperWastage said:
a few tips
typically, compilers only stop when there's an error, not warnings (unless you set flags like -Werror )
compiling is parallelized.... let's say you have a quad core, you can compile 4 projects simultaneously... when you have an error on the first make file, it stops.... but the other 3 projects will continue compiling and outputting logs until they're done (then the scheduler sees the first make file has an error, doesn't execute any more make builds and halts), so the last log file might not be showing you the error
For CM10.1, find5 is official now... you can just use brunch instead of breakfast & mka
Click to expand...
Click to collapse
In essence, I scour the log for errors?
I just presumed as CM10 already existed on the Oppo Find 5, it would be an error-free compile.
newbcake said:
In essence, I scour the log for errors?
I just presumed as CM10 already existed on the Oppo Find 5, it would be an error-free compile.
Click to expand...
Click to collapse
you could source the log for errors
or just run the compile script again and again.... the scheduler will continue building other packages, but it'll come to a point where it can't build anything else without that broken package.... and hence, the error in the log will be obvious(since everything else is already built, no logs from them)
it should be an error-free compile, but sometimes things could happen (a small tweak in package/A gives some problems when compiling with package/B)
I would say, most likely there's some build package incompatibility in your system.

[GUIDE] How to Compile Your Own CM11/CM12/AOSP Kernel

Hi guys, long time no post. I have updated this guide on how to build kernels for Falcon so that anyone can learn! It's pretty simple once you get the hang of it. So yeah, here we go!
Prerequisites:
- You must have a Linux firmware running on your computer (I suggest Builduntu because you can skip the next one [build environment setup])
- Build environment setup (Put the this in terminal and follow instructions)
- Patience and a heart willing to learn
- You need to know the languages C, C++, Java, Ruby, Python... NOT! You don't need to know ANY coding languages.
[MOTIVATIONAL SPEECH]
Truth be told, when I first started out developing, I knew NO coding languages except for HTML and a little bit of Java. Both have nothing to do with kernels! I actually learned how to do this when I suffered from a concussion. So if you really want to learn how to kernel dev and you give up halfway, just know that a 14/15 year old kid could do it..
[/MOTIVATIONAL SPEECH]
Click to expand...
Click to collapse
WARNING: I am not responsible for any damages to your phone or computer or pet unicorn. When you modify the wrong partitions, set too many jobs for your compiler, break your keyboard out of frustration etc., that is not anyone's fault but yours. Or your pet unicorn.
Your Personal Handbook to the Following:
- Anything inside "CODE" boxes, type it into your terminal. If you can't find terminal, then press CTRL, ALT, t.
- If I were you, I would write these by hand instead of copying and pasting it because after a certain amount of times, you will remember the linux commands and it will be easier for you to compile more kernels for different devices
- Use this thread as a "Help Me" button. Ask for help!
Click to expand...
Click to collapse
A New Beginning:
Let's start out with something simple, getting the actual code:
Code:
git clone https://github.com/cyanogenmod/android_kernel_motorola_msm8226
This could range from 3 minutes to 2 hours!
Once that's done, open up your file manager and rename the folder (should be android_kernel_motorola_msm8226) to whatever you want. I will refer it as "mykernel".
Click to expand...
Click to collapse
Pokemon!
For this tutorial, we will be using a Sabermod 4.7 toolchain to compile. I WOULD teach you how to compile with 4.8+, but it creates errors that will take even longer for me to write about sooooooooo :fingers-crossed:. Now to get the toolchain:
Code:
git clone https://github.com/SaberMod/android_prebuilts_gcc_linux-x86_arm_sabermod-arm-eabi-4.7
Rename this to whatever you like, but I will be referring this as "toolchain"
Now go into you folder where the kernel source is stored...
Code:
cd mykernel
Click to expand...
Click to collapse
You're Almost There!:
Time to set-up the compiler!
Code:
export CROSS_COMPILE=/home/(insert linux home name here)/toolchain/bin/arm-eabi-
This tells the toolchain that "OK, we want to make ALL this code here into a kernel".
This next line tells it that your defconfig (the toolchain's manual for compiling the kernel) that it's in the arch/arm/configs folder.
Code:
export ARCH=arm
Now to tell the it what the defconfig is!
Code:
make falcon_defconfig
Hehe, now to the hardest part of all...
MuHAHHAHAHa
Click to expand...
Click to collapse
THE HARD (coding) PART
You ready for this? HERE IT IS! TIME TO BUILD THE KERNEL!
Code:
make -j4
Now sit back, relax, and watch the code! Or you could read a book, watch ****, count your fingers, play with your toes...
If you have an error during the waterfall of code, find the part where it actually says *error* (you'll probably have to scroll upwards) and search it on Google or post it here.
Click to expand...
Click to collapse
THE BEST PART
If you manage to get something that says "the kernel zImage is ready" or something like that, that means you've made it!
You have officially compiled your own kernel from source! Now you need to put it in a flashable zip.
Download this file and open it up, but DON'T EXTRACT IT.
Now go to your kernel source then "CTRL + F" and search for "zimage-dtb".
Find it and put it in the "kernel" folder of "FalconKernel - Signed.zip". Then "CTRL + F" and search ".ko".
Copy radio-iris-transport.ko and put it in the system/lib/modules (not pronto) of the zip.
Then find wlan.ko and rename it to pronto_wlan.ko. Copy and paste it in system/lib/modules/pronto of the zip.
Click to expand...
Click to collapse
Now you can put it on your phone and flash it! ​
I will update this in a bit. What feature would you guys want in your kernel? The most votes in the POLL above will be the one I teach you here!
Here I will walk you through on how to add the intelliplug feature made by @faux123
First, fetch my Green Machine kernel source (go into your kernel folder in terminal):
Code:
git fetch https://github.com/YoshiShaPow/green_machine_falcon
Then you could cherry-pick (basically copy) all my cherry picks for intelliplug from my source.
If you do check my source out, you can see there's a little link to a history of commits near the middle of the screen, right above the files/folders. You can see at this page of my features history, you'll see a bunch of commits for intelliplug. I will use those commits and copy it to your own kernel.
This copies the initial coding/first commit of intelliplug!
Code:
git cherry-pick 01a850f
This cherry-picks the remaining commits so that your newly added intelliplug is updated.
Code:
git cherry-pick 6623f2f^..4e1ece7
One more thing though, you need to add the line to compile intelliplug!
Almost all things compiled along with the zImage are in a file called defconfig. What a defconfig does, is tell your machine to build certain modules, kernel objects, drivers, governors, etc.etc.etc.. Now, all of them are found in the folder
arch/arm/configs
Click to expand...
Click to collapse
As stated in the OP, you have to modify the defconfig you use. (CM11 Kernel is falcon_defconfig, Gummy Kernel is msm8226_mmi_defconfig). Open up the corresponding defconfig and add this to ANY line anywhere.
Code:
CONFIG_INTELLI_PLUG=m
Now, for those who are familiar with "y=yes/n=no/m=maybe", you'll see that I specifically told you to put the "m=maybe" one. That's because when you compile the kernel again, right after you're about to start your build. Since you put that "m", the terminal will prompt you with a "y=yes/n=no" question on whether or not you would like to add the following feature. Since you would like to add the feature, put in "y". Later on when you feel more comfortable with adding features to your kernel, you can go back into the defconfig and put it as
Code:
CONFIG_INTELLI_PLUG=y
So that it will compile it without asking, since you have given it an answer.
Now you have officially compiled a "Custom Kernel" and with the knowledge you know, you could create a feature packed one by just kanging (copying one's work/features).
Always remember to
Code:
make clean && make mrproper
after every build to prevent errors and such!
Click to expand...
Click to collapse
I will use this to teach you how to make your own Bash Building scripts (and save time) to make it easier for your development life to flourish... eventually....
Any guide on adding governors or hotplug driver??
Sent from my Moto G using XDA Free mobile app
Best guide but how to add features likes s2w,dt2w etc
Flashhhh said:
Any guide on adding governors or hotplug driver??
Sent from my Moto G using XDA Free mobile app
Click to expand...
Click to collapse
Vote in the poll above! I will make a guide for one or more of the top chosen picks!
Brawn_Sg said:
Best guide but how to add features likes s2w,dt2w etc
Click to expand...
Click to collapse
DT2W and S2W are more complex. They require a few other things (ex. Powersuspend). I'll wait a bit and see what feedback I get before moving forward to something a bit more complex like DT2W, or GPU Overclock.
Can i use make menuconfig?
Krizthian said:
Can i use make menuconfig?
Click to expand...
Click to collapse
Yes you can. Normally when using "make menuconfig", you use the command after making the kernel's defconfig (falcon_defconfig).
Build using Docker
If you're on Linux, take a look at this approach which uses Docker for building CyanogenMod 12.0:
http://forum.xda-developers.com/showthread.php?t=2650345
(Disclaimer: It's written by me)
YoshiShaPow said:
Hi guys, long time no post. I have updated this guide on how to build kernels for Falcon so that anyone can learn! It's pretty simple once you get the hang of it. So yeah, here we go!
WARNING: I am not responsible for any damages to your phone or computer or pet unicorn. When you modify the wrong partitions, set too many jobs for your compiler, break your keyboard out of frustration etc., that is not anyone's fault but yours. Or your pet unicorn.
Now you can put it on your phone and flash it! ​
Click to expand...
Click to collapse
when i was trying to flash cm12 rom in cwm recovery it says error in zip and getting status 1 error , installation aborted ,
pls help im using moto g gpe and when trying to flash from twrp it says error executing updater binary in zip ,
no idea what to do pls help me out
karthik432 said:
when i was trying to flash cm12 rom in cwm recovery it says error in zip and getting status 1 error , installation aborted ,
pls help im using moto g gpe and when trying to flash from twrp it says error executing updater binary in zip ,
no idea what to do pls help me out
Click to expand...
Click to collapse
When you downloaded the anykernel zip, you aren't supposed to extract it. The best way to put the kernel in the zip is to just drag and drop it while IN LINUX. It will not work for windows! Or you could try signing the zip in TWRP (I think there's an option for that somewhere).
YoshiShaPow said:
When you downloaded the anykernel zip, you aren't supposed to extract it. The best way to put the kernel in the zip is to just drag and drop it while IN LINUX. It will not work for windows! Or you could try signing the zip in TWRP (I think there's an option for that somewhere).
Click to expand...
Click to collapse
im not extracting anything , i just downloaded the official cm12 nightly and flashed but didn't workout ,any ideas
karthik432 said:
im not extracting anything , i just downloaded the official cm12 nightly and flashed but didn't workout ,any ideas
Click to expand...
Click to collapse
That has nothing to do with this thread :silly:. You probably have to sign the zip again.
@YoshiShaPow.... i need some help
i compile a kernel for my device and it booted fine but no display....
can you help me in this....
sorry for posting here..my device is Redmi 1s
Luffy.d said:
@YoshiShaPow.... i need some help
i compile a kernel for my device and it booted fine but no display....
can you help me in this....
sorry for posting here..my device is Redmi 1s
Click to expand...
Click to collapse
No problem, I welcome anyone with kernel development questions here! When booted, what do you mean? And if there's no display, how do you know it booted? Also, did you use my anykernel zip? I may be wrong but I don't think it is compatible with all phones.
YoshiShaPow said:
No problem, I welcome anyone with kernel development questions here! When booted, what do you mean? And if there's no display, how do you know it booted? Also, did you use my anykernel zip? I may be wrong but I don't think it is compatible with all phones.
Click to expand...
Click to collapse
yeah it booted bro....i can hear lock unlock sound and even i can hear incoming call ring
i was trying to fix this from a week and found out it not kernel it rom problem ...
my device is build using prebuilt kernel so any compile kernel wont work...but now they are build with this kernel source so compile kernel work
thanks bro...
and one thing bro... i m new to kernel development so how can i optimize kernel
i know about and can add governors and use custom toolchain but i don't know about o2 or o3 optimization etc and all
sorry if i m being too much
great I start today
Luffy.d said:
yeah it booted bro....i can hear lock unlock sound and even i can hear incoming call ring
i was trying to fix this from a week and found out it not kernel it rom problem ...
my device is build using prebuilt kernel so any compile kernel wont work...but now they are build with this kernel source so compile kernel work
thanks bro...
and one thing bro... i m new to kernel development so how can i optimize kernel
i know about and can add governors and use custom toolchain but i don't know about o2 or o3 optimization etc and all
sorry if i m being too much
Click to expand...
Click to collapse
Those changes are a bit more advanced because it will bring build errors. The kernel is already preoptimized with o2 changes. The errors are fixable though. I don't think I'll be able to add an explanation for those in this thread, maybe through pm?
YoshiShaPow said:
Those changes are a bit more advanced because it will bring build errors. The kernel is already preoptimized with o2 changes. The errors are fixable though. I don't think I'll be able to add an explanation for those in this thread, maybe through pm?
Click to expand...
Click to collapse
thanks bro...will pm you when i finish setuping my git
etvtaglios said:
great I start today
Click to expand...
Click to collapse
Go for it bro!!

How to make my own rom?

GIve me tools to make my own rom pls
nuribg said:
GIve me tools to make my own rom pls
Click to expand...
Click to collapse
I don't want to sound mean but the fact that you're asking for it here instead of looking for it yourself makes me think you aren't up for it.(as if you don't know what you're looking for). And when you'l encounter the hundreds of issues instead of googling you'll ask for them here too?
However if you insist there are many good guides here available. Just a few taps away.
ok i didnt explained very whell, im using superR free kitchen but when i compile and install the rom gives me fail
Its not that simple bro. You need a Linux distro with Java 8 or 9 installed. The android SDK. A strong knowledge of Linux. You need a github account. You need to sync a repo for the ROM. And build your device tree. Some coding knowledge Is preferable. I can help you via pm when you get stuck but it took me a long time to be able to turn out a working ROM..

Categories

Resources