Championswimmer's Ultimate HOW-TO - XPERIA X10 General

after numerous requests here we go!!!
no it's not complete yet, just starting...
firstly i'll just link up all threads from where i took collected my info, and then i'll start wiriting my how-to
it'll take time as my school and entrance exams are main priority at the moment but i'll do it in bits and pieces and i'll manage to pull it off before you x10 dies off .. ha ha ha
==========================================================================================================
SIMPLE GUIDE TO COMPILE KERNEL FOR X10i/X10a
=====================================================================================================
COMPILE AOKP FOR ANY XPERIA PHONE
=====================================================================================================
REFERENCE TO COMPILE AOSP/AOKP/CM7/CM9 FOR X10i/X10a
==========================================================================================================
firstly credits : >
1. DoomLord -> whose tools and info thread are just awesome
2. Zdzihu -> the biggest ever dev for x10 and for doing impossible feats
3. Freexperia Team -> for supporting this device for 2 years
4. Spaarc -> for his guide and his vast knowledge (guys!! this dude is 1 yr younger than me!!)
5. Azuzu -> for his awesome windows based tools
6. Androxyde -> flashtool and awesome shell scripts
7. Colossus -> for being the best mod ever !!! (yes i mean it buddy) and for guiding me a lot
8. Sahibunlimited -> for being me buddy and a really good friend to everybody here
9. GregBradley -> for being having the most useful signature in xda (and having helped me out when i was a noob)
10. LzVebz -> Pestering me to write this
phew!!! hope that's all?? more left?? please pm me, i'lll add you
EDIT
11. pvyParts -> for showing how to work on apk files
12. iridaki -> for being helpful and encouraging and pepping me up for all the good work i did and mostly for being an elder sister
13. ~Pilot~ -> for keeping xda clean
14. TAL333 -> for standing by me and believing in me

So firstly the threads that I read and YOU SHOULD PLEASE GO THOUGH ONCE before reading my Howto
spaarc's porting guide
doom's guide 1
doom's guide 2
doom's guide 3
doom's all in one info thread
doom's kernel.sin and ftf creator
doom's kernel.sin unpacker
dsixda kitchen (for "cooking" roms)
using android kitchen for xperia devices
http://forum.xda-developers.com/showthread.php?p=12875

Ok so as they say "safety first"
Let me give you your CRASH HELMET
It is said that x10 is UNBRICKABLE, though that is true but not hard and fast rule. Jerpelea and Doomlord have bricked x10 devices before and it's not all that impossible. Still, if you keep care of following things, you'll never brick your phone
1. NEVER DISCONNECT USB CABLE while flashing/bootloader unlocking/pccompanion upgrade is going on
2. Be extremely careful while using the_laser or 9Lukas5's unlock procedure. It changes device partition and mapper modules so they are delicate ares and can brick your device if procedure is not followed
3. DO NOT PANIC, THINGS CAN BE SET RIGHT. BE CALM, BE PATIENT, ASK FOR HELP AT XDA
=======================================================================================================================
Ok so, there can be bad flashes or whatever..... what to do if device does not boot up??
1. If the problem is about RED flashing led, then just plug your phone into a charger and wait over night it's a low charge problem. Once charged, all will be ok
2. If you face boot loop and you just do not know what to do (i.e. you cannot go to recovery too) then do this
a.) either download PC companion and update/upgrade your phone
OR
b.) download latest flashtool and flash a 2.1 for 2.3.3 firmware (that you get in .ftf format) that will set you on track

ok so to tell a few things first....
please do not pm me.regarding this.
ask any questions here.
i or any other member would definitely help
and dont get impatient.... I'm busy...so it'll take time to complete the guide
Sent from my X10S using xda premium

Finally it's here!!! Thanks man, I've been waiting for this

LzVebz said:
Finally it's here!!! Thanks man, I've been waiting for this
Click to expand...
Click to collapse
I've not yet started....feeling too lazy...but dont worry...in a week or two it'll be complete
Sent from my X10S using xda premium

Alright pretty dumb question feel free to shoot me. If I take an system ui apk and framework apk from say arc and just change it with my existing system ui n framework will I be getting the same theme of Sony arc.
Sent from my X10S using XDA

stanzzzzz said:
Alright pretty dumb question feel free to shoot me. If I take an system ui apk and framework apk from say arc and just change it with my existing system ui n framework will I be getting the same theme of Sony arc.
Sent from my X10S using XDA
Click to expand...
Click to collapse
maybe yes with systemui
DEFINITELY NOT with framework.
the framework res is not just the ui.
it defined the whole Android system...
it just cannot be ported like that....lol
@everyone
i won't shoot if you ask dumb questions.
you can ask dumb questions if you wish to.
that's the way we learn
Sent from my X10S using xda premium

Really happy to see someone doing this, thanks CS, may I suggest adding dooms guide to create update/amend scripts? I am sure you'll get to it! Best if luck with your exams too.
Sent from my X10i using XDA

[email protected] said:
Really happy to see someone doing this, thanks CS, may I suggest adding dooms guide to create update/amend scripts? I am sure you'll get to it! Best if luck with your exams too.
Sent from my X10i using XDA
Click to expand...
Click to collapse
never heard of that guide
I'll search and see....
i learnt amend and edify on my own by looking through various zip files....ha ha ha.
btw the dsixda kitchen makes edify/amend scripts automatically
Sent from my X10S using xda premium

championswimmer said:
maybe yes with systemui
@everyone
i won't shoot if you ask dumb questions.
you can ask dumb questions if you wish to.
that's the way we learn
Sent from my X10S using xda premium
Click to expand...
Click to collapse
Excellent! In which case, can you answer this question?
http://forum.xda-developers.com/showthread.php?t=1574805

blueowl0708 said:
Excellent! In which case, can you answer this question?
http://forum.xda-developers.com/showthread.php?t=1574805
Click to expand...
Click to collapse
decompile settings.apk and go through the xml files you get and play around with them a little....
Sent from my X10S using xda premium

this one

Ok, so lets get to our stuff fast
Her we begin with some info about how a ROM works
when cooking/porting roms, you are concerned with only a few folders
download any randon ROM zip and unzip it and see what it contains
1. /system/app -> this folder contains all apk files of apps
2. /system/framework -> this folder contains lots of .jar files that defines how the base operating system will run and function
3. /system/lib -> lots of .so files that are like drivers (yep .dll files in windows), these specify how the software communicates with various hardware components
4. /system/etc -> very dangerous folder contains lots of important configurations
5. /system/etc/permissions -> these contain lots of xml files that are required to define how the .jar files in framwork folder will work
ok so i'll elaborate point 2 and 5 a little more taking example of the panorama beta app by SE. it requires the com.sonyericsson.android.seee.jar file in framework folder to work but if you just keep the jar file, it'll not work. you need to sort out its permissions too and for that you need to put com.sonyericsson.android.seee.xml file in permissions folder
Click to expand...
Click to collapse
also the etc folder contains two some files called
gps.conf (which defines which gps server the device will use)
hosts (this defines which websites will be blocked .... yes that is your adblocker file )
apns.xml (which defines your apn configuration)
screwing up these files can cause you internet/gps/data traffic problems. also intelligent editing of these fils can give you better gps/data too
Click to expand...
Click to collapse

