[TUT] [SABERMOD] How to Compile Your Own AOSP/CM Custom Kernel - Moto G General

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.

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)

Championswimmer's Ultimate HOW-TO

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

How to build AOSP for Nexus 7?

I would like to mess with trying to install my own customized ROM's to my Nexus 7, but the first place to probably start is with being able to build AOSP as-is from source.
As I understand currently, building is only supported on Linux and OS X, but I can easily get Ubuntu 10.04 and re-partition my HDD to give it about 100GB (if that much is even needed).
Looking at:
http://source.android.com/source/initializing.html
I need to choose a branch and setup the Linux environment. I'm a bit confused as to what branch I should choose though. I want the latest source of Android available at the time, so I should pick the master branch? Or since I'm only building for the Nexus 7, should I choose it's device-specific branch instead? Although looking at:
http://source.android.com/source/build-numbers.html
the Nexus 7 is only at android-4.1.1_r1.1, but I could of sworn I heard there was r4 out already.
As for setting up the Linux environment, I hope I can just follow all the commands listed there without any problem.
Proceeding on with:
http://source.android.com/source/downloading.html
It looks like a pretty straightforward process that I'm also hoping can be done successfully if I follow the commands exactly as presented. I don't have a proxy nor the need for a local mirror either.
And then moving onto:
http://source.android.com/source/building-devices.html
Some stuff there I find a little bit confusing. It would seem I have to first get proprietary drivers, which all 4 seem to be placed conveniently at:
https://developers.google.com/android/nexus/drivers#grouper
From there, I imagine I can move the script that's bundled inside to the root of the source folder, run it, and follow the instructions. I don't exactly know what the root of the source folder is, but it would probably be obvious once I did start trying to build this. But once I did find it, I would run (using Nvidia's Graphics driver for the example) sh extract-nvidia-grouper.sh in Terminal, and it would place the right files where they need to be.
I don't understand the make clobber part too well at all; should I run this on the very first build, later builds, or all builds?
And once the source and drivers are all downloaded and available, I should then run lunch full_grouper-userdebug and then finally make -j# (# being some number in accordance with how many cores on my CPU I have). I have a triple-core CPU at 3.5Ghz, and I have the ability to unlock to quad-core at 3.3Ghz (but prefer to stay on triple). Should I just run -j32? Also will this build the Kernel as well, or will I have to get the source for that and compile it separately?
And once the build completes, my plan from there was to just go back to Windows and flash it. And if I managed to get it to flash and boot properly, I assume I would of succeeded with compiling AOSP from source
I noticed that userdebug part on full_grouper-userdebug gives "root access and debuggability". Does this mean it comes with some program like Superuser or SuperSU already installed? Or does this mean I can easily install those?
Perhaps after I get comfortable with the basics of flashing AOSP as-is, I can then try to mess with different types of optimizations, like Linaro and perhaps even messing with many types of optimizations from different kernels like faux123 has done .
I also have a 360kb/s DSL connection, so downloading the entire source the first time will probably take a good while. But once I have the source, I take it I don't have to redownload the entire thing for patches and stuff?
Any and all guidance is welcome
Bump before I go for tonight
Bump
You have a bunch of questions. I will answer some. And while I whole-heartedly support learning to build you don't need to build to flash roms.
The best advice I can give you is to just start building. You have found a bunch of instructions and links, obviously. Go ahead and begin, and tackle problems as they arise.
Environment
Okay...really the hardest part is setting upi the environment, if you don' t know linux. After downloading and installing Java and the SDK, make sure you add them to your path.
Most guides will have adding the path in the directions. But make sure to check that it works! It will be extremely frustrating, and you won't know what is wrong. Go to a random directory, Documents would be good, and enter java -version and then adb devices. If the computer says it cannot find the commands, then your path is the problem.
Make sure to setup udev. It is easy, Google it.
Building
Branch
You want to build from the tags.
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r4
For the proprietary blobs, whatever directory you repo sync from (~/android/system or whatever) is the root directory. run the extraction from there.
when the proprietary blobs are extracted, and the source has been downloaded, these are your commands.
Code:
. build/envsetup.sh
lunch
Lunch will return a list of devices, Grouper is the Nexus 7, it is number 4. eng and user-debug do have root access, but SU and SuperSU are more than just root, they manage the root access for your apps as well. You can download them from Play or install them as a flashable-zip.
Choose 4 and then
Code:
make otapackage
don't worry about the -j# part. Your machine almost definitley cannot handle -j32. It is -j4 by default, that should be fine for your cpu.
If you want to enable faster builds, you can enter
ENABLE_CCACHE=1
before make otapackage, but it will take up a lot of space on your hd. Your subsequent builds will use some thing from your intial build instead of rebuilding them each time (kernel and other things). So even if you repo sync, some changes won't be reflected in your later builds. For instance, if you do not clean your prebuilts and build system, your build date in the build.prop will always stay the same as the first build.
The way you clear the build directory and make new everything is with make clean or make clobber. You can run it before any build, but the build will take much much longer than one that uses prebuilts. Non-clobbered and with ccache enabled are the fastest of all. But subsequent builds are pretty fast even without ccache.
When you want to update your source, you can just go to your root dir and repo sync. It will only update your source, it won't take nearly as long.
Okay, I answered more than I intended. There are a million guides that show you every step in the process.
Don't ask anymore generic worry questions...you're ready. You understand more than most people do before their first build before I even posted. Get started and if you run into problems, search. If you can't find the answer, then come back and ask us.
Good luck. it is easy, and very satisfying.
I finally got around to installing a Virtual Machine, and Ubuntu 10.04 After doing that, I fully updated Ubuntu, installed VMWare Tools, and then proceeded to start trying to acquire the AOSP source.
Getting sun-java-6 was a bit tricky, but not too hard (I ran the commands exactly as listed on the site, but the package didn't exist; had to get it from somewhere else). After that, I proceeded to do everything else, except CCache (I didn't know what .bashrc was, but I'll look further into this with future AOSP builds).
I then made the folder, did repo sync, and I'm now acquiring the source now from android-4.1.1_r4. As a quick question, does it matter whether I choose to build from android-4.1.1_r4, or master? Would master be more up-to-date?
espionage724 said:
I finally got around to installing a Virtual Machine, and Ubuntu 10.04 After doing that, I fully updated Ubuntu, installed VMWare Tools, and then proceeded to start trying to acquire the AOSP source.
Getting sun-java-6 was a bit tricky, but not too hard (I ran the commands exactly as listed on the site, but the package didn't exist; had to get it from somewhere else). After that, I proceeded to do everything else, except CCache (I didn't know what .bashrc was, but I'll look further into this with future AOSP builds).
I then made the folder, did repo sync, and I'm now acquiring the source now from android-4.1.1_r4. As a quick question, does it matter whether I choose to build from android-4.1.1_r4, or master? Would master be more up-to-date?
Click to expand...
Click to collapse
Sorry for late answer, no, use the r4 branch as it is more up to date. Also, make clobber every time isn't needed but you should as it remove then entire out folder (wich is where compiled stuff go) and this make sure you rebuild a clean thing.
Building CyanogenMod 10
Dunno if this is of any interest, but I have a thread started with a complete walkthrough for building CyanogenMod10 for Nexus 7.
Most of the info is the same, and there are some tips in the comments as well.
espionage724 said:
I would like to mess with trying to install my own customized ROM's to my Nexus 7, but the first place to probably start is with being able to build AOSP as-is from source.
Click to expand...
Click to collapse
So, how did you get on? I've been following the same path I think - repo sync the source and follow Google's own tutorial on compiling Android but with the added step of incorporating the binary drivers for the grouper.
I've built the .img files using make -j8, that all works, fastboot flash worked, but I get no video out when booting up using the new OS. I can ADB into the Nexus and it's certainly booted and working okay apart from, I'm guessing, the missing binary drivers.
I've used each of the 5 binary driver scripts to populate the "vendor" directory in the root of the downloaded source before compiling from scratch, but perhaps I've missed a step, so I'm curious as to whether you've got a fully working AOSP+binary driver compile working.
(By the way, my build environment was Ubuntu 12.04 64bit, SDK r20.0.3, Android 4.1.1 (JRO03R) source, Sun Java 1.6, and it all seems to work well using 8 threads on a Core i5 2500K + 4GB RAM).
Edit:
I re-ran the binary extraction, did a make clean; make clobber, and re-compiled - and now video works. Everything works now apart from the compass, camera and rotation sensor. I also tried compiling CyanogenMod from source, too, and had the exact same three problems. Everything works, and works well, apart from camera, compass and rotation sensor. All of which work in the stock Google ROM. Weird.
OK, So I've just compiled an OTA update package from AOSP source... my question is this:
I already have unlocked the bootloader on my wife's Nexus 7, installed Clockworkmod, rooted it, installed busybox, etc, manually on the stock 4.2 update I downloaded from Google on the device when it asked me to upgrade.
Is the otapackage I just compiled going to replace my custom recovery if I flash it as is? I've looked, and it has a "recovery" folder in the .zip, whereas any of the custom ROMs I have downloaded for my phone do not. Do I simply delete this recovery folder, and flash away? Do I need to edit the updater-script? I'm still trying to read and learn about this, but I haven't gotten a good answer from google or searching this site for my specific problem... maybe I'm wording my searches incorrectly.
I would just rather not have to go back and reinstall Clockworkmod... I know that if I want to have busybox, SuperSU, and other apps installed when I flash I'm going to have to add them to the zip and resign... I just don't want to mess my recovery. And being that this is my wife's tab (and not mine to play with, as she pointed out ) I don't want her to get the impression that I'm having to "fix" something I "broke" lol.
hallowed.mh said:
OK, So I've just compiled an OTA update package from AOSP source... my question is this:
I already have unlocked the bootloader on my wife's Nexus 7, installed Clockworkmod, rooted it, installed busybox, etc, manually on the stock 4.2 update I downloaded from Google on the device when it asked me to upgrade.
Is the otapackage I just compiled going to replace my custom recovery if I flash it as is? I've looked, and it has a "recovery" folder in the .zip, whereas any of the custom ROMs I have downloaded for my phone do not. Do I simply delete this recovery folder, and flash away? Do I need to edit the updater-script? I'm still trying to read and learn about this, but I haven't gotten a good answer from google or searching this site for my specific problem... maybe I'm wording my searches incorrectly.
I would just rather not have to go back and reinstall Clockworkmod... I know that if I want to have busybox, SuperSU, and other apps installed when I flash I'm going to have to add them to the zip and resign... I just don't want to mess my recovery. And being that this is my wife's tab (and not mine to play with, as she pointed out ) I don't want her to get the impression that I'm having to "fix" something I "broke" lol.
Click to expand...
Click to collapse
Sorry if a bit late, but here are some answers:
yes, the rom will replace your recovery. but if you delete the recovery folder and delete every line containing the word "recovery" in the updater-script, you should be good to go.
And if you accidentally remove the recovery, you can always flash it back very easily using: "fastboot flash recovery [filename.img]" (your n7 has to be in the bootloader)
And again, yes, you will have to put the extra apps into the zip and update the updater-script to install them too.
Also, you will need the gapps package if you want to use the play store and other google apps.
Hope this helped
Nexus 7 3G does not boot after flashing AOSP
Hi,
I followed the steps provided on source.android.com to build and flash the AOSP for Nexus 7 3G Tilapia. After successful flash, the device does not show anything after Google logo. Please help me out.
Thanks,
Veeren
Compile with ccache makes build time extremely fast.
How to do:
_Open a terminal
_Install ccache:
sudo apt-get install ccache
_Open .bashrc:
sudo gedit ~/.bashrc
_Add these lines:
#ccache
export USE_CCACHE=1
_Save and exit
_Sync source code
_After source synced, run in same terminal (in root directory of your source):
prebuilts/misc/linux-x86/ccache/ccache -M 20G (20G is the size in giga of space allocated for ccache, change it as you want)
_Start building
How to see if ccache works:
_Open another terminal in the root directory of your source and type:
watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s
First build using ccache may be a little much longer but the others will be faster...
veerndra said:
Hi,
I followed the steps provided on source.android.com to build and flash the AOSP for Nexus 7 3G Tilapia. After successful flash, the device does not show anything after Google logo. Please help me out.
Thanks,
Veeren
Click to expand...
Click to collapse
Did you pull the proprietary files for your nexus and include them in the build? I believe things like your video drivers are included in there, so if those are missing....
I think the prop files are available for download from Google on source.android.com... If not, they tell you how to use an included script to pull them via adb. I can't remember... It's been a while since I built vanilla AOSP.
Sent from my Inspire 4G using xda app-developers app
Modifying stock AOSP
I have built AOSP following the Google tutorial.
I am compiling using the master branch and
Code:
aosp_grouper-userdebug
.
I have downloaded and extracted the appropriate proprietary binaries.
I am modifying two files in the source tree (see attachments; search for "// MODIFICATION ADDED HERE" to find my changes). Will these changes work? I am using Eclipse, set up in the exact way the tutorial explains, and I am not receiving any new errors.
When I compile the source using the following commands
Code:
$ . build/envsetup.sh
$ lunch aosp_grouper-userdebug
$ make fastboot adb
and flash it to my device with
Code:
$ fastboot -w flashall
BEFORE my modifications, it works just fine. The android-info.txt file and all the image files are produced properly.
However, AFTER adding the modifications, the build completes with no errors, but android-info.txt and all image files are no longer produced.
Why am I experiencing these problems? What can I do to make it work the way I want?
P.S. YES, I am aware that my modifications are not secure; these are for my own purposes, not for a public build.

[GUIDE] [Updated] Compiling and putting together a kernel for the X8

Second thread in a week. Read on, young dev, for you are about to enter a world of Android goodness soon.
WHAT IS A KERNEL?
A kernel, as explained by viper001 in his thread, is the software layer between the ROM and the hardware. It contains the crucial init process of the boot sequence. So an Android phone with a faulty kernel may mean a very expensive paperweight. But fear not I have compiled several kernels for my phone (released a few of them too) and I have never ever bricked my phone (not even a bootloop, strange right?).
WHY THE NEW THREAD AND WHY YOU SHOULD COMPILE A KERNEL?
viper001's thread is pretty outdated (it was published in 2010, it's nearly 2013 now) and uses the FXP source (which is also pretty old). Therefore if you compile a kernel following that guide, you'll only be able to use it with FXP ROM (which is almost ancient by now). That is why I decided, after considering Rohin's suggestion, to write a new kernel building guide, for members who wish to step into the dev world by compiling a kernel. Keep in mind, neither the XDA-ians nor I am to be held responsible if you do brick your phone (even if you pee on it due to sheer excitement, though I am pretty sure you'll handle it....LIKE A BOSS).
THE ACTUAL GUIDE
Okay so you want to compile your kernel, huh? Well, you're gonna need some packages and toolchains and sources and blah blah. In short these are the requirements:
1. An Ubuntu build (Linux Mint will do too but I haven't tried using it) on a fast computer (preferably a quad core but a dual core 2.4GHz will do too, 2GB of RAM) or a virtual installation (Google installing ubuntu on vbox).
2. Some packages that you can get by typing this in the Terminal:
sudo apt-get install git unrar libncurses5-dev qt3-dev-tools
3. A kernel source
4. A toolchain
5. Flashtool in your Windows installation (you must have one)
KERNEL SOURCES AND TOOLCHAINS
nAa GB (L)
nAa ICS (L)
nAa JB (L)
Alfs GB (use master branch; test has problems) (L)
LINARO (L sources only)
LINUX GNU Compiler for ARM
INSTRUCTIONS
Make a folder where you'll be working for the time being. Name it conveniently. Unpack a source there and a toolchain (use the Linaro one, it makes the kernel slightly faster and each of the sources I mentioned is compatible with it). Rename the toolchain folder, and the source folder too, to something simpler. It's better if all this is done without root, because that may screw your Ubuntu installation beyond recovery. Even so I did it in root. You, however, should do it in any place other than root, and make sure you can easily navigate to the place through Terminal.
Now for the tough Terminal bit. Navigate to the source folder and type in this:
export ARCH=arm
export CROSS_COMPILE=/path/to/toolchain/folder/bin/arm-linux-gnueabihf-
This will tell Terminal to build the kernel for the ARM platform using the Linaro toolchain.
Then type in:
make xxxx_shakira_defconfig
Where xxxx is the part of the name before _shakira. Check the /arch/arm/configs directory for either semc_ (for Alfs kernels) or nAa_ (for nAa kernels). Or you can make your own defconfig if you're up to the challenge.
Then type in:
make menuconfig
This will display a GUI version of your defconfig. Edit anything you want to there or directly in the defconfig.
Then type in:
make -j#
Where # is the number of cores your CPU has + 1.
If all goes well, you should have your kernel image. Grab the Image file form /arch/arm/boot.
You do have Windows installed, right? Good, because you're gonna need it now. Download the bootloader unlocking tool (not Flashtool, the one posted by the_laser).
You have to copy your Image file and a ramdisk, check my other guide, to the sinTools folder of the bootloader unlock tool. A suitable ramdisk, not a GB one for an ICS kernel and vice versa. Then rename the Image file to image and double-click on example_build.cmd. You should get a result.zip. Exatract it and rename result.sin to kernel.sin. Copy it over to a folder and place a loader.sin from a working kernel there too. Open up Flashtool. Go to Advanced > Bundle creation. Navigate to the folder and select both files and move them over to the right-side (by clicking the > button). Give it a proper name and branding and click OK. FLASH! FLASH! You are done with your kernel. First ever, huh? Wish to know more.
If your build failed, type in
make mrproper
or
make clean
Coming soon, TIPS AND TRICKS and more.
P.S.
It is pretty obvious that I'm not a RD, or any D for that matter, this guide may have petty mistakes. Therefore I request any member to let me know if there are any mistakes should he/she find any.
Stay safe and pray that your PC doesn't explode while you're doing this.
If any of the Forum Mods are reading this, you may wonder why I posted this when there already was a guide. viper001's thread is a bit outdated although some users have compiled kernels following it. Therefore to help users who are quite new to this, I wrote this. I sincerely hope I do not get warned for posting a guide twice, just to help people compile newer kernels.
NEITHER THE XDA-IANS NOR I AM TO BE HELD RESPONSIBLE FOR ANY DAMAGE THAT THIS MAY CAUSE TO YOUR PHONE. YOU ARE SOLELY RESPONSIBLE FOR WHATEVER YOU DO TO YOUR PHONE.
But do ask for help if you need it.
EDIT: You can also use the zImage file (you have to rename it to image) as pilu1978 said in his post (check second page and thank him). If you use this, you can attach a larger ramdisk.
COMPILING WiFi MODULES
After you compile a kernel, you need to compile a set of WiFi modules for the kernel. Otherwise your WiFi won't turn on and when you check in Terminal Emulator, you'll get blah blah.ko magic version errors. So after every compile, you also need to compile your WiFi modules.
For nAa based kernels, all you gotta do is issue the ./build_wifi.sh command right after compiling your kernel. It'll result in 3 files in the source's parent folder: tiwlan_drv.ko, tiap_drv.ko and sdio.ko. You have to copy these files to the ramdisk's modules folder, replacing the ones already there.
For nAa .32 kernel, you don't have to do anything. Just grab the following modules:
net/compat-wireless/net/mac80211/mac80211.ko
net/compat-wireless/drivers/net/wireless/wl12xx/wl12xx_sdio.ko
net/compat-wireless/drivers/net/wireless/wl12xx/wl12xx.ko
Thanks to @btisserand and @pilu1978.
For alfs based kernels, I have no idea. You can ask alfsamsung like I did. I tried it using his method and failed. However I tried copying the vendor_ti_wlan and the build_wifi.sh files from nAa's source to alfs' source and it worked, just once. I couldn't test the modules myself but my tester said the kernel didn't even boot o_0. Therefore I find it safer to stick to the nAa kernel source. But even if you do try with alfs and somehow manage to succeed, do post how you managed to compile it.
EDIT: Thanks to Daveee10, you now have another source for the WiFi modules. Download this as a zipball and extract in Ubuntu. Then execute nAa's build_wifi.sh script in Terminal and you should have the modules. Oh and if you get any permission denied error just chmod it. It works for me.
Next post covers TIPS AND TRICKS.
TIPS AND TRICKS
So compiling a kernel, a bland, vanilla kernel is pretty mainstream. You want more tweaks. That's up to you to find out how you're gonna manage that. All I can do is help you with some things that'll make the kernel your very own, your precious.
Changing the name of the kernel...like completely
You want to change the name of the kernel like
xxxxx
[email protected]#1
[TIMESTAMP]
The xxxxx in the first line can be changed in the defconfig or in the menuconfig (easier). Go to General Setup. Then scroll down to the KERNEL_VERSION line (in menuconfig). Then change the name to anything you like (for example, X8-kernel).
The [email protected]#1 can also be changed. Go to /source-folder/scripts and open up the mk_compile.h file. Scroll down to line 66 and change the word within inverted commas to anything you like (for example, X8). Then in the next line, change the word within inverted commas to anything you like as well (for example, XDA).
After you flash your compiled kernel and go to Settings > About phone, you'll see
X8-kernel
[email protected]#1
[TIMESTAMP]
I'm not sure if you can change the TIMESTAMP.
Editing CPU freqs
Editing CPU frequencies via kernel is also pretty easy (thanks fotak-x for the suggestion).
Go to /arch/arm/mach-msm and open up acpuclock.c.
Scroll to line 202 (the line which says "7x27 with GSM capable modem PLL0 and PLL1 swapped" or something) and just below that you'll see the frequency table which also has the GPU frequencies (??)
The value after { 0, is the CPU frequency, the one you want to change.
You can delete any frequency that you don't use (19MHz and so on) but don't delete 600MHz or add any beyond 864MHz. No X8 will ever go beyond that without freezing up.
The values just before the last number are the voltage units (ranging from 1 to 7). You can experiment with that too but it's better not to.
If you do not know what you are doing, please do not attempt this.
Adding/Deleting I/O schedulers
First look at this commit from DooMLorD: https://github.com/DooMLoRD/Xperia-...mmit/0ae625f7561c559d4933284f489733bf5eb66e96
I'm pretty sure you understood what you gotta do. If you still didn't, read on.
What Sir DooMLorD did was change some lines in the Kconfig.iosched of /block directory to add the Simple I/O scheduler. Then he edited the Makefile to include the building of SIO. The most important thing he did was to make a new file and paste the code that is the script that tells SIO what to do, basically it's core ingredient. You have to perform similarly and change the defconfig to include the I/O scheduler.
Deleting is way simpler than that. You just have to write n after the line in the defconfig where the inclusion of the scheduler is mentioned.
50% FPS-uncap in ICS (and JB?) kernels
It's pretty obvious that I'm referring to the nAa-ICS kernel source. Navigate to the arch/arm/mach-msm directory and open up the board-delata.c file.
Go to line 1915 (the one that begins with panel_data->panel_info.lcd.vsync_enable). Change the value to FALSE. This disables HW vSync.
Then go to line 1999 (it also begins with panel_data->panel_info.lcd.vsync_enable). Change this value to FALSE as well.
Compile the kernel as you would normally. Flash to see a slight increase in performance, and a massive improvement in gaming.
Thanks to pilu1978
That's it for now. Will be updated soon.
CREDITS in no particular order
-viper001
-nobodyAtall
-alfsamsung
-djnilse
-Daveee10
-CyanogenMod team
-pilu1978
-RohinZaraki
-fotak-x
-DooMLorD
-paxChristos
-Google and the Android team
is it possible to compile it from stock kernel?
Thanks sgt may try compiling a kernel just for my ROMs
cool
@fotak-x
yes you can download the stock sources and compile it but it's a little complicated. and all kernels are basically improvements over the stock kernel, so in a way you are compiling a not-so-stock stock kernel.
Thread updated. More tips and tricks now.
Some additions
About the compiler (arm gcc). Today everyone prefer linaro. After a lot of testing, I can say: NO real performance differences between the different compilers (tried google/codesourcery/linaro with lot of versions between 4.4.x and 4.7.x series). Sometime the older is better. The linaro gcc contains optimized libgcc for each instruction set, but we are on the bottom of the list, without the armv7 extensions, extended float unit (thumb-2) and vector processing unit (NEON) the linaro gcc can't give real boost for our phone.
About the cpu frequencies: yes, possible to add/remove/modify these values, but without enough knowledge, better if you not do anything. You use an android phone, so you must know, your best friend: google. Use it. And try to understand how to generate the cpu freqs. Learn about the PLLs, their values, dividers, bus frequencies (axi, ahb, etc...) before start to play with frequencies. You can't set directly the gpu freq, in the msm7x27 SoC series the gpu freq depends on the axi clock (can't work in async mode). Modify the VCC levels, bus frequencies the easiest way to make the phone unstable.
About the wifi modules: you can use the wifi drivers from nAa sources if you want to compile modules to alfs kernel. Or you can find the tiwlan1271 driver sources in the cyanogenmod source tree too. If not working, or you can't compile, try another compiler, or other sources. If you successfully build the modules, you NOT must recompile it after a new kernel build. If you change the kernel versions (2.6.29.xx-xyz) you MUST recompile the modules (the wifi modules linked directly to the kernel version).
good addition mate. i never added any freq and that's why i don't know the exact amount it multiplies by at every step. or even if it works that way. and i never succeeded in compiling the WiFi modules for alfs. and yeah there is basically no improvements in terms of performance between Linaro and Codesourcery. Linaro just seems cool and that's why everyone wants to use it. simple as that. that being said, Linaro does indeed work good on ARMv7 devices as you said in your post.
Some additions (again)
Differences between make clean and make mrproper (if you need to clean the sources after a failed build). The make clean command delete the most generated files and builded objects, but keep the .config file (what contains the changes of actual defconfig) and keep enough informations to build external modules. The make mrproper command delete ALL generated files/objects, after this command you need to configure the kernel config again (make blabla_defconfig and make menuconfig for example). If you use alfsamsung sources, never use the mrproper command, because this source not contains defconfigs, only a predefined .config, the make mrproper delete it, and need to extract this file again.
About the Image and zImage: the difference between these files is only one, the Image contains the raw kernel code, the zImage starting with a decompressing code and the compressed image. When build the kernel.sin, you can use the zImage too, just rename to Image. The result is a smaller kernel, you can attach bigger ramdisk. The maximum size of the kernel (the complete kernel.sin) is around 8.300.000 byte. A typical kernel image is around 5,5MB (you can use ramdisks with maximum 2,5MB) the compressed image size is less than 3MB (you can use ramdisks around 5MB size)
As sgt. meow wrote: "Linaro just seems cool and that's why everyone wants to use it." This is the general problem in the development section, every "developer" want to make "cool" things, I think better if they concentrate to make "good" things, instead of making "cool" sh!ts...
Some tips:
If you make a kernel, never post it: based on LATEST xyz source. The latest is relative. Write a correct commit version, if you don't know what is it, need to learn before publish kernels.
To the members who have low bandwidth. Download sources as zipball, it needs less data transfer than a repository sync (when you sync a repo, you download a lot of deltas, additional files too), a typical kernel zipball is around 90MB. This method works with rom sources too (but more complicated, because you need to download and extract manually more than 200 files), for example the minicm7 sources with manual download as zipballs is only 600MB (without the prebuilts what is around additional 700MB).
If you want to be "cool" and use linaro, use the standalone linaro gcc (the arm-none-eabi version) instead of the linaro toolchain (arm-linux-gnueabi version) it will give less compiling errors.
true dat, brother.
and is minicm7 really about 1.3GB in size as zipballs? one more thing i heard (read, probably) that the zImage is the compressed version of the Image with a decompression code. so if we use that, won't booting time be a lil bit slower?
added all your suggestions bro. thanks a lot for helping out. you should apply for RC.
No, the compressed image not give significant slower boot time. All nAa kernels use compressed images, and boot faster than the alfs (the alfs8 use normal image, the alfs9 use compressed).
Yes, the minicm7 source only 614MB if you download as zipballs. For example: the settings app size is 3,5MB if you download as zip, but the git repo is around 90MB (this is an extreme example, with some part of code you can't decrease the download size).
Tips to use this method.
Make the repo init, but not start the sync. Check the default.xml in .repo/manifests, and you can see all needed repo.
You can make download links from this file in this form:
https://github.com/"name value"/zipball/"revision value"
Concrete example:
You see this line:
<project path="bootable/recovery" name="CyanogenMod/android_bootable_recovery" />
The link what you need: https://github.com/CyanogenMod/android_bootable_recovery/zipball/gingerbread
(the most line in default.xml not contains revision, if you not see it use gingerberad for minicm7, or ics for minicm9)
If the download finished, you must extract manually the downloaded file into the "project path". With this example: in your source folder you must make the bootable/recovery folder, and extract the downloaded zip into this folder (warning: the zip contains a folder named in this form - project name+commit number, you must extract the files into the "project path" folder WITHOUT this folder (you need the files INSIDE this folder))
gonna try that soon.
okay so the line has to be edited like this:
<project path="bootable/recovery name="CyanogenMod/android_bootable_recovery/zipball" />
i'm trying it on the MiniCM9 source.
oh yeah android source from googlesource can't be zipballed that way.
sgt. meow said:
gonna try that soon.
okay so the line has to be edited like this:
<project path="bootable/recovery name="CyanogenMod/android_bootable_recovery/zipball" />
i'm trying it on MiniCM9.
Click to expand...
Click to collapse
No.
The correct method for get direct links:
You can see in the default.xml: <project path="external/compcache" name="CyanogenMod/android_external_compcache" revision="master" />
The link what you need:
https://github.com/CyanogenMod/android_external_compcache/zipball/master
The text with puple color: need to write it manually
Text with green color: the repo what you need
Text with blue color: the branch name what you need. Usually you not see the revision in the default.xml, if not exist, use the default branch name (gingerbread or ics, depends on what source needed)
The downloaded file will be this: CyanogenMod-android_external_compcache-cm-7.0.0-0-g5fdea21.zip
Inside the zip package you can see a folder with same name, this folder NOT needed, go inside this folder, and extract the files into the folder what marked with orange colour.
You must do it with ALL project (over 200 files), but you need to download only 600MB, and not need to sync the repo (what is much bigger).
EDIT: You not need anything from google sources if you want CM7 (just the prebuilt binaries, but you can find it somewhere in the minicm nightlies threads, eagleeyetom uploaded it when the aosp servers was unavailable)
EDIT: what about platform/abi/cpp and some others?
sgt. meow said:
EDIT: what about platform/abi/cpp and some others?
Click to expand...
Click to collapse
Please explain it in longer form (I not understand what is the question)
i saw this line in the default.xml
<project path="abi/cpp" name="platform/abi/cpp/zipball" remote="aosp" revision="refs/tags/android-4.0.4_r2.1"/>
this is important. how do i zipball or tarball it?
sgt. meow said:
i saw this line in the default.xml
<project path="abi/cpp" name="platform/abi/cpp/zipball" remote="aosp" revision="refs/tags/android-4.0.4_r2.1"/>
this is important. how do i zipball or tarball it?
Click to expand...
Click to collapse
Okay, understand I checked only the cm7 sources, what not contains codes from aosp servers (only the prebuilt toolchains, but this is available on mediafire servers, eagleeyetom upload it when the prebuilts was unavailable ). So, at this moment no idea how to download code from google servers.
Try this: remove all minicm/cyanogenmod related lines from default.xml, leave only the lines that contains: remote="aosp", and sync the repo with only the aosp code. Or send your default.xml (just copy/paste the contents, and send it in a pm.
sorry for off-topic but @pilu you should be recognized developer

[LOLLIPOP] Xperia AOSP Project

hi all
we have included this device in open devices project
you can check news about project on
http://developer.sonymobile.com/knowledge-base/open-source/open-devices/
feel free to fork, build, fix and push back
Br
J
jerpelea said:
hi all
we have open up gits for Xperia Z,Z1,Z2 devices
http://developer.sonymobile.com/201...-aosp-for-xperia-on-github-video-open-source/
feel free to fork, build and push back
J
XDA:DevDB Information
Xperia AOSP Project, ROM for the Sony Xperia Z1
Contributors
jerpelea
Version Information
Status: Testing
Created 2014-10-16
Last Updated 2014-10-16
Click to expand...
Click to collapse
WHooop Whooop WHHHHOOOOP!! :victory::victory::highfive::fingers-crossed::good::cyclops::victory:
Thank you jerpelea!!!! :victory:
ps; sorry for OT, Just so SUPER excited by this news!!!!!
would this lead to a better generation of AOSP roms for Z1? with good battery and camera functionality?
jerpelea said:
hi all
we have open up gits for Xperia Z,Z1,Z2 devices
http://developer.sonymobile.com/201...-aosp-for-xperia-on-github-video-open-source/
feel free to fork, build and push back
J
XDA:DevDB Information
Xperia AOSP Project, ROM for the Sony Xperia Z1
Contributors
jerpelea
Version Information
Status: Testing
Created 2014-10-16
Last Updated 2014-10-16
Click to expand...
Click to collapse
Like the guy above me asked. How does the camera react on this one? Same functionality? Or loss of important parts like bionz etc..
Very Nice
Read somewhere that modem and camera are disabled.
So we can't know how the camera react at this moment.
Thank you very much! Will such devices as amami, togari etc. be added too?
Attention: "For example, the camera is not working and the modem is not enabled, which means you cannot make phone calls."
Von meinem Sony Xperia Z1 gesendet. Mit Hirn.
Please @jerpelea can you put up a tut for building this! :crying:
I have downloded the source, and setup the build environment like you said on github but having issues with the final out directory.
It builds 100%, no issues whatsover, but mkbootimg fails to build the boot.img and it doesnt build the system.img :crying: I only have the userdata.img, kernel, and a system folder (others as well but these three are the important ones, oh theres also the ramdisk.img as well)
I have tried compiling the system folder using mkfs.yaffs2 to a system.img file and that flashes fine, userdata.img flashes too but the kernel I have tried a few combos and I can flash the boot.img file using files I have compiled before but it never boots. Its hard to see whats going on because I think the system folder never flashes properly so I dont have access to adb or anything. Its hard to trouble shoot this as well because it "bricks" my device everytime and its time consuming getting it up and running again. The build.prop looks fine and all folders in system folder look spot on but I am clearly missing something. I tried the fastboot flashall as well but that didtnt do anything, it gives me an error saying something about it must be an OUT_DIRECTORY... or something (yes I have tried it from the out/target/product/honami/ directory but same error, I think its because its looking for a system.img file..)
Please can you give me a kick in the right direction? I have been pulling my hair out trying to flash this but its a no go.
Desperately want to get it up and running (I am prepared to even go a few days without the radio just to test it and I can live without the camera as well)
PS: Sorry for being such a noob!
NanoSurfer said:
Please @jerpelea can you put up a tut for building this! :crying:
I have downloded the source, and setup the build environment like you said on github but having issues with the final out directory.
It builds 100%, no issues whatsover, but mkbootimg fails to build the boot.img and it doesnt build the system.img :crying: I only have the userdata.img, kernel, and a system folder (others as well but these three are the important ones, oh theres also the ramdisk.img as well)
I have tried compiling the system folder using mkfs.yaffs2 to a system.img file and that flashes fine, userdata.img flashes too but the kernel I have tried a few combos and I can flash the boot.img file using files I have compiled before but it never boots. Its hard to see whats going on because I think the system folder never flashes properly so I dont have access to adb or anything. Its hard to trouble shoot this as well because it "bricks" my device everytime and its time consuming getting it up and running again. The build.prop looks fine and all folders in system folder look spot on but I am clearly missing something. I tried the fastboot flashall as well but that didtnt do anything, it gives me an error saying something about it must be an OUT_DIRECTORY... or something (yes I have tried it from the out/target/product/honami/ directory but same error, I think its because its looking for a system.img file..)
Please can you give me a kick in the right direction? I have been pulling my hair out trying to flash this but its a no go.
Desperately want to get it up and running (I am prepared to even go a few days without the radio just to test it and I can live without the camera as well)
PS: Sorry for being such a noob!
Click to expand...
Click to collapse
Sent from my GT-I9505 using XDA Free mobile app
Try using the new mkqcdtbootimg repo for kernel building, put it in system/extra. I've compiled successfully with aosp l-preview branch. Haven't tested the compiled rom though
krabappel2548 said:
Sent from my GT-I9505 using XDA Free mobile app
Try using the new mkqcdtbootimg repo for kernel building, put it in system/extra. I've compiled successfully with aosp l-preview branch. Haven't tested the compiled rom though
Click to expand...
Click to collapse
Thank you Sir!!! Yes! :highfive: That makes perfect sense! *doh* :silly: (i feel silly now)
Will try that. Really appreciate it!!! Thank you for the heads up and responding :good:
@NanoSurfer did you manage to build boot.img after copying the repo source to system/extras/ ? I wasn't able to Let me know if you did. I must be doing something wrong
tejaswi.rohit said:
@NanoSurfer did you manage to build boot.img after copying the repo source to system/extras/ ? I wasn't able to Let me know if you did. I must be doing something wrong
Click to expand...
Click to collapse
Hey bro
Nope. I put mkqcdtbootimg in my /bin folder so I could execute it from anywhere but it still wouldnt work (by the way, you have to compile mkqcdtbootimg using "make mkqcdtbootimg", wish someone told me that before ). So I compiled the kernel seperately and got a boot.img, put that in /out folder and tried fastboot flashall, nope no go. Useless.
I cannot make a system.img during compile time! I managed to make a system.img though by executing "make snod". I tried flasing that, with my userdata.img, boot.img, system.img. NOPE ,ALWAYS BRICKS!!!! Arrrgh!!!! Wtf?? Btw fastboot flashall simply does not work.
Anyway, I wish I knew how @jerpelea did it because I have tried EVERYTHING! Im super frustrated by this because it seems there is either
a) critical stuff missing to succesfully build.
b) information is way to vague.
Ive wasted a lot of time on this and Im getting tired of having to recover my phone everytime. So do yourself a favour bro and rather leave this until a proper tut is posted or someone can explain the steps in more detail.
Cheers
NanoSurfer said:
Hey bro
Nope. I put mkqcdtbootimg in my /bin folder so I could execute it from anywhere but it still wouldnt work (by the way, you have to compile mkqcdtbootimg using "make mkqcdtbootimg", wish someone told me that before ). So I compiled the kernel seperately and got a boot.img, put that in /out folder and tried fastboot flashall, nope no go. Useless. ............
Cheers
Click to expand...
Click to collapse
@NanoSurfer I compiled the ROM successfully and flashed it too. It booted up just fine. This is what I did.
I downloaded the sources of mkqcdtbootimg and then extracted the openssl libraries from Android Source and placed it in the mkqcdtbootimg source folder (place it inside libdtd folder too, not sure of the exact folder name)and typed "make". Initially I had an error regarding some linker error got it fixed by installing this package libssl-dev I'm running Ubuntu 14.04. Ok, so that resulted me in a mkqcdtbootimg executable. What I realized what while compile the compiler is calling mkbootimg when mkqcdtbootimg isn't there, so I renamed mkqcdtbootimg executable to mkbootimg and placed it in out/host/linux-x86/bin . I replaced the original mkbootimg.
Once I did that my compilation went smooth. I got all the required images in the out folder. I tried fastboot flashall that didn't work for me either. So these are the partitions are flashed manually.
1. userdata
2. cache
3. system
4. boot
5. recovery
Crossed my fingers and typed "fastboot reboot" and BAM! it booted right to the home screen
P.S. I have a Xperia Z2. I downloaded the Android Source for 4.4.4_r2 but the blobs seem to be for 4.4.2 as of now at least for Z2 so I had some issues regarding sensors. Going to change my branch and compile again. But other than that the ROM was smooth as silk
Don't give up
tejaswi.rohit said:
@NanoSurfer I compiled the ROM successfully and flashed it too. It booted up just fine. This is what I did.
I downloaded the sources of mkqcdtbootimg and then extracted the openssl libraries from Android Source and placed it in the mkqcdtbootimg source folder (place it inside libdtd folder too, not sure of the exact folder name)and typed "make". Initially I had an error regarding some linker error got it fixed by installing this package libssl-dev I'm running Ubuntu 14.04. Ok, so that resulted me in a mkqcdtbootimg executable. What I realized what while compile the compiler is calling mkbootimg when mkqcdtbootimg isn't there, so I renamed mkqcdtbootimg executable to mkbootimg and placed it in out/host/linux-x86/bin . I replaced the original mkbootimg.
Once I did that my compilation went smooth. I got all the required images in the out folder. I tried fastboot flashall that didn't work for me either. So these are the partitions are flashed manually.
1. userdata
2. cache
3. system
4. boot
5. recovery
Crossed my fingers and typed "fastboot reboot" and BAM! it booted right to the home screen
P.S. I have a Xperia Z2. I downloaded the Android Source for 4.4.4_r2 but the blobs seem to be for 4.4.2 as of now at least for Z2 so I had some issues regarding sensors. Going to change my branch and compile again. But other than that the ROM was smooth as silk
Don't give up
Click to expand...
Click to collapse
Ahhhhhh dude!!! A 1000 thanks to you mate!!! :highfive: YESSS VICTORY! :victory: She works... FINALLY :victory:
Man THANK YOU!!! I love you bro! :laugh: You made my day :good:
And a SPECIAL thanks to @jerpelea!!!!! Flip it was painful trying to figure this out but finally I've got it. I owe you @tejaswi.rohit
NanoSurfer said:
Ahhhhhh dude!!! A 1000 thanks to you mate!!! :highfive: YESSS VICTORY! :victory: She works... FINALLY :victory:
Man THANK YOU!!! I love you bro! :laugh: You made my day :good:
And a SPECIAL thanks to @jerpelea!!!!! Flip it was painful trying to figure this out but finally I've got it. I owe you @tejaswi.rohit
Click to expand...
Click to collapse
Congratulations @NanoSurfer Glad I could help How's the build ? Do you face any issues regarding screen brightness,rotation, sound and mobile network ? Those were the problems I had on my 4.4.4 build
tejaswi.rohit said:
Congratulations @NanoSurfer Glad I could help How's the build ? Do you face any issues regarding screen brightness,rotation, sound and mobile network ? Those were the problems I had on my 4.4.4 build
Click to expand...
Click to collapse
Same issues as you here are the problems I found:
1) mobile network broken
2) wifi not working
3) screen rotation not working
4) sound not working
5) brightness slider has no affect
6) internal storage showing as about 70mb
7) phone resets when restarted (like it does a factory wipe)
8) camera broken
9) Bluetooth broken
I managed to get the sound working though by flashing the aosp kernel from Sony's github I think I can fix wifi as well because I compiled the prima module, but I couldn't push it to system/lib as adb wouldn't allow it (read only file system) I'm still trying to figure out how to compile that module inline.
I think a lot of the problems are kernel related.
Interestingly tho, the performance is way better than I expected! Graphics and scrolling are very smooth.
Busy working on the issues. Will let you if I make any breakthroughs
I think I fixed the sound, just busy doing another build to test a few more things...
I'm struggling though to get the sim to work :crying: Also trying to fix wifi but I'm crossing fingers that the build I'm doing at the moment fixes that :fingers-crossed:
By the way, I was wrong previously about a few things, the data partition is actually displaying 100% correct and it doesn't reset after each boot. However, this was happening to me after I flashed a boot.img I compiled, I think maybe because I used a stock ramdisk Im just guessing but I don't know why. The kernel it builds with works just fine. If the next build is ok, I will post my device config files for others to play around with...
krabappel2548 said:
Sent from my GT-I9505 using XDA Free mobile app
Try using the new mkqcdtbootimg repo for kernel building, put it in system/extra. I've compiled successfully with aosp l-preview branch. Haven't tested the compiled rom though
Click to expand...
Click to collapse
working on the guide
br
J
to be able to build kernel you need
cd build && git cherry-pick 612e2cd0e8c79bc6ab46d13cd96c01d1be382139 && cd ..
before building
br
J
tejaswi.rohit said:
@NanoSurfer I compiled the ROM successfully and flashed it too. It booted up just fine. This is what I did.
I downloaded the sources of mkqcdtbootimg and then extracted the openssl libraries from Android Source and placed it in the mkqcdtbootimg source folder (place it inside libdtd folder too, not sure of the exact folder name)and typed "make". Initially I had an error regarding some linker error got it fixed by installing this package libssl-dev I'm running Ubuntu 14.04. Ok, so that resulted me in a mkqcdtbootimg executable. What I realized what while compile the compiler is calling mkbootimg when mkqcdtbootimg isn't there, so I renamed mkqcdtbootimg executable to mkbootimg and placed it in out/host/linux-x86/bin . I replaced the original mkbootimg.
Once I did that my compilation went smooth. I got all the required images in the out folder. I tried fastboot flashall that didn't work for me either. So these are the partitions are flashed manually.
1. userdata
2. cache
3. system
4. boot
5. recovery
Crossed my fingers and typed "fastboot reboot" and BAM! it booted right to the home screen
P.S. I have a Xperia Z2. I downloaded the Android Source for 4.4.4_r2 but the blobs seem to be for 4.4.2 as of now at least for Z2 so I had some issues regarding sensors. Going to change my branch and compile again. But other than that the ROM was smooth as silk
Don't give up
Click to expand...
Click to collapse

Categories

Resources