[ Guide ]Compiling WORKING 64 bit Android Kernel [ Le2 ] [ NOOB Friendly ] - LeEco Le 2 Guides, News, & Discussion

This is My first guide on XDA
From the day I owned Le2 I always wished to compile my own kernel. I searched on the web for compiling 64bit android kernel but didn't get satisfying results. So I did some research and asked some android developers, I got help from some developers but some of the developer refused may be due to their attitude or may be they didn't want to share their ideas / knowledge. So i saw some kind devs trying things out for our device.Then we created a team ,and i met really kind and expert developers there.Later leeco released the kernel sources.People claimed it was not working.But our team worked too hard to get it work.
What will you need :
1. Ubuntu 64 Bit OS
2. Good Internet Connection.
3. Basic Knowledge of Linux.
4.A little common sense
Lets Start
First we need to get some important stuff / tools / software .
1. Open Ubuntu Software center and install JDK 7 or JDK 8
2. Open terminal and run the following command
Code:
sudo apt-get install libncurses5-dev
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
sudo apt-get install -y ccache &&echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc &&source ~/.bashrc && echo $PATH
Code:
export USE_CCACHE=1
Code:
mkdir ~/bin
Code:
export PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Now ur'r Linux machine is all set to compile kernel.
3. Now you need to download a toolchain.Use any 64 bit compatible toolchain .In my case i am using uber toolchain "aarch-linux-android-4.9"
create a folder kernel
now
type
Code:
cd kernel
Code:
git clone https://bitbucket.org/UBERTC/aarch64-linux-android-4.9.git
4. Time to download Kernel sources. For this tutorial I am using our team's kernel source. Here is the link for our sources > h t t p s ://github.com/s2-devs/android_kernel_leeco_msm8976
.Select branch as stock-6.0 from left and press download on the right.
5. place both this zip in "kernel" directory which we made in previous step.
6. Extract the zip in the "kernel". Now you will have two folders one of toolchain and other of kernel source.
7. Open the kernel source folder and type the following code.
9. Run the following command to point the variable to toolchains path :
in my case:
Code:
export CROSS_COMPILE=/home/Bh-singhal/kernel/aarch64-linux-android-4.9/bin/aarch64-linux-android-
If you followed along with me you will just have to change the name of the user ( replace <Bh-singhal> with <ur's username> )
10. Time to Compile your kernel :
Code:
export ARCH=arm64
Code:
make s2-perf_defconfig
The name of defconfig file may be different in future check it in "kernel/le2skernelsource/arch/arm64/defconfig/"
Now the final command make. It takes a parameter -jn. Where ( n = # of threads per core + 1 )
I have a Dual core processor with 2 thread per processor so for me it is " make -j3 ".
Code:
make -j3
Now sit back and relax.......let the kernel compile
Got a compilation error ?
Post it here.
NOW FINAL STEP
DUE TO WHICH MANY PEOPLE DID NOT GET KERNEL BOOTING
3. Open "kernel/le2kernelsource/arch/arm64/boot/".
4. Copy "Image.gz-dtb".
5. now take a stock boot.img of current firmware that u r using.
6. unpack the stock boot.img,search on google for that
7. after unpacking you will see various unpacked files of stock boot.img
delete the file named kernel.gz
and paste Image.gz-dtb there.
8.rename Image.gz-dtb to kernel.gz
9.Repack the kernel
10.u will have a newer boot.img
Edit: For those who do not get Image.gz in their unpacked Stock Boot.img, use the Unpacker Tool in the Downloads Section
Click to expand...
Click to collapse
11. Flash it using twrp or fastboot
Code:
fastboot flash boot kernelfilename.img
all done
12.Clap for yourself and a salute from me
13.READ the next post for more things
Credits:
Our Team:
Brawn_Sg
Rishabh Rao
13THWARRIOR
Testers:
Lakshay Taneja (@Lakku)
Jignesh Jain (jhakjhuk1853)
Have Fun!
XDA:DevDB Information
Kernel compiling guide for le 2, Kernel for the LeEco Le 2
Contributors
Brawn_Sg, Rishabh Rao, 13THWARRIOR, sadiqdev, jhakjhuk1853 and Lakku
Source Code: https://github.com/s2-devs/android_kernel_leeco_msm8976
Kernel Special Features:
Version Information
Status: Stable
Created 2016-12-04
Last Updated 2016-12-05

Reserved
guys tell me if you get any problem or error
i and our team will help
do share your progress on this thread
and whenever you use our kernel source do give us credits
ADDITIONAL THANKS to @TeamMex (My inspiration) for helping me everytime i got any error and teaching we how to develop things.

Reserved

Awesome work bro.. Really appreciate your hard work!!!??

Great
Sent from my Le X526 using XDA-Developers mobile app

Great work fella!!
Really nice to see development going on for Le-2.
Questions ->
- Isn't our device octacore
- for the command 'make -jn', shouldn't 'n' be 'no. of cores *2'; like for dual core 'n' should be 4
---------- Post added at 12:47 AM ---------- Previous post was at 12:36 AM ----------
How you got the kernel source working?
This guide is still pending.

Good job mate

Appreciate your knowledge and hardwork. Thank you very much .

[email protected] said:
Great work fella!!
Really nice to see development going on for Le-2.
Questions ->
- Isn't our device octacore
- for the command 'make -jn', shouldn't 'n' be 'no. of cores *2'; like for dual core 'n' should be 4
---------- Post added at 12:47 AM ---------- Previous post was at 12:36 AM ----------
How you got the kernel source working?
This guide is still pending.
Click to expand...
Click to collapse
Thanks from Brawn_Sg and our Team.
1. Our Device is octacore but while building/compiling u dont give no. of cores in phone, that make -j"n" is the number of cores in pc's processor +1 or 2.
2. We Got the kernel working by our hard work and its fully tested now.
3. This Guide is fully completed and working. It is not pending......:good::good::good:
---------- Post added at 11:21 PM ---------- Previous post was at 10:48 PM ----------
Check out the TWRP made from these Kernel Sources Here: http://forum.xda-developers.com/le-2/development/twrp-3-0-2-0-s2-built-source-custom-t3512723

Brawn_Sg said:
This is My first guide on XDA [emoji14]
From the day I owned Le2 I always wished to compile my own kernel. I searched on the web for compiling 64bit android kernel but didn't get satisfying results. So I did some research and asked some android developers, I got help from some developers but some of the developer refused may be due to their attitude or may be they didn't want to share their ideas / knowledge. So i saw some kind devs trying things out for our device.Then we created a team ,and i met really kind and expert developers there.Later leeco released the kernel sources.People claimed it was not working.But our team worked too hard to get it work.
What will you need :
1. Ubuntu 64 Bit OS
2. Good Internet Connection.
3. Basic Knowledge of Linux.
4.A little common sense
Lets Start
First we need to get some important stuff / tools / software .
1. Open Ubuntu Software center and install JDK 7 or JDK 8
2. Open terminal and run the following command
Code:
sudo apt-get install libncurses5-dev
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Code:
sudo apt-get install -y ccache &&echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc &&source ~/.bashrc && echo $PATH
Code:
export USE_CCACHE=1
Code:
mkdir ~/bin
Code:
export PATH=~/bin:$PATH
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Now ur'r Linux machine is all set to compile kernel.
3. Now you need to download a toolchain.Use any 64 bit compatible toolchain .In my case i am using uber toolchain "aarch-linux-android-4.9"
create a folder kernel
now
type
Code:
cd kernel
Code:
git clone https://bitbucket.org/UBERTC/aarch64-linux-android-4.9.git
4. Time to download Kernel sources. For this tutorial I am using our team's kernel source. Here is the link for our sources > h t t p s ://github.com/s2-devs/android_kernel_leeco_msm8976
.Select branch as stock-6.0 from left and press download on the right.
5. place both this zip in "kernel" directory which we made in previous step.
6. Extract the zip in the "kernel". Now you will have two folders one of toolchain and other of kernel source.
7. Open the kernel source folder and type the following code.
9. Run the following command to point the variable to toolchains path :
in my case:
Code:
export CROSS_COMPILE=/home/Bh-singhal/kernel/aarch64-linux-android-4.9/bin/aarch64-linux-android-
If you followed along with me you will just have to change the name of the user ( replace <Bh-singhal> with <ur's username> )
10. Time to Compile your kernel :
Code:
export ARCH=arm64
Code:
make s2-perf_defconfig
The name of defconfig file may be different in future check it in "kernel/le2skernelsource/arch/arm64/defconfig/"
Now the final command make. It takes a parameter -jn. Where ( n = # of threads per core + 1 )
I have a Dual core processor with 2 thread per processor so for me it is " make -j3 ".
Code:
make -j3
Now sit back and relax.......let the kernel compile
Got a compilation error ?
Post it here.
NOW FINAL STEP
DUE TO WHICH MANY PEOPLE DID NOT GET KERNEL BOOTING
3. Open "kernel/le2kernelsource/arch/arm64/boot/".
4. Copy "Image.gz-dtb".
5. now take a stock boot.img of current firmware that u r using.
6. unpack the stock boot.img,search on google for that
7. after unpacking you will see various unpacked files of stock boot.img
delete the file named kernel.gz
and paste Image.gz-dtb there.
8.rename Image.gz-dtb to kernel.gz
9.Repack the kernel
10.u will have a newer boot.img
11. Flash it using twrp or fastboot
Code:
fastboot flash boot kernelfilename.img
all done
12.Clap for yourself and a salute from me [emoji14]
13.READ the next post for more things
Credits:
Our Team:
Brawn_Sg
Rishabh Rao
13THWARRIOR
Testers:
Lakshay Taneja (@Lakku)
Jignesh Jain (jhakjhuk1853)
Have Fun!
XDA:DevDB Information
Kernel compiling guide for le 2, Kernel for the LeEco Le 2
Contributors
Brawn_Sg, Rishabh Rao, 13THWARRIOR, sadiqdev, jhakjhuk1853 and Lakku
Source Code: https://github.com/s2-devs/android_kernel_leeco_msm8976
Kernel Special Features:
Version Information
Status: Stable
Created 2016-12-04
Last Updated 2016-12-05
Click to expand...
Click to collapse
I really appreciate your work bro ....
But no news for letv 1S
Sent from my Le X507 using Tapatalk

So Are you Working on Any Rom??? if Yes which then which one?? AOSP or CM??

Rishabh Rao said:
Thanks from Brawn_Sg and our Team.
1. Our Device is octacore but while building/compiling u dont give no. of cores in phone, that make -j"n" is the number of cores in pc's processor +1 or 2.
2. We Got the kernel working by our hard work and its fully tested now.
3. This Guide is fully completed and working. It is not pending......
[/COLOR]Check out the TWRP made from these Kernel Sources Here: http://forum.xda-developers.com/le-2/development/twrp-3-0-2-0-s2-built-source-custom-t3512723
Click to expand...
Click to collapse
Wanted to know what was the problem with kernel sources provided by LeEco and how you solved it to make working kernel source.

Something is missing over here i Think so ! AFTER 7TH STEP ? DIRECT 9 ? MAY BE TYPING MISTAKE OR SOMETHING MISSING PLEASE CLEAR IT OUT

why this error ?

mF^ said:
why this error ?
Click to expand...
Click to collapse
hey
i m assuming that u have followed all my steps properly
in kernel folder u also have the le s2 kernel source floder
being cd in kernel folder
cd to s2 kernel source folder
and then type the commands
which u typed and were getting error
thanks
.......press thanks if i helped............

Can you tell the amount of data we have to download?
Sent from my Redmi Note 3 using Tapatalk

boot.img
how to pull boot.img form mobile devices

First of all great job bro...
Bro I am stuck at boot loop .. please help ... I followed all the steps strictly... And also tried many times on Ubuntu:amd64 and Kali Linux : amd64 .... I compiled successfully but stuck at boot loop .. I extracted boot IMG from latest full update zip file of 5.8.019s eui ... Pls help I also tried other toolchains... But no help

Not getting working kernel i think anything is missing ;(

Awesome work @Brawn_Sg, @rishav Rao
I was wondering whether my Le 2 will have developer community support as my Mi3W, waiting for Roms.

Related

{Guide} [HOW TO]Building CM11 from source for i9082/L

Here are the steps to build your own kernel from source. This guide is showing you how to build your first the stock kernel on your own..... It is kick start for making things on your own way....
This guide applies to i9082/i9082L and general devices also.:laugh:
This guide assumes you have basic knowledge of linux and linux system configuration.
Prerequisites
Quote:
HTML:
1. Ubuntu 13.10 / BBQLINUX (I personally use this)
2. patience...lots and lots of patience.
Here starts the fun:-
1. Installing ubuntu 13.10.
Quote:
This can be done in 3 ways and I am not gonna cover it all.
- along with windows ,i.e dual boot
- in virtualbox within windows
- as a windows application installation with "wubi" installer
For starting user i think second option, i.e installing in virtualbox is best.
here's starting tutorials
http://www.youtube.com/watch?v=tDDRFiwHujg
NOTE - you should have atleast 100 Gb partion for virtualbox.
2. Setting up building environment.
PHP:
THIS ALL BELOW STEPS ARE NOT NEEDED IF YOU HAVE INSTALLED BBQLINUX, BUILDING ENVIRONMENT IS SET IN BBQLINUX BY DEFAULT. IT WORKS OUT-OF-THE-BOX.
Initializing a fresh Android Build Environment in Ubuntu 13.10 sucks, right? The instructions at the AOSP page are outdated and inaccurate. Near as I can tell, they try to have you install 2 JDKs, the first one not even being the correct link for Saucy Salamander, and the second being OpenJDK. Which might work. But I dunno about all that, I’d rather have Oracle’s official stamp when it comes to building for Android.
Currently most of the guides are up to 12.04 LTS, which is fine and dandy, but being on the cutting edge is nice too.
This guide applies to all variations of Ubuntu 13.10 Saucy Salamander 64 bit. Do not use the 32 Bit version. Also, PAY CLOSE ATTENTION when to use “sudo” and when to not. It can make things funky if you do something as root that you shouldn’t.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
First, let’s set up the correct JDK.
Many of you probably have some kind of wrong Java installed unless you’re starting with a fresh Ubuntu base, and even then maybe.
Let’s get rid of that. Copy and paste this into a Terminal window:
Code:
PHP:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Follow the instructions to remove OpenJDK.
If you must keep it, it’s possible. But I’m not going to tell you how to do it here. I don’t want any chance of confusion or mistake.
Now copy and paste the following into the Terminal:
Code:
PHP:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 13.10.
No more unrecognized Java version errors! And it will update automatically with the rest of your system.
Next, we actually need to install the package. More copy-paste:
Code:
PHP:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the on-screen instructions. You have to Accept the Licensing Agreement to complete the install. Hopefully no human centipede clauses.
Let’s make sure the correct version of Java is activated, run the following Terminal command:
Code:
PHP:
java -version
You should see something like the following:
Code:
PHP:
java version “1.6.0_45″ Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu:
Code:
PHP:
sudo apt-get install git-core gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
When that is done installing, run the following command in your Terminal window:
Code:
PHP:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That’s it on the package side of things.
You guessed it, time for more Terminal. This really is the easiest way, seriously. And it’s totally worth it when you’re basking in the glory of a bunch of people on XDA.
The binary for a program called “repo” will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:
Code:
PHP:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to open ~/.bashrc
I like nano:
Code:
PHP:
sudo nano ~/.bashrc
At the very bottom, add the following line:
Code:
PHP:
export PATH=~/bin:$PATH
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
PHP:
source ~/.bashrc
That should be everything. Now you’re ready to build Android the right way. Luck!
3. Downloading source
Open terminal
To initialize your local repository using the CyanogenMod trees, use a command like this:
HTML:
mkdir cm11
cd cm11
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
Create local_manifest.xml in .repo folder.
PHP:
cd .repo
nano local_manifest.xml
Paste following into the terminal
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/samsung/i9082" name="pawitp/android_device_samsung_i9082" remote="github" revision="cm-11.0" />
<project path="vendor/samsung/i9082" name="k2wl/android_vendor_samsung_i9082" remote="github" revision="master" />
<project path="kernel/samsung/i9082" name="pawitp/android_kernel_samsung_i9082" remote="github" revision="cm-11.0" />
</manifest>
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash.
Then to sync up:
HTML:
repo sync -j#
# is number of jobs you want to give for your downloading source. I use 2.
Download gonna be huge. Approx 12-15 GB.
So its gonna take while depending upon your internet connection.
You may get errors while downloading, like
HTML:
Sync exited due to fetch errors
Just restart download by
HTML:
repo sync
4. Starting Building process
PHP:
. build/envsetup.sh && time brunch i9082 -j#
Again # is meant for No. of CPU cores you have.
Building gonna take time, depending upon your computer configuration.
Any errors, post here.
I will try my best to solve problems .
Start building your own CM11...
Any suggestion welcome.
reserved for future use.
one more
Just last in case
THANKS K2wl for this amazing guide.
k2wl said:
Here starts the fun
Click to expand...
Click to collapse
Wow that's a really good guide.
You make building from a ROM/Kernel from source much simpler than it should be.
I just replaced my 12.04 LTS with 13.10 last night, was wondering if I shouldn't have, but if it's working good for your development, think I'll keep it for a while. And yes, building a fresh android build environment sucks
I'm new to android development, but so far the linux, java and php code seems mostly regular. Gonna start with kernel first, then maybe try my hand on building a ROM. Thank you for the guide! :good:
iceyhotguy said:
Wow that's a really good guide.
You make building from a ROM/Kernel from source much simpler than it should be.
I just replaced my 12.04 LTS with 13.10 last night, was wondering if I shouldn't have, but if it's working good for your development, think I'll keep it for a while. And yes, building a fresh android build environment sucks
I'm new to android development, but so far the linux, java and php code seems mostly regular. Gonna start with kernel first, then maybe try my hand on building a ROM. Thank you for the guide! :good:
Click to expand...
Click to collapse
Good. Thats the spirit.
keep 13.10. its good.
i switched to BBQLINUX just few days, until earlier i was using 13.10.
kernel develpment is not much hussle.
just be sure...dont add features which make kernel unstable.
i statred with kernel development only...:good::laugh:
and then come to ROM development.
best luck..
if any queries regarding kernel or ROM development, just ask me...i am here to help.
this can be used to build other roms too right .... by just changing the github repo to the rom u wanna build
One more question, how to apply patches?
But, k2wl.
This method builds an Odin flashable file.
How to make flashable zips, which can be flashed through custom recoveries.????
Sent from my iPhone using Tapatalk
rutvikrvr said:
this can be used to build other roms too right .... by just changing the github repo to the rom u wanna build
Click to expand...
Click to collapse
yes its gonna be useful to build other AOSP based roms. like PA,AOKP,OMNI,AICP etc... just need few modifications according to respective roms.
black87 said:
One more question, how to apply patches?
Click to expand...
Click to collapse
copy the patch file to respective directory and apply patch with following command.
HTML:
patch -p1 < patch.diff
eg. if you want to apply bluetooth patch and ur patch name is fixbluetooth.diff
then
HTML:
cd hardware/broadcom/libbt/
git checkout .
patch -p1 < fixbluetooth.diff
if any problems plz tell me..
Ateekujjawal said:
But, k2wl.
This method builds an Odin flashable file.
How to make flashable zips, which can be flashed through custom recoveries.????
Sent from my iPhone using Tapatalk
Click to expand...
Click to collapse
It builds flashable zips only ......with CWM or any other....
@k2wl im getting this error http://pastebin.com/uLy1MGew
rutvikrvr said:
@k2wl im getting this error http://pastebin.com/uLy1MGew
Click to expand...
Click to collapse
check slimrom's github source. instructions are given there.
also @k2wl said that you have to make some other modifications.
Did you try the breakfast command???
rutvikrvr said:
@k2wl im getting this error http://pastebin.com/uLy1MGew
[email protected]:~/slimrom$ . build/envsetup.sh && time brunch i9082 -j4
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including vendor/slim/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/slim/vendorsetup.sh
ls: cannot access device/*/i9082/slim.mk: No such file or directory
build/core/product_config.mk:231: *** Can not locate config makefile for product "slim_i9082". Stop.
Device i9082 not found. Attempting to retrieve device repository from SlimRoms Github (http://github.com/SlimRoms).
Repository for i9082 not found in the SlimRoms Github repository list. If this is in error, you may need to manually add it to .repo/local_manifests/slim_manifest.xml
ls: cannot access device/*/i9082/slim.mk: No such file or directory
build/core/product_config.mk:231: *** Can not locate config makefile for product "slim_i9082". Stop.
** Don't have a product spec for: 'slim_i9082'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
real 0m22.876s
user 0m0.219s
sys 0m0.087s
Click to expand...
Click to collapse
your device folder points to device named cm_i9082, not slim_i9082. thats why.
jst open cm.mk file in device/samsung/i9082 cm.mk and edit its content to slim.
means
if it says in the line cm_i9082 change it to slim_i9082.
save it.
rename the file to slim.mk
and change one more file which will point to slim.mk
i.e androidproducts.mk
change the
HTML:
PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/device_i9082.mk
to
HTML:
PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/slim.mk
after that one more file to be created.
slim.dependencies.
just rename cm.dependencies to slim.dependencies.
and then try that command again.
i am attaching files for you.
jst replace them. or edit as you like.
---------------------------------------------------------------------------------------------------------------------
good to know some one started something.
you downloaded source. thats great....keep up... i will help you as much as i can....
rutvikrvr said:
@k2wl im getting this error http://pastebin.com/uLy1MGew
Click to expand...
Click to collapse
Or simply use i9082 device tree for SlimROMs from my Github. I have made all the necessary changes.
xenon92 said:
Or simply use i9082 device tree for SlimROMs from my Github. I have made all the necessary changes.
Click to expand...
Click to collapse
yep....that will do....
but i think untill and unless he do it himself, he wont understand....
@xenon92 as k2wl is saying.. Il try on my own first otherwise I'll use ur device tree if I'm not able to do it at all... Thanx fr the reply.
Sent from my GT-I9082 using XDA Premium 4 mobile app
EDIT: ITS STARTED BUILDING ..THANX FR THE SUPPORT
rutvikrvr said:
@xenon92 as k2wl is saying.. Il try on my own first otherwise I'll use ur device tree if I'm not able to do it at all... Thanx fr the reply.
Sent from my GT-I9082 using XDA Premium 4 mobile app
EDIT: ITS STARTED BUILDING ..THANX FR THE SUPPORT
Click to expand...
Click to collapse
thats the spirit of learning...keep up...
one more error http://pastebin.com/wcuPHsi0 ..pl help
device/samsung/i9082/overlay/frameworks/base/core/res/res/values/config.xml
just edit this file and delete line number 34,199,205. and save it.
just restart building again.

Guide: How To Build Your Own Stock AOSP For Your Nexus 7 (2013) KVT49L

PHP:
Guide: How To Build AOSP From Source With Linux Mint 16 - Nexus 7 (2013) KVT49L
Important Note: Do NOT use Linux Mint 16 KDE to do this guide, it will seriously mess up your programs menu when you remove the old Java. This guide has been tested and is working on Linux Mint 16 Cinnamon and Linux Mint 16 MATE
Got the KVT49L repos working and guide is updated to reflect this. This build includes several bug fixes from the KOT49H build but it is NOT 4.4.3, just an updated version of 4.4.2.
I started this guide as I could not find a step by step detailed guide to build a stock AOSP from source with Linux Mint 16.
All the steps should work in Ubuntu but I haven't tried so not 100% sure of that.
All this assumes your tablet is already unlocked.
Here goes:
Important note: Anything that is bolded text other then section titles are command line entries that are done in Terminal in Linux Mint. I thought it would be simpler to do it this way then say 'in Terminal' for every entry.
First we need to remove Icedtea Java or OpenJDK.
In Terminal: sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Then in Terminal: sudo add-apt-repository ppa:webupd8team/java
Next: sudo apt-get update && sudo apt-get install oracle-java6-installer
Be sure to accept the licence agreement to install java when it prompts you.
Next: sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
Follow this with: sudo apt-get install -f
This should fix any dependency errors.
Now: sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Next download the SDK Tools For Linux x64 from this link. https://developer.android.com/sdk/index.html
Then: cd ~/Downloads
And: tar -xvf android-sdk_r22.6.2-linux.tgz
or tab the latest 'android-sdk_xxx.tgz file it they update it and it is a newer version then the one I downloaded to do this.
You can rename the android.sdk_xxx.tgz folder you extracted to SDK.
Then: cd ~/Downloads/SDK/tools
Next: ./android sdk
It will show you the tools that can be installed, just install the highest version API of 'Platform Tools' and 'Tools' for the latest android version '4.4.x' it shows.
Make sure you install the repo tool, in Terminal:
With: mkdir ~/bin
Then: curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
And: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Now: sudo chmod a+x ~/bin/repo
Now sudo nano ~/.bashrc
Add this to the bottom of the text: export PATH=~/bin:$PATH
Then hit Ctrl-O and enter, it should say it saved the file followed by Ctrl-X to exit.
Then restart bash: source ~/.bashrc
Now lets Initialize the Repository for GIT configuration
First : git config --global user.name {Your Name}
Then: git config --global user.email {[email protected]}
If you have not registered with the GitHub website just doing these two steps works fine.
If you have registered with the GitHub website create a file called .netrc in your home directory, add your GitHub password to it with no spaces on the first line and change the permissions to '600' or you will have to continually authenticate when building the source.
In Terminal:nano ~/.netrc
Then add just your GitHub password (like I said you only need to do this if you have registered with GitHub).
Then 'Ctrl-O' and enter and it'll say it saved it, then 'Ctrl-X' to exit nano.
And then: chmod 0600 ~/.netrc
Now: mkdir ~/AOSP
Then: cd ~/AOSP
Now you get the source code etc: repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.2_r2
Then do in Terminal : repo sync -j12
Use repo sync -j12 for a quad core CPU or Intel I5 or if you have say an quad core I7 with 8 threads you can use repo sync -j24 to speed things up etc.
I have a I7 3930k with 12 threads so I used repo sync -j36. This gives you three threads per logical CPU and speeds things along quite well.
It may take several hours for the sync to finish.
After the sync finishes go to https://developers.google.com/android/nexus/drivers#razorkot49h and download the drivers (binaries) for the Nexus 7 (Wi-fi). You do need to use the KOT49H binaries and they work fine with the KVT49L build.
In Terminal: cp ~/Downloads/asus-flo-kot49h-a9532596.tgz ~/AOSP
Then: cp ~/Downloads/broadcom-flo-kot49h-c33beb3d.tgz ~/AOSP
And: cp ~/Downloads/qcom-flo-kot49h-f92d75b1.tgz ~/AOSP
In Terminal: tar -xvf asus-flo-kot49h-a9532596.tgz
And: tar -xvf broadcom-flo-kot49h-c33beb3d.tgz
Then: tar -xvf qcom-flo-kot49h-f92d75b1.tgz
If you have closed the Terminal after the sync remember to do: cd ~/AOSP
when you open Terminal again before doing the tar commands.
They should be the file names of the binaries for KOT49H that you are extracting but if for any reason the file names are different use the Tab key and tab the correct names in after 'tar -xvf'.
If the names ARE different I'd really check to make sure you downloaded the correct flo binaries.
Then: ./extract-asus-flo.sh
Now also in Terminal: ./extract-broadcom-flo.sh
And: ./extract-qcom-flo.sh
Hint: It will show you a really long licence agreement for each binary that you scroll by hitting the Enter key that takes forever to scroll one line at a time, it has 8 sections and several subsections. Hold the Enter key until you just get past Part 8, section D of the licence and stop there. Now hit enter a few more time one key stroke at a time until you finish Part 8 section E and see the 'Type 'I ACCEPT' to agree to the licence.' and type I ACCEPT If you just scroll by holding the Enter key all the way to the bottom of the licence you'll get an error you never accepted the licence. Then close Terminal.
Building the Sources
Now open Terminal: cd ~/AOSP
Then: . ./build/envsetup.sh
Now to select the type of device we give the following command: lunch
Choose: 11. aosp_flo-userdebug
by entering '11' or whatever number aosp_flo is after your enter the 'lunch' command (it was number 11 on mine).
Now: make -j12 for a quad core cpu or I5 or make -j24 for an I7 etc.
With your tablet connected to your USB cable and the PC: adb root
Then: adb reboot bootloader
And: cd out/target/product/flo
Lastly: fastboot -w flashall
If you get an error on the 'adb' and 'fastboot' commands do these first:
sudo apt-get install android-tools-adb
and: sudo apt-get install android-tools-fastboot
If you get an error when you fastboot -w flashall to do with a '-p' flag needed or 'android-info.txt' is missing it means you forgot to to the 'lunch' command before building the source. Go back to the 'Building The Sources' section.
If you already have a custom recovery installed like TWRP and would rather build a zip file to install with the recovery rather then flash it in adb instead of make -j12 do: make -j12 otapackage
In the /home/"yourusername"/AOSP/out/target/product/flo you have an aosp_flo-ota-eng.___.zip file to flash in your custom recovery.
You will need to wipe/reset data your in recovery before flashing it and re-install all your apps etc.
Installing Custom Recovery, Rooting and Google Apps
If you want to install a custom recovery download TWRP http://techerrata.com/browse/twrp2/flo
Rename the file in Downloads to recovery.img
Then in Terminal with your tablet connected by USB to your PC: adb root
And: adb reboot bootloader
Then: cd ~/Downloads
And: fastboot flash recovery recovery.img
Use the volume buttons on your phone to scroll onto "Restart Bootloader" and hit the powerbutton to select it. After the bootloader reloads, use the volume buttons to scroll to "Recovery Mode" and hit power button again to select it. You should then be in your custom recovery.
If for any reason you get a red android and no recovery just boot into fastboot mode again and reinstall the recovery.img.
And finally, to root your tablet download SuperSu http://download.chainfire.eu/supersu and install the supersu.zip in recovery mode.
Download PA GAPPS from here http://forum.xda-developers.com/showthread.php?t=2397942 if you want the zip to install Google Apps in recovery.
You now have your own rooted vanilla AOSP you compiled yourself, congrats!
P.S. Very likely a good idea wipe/reset data in recovery and start with a clean install, you'll need to install all your programs and stuff anyways I'm sure.
P.P.S.I did download and install the XPOSED Framework apk http://forum.xda-developers.com/showthread.php?t=1574401 after I put AOSP on my tablet so I could install Advanced Power Menu and some other add-ons like Boot Manager and Greenify. As well I installed a custom kernel with Faux Sound and Faux Kernel enhancements.
I think for the download repo tool section you only need the second (commondatastorage) one. The first one no longer works.
Other than that, it looks pretty good.
Awesome thanks!!!
Sent from my Nexus 7 using Tapatalk
meekrawb said:
I think for the download repo tool section you only need the second (commondatastorage) one. The first one no longer works.
Other than that, it looks pretty good.
Click to expand...
Click to collapse
Yeah, you're right, I checked into it.
Thanks!!
I updated the guide and removed that.
meekrawb said:
I think for the download repo tool section you only need the second (commondatastorage) one. The first one no longer works.
Other than that, it looks pretty good.
Click to expand...
Click to collapse
Edit: I see the problem with the second curl command, when I save the post it shortens the url in the command with dots and when you copy and paste it it is incorrect and does not download, I'm trying to figure out how to fix it, every time I save the post no matter if I take the url code out or not it shortens it.
Second edit: I figured out a work-around and added it to the guide. It's half baked how I had to do it but at least it's working now.
hey all, sorry if this is off topic, but ive been looking for help everywhere and im about ready to give up, im trying to build evervolv for flo, i've got the source downloaded and im ready to build, the only thing im having trouble with is getting all the propratairy blobs and device spacific files from the n7. is there a way i can just sync up with cyanogenmods device repo or over right the repo that is build into evervolvs source? thanks for any help.
Andromendous said:
hey all, sorry if this is off topic, but ive been looking for help everywhere and im about ready to give up, im trying to build evervolv for flo, i've got the source downloaded and im ready to build, the only thing im having trouble with is getting all the propratairy blobs and device spacific files from the n7. is there a way i can just sync up with cyanogenmods device repo or over right the repo that is build into evervolvs source? thanks for any help.
Click to expand...
Click to collapse
download the binaries and extract them as was shown in the OP.
Then do
make clobber
. build/envsetup.sh
lunch
make (whatever option you decide, otapackage etc)
Make clobber is important because it ensures you start clean and that the binaries will be properly implemented in your rom.
oldsoldier2003 said:
download the binaries and extract them as was shown in the OP.
Then do
make clobber
. build/envsetup.sh
lunch
make (whatever option you decide, otapackage etc)
Make clobber is important because it ensures you start clean and that the binaries will be properly implemented in your rom.
Click to expand...
Click to collapse
ok, i did all that and still get the same error like below. dunno if i mentioned it, but i am trying to build evervolv
EDIT: the option (5) was "aosp_flo-userdebug
KedarWolf said:
Edit: I see the problem with the second curl command, when I save the post it shortens the url in the command with dots and when you copy and paste it it is incorrect and does not download, I'm trying to figure out how to fix it, every time I save the post no matter if I take the url code out or not it shortens it.
Second edit: I figured out a work-around and added it to the guide. It's half baked how I had to do it but at least it's working now.
Click to expand...
Click to collapse
I think you had the "commondatastorage" one right before. It is the "curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo" that doesn't work anymore.
So instead of those two steps, it should be just this one:
Download the Repo tool and ensure that it is executable:
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
I hope that makes more sense.
Great post! Thanks for this!
meekrawb said:
I think you had the "commondatastorage" one right before. It is the "curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo" that doesn't work anymore.
So instead of those two steps, it should be just this one:
Download the Repo tool and ensure that it is executable:
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
I hope that makes more sense.
Click to expand...
Click to collapse
I fixed the second curl command so it works. Not 100% sure you need the first curl command but it does work in Linux Mint 16 and doesn't mess anything up so I left it in.

[GUIDE] Build CM13 from source for the Z5/Z5C/Z5P

The Sony-Kitakami dev team is glad to announce a guide on how to build CM13 or any CM13 based ROM for the entire Z5- series
Note: If you plan to release a ROM using our sources then credits aren't required, however we would deffinately appriciate it very much!
Before we get started
What you need
Any of our supported devices
A PC that is capable of running linux
An Internet connection
And lots of lots of patience
Getting started
Setting up Linux
To be able to build a ROM fully from source a Linux based operating system is required. This is due to the fact that windows is unable to compile the android source code due to lacking tools/libaries. After all you're compiling Linux on Linux (Because android is Linux). We strongly recommend to have AT LEAST 50 GB of space for Ubuntu!!!
Please be aware that this guide is target audiences with Ubuntu specifically and so may not work on other distros. Because of this we prefer ubuntu for everyone that is coming from windows.
Because this guide isn't about how to install ubuntu, I'll let this guide explain all for you : http://www.linuxtechi.com/ubuntu-15-10-desktop-installation-guide/
Installing the required packages
We will start off by downloading openjdk 7 (Note: Open JDK 8 isn't supported by CM yet).
Please open the terminal and enter or copy paste the following :
Code:
sudo apt-get update && sudo apt-get install openjdk-7-jdk
After entering the password (Note: you won't be able to see any output when typing the password) hit enter and then type "y" and hit enter again.
Once this is completed we will download the required packages. Please copy paste the following into your terminal :
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache
libgl1-mesa-dev libxml2-utils xsltproc unzip maven schedtool
You may have to enter your password again after hitting enter. Once that is done enter "y" again and hit enter again.
Additionally you can set up ccache by entering the following into the terminal :
Code:
echo 'export USE_CCACHE=1' >> ~/.bashrc
after this has been done, restart your PC.
Then we will set up git. Replace "Your name" with your name and "[email protected]" with your email :
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Now we will need to set up the repo tool. Copy the following into the terminal:
Code:
mkdir ~/bin && PATH=~/bin:$PATH && echo 'PATH=~/bin:$PATH' >> ~/.bashrc && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Guides
CyanogenMod 13
Getting the CM13 source
Start out by making a directory called cm13 in your home dir by running the following command :
Code:
mkdir ~/cm13/
Now we will initialize the CM13 repository by entering the following in your terminal :
Code:
cd ~/cm13/ && repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
We are now coming to the worst part and that is downloading the entire 20GB big CM13 source code. To sync the source code, run the following command :
Code:
repo sync
And now wait.... and wait..... and wait....... until it's done
Getting the Z5/Z5C/Z5P source
To clone the device specific source code we'll have to introduce you to some of the codenames as those are used for simplifying reasons when building from source
Code:
NAME CODENAME
Sony Xperia Z5 sumire
Sony Xperia Z5 Compact suzuran
Sony Xperia Z5 Premium satsuki
We will start off by cloning the appropriate manifests for your device. Please enter the following and make sure to replace yourdevicecodename with your device codename :
Code:
cd ~/cm13/ && git clone https://github.com/Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-yourdevicecodename .repo/local_manifests
Now we will sync our device specific source like this :
Code:
repo sync --force-sync
This could again take some time depending on your connection as the kernel source is quite heavy.
Building the ROM
We will now get to the big part, which is compiling. Note this could take from 1 hour to more than 10 hours depending on how good your PC is. Replace yourdevicecodename with your targeted device codename.
Please copy the following to your terminal line by line
Code:
cd ~/cm13/
cd .repo/local_manifests/ && git pull && cd ../.. && repo sync --force-sync
. build/envsetup.sh
lunch
cm_yourdevicecodename-userdebug
mka clobber
mka bacon
After a long time of waiting you should be done and your CyanogenMod package should be located in home/cm13/out/target/product/yourdevicecodename/
Congratulations! You have now build your very own CM13 ROM from source!
CyanogenMod 13 based ROMs
If you are planning to build a CM13 based or similar ROM (Bliss Pop, RR, Slim etc.), we're expecting you to be a more advanced user. As much as we would like to give a strict guide, we simply can't cover all as there are always differences between each and every ROM.
You will have to start off by downloading the ROM source. Again this should be similar to CM but the git links are different.
Ex:
Code:
RR = repo init -u [url]https://github.com/ResurrectionRemix/platform_manifest.git[/url] -b marshmallow
Bliss = repo init -u [url]https://github.com/BlissRoms/platform_manifest.git[/url] -b mm6.0
and much more. Most of them can be found on the ROMs official git team under the platform_manifest repo.
Here is where things get hard. You will have to edit our manifests and adjust them to work with your target ROM. This is nearly impossible to explain as each ROM contains different repos that may overlap with the CM ones or it may lack repos that you're trying to remove. In other words, you will need to learn how to use the local manifests. A nice guide exists here https://wiki.cyanogenmod.org/w/Doc:_Using_manifests
Once this is done you will have to adjust your device tree to work with your specific ROM. Again this is always different. The best way to learn is to compare a CM tree with a tree from a different ROM
Ex:
Samsung Galaxy S5 mini tree for CyanogenMod : https://github.com/cm-3470/android_device_samsung_kminilte
Samsugn Galaxy S5 mini tree for BlissPop : https://github.com/cm-3470/android_device_samsung_kminilte/tree/bosp-6
The main differences are the cm.mk or device.mk files etc.
Here is a commit that show the transfer from CM to Bliss Pop which usually isn't very hard
https://github.com/cm-3470/android_...mmit/5e902e7dd228c6804b2735af9a96ea02969aa2cf
Once this is completed you can run your build and release it!
XDA:DevDB Information
How to build CM13 from source for the Z5, ROM for the Sony Xperia Z5
Contributors
CTXz, zacharias.maladroit, Moonbutt74
Source Code: https://github.com/Sony-Kitakami
ROM OS Version: 6.0.x Marshmallow
ROM Firmware Required: Stock Marshmalllow
Based On: CyanogenMod
Version Information
Status: Alpha
Created 2016-04-12
Last Updated 2016-04-15
Reserved
Reserved
Thanks for posting the guide
I followed the steps, but got stuck at the command: "cd ~/cm13/ && git clone [email protected]:Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-sumire"
It returned this to me:
Cloning into 'android_.repo_local_manifests'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
EDIT: Never mind, I investigated, and found out that I had to generate an SSH key and link that to my GitHub account. If anyone needs help with this, I used this guide: https://help.github.com/articles/generating-an-ssh-key/
Uclydde said:
Thanks for posting the guide
I followed the steps, but got stuck at the command: "cd ~/cm13/ && git clone [email protected]:Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-sumire"
It returned this to me:
Cloning into 'android_.repo_local_manifests'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
EDIT: Never mind, I investigated, and found out that I had to generate an SSH key and link that to my GitHub account. If anyone needs help with this, I used this guide: https://help.github.com/articles/generating-an-ssh-key/
Click to expand...
Click to collapse
Hey, sorry for that. I had git set to ssh like and forgot that they require a keygen. I've changed it to https://github.com/Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-yourdevicecodename so it no longer needs a key
Actually, is you are building CM13 and using Ubuntu 14.04 or up, you just need to type:
Code:
sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
Okay, I hit another bump. When I type: "cd .repo/local_manifests/ && git pull && cd ../.. && repo sync --force-sync"
It returns:
bash: cd: .repo/local_manifests/: No such file or directory
zhangyang_haha said:
Actually, is you are building CM13 and using Ubuntu 14.04 or up, you just need to type:
Code:
sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
Click to expand...
Click to collapse
No, you'll be missing quite some packages
Sent from my E5823 using XDA-Developers mobile app
Uclydde said:
Okay, I hit another bump. When I type: "cd .repo/local_manifests/ && git pull && cd ../.. && repo sync --force-sync"
It returns:
bash: cd: .repo/local_manifests/: No such file or directory
Click to expand...
Click to collapse
Ok updated again. Please run this.
cd ~/cm13/ && git clone https://github.com/Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-yourdevicecodename .repo/local_manifests
CTXz said:
Ok updated again. Please run this.
cd ~/cm13/ && git clone https://github.com/Sony-Kitakami/android_.repo_local_manifests.git -b cm-13.0-yourdevicecodename .repo/local_manifests
Click to expand...
Click to collapse
Yay, that worked! However, I got to the "cm_yourdevicecodename-userdebug" line, so I entered "cm_sumire-userdebug", but that returned: "cm_sumire-userdebug: command not found"
Uclydde said:
Yay, that worked! However, I got to the "cm_yourdevicecodename-userdebug" line, so I entered "cm_sumire-userdebug", but that returned: "cm_sumire-userdebug: command not found"
Click to expand...
Click to collapse
This needs a
Code:
repo --sync
in between
Uclydde said:
Yay, that worked! However, I got to the "cm_yourdevicecodename-userdebug" line, so I entered "cm_sumire-userdebug", but that returned: "cm_sumire-userdebug: command not found"
Click to expand...
Click to collapse
When you type lunch it will show a big list of devices and prompt for an input. Enter cm_sumire-userdebug. You can also however run
Code:
lunch cm_sumire-userdebug
Sent from my E5823 using XDA-Developers mobile app
Nice guide, buddy
Binaries have been updated to v5a,
v4 is included in this, can you update please? I did it manually and got it to boot
I'm not able to push them to github.
http://developer.sonymobile.com/downloads/tool/software-binaries-for-aosp-m-android-6-0/
celderic said:
Binaries have been updated to v5a,
v4 is included in this, can you update please? I did it manually and got it to boot
I'm not able to push them to github.
http://developer.sonymobile.com/downloads/tool/software-binaries-for-aosp-m-android-6-0/
Click to expand...
Click to collapse
Is the camera working for you ?
Did the focus improve ? or are still changes needed ?
zacharias.maladroit said:
Is the camera working for you ?
Did the focus improve ? or are still changes needed ?
Click to expand...
Click to collapse
It doesn't work for me with v4, or v5a
Using the guide posted here, nothing changed only updated to v5a manually.
I haven't bothered to look through the log yet, bur it says camera hardware inaccessible or something like that I forget the exact wording. With v4 and v5a, I even downloaded the source again to make sure it wasn't a problem on my end.
I'll try and have a proper look tomorrow
celderic said:
It doesn't work for me with v4, or v5a
Using the guide posted here, nothing changed only updated to v5a manually.
I haven't bothered to look through the log yet, bur it says camera hardware inaccessible or something like that I forget the exact wording. With v4 and v5a, I even downloaded the source again to make sure it wasn't a problem on my end.
I'll try and have a proper look tomorrow
Click to expand...
Click to collapse
Yeah, we kinda apologize for that. My linux environment has broken hard after upgrading to ubloatu, i mean Ubuntu 16.04... I'm busy updating to debian now, and will most likely stick with debian jessie as sid and stretch ended in an huge catastrophy. Thanks to @moonbutt74 for not warning me. (<- Only a joke, he actually predictied that sid will be a catastrophy but I didn't listen cuz that's me). I'll also most likely need to update the guide too as we no longer prefer/recommend ubuntu 16.04
Sent from my E5823 using XDA-Developers mobile app
celderic said:
It doesn't work for me with v4, or v5a
Using the guide posted here, nothing changed only updated to v5a manually.
I haven't bothered to look through the log yet, bur it says camera hardware inaccessible or something like that I forget the exact wording. With v4 and v5a, I even downloaded the source again to make sure it wasn't a problem on my end.
I'll try and have a proper look tomorrow
Click to expand...
Click to collapse
@celderic
did you do any modifications to the repos ?
If not did the kernel built with the ROM work for you ?
Thanks
edit:
v04 and v05a binary blobs are the same for us (Kitakami)
Changes in v05a was for kanuti, rhine, shinano and yukon
zacharias.maladroit said:
@celderic
did you do any modifications to the repos ?
If not did the kernel built with the ROM work for you ?
Thanks
edit:
v04 and v05a binary blobs are the same for us (Kitakami)
Changes in v05a was for kanuti, rhine, shinano and yukon
Click to expand...
Click to collapse
Sorry been on holiday not had time to reply on here, oh I didn't realise they where the same for our device.
I didn't modify the repos, and yes the stock cm kernel booted fine.
openjdk-7 isnt available under ubuntu 16.04. Is 8 or 9 supported yet or do I have to manually install v7?

[GUIDE]Compiling ROMs from Compressed Sources

I have recieved many messages about how to compile ROMs from compressed sources , here i present the guide
First Lets start with the download links
Download Thanks to @DigiGoon @vaibhavpandeyvpz @kD @MSF Jarvis and @regalstreak for their works
for more info u can see the link above to understand things better
Now After Downloading the sources what to do
*extarct it using terminal as said in the above link
after that the main thing , installation of main packages
1)Installing Java Development Kit (JDK)
For Kitkat
Installation of Java V6
Open The Terminal and Paste following Command
a) This will Remove the wrong Java JDK from Ubuntu 13.10
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
b) Enter the Following Command and This will Install JDK
Code:
wget https://launchpad.net/~webupd8team/+archive/ubuntu/java/+files/oracle-java6-installer_6u45-0%7Ewebupd8%7E8_all.deb sudo dpkg -i oracle-java6-installer_6u45-0~webupd8~8_all.deb wget https://launchpad.net/~webupd8team/+archive/ubuntu/java/+files/oracle-java6-set-default_6u45-0%7Ewebupd8%7E8_all.deb sudo dpkg -i oracle-java6-set-default_6u45-0~webupd8~8_all.deb
c)Check The Java Version Installed
Code:
java -version
For Lollipop/Marshmallow Required Java Version is 7 (java 8 not yet supported)
To Install Java V7
Code:
sudo apt-get update && sudo apt-get install openjdk-7-jdk
NOTE: For Ubuntu 16.04 user use this command
Code:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk
*************JAVA INSTALLATION COMPLETES*****************
2)Installation Of Required Tools
Enter The Following Command
Code:
sudo apt-get install git-core gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
NOTE:if u get broken dependencies error use following command and then above command
Code:
sudo apt-get update
sudo apt-get upgrade
**************All DONE*****************************
Now compiling and setting up files
after all the above
download all ur device related sources like device tree, kernel source, vendor files(if present)
Now where to keep those sources?
So, here i take cm13 and ASUS ZenFone 4 as example
The DEVICE TREE goes here:
cm13/device/asus/a400cg
Explaination:
asus is the company name u can know it from the .zip of the device tree u downloaded
*e.g.: android_device_asus_a400cg-master.zip
this says the directory and name of folders itself
device / asus / a400cg /
The Vendor Files Here:
cm13/vendor/asus/a400cg/
The Kernel Source (if not using prebuilt kernel) Here:
cm13/kernel/asus/a400cg/
***************SETTINGS FILES COMPLETE**************
Now Compiling:
open up terminal and cd to cm13 directory
Type :
. build/envsetup.sh or source build/envsetup.sh as ur choice
then
brunch a400cg
and finished wait for it to complete.
Holla u have compiled ROM from compressed source.
Any idea how much harddrive space will it require ?
Please reply as soon as possible !
Thanks in advanced
ABSathe said:
Any idea how much harddrive space will it require ?
Please reply as soon as possible !
Thanks in advanced
Click to expand...
Click to collapse
40gb if with repo
and while compiling it will increase more
sandeep.sethi said:
40gb if with repo
and while compiling it will increase more
Click to expand...
Click to collapse
I'm using no repo sources .. Will 50 GB be sufficient ? With compiling !
Sent from my Moto E using XDA Labs
ABSathe said:
I'm using no repo sources .. Will 50 GB be sufficient ? With compiling !
Click to expand...
Click to collapse
no bro
i recommend a minimum of 150-200gb partition for ubuntu
sandeep.sethi said:
no bro
i recommend a minimum of 150-200gb partition for ubuntu
Click to expand...
Click to collapse
Okay .. No problem .. I'll delete some old sources then
Sent from my Moto E using XDA Labs
thanks for the guide
kjinx01 said:
thanks for the guide
Click to expand...
Click to collapse
your welcome
thanks for the guide . really need it
Anarchy16 said:
thanks for the guide . really need it
Click to expand...
Click to collapse
your welcome
@sandeep.sethi can I use stock boot.img if I don't have kernel source. .pls reply
Sent from my Samsung Galaxy Note 3 using XDA Labs
Yeshas Prabhakar said:
@sandeep.sethi can I use stock boot.img if I don't have kernel source. .pls reply
Sent from my Samsung Galaxy Note 3 using XDA Labs
Click to expand...
Click to collapse
yes use the prebuilt kernel
sandeep.sethi said:
yes use the prebuilt kernel
Click to expand...
Click to collapse
Can you please tell me how to use the stock kernel.
I am new to compiling. Want to build for my Mi Max 2 but the kernel sources have not yet been released.
I am running Lineage 14.1 on my phone and I have a boot.img as well as a ZImage after extracting the boot.img.
Can use this to compile a rr or xenon HD rom? If yes how do I put this in my Google cloud Engine.
If possible can you please tell me the steps.
Thank you.
Jay_B said:
Can you please tell me how to use the stock kernel.
I am new to compiling. Want to build for my Mi Max 2 but the kernel sources have not yet been released.
I am running Lineage 14.1 on my phone and I have a boot.img as well as a ZImage after extracting the boot.img.
Can use this to compile a rr or xenon HD rom? If yes how do I put this in my Google cloud Engine.
If possible can you please tell me the steps.
Thank you.
Click to expand...
Click to collapse
keep tha zimage in a folder in device tree and define the location of it in board config
for reference: https://github.com/adeveloper79/android_device_aio_otfp_device/blob/cm-12.1/BoardConfig.mk#L73
Thank you for the quick reply.
I made put the zImage in a folder name kernel in the device tree and updated the boardconfig with the path to the zImage.
The issue is when I type lunch it does not show the device as it is not yet supported. So how do I proceed.
Thank you.
Thanks for the guide

Building Android for some devices (Huawei Y6 - msm8909 - in this Guide)

Today i share my knowledge to setup and build lineageos-7 for the Huawei Y6.
First of all we need to install some things.
Run these commands with root or sudo.
Code:
apt-get install -y bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev ccache rsync tig sudo imagemagick android-tools-adb android-tools-fastboot bc bsdmainutils file screen bash-completion wget nano
This one works well for Ubuntu 16.04 64 bit.
After that create a user with that you like to build android and log in with that user.
You need to run the following command after login:
HTML:
mkdir ~/bin && cd ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo && chmod a+x repo && cd
After that you should configure git. For me it is:
HTML:
git config --global user.name "username" && git config --global user.email "[email protected]"
Now you can start to fetch the sources.:
HTML:
mkdir lineageos-7.1 && cd lineageos-7.1 && repo init -u git://github.com/LineageOS/android.git -b cm-14.1 && repo sync
That will set up up a fresh source for lineageos-7.1 at all. Everything from now is device specific.
First we should create the basic folders for our device. I always fetch the sources for the huawei cherry to get the deps.:
HTML:
cd ~/lineageos-7.1 && . build/envsetup.sh
That will set up the lineageos build env.
Next command:
HTML:
breakfast cherry
That will fetch some sources for qcom devices.
Now we need to get the files to build lineageos-7.1 for our huawei y6.
HTML:
cd ~/lineageos-7.1/kernel/huawei && git clone https://github.com/giorgio130/android_kernel_huawei_msm8916.git msm8908 -b cm-14.1 && cd ~/lineageos-7.1/devices/huawei && git clone https://github.com/giorgio130/android_device_huawei_scale.git scale -b cm-14.1 && git clone https://github.com/giorgio130/android_device_huawei_msm8909-common.git msm8909-common -b cm-14.1 && git clone https://github.com/giorgio130/proprietary_vendor_huawei.git ~/lineageos-7.1/vendor/huawei -b cm-14.1
That was a simple Do that after that command quene. Nothing special for linux users.
If you got everything at the right place, please edit:
lineageos-14.1/device/huawei/msm8909-common/BoardConfigCommon.mk
and change:
HTML:
TARGET_KERNEL_SOURCE := kernel/huawei/msm8916
to:
HTML:
TARGET_KERNEL_SOURCE := kernel/huawei/msm8909
Now we should be ready to go. Go back to the base folder and run:
HTML:
. build/envsetup.sh && export WITH_SU=true && brunch lineage_scale-userdebug
With that commands everybody should be able to build and run LineageOs for the Huawei Y6 and other devices. It is the same with only other devices.
Step 1.
HTML:
. build/envsetup.sh
will source up the LineageOS.
Step 2.
HTML:
export WITH_SU=true
will enable full root access inside the finished build.
Step 3.
HTML:
brunch lineage_scale-userdebug
will build a flashable zip file for the Huawei Y6 aka Huawei Scale.
HTML:
make clean && make clobber
will clean up your whole environment before or after you compiled Android. You need to run step 1, 2, and 3 again after you run this or changed something.
Edit 1: Moved text to code.
Edit 2: Added some stuff.
Edit 3: Cleanup
@Runner85sx thank a lot, was looking for such tutorial.
On the lineage for y6 scl l01 the rotation is reverse. Can please guide me how to solve it.
Ps am not a dev but want to learn, for can manage to do minor changes
Thanks a lot! Hope to see new developers get into this device. Thanks
haidar.com said:
@Runner85sx thank a lot, was looking for such tutorial.
On the lineage for y6 scl l01 the rotation is reverse. Can please guide me how to solve it.
Ps am not a dev but want to learn, for can manage to do minor changes
Click to expand...
Click to collapse
I'm not sure why you have this problem. My device is working still well. I built new flashable zips and tested them. Everything okay till now here with an debranded Vodafone Huawei Y6 SCL-L01.
So you may you/me have a problem with DTS/DTB.
Can I use this to build AOSP for Y6?
Runner85sx said:
I'm not sure why you have this problem. My device is working still well. I built new flashable zips and tested them. Everything okay till now here with an debranded Vodafone Huawei Y6 SCL-L01.
So you may you/me have a problem with DTS/DTB.
Click to expand...
Click to collapse
How did you debrand your y6?
emre.yv said:
Can I use this to build AOSP for Y6?
Click to expand...
Click to collapse
Yes. You only need to modify some files inside device/huawei/msm8909-common and device/huawei/scale
Is it posible to make cm 11 for y6?
Ruven03 said:
Is it posible to make cm 11 for y6?
Click to expand...
Click to collapse
I'm not an advanced developer but, if Runner85sx bring android 7 to our device, You'll be able to change some files and create older version (cm 11), but the only problem is, unfortunately there's a chance that drivers would have some problems or/and simply not work.
Just a stupid question... Can you tell me what files I need to edit to make it work on AOSP? I want to compile the source without compiling the kernel and using the stock one
thanks
How?
Whether other devices can use this to build a custom kernel and use this kernel source
@Runner85sx thank you... I feel so empowered.... now trying to figure out how to deal with the camera. Any idea where I must start, cause I am beginning to miss my selfies
vajohnify said:
@Runner85sx thank you... I feel so empowered.... now trying to figure out how to deal with the camera. Any idea where I must start, cause I am beginning to miss my selfies
Click to expand...
Click to collapse
You are welcome.
I think the right place to start is the source code of the camera driver.
hi dear @Runner85sx thanks for your guide and work on this device... :fingers-crossed:
I have try this guide on desktop without problems...
but on my pi3 with berryboot last version and ubuntu mate 16.04 after the command
Code:
sudo apt-get install -y bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev ccache rsync tig sudo imagemagick android-tools-adb android-tools-fastboot bc bsdmainutils file screen bash-completion wget nano
i have this problem after Reading package lists... Done
Building dependency tree
Reading state information... Done
Code:
E: Unable to locate package lib32ncurses5-dev
E: Unable to locate package lib32readline6-dev
E: Unable to locate package lib32z1-dev
I have read you use pi 3 to built android I can know your set up or a solution to my error? Thanks :laugh:
Is there like a program or something that I can use to learn how to code? Cause I'm interested in learning but I don't know where to start and all of what you posted did not make any sense to me.
adam_s_459_ said:
Is there like a program or something that I can use to learn how to code? Cause I'm interested in learning but I don't know where to start and all of what you posted did not make any sense to me.
Click to expand...
Click to collapse
Same
Hello XDA Community! I'm building my first custom ROM and I have a question: Is it required to flash the ROM on the device or I can do something familiar to 'fastboot boot' style?
EDIT: And one more question: I'm making cm10 rom and will it work when I port our tree to this rom (kernel version etc)
EDIT 2: I have a problem while porting because cm10 didn't find cherry when typing breakfast cherry. Any Ideas?
Won't compile
Thank you Runner85sx so much for this comprehensive quick start guide. This is just what this community is missing.
I have changed in the following text all the backslashes to slashes in order for the forum to let me post. It thinks the paths are links and blocks my post as a new user. Ridiculous.
I run up to some issues executing the commands.
Firstly the 7th command I think should be:
HTML:
cd ~\lineageos-7.1\device\huawei
instead of:
HTML:
cd ~\lineageos-7.1\devices\huawei
Secondly the file that needs editing:
HTML:
~\lineageos-14.1\device\huawei\msm8909-common\BoardConfigCommon.mk
should be:
HTML:
~\lineageos-7.1\device\huawei\msm8909-common\BoardConfigCommon.mk
And lastly the last command
HTML:
brunch lineage_scale-userdebug
failed with the following output:
HTML:
including vendor\cm\vendorsetup.sh
build\core\product_config.mk:254: *** _nic.PRODUCTS.[[device\huawei\scale\lineage.mk]]: "device\cyanogen\msm8909-common\msm8909.mk" does not exist. Stop.
Device scale not found. Attempting to retrieve device repository from LineageOS Github (http:\\github.com\LineageOS).
Repository for scale not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests\roomservice.xml.
build\core\product_config.mk:254: *** _nic.PRODUCTS.[[device\huawei\scale\lineage.mk]]: "device\cyanogen\msm8909-common\msm8909.mk" does not exist. Stop.
build\core\product_config.mk:254: *** _nic.PRODUCTS.[[device\huawei\scale\lineage.mk]]: "device\cyanogen\msm8909-common\msm8909.mk" does not exist. Stop.
** Don't have a product spec for: 'lineage_scale'
** Do you have the right repo manifest?
complaining that the directory "cyanogen" does not contain a directory called "msm8909-common", so I copied it from "~\lineageos-7.1\device\huawei\msm8909-common" (probably a stupid thing to do, but it was a quick try).
Then I had some compiling activity but unfortunately ended with the following output:
HTML:
Checking build tools versions...
build\core\base_rules.mk:183: *** device\huawei\msm8909-common\camera\QCamera2\HAL: MODULE.TARGET.SHARED_LIBRARIES.camera.msm8909 already defined by device\cyanogen\msm8909-common\camera\QCamera2\HAL.
build\core\ninja.mk:166: recipe for target '\home\hlucid\lineageos-7.1\out\build-lineage_scale.ninja' failed
make: *** [\home\hlucid\lineageos-7.1\out\build-lineage_scale.ninja] Error 1
make: Leaving directory '\home\hlucid\lineageos-7.1'
#### make failed to build some targets (43 seconds) ####
Does anybody have a clue of what is wrong? Any help is appreciated. Thanks.

Categories

Resources