hey champ!
First I'd like to thank you very much for this nice guide and for your kernel. With latter u saved my ass. Was on Doom's with FeraLab and phone reboots sometimes Now it's flying!!!
But I'm fan of good design. And please don't hit me, but I'd like to change the boot-logo of your kernel is there any way? Or do u have any nice guide to change logo?
Would be awesome!!!

Question
Hi champ,
Does THIS also work for X10?

LzVebz said:
Hi champ,
Does THIS also work for X10?
Click to expand...
Click to collapse
not precisely.
for the perfect repacking script, see www.github.com/championswimmer/kCernel-goro
inside build-bootimg folder
Sent from my X10S using xda premium

championswimmer said:
not precisely.
for the perfect repacking script, see www.github.com/championswimmer/kCernel-goro
inside build-bootimg folder
Sent from my X10S using xda premium
Click to expand...
Click to collapse
Thanks!
I've one question left I think
I'm currently on Windows 7 ultimate, and I have 1 TB left on drive D (which is empty) My question is.. Is there a way to Dual-boot Windows & ubuntu without wubi?
Thank u very much again

Compiling kernel
So letme tell you how a kernel for x10 can be compiled
1. install ubuntu (through wubi or in vmware will also do) but i prefer on a separate partition.
2. Install the following packages
git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
here's how you go about doing it
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
sun-java6-sdk is no more officially available through ubuntu repositories
so you will need a workaround.... so here are some helpful articles
http://www.gaggl.com/2011/10/installing-java6-jdk-on-ubuntu-11-10/
http://superuser.com/questions/353983/how-do-i-install-the-sun-java-sdk-in-ubuntu-11-10-oneric
http://softwareinabottle.wordpress.com/2011/11/17/install-sun-jdk-6-on-ubuntu-11-10/
In case you are on a 64-bit version of ubuntu, (btw i strongly recommend using a 32 bit version for android development as you'll face various problems with 64-bit at various stages) you'll need these packages too
ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib​
3. Next you'll need a cross-compiler.
a cross compiler is used to compile for a different architecture than from the one you are currently working on. in this case you are either on a i686 or amd64 pc while the kernel you are compiling is for an ARMv7 processor.
for ubuntu, getting the Linaro GCC cross compiler for arm is getting as easy as
Code:
sudo apt-get install gcc-arm-linux-gnueabi
4. Now you are pretty much set up to compile kernels. Next we need sources.
So let me link you up to the most common available ones
Sony Ericcsoon Official Kernel Sources for 3.0.1.G.0.75 (gingerbread firmware)
Sony Ericsson Official Kernel Sources for Eclair Firmware
FreeXperia Kernel For ICS
FreeXperia Kernel for GingerBread
DoomKernel (this is my forked repo)
*** i'll update this list later (there are dozens of kernels for x10, all have their sources, i guess for now, this is enough)
5. So the source you have downloaded will be either a tar or zip archive. Using archiver, extract it into a directory of your liking.
6. Open terminal and 'cd' into the kernel directory. The kernel directory is the one which contains the folders arch, block, crypto, firmware, drivers .....
for compiling kernel you need to be in the root of this direcrory.
7. So here are a few codes that will get your kernel compiled
To clean source directory : -
Code:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make clean
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make distclean
To get default configuration
Code:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make semc_es209ra_defconfig
if you are compiling FXP kernel then instead of semc_es209ra_defconfig you need to write fxp_es209ra_defconfig , and likewise for DoomKernel you need to use doom_x10_defconfig
To configure the kernel
Code:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make menuconfig
inside general setup you can name your kernel
and inside power management setup you can setup which CPU governors will be present and which will be default
do not mess to much with the driver setups or with "kernel hacking" area....
do not touch things that you have no idea about
Finally... to compile the kernel
Code:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make
If all goes well, you'll get this message
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
If you get stuck in between, nothing to fret about. Just post here what problem you faced, amd me or some other helpful soul will help you out
8. I know you are thinking "whew!! are we done??"... ha ha ha!! no buddy!! not yet... much more work to do.
Firstly from you kernel directory go to arch/arm/boot (using a file explorer, not a terminal) and inside you'll find a 2~3 MB sized file called zImage. Copy that file into a separate folder where you'll stach all your finished works.
9. Now we need to compile the wifi modules.
It is imperative to note here that wifi modules should be compiled immediately after kernel has been compiled. DO NOT run "make clean" or "make distclean" commands in the kernel folder before wifi modules have been compiled
Click to expand...
Click to collapse
For compiling wifi, you'll need the "vendor" folder (which is there in official sony kernel sources but not present in Doom's or FXP's repo). So if you need just the vendor folder, you'll HAVE TO download the official kernel sources too.
in terminal 'cd' to vendor/atheros/wlan/host/ folder
edit the localmake.linux.inc file using a text editor
Code:
sudo gedit localmake.linux.inc
edit the line ATH_CROSS_COMPILE_TYPE := arm-eabi- to ATH_CROSS_COMPILE_TYPE := arm-linux-gnueabi-
also in the line
# ATH_LINUXPATH := < kernel source path >
remove the # (uncomment it) and insert the appropriate kernel source path (the folder that contains arch, crypto, firmware, drivers etc folders.
now to compile wifi modules, run this code
Code:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KERNEL_DIR=/path/to/kernel make
of course, in place of "/path/to/kernel" type the actual path to kernel on your pc
this will get your wifi module compiled
go to the folder
vendor/atheros/wlan/host/.output/QUALCOMM_ARM_NATIVEMMC_BSP_REV=3240-SDIO/image/
and you'll find a file ar6000.ko
transfer that file to the place where you kept your zImage safely earlier.
10. PHew!! done?? ha ha .. no dude.. still not...more work left
now to pack things up, you'll need a ramdisk.
so lets steal a ramdisk from a already working kernel (for stock kernel take stock ramdisk, for cm7/cm9 take respective ramdisk)
take any kernel and unpack it using instructions given here
the file ending with xyz.cpio.gz is the ramdisk. rename the file into "ramdisk" (without any extension) and put this file into the folder where you kept your zImage and wifi module.
Now transfer all these three files into a folder which is accessible from your Windows partition (oops... yeah... without windows you cannot finish this job)
Rest of the steps that follow are to be done on Windows (i have not tried on WINE)
rename zImage to "image"
now using this tool (courtesy DoomLord) pack your ramdisk and image into a flashable .ftf file
also make a copy of the file ar6000.ko and name it wifi.ko
both these ar6000.ko and wifi.ko files are supposed to be in the folder /system/lib/module of your mobile (please create appropriate flashable zip for the same)
===============================================================================================================
If you found this Guide helpful, please remember to press the thanks button ;P
================================================================================================================

LzVebz said:
Thanks!
I've one question left I think
I'm currently on Windows 7 ultimate, and I have 1 TB left on drive D (which is empty) My question is.. Is there a way to Dual-boot Windows & ubuntu without wubi?
Thank u very much again
Click to expand...
Click to collapse
send me a screenshot of you disk manager (start->computer management -> disk management)
then i'll tell you how you can set it up easily

Related

[TOOL/KITCHEN] - Android Builder v.5 (Dead)

This project is no longer being updated. Feel free to use the code.
Android Builder (AB v.5)
kiel123 has joined the AB team!
Thanks to dsixda, Armin Coralic, and cteneyck. I do have permission to reuse their code.
Requirements:
Ubuntu Linux or variant
dsixda's HTC Android Basic Kitchen - http://forum.xda-developers.com/showthread.php?t=633246
In my crazy quest to learn more about Android, I decided to create a companion to dsixda's kitchen that will take some of the drudgery out of downloading and compiling AOSP and the HTC kernel.
Here's what the current menus looks like:
Code:
Select the device that you would like to build for.
1) HTC Droid Eris
a) About Builder
0. Exit
Please enter option number:
and then
Code:
1. Sync AOSP - Cupcake (1.5) repo
2. Sync AOSP - Donut (1.6) repo
3. Sync AOSP - Eclair (2.1) repo
4. Sync AOSP - Froyo (2.2) repo
0. Exit
Please enter option number:
You can follow these two steps, and you will get a freshly compiled, but unsigned ROM in the original_update folder. After running it through the kitchen, it boots up just fine. Of course, most of the hardware doesn't work. That's the part that I am working on now (seriously, I am). I've been working on this for a while, because as I said - this is really about me learning. If I can make a tool that someone finds useful, then great!
Install instructions:
1) download and unzip dsixda's kitchen to whatever directory you want
2) download Android Builder into kitchen's scripts/plugins folder and unzip
3) back out and start the kitchen
4) select 'Run plugin scripts' from Advanced menu and select 'Android Builder'
5) you're there!
NOTE: This will try to install/update all of the packages that it needs, including Java5. Please look at the code so that you know what it's doing. That's just a good general practice with any code that you can actually look at and that you have to run as root...
Future plans:
1) add more kernels (devices)
2) add more vendor trees (goes along with devices)
3) add more repos (CM5, CM6, AOSP Master)
I hope someone finds this useful, and feel free to post useful suggestions/bug reports.
DOWNLOAD - (https://github.com/gnarlyc/android_builder)
CHANGELOG -
v5. - kiel123 re-wrote v.4 as a plugin to dsixda's kitchen with me testing afterward, minor fixes, removed Java6 as no longer needed by kitchen
v.4 - re-wrote to add structure to support more devices in the future
added option for Cupcake, Donut, and Froyo
added .config files that enable touchscreen in kernel by default
v.3 - unreleased build
v.2 - corrected misspellings in code and dialogs
added sudo to launch setup script (Still need to sudo bash first. Sorry.)
v.1 - initial release
Very nice. I have been doing the same. I have used darchstar's post here as the basis of my work. But, I am always glad to look how others are doing things. Thanks for the post.
arockj said:
Very nice. I have been doing the same. I have used darchstar's post here as the basis of my work. But, I am always glad to look how others are doing things. Thanks for the post.
Click to expand...
Click to collapse
Thanks for the thanks! I don't quite get the vendor tree thing, but I just need to look at it again a few times. And, that's where I'm at. It would be really neat to be able create a working AOSP ROM from scratch with minimal manual intervention. It might not be possible, but I haven't found that out yet. (But wait! If you can do it manually, it can be scripted. Right?)
there's typo in your install script
look for line: android_builder*
should be android-builder*
and your install script should use mv command instead of cp to avoid files duplication
EDIT: also you should use sudo command along with ./ab_setup script or include within script as well.
When i ran ./abmenu and i get this message
Code:
Please copy 'menu-kd' to the root of your kitchen folder with 'menu'
menu-kd?.... don't you mean abmenu? turned out it was looking for menu file which i had it renamed to kitchen_menu but I fixed that on my part and all is working well.
Dont let any of my criticism scare you away, I can see there's a lot of potential use for this scripts, great start by the way.
firestrife23 said:
there's typo in your install script
look for line: android_builder*
should be android-builder*
and your install script should use mv command instead of cp to avoid files duplication
EDIT: also you should use sudo command along with ./ab_setup script or include within script as well.
When i ran ./abmenu and i get this message
Code:
Please copy 'menu-kd' to the root of your kitchen folder with 'menu'
menu-kd?.... don't you mean abmenu? turned out it was looking for menu file which i had it renamed to kitchen_menu but I fixed that on my part and all is working well.
Dont let any of my criticism scare you away, I can see there's a lot of potential use for this scripts, great start by the way.
Click to expand...
Click to collapse
I renamed all of the scripts at the last minute and thought that I had them fixed. I'll make the corrections and repost. The goal is to get this thing working well. Your criticism is just more motivation. Thanks!
I'm new to all this but I would love this to work with Froyo source.
Geo411m said:
I'm new to all this but I would love this to work with Froyo source.
Click to expand...
Click to collapse
The current 'internal' build works with Cupcake (1.5), Eclair (2.1), and Froyo (2.2). It's not ready to release though. Give me another week or two. I'm working on proprietary bits now, so that you get a more usable ROM from the start.
Although from your sig, it appears that you don't have an Eris, so you probably don't care much about it's proprietary bits. If you want it to get Froyo instead of Eclair, you can just change 'eclair' to 'froyo' in the script that creates the repo.
I'm with you on Froyo. I have a feeling in a month or two very few people will want to run a pre-Froyo ROM. It's really nice.
rm error on install
i keep getting "rm: cannot remove './bkup': No such file or directory"
the file is there untill i run the ./install script then it disappears and shoots me an error any help would be appriciated
Sjflowerhorn said:
i keep getting "rm: cannot remove './bkup': No such file or directory"
the file is there untill i run the ./install script then it disappears and shoots me an error any help would be appriciated
Click to expand...
Click to collapse
That files was used by me while developing the code. It's not needed. I'll fix the install script for v.5, but if you really want to fix the script now... Just remove the line -
'rm ./bkup'
from the 'install' script
You should still be able to start Android Builder by typing './abmenu', as long as it's in the same folder with the kitchen's menu. The error shouldn't matter.
gnarlyc said:
That files was used by me while developing the code. It's not needed. I'll fix the install script for v.5, but if you really want to fix the script now... Just remove the line -
'rm ./bkup'
from the 'install' script
You should still be able to start Android Builder by typing './abmenu', as long as it's in the same folder with the kitchen's menu. The error shouldn't matter.
Click to expand...
Click to collapse
k thanks i think it worked the same even with the error but got it =)
Sjflowerhorn said:
k thanks i think it worked the same even with the error but got it =)
Click to expand...
Click to collapse
Good deal. Let me know how it goes.
gnarlyc --
Have you thought of making this into a .plugin file that can be placed in the scripts/plugins folder of the HTC Android Kitchen? Then that way you won't need to update your scripts each time I update my kitchen
In my thread I could provide a link to your tool, so that people can add that plugin if they want.
dsixda said:
gnarlyc --
Have you thought of making this into a .plugin file that can be placed in the scripts/plugins folder of the HTC Android Kitchen? Then that way you won't need to update your scripts each time I update my kitchen
In my thread I could provide a link to your tool, so that people can add that plugin if they want.
Click to expand...
Click to collapse
The thought has occurred to me.
Give me a bit. A link in your thread would be great. It might even motivate me to add more devices. Getting stuck on adding Eris proprietary bits has lead me down the road of making a ROM (http://forum.xda-developers.com/showthread.php?t=725447) and documenting the process. I'll get back to Android Builder soon though.
Ok, so...
TO-DO
-------
1) rewrite AB as a plugin to dsixda's HTC Android Kitchen
2) add proprietary bits for Eris
3) add more devices
4) add CM repos
5) add Gingerbread repo
6) add compatibility with more distros
i am getting line 28: update-java-alernatives: command not found?
lord194409 said:
i am getting line 28: update-java-alernatives: command not found?
Click to expand...
Click to collapse
Interesting... I've tested from a freshly installed Ubuntu installation several times. It should install everything you need.
You could try 'update-alternatives --config java' and let me know what it says. You could also look for a file called 'setup_ran' in the root of the Kitchen, and delete it. Start './abmenu' after that and try again.
thanks for answering. Could the problem be that i installed it on cygwin.
lord194409 said:
thanks for answering. Could the problem be that i installed it on cygwin.
Click to expand...
Click to collapse
Yes. Android Builder will not work under cygwin. I don't know that it ever will. That's on the TO-DO list, but it's so far down that it's not on the posted TO-DO list.
I've only tested under Xubuntu 10.04 and minimal Ubuntu 10.04.
If you happen to work it out on cygwin, let me know! I'm sure others would be happy to have the option. Heck, I might even be. I'm mainly using Ubuntu because of AB anyway. (Although, it is kind of growing on me.)
thanks i will look in to it.
Sent from my Eris using XDA App
just wanted to let you know that it didn't work for me. It runs, gives some errors and outputs a update.zip called AOSPbase but the file is only 1.1kb in size.
Geo411m said:
just wanted to let you know that it didn't work for me. It runs, gives some errors and outputs a update.zip called AOSPbase but the file is only 1.1kb in size.
Click to expand...
Click to collapse
make sure you have java5 and java6 jre/jdk installed. it should work then. i had a similar issue the first time through... took it literally 10hours plus, then output was the 1.1k AOSPBase.zip file.
manually installed all java components, and everything worked perfectly then (and took half the time)

GUIDE - Compile latest Dzo's 3.0.8 kernel (Aurora)

Ok, in this guide, we'll build our development environment so we can start compiling aurora's kernel (3.0.8) in ubuntu.
NOTES:
- Every command is to be used in the terminal (Applications-Accessories-Terminal).
- There are scripts you can use to automate stuff, I'll post them in the second post on this thread.
- Sorry, I won't guide you on how to install Ubuntu or Android SDK, there are guides on the web all over the place.
1 - First things first, here's what we need:
a) Ubuntu 10.04 LTS x64 (this is recommended by google, it might work in other ubuntu versions, but I didn't tried it). To download it, go to:
http://releases.ubuntu.com/lucid/
And select the 64-bit PC (AMD64) desktop CD version. Your processor must support 64bits (most modern ones support it, else, use the x86 iso, not tested though).
Install ubuntu, you can use dual-boot with windows. I won't post a guide to this, as it's very easy and there are guides all over the net.
b) Install android sdk, to use adb (this is optional, but you really should if you use adb).
Follow this guide:
http://forum.xda-developers.com/showthread.php?t=921169
Note: Eclipse is not needed
c) Install some tools that are needed, like git, compiler stuff etc (this is a single command, copy and paste everythin):
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc abootimg
NOTE: If abootimg doesn't install (It didn't for me, for some reason) go in here, download and install the deb package.
d) Install the toolchain (it's a set of tools used to compile the kernel, I think. This takes a while):
Code:
git clone https://android.googlesource.com/platform/prebuilt
e) Download dzo's kernel from git and set the git branch to "master":
Code:
git clone https://github.com/dzo/kernel_huawei.git
git checkout master
2 - Getting to the fun stuff...
a) First, copy the boot.img attached to this post to your /home/kernel_huawei folder.
b) Set up the environment. Do this, in the terminal (must be done for each compilation session, I'll post scripts in the end, to automate this stuff):
Code:
cd kernel_huawei
export ARCH=arm
export CROSS_COMPILE=/home/username/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make u8800_defconfig
Note, replace /username/ in the third command with your username.
c) Compile. This takes like 10 minutes, depending on your pc:
Code:
make
TIP - Speedup compilation (thanks to Unrealized)
You can use
Code:
make -jx
to speed up the compilation.
ie, if you have 2 cores, use
Code:
make -j3
for 4
Code:
use -j5
3 - Create the boot.img. If you aren't already in the kernel_huawei folder, do this:
Code:
cd kernel_huawei
Then:
Code:
abootimg -u boot.img -k arch/arm/boot/zImage
After this, the boot.img in your kernel_huawei folder is updated. You can copy that to your phone.
_________________________________________
That's it. In the second post, I'll tell you how to check for latest version, check changelogs and scripts to automate stuff.
If you find any errors, please let me know.
ADDITIONAL STUFF
CHECK FOR UPDATES AND CHANGELOG's
In the terminal:
Code:
cd kernel_huawei
git pull
git log
SCRIPTS
To create a script, create an empty document (no extension), copy the commands and save it. Then right click it, go to "Properties-Permissions" and set it to execute.
To run the script, use the therminal and do:
Code:
cd /path/to/script/file/
./scriptfilename
OR, you can create a shortcut to the script in the panel, for example:
- Right click on the panel and select "Add to panel - Custom application launcher"
- Then, in type, select "Application in terminal"; give it any name, and then browse to the script file.
To run the script just click in the icon in the panel.
a) Automatically download the latest updated files and see what has changed, without compiling:
Code:
cd ~/kernel_huawei
git pull
git log
$SHELL
b) Automatically download the latest updated files, immediately compile and create a new boot.img in the kernel_huawei folder:
Code:
cd ~/kernel_huawei
git pull
export ARCH=arm
export CROSS_COMPILE=/home/username/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make u8800_defconfig
make
abootimg -u boot.img -k arch/arm/boot/zImage
$SHELL
In this script, you must change the /username/ in the 4th command to your username.
Installing the kernel on the phone
a) Use adb to put the boot.img, (assuming it is on the kernel_huawei folder) in the phone and reboot the phone:
Code:
cd kernel_huawei
adb shell mount -o rw,remount /dev/block/mmcblk0p1 /.cust_backup
adb push boot.img /.cust_backup/image/boot.img
adb shell mount -o ro,remount /dev/block/mmcblk0p1 /.cust_backup
adb reboot
c) Manual installation:
- Copy the updated boot.img to your sdcard.
- Use root explorer (make sure it is set to show hidden files) and copy the boot.img to ./cust_backup/image, replace the original and reboot.
Thank you for this! gonna try it!
whats about pro?
well i dont get any of that... :\
can we use your upload with any rom?
thanks in advance for your replies..
birginioss said:
well i dont get any of that... :\
can we use your upload with any rom?
thanks in advance for your replies..
Click to expand...
Click to collapse
What do you mean? There's no upload here for any ROM... the files here are just for compiling Dzo kernel to use in Aurora... I suggest you ignore this thread if you don't know what this is all about
Sent from my U8800
Matoxas said:
whats about pro?
Click to expand...
Click to collapse
Sorry, this is only for Dzo kernel for Aurora, I know nothing about U8800 pro...
Sent from my U8800
Can you post latest 3.0.8 kernel so we can flash it over cwm. Thx
Sent from my U8800 using Tapatalk 2 Beta-5
boss_y said:
Can you post latest 3.0.8 kernel so we can flash it over cwm. Thx
Sent from my U8800 using Tapatalk 2 Beta-5
Click to expand...
Click to collapse
It's in Aurora's thread, search posts by Dzo, it's 3.0.8 v2...
Sent from my U8800
Thanks
Good Work!
fjsferreira said:
It's in Aurora's thread, search posts by Dzo, it's 3.0.8 v2...
Sent from my U8800
Click to expand...
Click to collapse
so there is a Zip that we can flash?
what are the adventages of this kernel?
Sent from my U8800 using XDA
Great stuff, thanks heaps for this. Finally understand how to compile kernels for this phone now.
levibuko said:
so there is a Zip that we can flash?
what are the adventages of this kernel?
Sent from my U8800 using XDA
Click to expand...
Click to collapse
Yes, Dzo posted the zip already. I suggest you search Aurora's thread and read about what 3,0 kernel does... 1 hint: you'll be amazed
Sent from my U8800
Matoxas said:
whats about pro?
Click to expand...
Click to collapse
just want to explain about the pro version. every kernel needs a defconfig, it's like a configuration while compiling a kernel. but, the pro version have a different defconfig so you must pull it first, the file is /proc/config.gz
about the source, we all know the kernel source of .35 kernel for u8800 and pro version are the same but the defconfig is different. so as fjsferreira said, this source isn't compatible for pro version. unless someone port the 3.0.8 source into the pro version. i don't know how to port the kernel, i just want to tell you what is needed to build a kernel
sorry for my bad english
fjsferreira said:
Yes, Dzo posted the zip already. I suggest you search Aurora's thread and read about what 3,0 kernel does... 1 hint: you'll be amazed
Sent from my U8800
Click to expand...
Click to collapse
i searched for a half hour but didnt find sth....
edit: found the zip
Sent from my U8800 using XDA
levibuko said:
i searched for a half hour but didnt find sth....
edit: found the zip
Sent from my U8800 using XDA
Click to expand...
Click to collapse
Make sure to use v2 with fixed USB storage...
Sent from my U8800
Here, kernel from today, changelog is "Make button backlight even brighter", pretty self explanatory... Again, don't go to aurora thread posting bugs regarding this kernel as it wasn't an "official" dzo release, please...
fjsferreira said:
Here, kernel from today, changelog is "Make button backlight even brighter", pretty self explanatory... Again, don't go to aurora thread posting bugs regarding this kernel as it wasn't an "official" dzo release, please...
Click to expand...
Click to collapse
Should we put this boot.img file while on pink screen.
I read the first page.But i can't see that ,where is the place of boot.img.
Sorry about this silly question
Thank you fjsferreira.
Mr.Moriarty said:
Should we put this boot.img file while on pink screen.
I read the first page.But i can't see that ,where is the place of boot.img.
Sorry about this silly question
Thank you fjsferreira.
Click to expand...
Click to collapse
Yes, if you have usb storage access in pink mode, you can put it in the "image" folder, or you can copy it directly with root explorer to ./cust_backup/image/ and then reboot. If you can't see that folder with root explorer, go to options and make sure it's set to show invisible files. It's in the root of filesystem, where /system/ and /etc/ folders are with all the others
Of course, in both cases, replace the original boot.img.
i have tryed the new kernel "Make button backlight even brighter" and the lights to turn on must change to autobright, but backlight are brighter...

[GUIDE]How to make a ROM - Easiest

How to Make Your Own Custom Rom
Click to expand...
Click to collapse
Part 1 : Setting Up Dsixda's Android Kitchen.
So, Do you want to make a custom rom or, mod one that is made already? If your answer to this question is yes then you are at the right place. In this article I will help you get started with setting up an environment to make your own custom roms or edit the ones that are developed already. We are going to take help of dsixda's Android Kitchen Utility to help us in this task and in this article I am going to help you get started by guiding you through the installation process of Android Kitchen on your Personal Computer. So, you might have the question in your mind what exactly is Android Kitchen and what does it do and whom it is for? Continue reading to know all this as well as to get instructions on setting it up on your PC.
What is Dsixda's Android Kitchen?
Who is this kitchen for?
-Those who are brand new to creating custom ROMs and want an easy place to start learning
-Those who just want to modify shipped ROMs or someone else's custom ROMs to their liking
-Those who are confused by all those scripts and complex commands required for building and extracting
Please note:
-The kitchen will not automatically turn you into a developer. A developer is someone who writes code or builds something from the ground up and understands exactly what goes on behind the scenes. The kitchen hides all that and puts a user-friendly interface above it. However, this may be the push that gets you into development in the future.
My goal is to give you the tools to make your life easier and save you lots of time, and at the same time help you learn about the Android OS.
A little bit of prior UNIX command-line knowledge would be useful to get started with the kitchen, but the help guides should be enough for a newbie. Knowledge of command lines is always important if you ever want to get involved in Android or development.
Code:
===========================================================
Android Kitchen - by dsixda (xda-developers.com)
===========================================================
Main Menu
1. Set up working folder from ROM
2. Add root permissions
3. Add BusyBox
4. Disable boot screen sounds
5. Add wireless tethering
6. Zipalign all *.apk files to optimize RAM usage
7. Change wipe status of ROM
8. Change name of ROM
9. Check update-script for errors
10. Show working folder information
Advanced Options
11 - Deodex files in your ROM
12 - Add task killer tweak for speed (stock ROM only)
13 - Add /data/app functionality
14 - Add Nano text editor + sysro/sysrw
15 - Add Bash (command shell)
16 - Add Apps2SD
17 - Add /etc/init.d scripts support (busybox run-parts)
18 - Add custom boot animation functionality
19 - Porting tools (experimental)
20 - Tools for boot image (unpack/re-pack/etc.)
21 - Unpack data.img
22 - Sign APK or ZIP file(s)
23 - Convert update-script or updater-script
24 - Miscellaneous optins / Plugin scripts
99. Build ROM from working folder
00. About/Update kitchen
x. Exit
How To Install Kitchen?
1. Install latest Java JDK. It's pretty simple just follow the instructions and you are done.
2. Download and Extract Cygwin Packages and Android Kitchen on your desktop or somewhere easy to
access.
3. Once extracted go through kitchen_readme.txt and you will get an overview of how to setup the
kitchen.
4. To begin, install Cygwin first. So, run setup.exe from the extracted files and go through the installation
process.
5. Run Cygwin.exe once and it will create a folder with your username on /home/ directory.
6. Navigate to the folder where you installed Cygwin and go inside .../ home// folder.
7. Copy the extracted kitchen folder to this location.
8. Once copied, rename it to kitchen (type all letters in lower case for Linux is case sensitive).
9. Run Cygwin.exe and navigate to kitchen folder. for that simply type the command cd kitchen and press Enter
10. Once inside kitchen folder, type ./ menu to run android kitchen. Note: if you get a permission denied error then type chmod +x menu or chmod 777 menu in Cygwin command line utility first and then only run the command ./menu .
11. You will be presented with the Android Kitchen menu seen above. Use these options and get started. That's all. You have successfully installed android kitchen on your PC. Though this is originally meant for only HTC based roms some of it's features will come handy for modding Samsung Roms too. Please note that because of the same reason all the functions/features of Android Kitchen may not work for you.
Wow. Why did you copy and create a new thread and paste it? Why? Don't we have enough spam already?
EDIT: I don't see the point of this. Couldn't just share a link to the thread?
Interesting.
Thanks!
Sent from my Xperia™ PLAY using TapatalkHD
Lol. Nah, I think I will just stick with good ol' Linux and good ol' terminal and gedit (the proper way )
Sent from my E15i using XDA
Aha!!!
This is what i need... Great! Thankx
Nice info
Creating Custom ROM For Xperia 2011 Device
SatrioDwiPrabowo said:
Nice info
Click to expand...
Click to collapse
Is there any guide how to make custom rom for 2011 device like : Xperia Ray .. ???
engkozhe said:
Is there any guide how to make custom rom for 2011 device like : Xperia Ray .. ???
Click to expand...
Click to collapse
Use dsixda for basic tools rest you do whatever you want theme it add scripts do whatever you want !
Sent from my HTC Explorer A310e using xda premium
Ok. Tnx
Sent from my ST18i using xda app-developers app
I got stuck on services.odex n i cant get the classes.dex file, how can i deodex. Odex n put it on jar file? Tnx
ST18 with custom kernel
engkozhe said:
I got stuck on services.odex n i cant get the classes.dex file, how can i deodex. Odex n put it on jar file? Tnx
ST18 with custom kernel
Click to expand...
Click to collapse
To deodex ROMs use the option in Kitchen for it!
Sent from my HTC Explorer A310e using xda premium
Oh... One more question, can we put apk directly to system folder on cygwin? And how do you create credit on updater script?? Thank you
Sent from my ST18i using xda app-developers app
engkozhe said:
Oh... One more question, can we put apk directly to system folder on cygwin? And how do you create credit on updater script?? Thank you
Sent from my ST18i using xda app-developers app
Click to expand...
Click to collapse
You can add apps in /system/app or /data/app
But if you add in data you will have to create appropriate lines in updater script!
Sent from my HTC Explorer A310e using xda premium
Interesting.
...
updated

[GUIDE] All you need to know about the ramdisk of the kernel

WHAT'S IN THE RAMDISK
So anyone who has compiled a kernel (for the X8) or is about to step into the world of developing android awesomeness through kernel building, should know that there are 2 (two) parts to the kernel:
The kernel image compiled from source code, and
The ramdisk
Both are equally important and are inter-dependent; without the kernel, the ramdisk is nothing (unless of course the devs come up with any other use) and without the ramdisk, the kernel is incomplete (again, this may change in the near future).
You (XDA-ians as I like to call you guys), especially those in the X8 sub-forums must have read viper001's kernel building guide. If you haven't, and do not want to read just 4 posts because of your laziness, it tells you how to compile your kernel image. Hah, now you are almost dying to read it. Well go ahead, read it.
Done reading. Well if you followed that guide to the letter (which I am sure many of you haven't), you'll have compiled your kernel with the FXP ramdisk. Now you want to build it from another source. It's pretty much the same process. However the FXP ramdisk won't work with this kernel. Not a chance (maybe a little). You need the ramdisk so you unpack the kernel using DooMLorD's tool (and forget to thank him; go thank him right now) and see a folder named kernel.sin-unpacked. You open it and see a bunch of files that you've never even heard of. You drop the kernel-building project.
This guide will hopefully eradicate that fear, or ignorance (maybe), and cover up what's in the ramdisk.
The parent (or root) directory of the ramdisk folder itself contains a bunch of files and folsers, which also contain more files.
Let's look at the contents in the root directory:
1 “modules” folder – This one is pretty easy. It contains the kernel specific modules that are loaded up at boot.
2 “res” folder – This folder contains another folder named “images” which contains images to be used in the recovery (more on that later).
3 “sbin” folder – Inside this folder are about 200 files (may vary), most of which are responsible for basic functioning of the phone.
4 default.prop – This file contains only a few lines of code that allow adb to run (line 4) and also makes the kernel insecure to give us permanent root.
5 init – This program initializes elements of the android OS and looks at the two following files:
6 init.rc – This file contains generic initialization code
7 init.<machine_name>.rc – This file contains device-specific initialization code.
8 initlogo.rle – This is the bootlogo (not the bootanimation which comes with the ROM).
9 pre_hw_config.sh – This file is executed at boot to get settings like cpu freq and governors just right.
10 recovery.fstab – This file specifies how the different partitions and file systems are to be mounted.
11 ueventd.rc – This file sets user or group (or root?) permissions on /dev nodes. (I got this line from the Internet and have no idea myself what the hell this means o_0).
12 ueventd.goldfish.rc – This file is empty in our kernels. Dunno why, though.
Now for the files in the /res/images directory:
1 icon_clockwork.png – This is the background seen in CWM.
2 icon_error.png and icon_firmware_error.png – These images are displayed on the screen when there is an error. Not sure though as I have never encountered any such error before in my life.
3 icon_firmware_install.png and icon_installing.png – These images are displayed when installing anything via CWM.
4 indeterminateX.png (where X is a number from 1 to 6, both inclusive) – This is basically the animation of the progress bar (the grey stripes moving forwards, or backwards, or both).
5 progress_empty.png – This is the progress bar during the initial stages of flashing anything in CWM.
6 progress_fill.png – This is the progress bar fill.
These are the files in the /modules folder:
1 sdio.ko – This is a file related to WiFi.
2 tiwlan_drv.ko – This is the tiwlan WiFi driver module.
3 tiap_drv.ko – This is the tiap WiFi driver module.
4 x8uv.ko – This is the undervolting module.
5 synaptics_i2c_rmi4_no_dt.ko – This disables dual touch in Synaptics.
6 synaptics_i2c_rmi4_dt.ko – This enables dual touch in Synaptics.
NOTE: I am not an expert.
More to come soon. See you and I hope sincerely that I do not get banned for this.
THE DREADED SBIN DIRECTORY
Going into the /sbin directory, we see a lot of files, the names of each sending shivers down your spine. But fear not, for sgt. meow will help you understand the functions of some important ones:
1. adbd – The file that allows you to use the adb shell. “adbd” stands for “Android Debugging Bridge Daemon”.
2. bootlogo – This file starts the kernel bootlogo (according to some user on the androidcentral forum; just saw a snippet on google search, opened the page and there was no thread).
3. bootrec – This file basically tells a kernel how to boot up a recovery
4. busybox – It lets you run LINUX / UNIX based commands (ls, gzip, uname etc.) that are required for root-level tasks.
5. dmesg – It is the Linux kernel's own logging system and is similar to logcat.
6. fix_permissions – This file applies and fixes permissions on the Android data folders.
7. insmod – This file is basically what is executed when you type insmod /..../../../../ xxx.ko (or similar) to load up the modules. An alternative way to do this is to write the line in hw_config.sh of /system folder (I guess) to load up modules at every boot. Or you could place the modules in the /modules directory of the kernel.
8. killrecovery.sh – This file, as the name suggests, kills the recovery when you exit it and boots into Android.
9. nandroid – The file responsible for nandroid backups.
10. nandroid-md5.sh – This file generates MD5 checksums for nandroid backups to verify its integrity.
11. reboot – This file reboots the phone when prompted to.
12. recovery – This is the recovery binary. For our devices, it is CWM recovery. This file can be changed easily (what I did with oxydo ICS) to other recoveries for this device for that version of Android.
Most of the other files are LINUX / UNIX based commands and some are files the functions of which cannot be explained by me.
More to come soon. Hope you enjoyed it so far.
FILES YOU CAN EASILY EDIT IN THE RAMDISK
There are some files in the ramdisk that can be edited pretty easily. There are also other files editing which means you gotta be RD or gotta have similar talent. Let's not go into that for now. The easy ones are:
1. initlogo.rle - The file that is easiest to edit. Basically you can convert any image to .rle format and replace it. make sure it is the right resolution.
2. /sbin/recovery - You can use recovery from another kernel (for the same Android version)and replace it in yours. You can also compile your own recovery binary by issuing the make recovery command after a successful CM build.
3./sbin/bootrec - You may have to change this when you change the recovery. Just a simple copy paste, that's all.
4. /sbin/rec_input - This file may need changing too when you change recovery.
5. /res/images/.. - Every .png file in this directory can be easily changed to any other .png file. Just make sure the resolutions are right, or else you will not be able to navigate properly in recovery.
6. init.rc - This file is easily changeable but you need to know what you are doing, otherwise you may mess up the boot sequence.
You can have a shot at changing other files, too. Lemme know how it goes.
CREDITS:
1. Allah Almighty (yes I'm a Muslim)
2. All XDA-ians, especially those in the X8 sub-forum for help (and for pressing thanks)
3. The Internet (Google, Wikipedia and Github mostly) for info
4. Me, for spending hours behind this guide.
5. My family, for not disturbing me while I was doing this. LOL
thank you
that is what i'm trying to understand :good:
This is for sure a valuable thread. Thanks for this!!
Sent With My Brains To Yours. Duh.
Nice thread , Captain Meow Meow
Sent from my X8 using xda app-developers app
sbin will take some time to cover but i will try my best.
sgt. meow said:
sbin will take some time to cover but i will try my best.
Click to expand...
Click to collapse
Its good to see that you are working hard...
Keep it up
great thread.thanks
sent from my x8™ using gingerzaraki®
THREAD UPDATED WITH SBIN CONTENTS. OMG. :wink:
Dude, you should make an *updated* Kernel Building Guide with new sources (i.e. alfs kernel or nAa kernel). Old one still uses FXP kernel source and outdated toolchain instead of Linaro.
RohinZaraki said:
Dude, you should make an *updated* Kernel Building Guide with new sources (i.e. alfs kernel or nAa kernel). Old one still uses FXP kernel source and outdated toolchain instead of Linaro.
Click to expand...
Click to collapse
And link to your sources as an example for others..
Banned? And why? This is usefull =))
Sent from my E15i using xda premium
@Rohin
yeah I might
@Elmir
that was a joke
@all
THREAD UPDATED WITH FILES THAT CAN BE EDITED AND CREDITS. :BIG GRIN:

[TUT] [SABERMOD] How to Compile Your Own AOSP/CM Custom Kernel

Since this is in the Moto G (Falcon) forum, these steps are for the Falcon. This does not mean that it isn't the same for other phones! Even if you don't own a Falcon device, feel free to ask for help here!
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 year old kid with a concussion beat you .
[/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 etc., that is not anyone's fault but yours.
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! Read a book, count your fingers, watch ****, and wait patiently.
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
Almost done :
Time to set-up the compiler!
Code:
export CROSS_COMPILE=/home/*your linux name*/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 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 EASY 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! ​
Reserved
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
One More
One more
Nice guide!
I think it lacks one thing- how to modify the kernel.
The guide only mentions how to compile a preconfigured kernel, just the way it is. Modding kernels and adding new features (like OC, schedulers, s2w etc.) is the cool part about making a kernel yourself IMO.
Just a suggestion.
Sent from my XT1033 using XDA Premium 4 mobile app
KDB223 said:
Nice guide!
I think it lacks one thing- how to modify the kernel.
The guide only mentions how to compile a preconfigured kernel, just the way it is. Modding kernels and adding new features (like OC, schedulers, s2w etc.) is the cool part about making a kernel yourself IMO.
Just a suggestion.
Sent from my XT1033 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Well, I will be putting the reserve posts to good use later
What would be the best way to test a kernel w/o bricking the phone?
adizz4 said:
What would be the best way to test a kernel w/o bricking the phone?
Click to expand...
Click to collapse
You can't brick a phone with an unmodified kernel!
Oops double post
adizz4 said:
What would be the best way to test a kernel w/o bricking the phone?
Click to expand...
Click to collapse
Does "fastboot boot kernel.img" work from bootloader mode?
Also why wouldn't the any kernel zip work if I decompressed and compressed it again. I did that before this thread and it didn't work.
P.Kosunen said:
Does "fastboot boot kernel.img" work from bootloader mode?
Click to expand...
Click to collapse
I've been using that to test. Its a really good way but you'll have to build a boot.img
adizz4 said:
Also why wouldn't the any kernel zip work if I decompressed and compressed it again. I did that before this thread and it didn't work.
I've been using that to test. Its a really good way but you'll have to build a boot.img
Click to expand...
Click to collapse
I specifically said in the tutorial nor to unzip it... The zip is already signed (a prerequisite for flashing) and unzipping will break it.
Did we need sudo before make -j4 command?
Sent from my XT1032
Siekil said:
Did we need sudo before make -j4 command?
Sent from my XT1032
Click to expand...
Click to collapse
Not necessary
I'll be writing more posts on how to add features to your kernel and basic cherry-picking features
I syncd gummy kernel sources and tried to build using linaro and sm but I keep getting this error.
sound/soc/msm/msm8226.c:30:40: fatal error: qdsp6v2/msm-pcm-routing-v2.h: No such file or directory
Click to expand...
Click to collapse
Any inputs on that?
adizz4 said:
I syncd gummy kernel sources and tried to build using linaro and sm but I keep getting this error.
Any inputs on that?
Click to expand...
Click to collapse
Probably a gcc error... I'd try compiling with a 4.7 toolchain. And also, make sure you're using the msm8226_mmi_defconfig since gummy's different
@YoshiShaPow thanks for the guide. I'm using it to begin fooling around with some building.
May I be a pain in the *** and ask you for a lil help? If using the file you provided to insert the build, I get trouble with wifi (in latest Aospa). I don't expect you to solve that, but I was wondering how to make out of the zimage a boot.img file, but I've read around the ramdisk needs to be merged into that, and honestly I'm not so sure how to do that. I found some guides, but none of them is specific for falcon, so I might be goofing around if I follow them?
Also checked the flashing script in the file you provided and noticed that it makes a boot.img on the go, but couldn't figure out how to reproduce that either.
If what I'm asking is too hard or long to be answered , I understand :good:
Edit: now I tried building with Linaro and after sorting out a couple of errors, voilá, I got a build. But again, my wifi gets smashed. Everything else seems to work fine, but when I try to turn wifi on, it's dead, nothing happens. My ideas: could it be something about the way the kernel's flashed skipping a boot.img (ramdisk?)? Is it something about AOSPA (think it shouldn't since it uses CM kernel)? Or should I be looking into my build, making a logcat about the issue and working it back?
fermasia said:
@YoshiShaPow thanks for the guide. I'm using it to begin fooling around with some building.
May I be a pain in the *** and ask you for a lil help? If using the file you provided to insert the build, I get trouble with wifi (in latest Aospa). I don't expect you to solve that, but I was wondering how to make out of the zimage a boot.img file, but I've read around the ramdisk needs to be merged into that, and honestly I'm not so sure how to do that. I found some guides, but none of them is specific for falcon, so I might be goofing around if I follow them?
Also checked the flashing script in the file you provided and noticed that it makes a boot.img on the go, but couldn't figure out how to reproduce that either.
If what I'm asking is too hard or long to be answered , I understand :good:
Edit: now I tried building with Linaro and after sorting out a couple of errors, voilá, I got a build. But again, my wifi gets smashed. Everything else seems to work fine, but when I try to turn wifi on, it's dead, nothing happens. My ideas: could it be something about the way the kernel's flashed skipping a boot.img (ramdisk?)? Is it something about AOSPA (think it shouldn't since it uses CM kernel)? Or should I be looking into my build, making a logcat about the issue and working it back?
Click to expand...
Click to collapse
Sorry, I wanted to wait till I could use a computer to respond.
You must be missing the *.ko files:
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
kernel for x86 device [Asus zenfone5] can be made using this method?
YoshiShaPow said:
Sorry, I wanted to wait till I could use a computer to respond.
You must be missing the *.ko files:
Click to expand...
Click to collapse
Uhm, no, I followed that part step by step. I did it once more to double check, and I'm still in the same place. Actually, I suspected something and tried your kernel (TGM) and had the same problem (WTF?). I need to try wiping everything and reinstalling aospa to make sure there isn't some other thing going on down there.
But it's ok, I'll figure it out somehow. What I'd really need if you can point me in the right direction, si how to step further into building a boot.img
Or for that I MUST follow the official CM method, meaning syncing the full repo and building just the kernel?
Thanks for your help!
---------- Post added at 10:42 AM ---------- Previous post was at 10:18 AM ----------
sanjib734 said:
kernel for x86 device [Asus zenfone5] can be made using this method?
Click to expand...
Click to collapse
I'd guess it's not about the method. I think there's no CM official support for this device. Do you have any unofficial source to build from (Github)? If so, I guess you could try.
Edit: should check if Sabermod is compatible with the device's arch too.

Categories

Resources