[GUIDE]Compiling ROMs from Compressed Sources - Android Software Development

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

Related

[TUTORIAL] So You Want To Build AOKP/ICS for the Touchpad?

This is strictly just a reference guide/tutorial! If you cannot simply follow directions and copy/paste, I'm not going to help you! This is idiot-proof.
Build Environment​
Operating system -- Tested on Ubuntu 10.04 (64bit)
Terminal
Decent hardware (minimum of at least a dual core CPU and 4 GB of RAM)
Optimally have an SSD (standard mechanical drives work as well but slow down the process drastically)
Must have required packages for building installed, I will list them further down
Required Packages​
Simply copy and paste this in a terminal window:
Code:
sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
Let that install and then proceed.
Getting the Source​
Make required directories
Obtain repo binary
Add repo binary to your path
Give repo binary proper permissions
Initialize empty repo
Sync repo
Grab device tree and vendor tree which are not included in the AOKP manifest
Add Mecha to the vendor setup
Alright, so now we're getting there. I have outlined the basics of what we're about to do and broke them down as I know them. This is all pretty much going to be copy/paste so it'll be fairly difficult to screw this up
Copy/paste:
Make directory for repo binary
Code:
mkdir ~/bin
Add directory for repo binary to your path
Code:
PATH=~/bin:$PATH
Download repo binary and place it in the proper directory
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Give the repo binary the proper permissions
Code:
chmod a+x ~/bin/repo
Create directory for where the AOKP repo will be stored and synced
Code:
mkdir ~/aokp
Move to our new AOKP directory
Code:
cd ~/aokp
Initialize the AOKP repo and download the manifest
Code:
repo init -u git://github.com/AOKP/platform_manifest.git -b master
Sync AOKP source
Code:
repo sync -jX
X == Number of cores your CPU has
Start the build​
This is probably the EASIEST part of all, simply copy/paste this command and walk away!
Code:
. build/envsetup.sh && lunch aokp_tenderloin-userdebug && make otapackage -jX
Where X == cores per CPU again.
Syncing the repo is dependent upon your Internet connection. It can take anywhere from 30 minutes to several hours to fully sync. Same thing goes for build times. Don't expect this to be short. If you have patience and have no build errors, you'll end up with a flashable zip in ~/aokp/out/target/product/tenderloin! Happy crack-flashing!
Thats nice, too bad i sold my i5 laptop recently, and the Internet speed is awful herr , but thanks dude
Sent from my HTC Desire HD using xda premium
Will it compile on a 32bit vm? Not worried about the time.
nomadman said:
Will it compile on a 32bit vm? Not worried about the time.
Click to expand...
Click to collapse
ICS requires a 64bit linux install afaik
http://groups.google.com/group/android-building/browse_thread/thread/168d757c41cdaf3d?pli=1
Jedipottsy said:
ICS requires a 64bit linux install afaik
http://groups.google.com/group/android-building/browse_thread/thread/168d757c41cdaf3d?pli=1
Click to expand...
Click to collapse
I don't think that's true, I've compiled an ICS ROM on a 32-bit machine. I think it should work.
Sent from my ZTE-BLADE using XDA App
What's advantage of using AOKP if they forked from CyanogenMod? It would be same for HP Touchpad, maybe it would be even behind in update until AKOP merge new commits from CyanogenMod git.
bhanvadia said:
What's advantage of using AOKP if they forked from CyanogenMod? It would be same for HP Touchpad, maybe it would be even behind in update until AKOP merge new commits from CyanogenMod git.
Click to expand...
Click to collapse
Dude, don't start this crap again. If you got beef, take it up via PM or somewhere else that isn't in the thread.
bhanvadia said:
What's advantage of using AOKP if they forked from CyanogenMod? It would be same for HP Touchpad, maybe it would be even behind in update until AKOP merge new commits from CyanogenMod git.
Click to expand...
Click to collapse
There are lots of advantages in using AOKP. Rom Control has so many tweaks. It's really a great build. Only certain things are forked (which you will find in every AOSP variant)
f_padia said:
I don't think that's true, I've compiled an ICS ROM on a 32-bit machine. I think it should work.
Sent from my ZTE-BLADE using XDA App
Click to expand...
Click to collapse
I would love to know how...I tried and had zero success. Switched to 64-bit and I'm good to go.
TMartin said:
I would love to know how...I tried and had zero success. Switched to 64-bit and I'm good to go.
Click to expand...
Click to collapse
Id try if I knew how lol. Don't have patience sometimes, haha. Maybe I'll try it since I got a 32-bit myself.
Sent from my Galaxy Nexus
I get the following:
[email protected]:~$ sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnupg is already the newest version.
zip is already the newest version.
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate
[email protected]:~$
worm9110 said:
I get the following:
[email protected]:~$ sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnupg is already the newest version.
zip is already the newest version.
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate
[email protected]:~$
Click to expand...
Click to collapse
It is in the partner repo so you need to make sure it is enabled.
If you open Synaptic and go to Tools/Repositories, then Other Software you should be able to check off Canonical Partners and Canonical Partners (Source Code). Reload, close Synaptic, and try again.
To anyone on the Ubuntu 12.04 nightlies, don't even bother trying to compile this, let alone install the dependencies. Build errors up the arse, repo sync errors, and a myriad of other hassles that just aren't worth it. A fresh install of 11.10 fixed everything for me, even following the same exact steps I was doing on 12.04.
Sent from my SCH-I500 using XDA App
Rather than do this in a VM, I'd like to create a second partition on my desktop and just run Ubuntu native.
Any recommendations for partition size? Whenever I create an Ubuntu VM, VirtualBox recommends 8GB, which I generally increase to 24GB (4GB for swap, 4GB for /home, and 16GB for / mounts) but as I've never tried to build from source, I have no idea what the space requirements are.
Please advise.
Went ahead and built it in a VirtualBox VM, on top of an SSD, with the device settings in VBox set to reveal to the guest OS that the host HDD is an SDD. Seems very fast. I configured my VM with a Dynamic drive, and set the max space to 64GB (doubt I'll ever come close to that) with 4GB RAM, 4 virtual CPU cores, and 4GB of swap space.
The current size of the virtual disk after my first build of the tenderloin source is 33GB. I'd say if you were going to set up an actual hard drive partition that 40GB would be a minimum, and probably closer to 64GB would be wise depending on if you want to build two versions simultaneously.
For those who struggle with the initial setup, if you're using Ubuntu 11.10, you won't be able to add sun-java6-jdk via apt-get simply by adding Canonical's partner repos. Sun is no longer making the package available via the partner repo's.
Instead, open a terminal window and do the following:
Code:
cd ~/
wget https://raw.github.com/flexiondotorg/oab-java6/master/oab-java6.sh -O oab-java6.sh
chmod +x oab-java6.sh
sudo ./oab-java6.sh
This downloads a shell script from flexion.org, which is the group that used to provide the sun-java6-jdk packages in Canonical's partner repo's before Canonical decided to block them for what they view as violating copyright law. The script is just a wrapper for steps you could take manually, and if you're curious what it does, before the last line above, you can always do the following to view the contents of the script:
Code:
cat oab-java6.sh
Obviously, use of this script presumes you've read and accepted Oracle's license terms, etc., found here:
http://www.oracle.com/technetwork/java/javase/terms/license/
Hopefully this helps some of our members who are getting stuck with the basics.
TMartin said:
I would love to know how...I tried and had zero success. Switched to 64-bit and I'm good to go.
Click to expand...
Click to collapse
I've been building on a 32-bit VM for some time. Pretty good guide here...
https://www.evernote.com/shard/s102...03022e318722/5b04667c8934a25489b86623805bfb31
I was able to successfully build the image. Can someone point me to how contributing back. How do i send files for review. How to revert back a file to original state if the modifications I made dont work.
If someone could point in the right direction , I would try to contribute something to the community.
suren21 said:
I was able to successfully build the image. Can someone point me to how contributing back. How do i send files for review. How to revert back a file to original state if the modifications I made dont work.
If someone could point in the right direction , I would try to contribute something to the community.
Click to expand...
Click to collapse
http://git-scm.com/documentation
worm9110 said:
I get the following:
[email protected]:~$ sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnupg is already the newest version.
zip is already the newest version.
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate
[email protected]:~$
Click to expand...
Click to collapse
I found this in another guide in the sensation forum for compiling cm9, seemed to work for me
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-plugin
Noob question
I keep getting an error message, not sure how to fix it;
Code:
running: java -Xmx2048m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpamHamk out/target/product/maguro/aokp_maguro-ota-eng.mandrew.zip
Could not create the Java virtual machine.
ERROR: signapk.jar failed: return code 1
make: *** [out/target/product/maguro/aokp_maguro-ota-eng.mandrew.zip] Error 1

[GUIDE] Compiling Cyanogenmod7 from Source

I'm opening this thread as i myself came across certain problems during the compiling of Cyanogenmod7 for the ZTE Blade from Source. I'm not a developer of any sort and want to make this clear. I'm opening this thread in the General section as all can comment.
This thread may help people who want to make their own CM7 builds. This thread is based on Cyanogenmod's guide on compiling from source. I've added some extra commands for people who do not understand CM's guide very well as i didn't find it to be very transparent.
Firstly,this guide is written for the people who want to compile CM7 on a linux platform,especially Ubuntu as i'm writing this based on Ubuntu 11.10.
Secondly,this guide may not be perfect as i do not have extensive knowledge on Ubuntu. So,any recommendations will be highly appreciated.
Thirdly,thanks go to the entire CyanogenMod team without whom the blade wouldn't be what it is now. Also to Wbaw,for making the TPT procedure. And to all the Blade developers out there who're spending their precious time to help us.
Here we go..
Hardware Requirements:
- A minimum dual core pc, the more ram the better
- A working wifi connection or network connection
- Linux Operating System. Either 32-bit or 64-bit will work
Any time during the process if you need to type as Root,give the command,
Code:
sudo -i
A.Installing a few programs first.
The terminal is where we will be doing most work.
Open terminal and type the code under the given programs.
1.Python,rar,curl,git.
Code:
sudo apt-get install python rar curl git
2.Java
Setting up java is very important. You can download java from Ubuntu Software centre or through the terminal.
On Ubuntu's 10.10 and 11.10 variants,enabling the repository is important.
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
After that,type the following.
Code:
sudo apt-get update
You may want to repeat previous commands again. To do so you can simply type "!!".
After that,type,
Code:
sudo apt-get install sun-java6-jdk
Certain people may face the problem in the form of an error sayingackage is not available or has another installation candidate. If you get an error like this, add this and try again,
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
Code:
sudo apt-get update
Code:
sudo apt-get install sun-java6-jdk
For us to compile Gingerbread,we need a Java version of "1.6.x"
To check the version,type,
Code:
java -version
We're done setting up Java.
3.Android SDK.
Download the Android SDK from here- http://developer.android.com/sdk/index.html
Extract it to your home folder.
Navigate to android-sdk-linux/tools and open "android" and run it in terminal.
Install the platform files. The most important ones that we need are the Android SDK Tools and The Android 2.3.3 Files.
B.Setting up UDEV.
Type,
Code:
sudo gedit /etc/udev/rules.d/11-android.rules
and paste the following after editing your user name in the code,
Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1353", MODE="0660", OWNER="<your user name>" #Normal
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1351", MODE="0660", OWNER="<your user name>" #Debug
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1354", MODE="0660", OWNER="<your user name>" #Recovery
Type the following to change permissions to read.
Code:
chmod 0644 /etc/udev/rules.d/11-android.rules
Any extra info regarding UDEV can be found here- http://wiki.cyanogenmod.com/wiki/Udev
We have setup UDEV.
C.Installing the build packages.
For 32bit and 64bit systems,
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64bit systems only,
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib
D.Setting up some directories in the environment.
Type the following to create them,
Code:
mkdir -p ~/bin
Code:
mkdir -p ~/android/system
E.Installing the repositories.
Type the following to make executable the repo function.
Code:
curl https://raw.github.com/android/tools_repo/master/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
You may need to reboot for the changes to take place.(Recommended)
To initialize the repositories,type the following (Note this will take very long and you will be asked for your name and email ID),
Code:
cd ~/android/system/
Code:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git
Code:
repo sync
F.Copying of the proprietary files from a working Blade having Cyanogenmod7 installed on it.
Connect the device and ensure ADB is working.You can go here (http://wiki.cyanogenmod.com/wiki/ADB) if you have issues. Type the following for copying,
Code:
cd ~/android/system/device/zte/blade/
Code:
./extract-files.sh
G.Downloading of ROM Manager
Code:
~/android/system/vendor/cyanogen/get-rommanager
H.Building Cyanogenmod
Check for updates first,
Code:
cd ~/android/system/
Code:
repo sync
Configure your build and compile using,
Code:
. build/envsetup.sh && brunch blade
Copy your .zip file from ~/android/system/out/target/product/blade/update.cm-XXXXX-signed.zip to the root of the SD card.
Thats it,you're done.
You can flash the zip file from CWM or any other recovery or use an emulator.
You can also download Gapps and use that.
EDIT:I'm busy with my exams this whole month and maybe the next. So will try to update it and rectify any mistake ASAP. I haven't added the integration of the Eclipse ADT and will do so when i'm free again.
There is a guide on the CyanogenMod wiki here: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Blade
wbaw said:
There is a guide on the CyanogenMod wiki here: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Blade
Click to expand...
Click to collapse
I tried following the same and got stuck up on several occasions. It isn't very noob friendly. Thats's why i opened one here hoping it helps others like me.
Sent from my Blade using XDA app
The wiki guide seems perfect for me. It was written by & for technical people used to working with Linux though. Maybe you could help to make it more noob friendly.
As it's a wiki you should be able to create an account & submit changes if you want to make it better, although the site is really slow/down for me at the moment so I'm not sure what the rules are.
You can use apt-get install to install more than one package, you could combine all those apt-get install lines into one. Some people may also need to install more packages, the full list is on the wiki.
Also, if you have a multi-core cpu, you can make it compile a bit faster by using the -j option on brunch, -j2 for dual core, -j4 for quad core.
wbaw said:
The wiki guide seems perfect for me. It was written by & for technical people used to working with Linux though. Maybe you could help to make it more noob friendly.
As it's a wiki you should be able to create an account & submit changes if you want to make it better, although the site is really slow/down for me at the moment so I'm not sure what the rules are.
You can use apt-get install to install more than one package, you could combine all those apt-get install lines into one. Some people may also need to install more packages, the full list is on the wiki.
Also, if you have a multi-core cpu, you can make it compile a bit faster by using the -j option on brunch, -j2 for dual core, -j4 for quad core.
Click to expand...
Click to collapse
Ok. Thanks a lot. Will include the other packages and the -j option as soon as possible.
Edit:Have added the all in one apt command. Will add other packages tomorrow.
Sent from my Blade using XDA app
wbaw said:
Some people may also need to install more packages, the full list is on the wiki.
Click to expand...
Click to collapse
What packages are yet to be put here? I just saw the wiki. Except for the Eclipse IDE,i've put everything else here.
Sent from my Blade using XDA app
karthiknr said:
What packages are yet to be put here? I just saw the wiki. Except for the Eclipse IDE,i've put everything else here.
Sent from my Blade using XDA app
Click to expand...
Click to collapse
From the wiki...
For 32-bit & 64-bit systems:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Click to expand...
Click to collapse
wbaw said:
From the wiki...
Click to expand...
Click to collapse
Its already there. The adding of the repository for java is under Java itself.
Sent from my Blade using XDA app
you still missed most of the required packages, fine if you already have them installed, but not everybody will.
wbaw said:
you still missed most of the required packages, fine if you already have them installed, but not everybody will.
Click to expand...
Click to collapse
It would be better for me to understand if you specified the packages.
I think only Eclipse is missing. Nothing else.
Sent from my Blade using XDA app
karthiknr said:
It would be better for me to understand if you specified the packages.
I think only Eclipse is missing. Nothing else.
Sent from my Blade using XDA app
Click to expand...
Click to collapse
I already did, here they are again...
For 32-bit & 64-bit systems:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
wbaw said:
I already did, here they are again...
For 32-bit & 64-bit systems:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
Click to expand...
Click to collapse
They're already there under the Building Packages heading.
Sent from my Blade using XDA app
wbaw said:
I already did, here they are again...
For 32-bit & 64-bit systems:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
Click to expand...
Click to collapse
He already has those listed, just later on in the post. They are in scrolling code boxes, so its not obvious they are all there at first. Might be better to put them at the start, and then you just install everything at once.
karthiknr said:
For 32bit and 64bit systems,
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64bit systems only,
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib
Click to expand...
Click to collapse
Amphoras said:
He already has those listed, just later on in the post. They are in scrolling code boxes, so its not obvious they are all there at first. Might be better to put them at the start, and then you just install everything at once.
Click to expand...
Click to collapse
I listed them later as they won't work if java isn't there. So i've put everything in order.
Sent from my Blade using XDA app
Thanks a lot for this should really help me . I have a quick question though, how much space should I need to successfully compile? I have Ubuntu 11.10 64 bit installed alongside windows via the application method and the default size was 18GB. I've read on the android developers that you need 25GB for a single build so how much do you recommend? Also is installing it via the application method ok or should I create a new partition on my HDD? Thank you once again.
youngsta2010 said:
Thanks a lot for this should really help me . I have a quick question though, how much space should I need to successfully compile? I have Ubuntu 11.10 64 bit installed alongside windows via the application method and the default size was 18GB. I've read on the android developers that you need 25GB for a single build so how much do you recommend? Also is installing it via the application method ok or should I create a new partition on my HDD? Thank you once again.
Click to expand...
Click to collapse
You need at least 25 to 30 GB. I don't recommend the application method of installing Ubuntu as you may have problems in the future. You better install Ubuntu alongside Windows. You don't have to make a new partiton for this. Ubuntu installer itself will choose a logical partition with the most space and will allow you to choose how much space you are willing to give for it.
Thanks I think that's what I did already, ran the wubi installer from windows, choose drive then choose how much space. I just went with the default which was 18GB. Then when I reboot I get the grub loader and choose windows or Ubuntu. I'm going to put one of my external drives in my desktop and install it to that. Thank you for the help.
youngsta2010 said:
Thanks I think that's what I did already, ran the wubi installer from windows, choose drive then choose how much space. I just went with the default which was 18GB. Then when I reboot I get the grub loader and choose windows or Ubuntu. I'm going to put one of my external drives in my desktop and install it to that. Thank you for the help.
Click to expand...
Click to collapse
Wubi is different. Boot with ubuntu on a disc or a usb stick and then install it alongside windows.
Sent from my Blade using XDA app
Ah ok, I'll do that. Thanks for the help man and the guide, it's appreciated.
karthiknr can I ask for your help again basically I have everything set up but I'm having trouble with adb and my phone. When I do
Code:
adb devices
without root I get
Code:
List of devices attached
???????????? no permissions
But if I do it with root I get
Code:
No command 'adb' found, did you mean:
I've set up udev according to your instructions and everything else went well until this. Thanks in advance.

[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 libc6-dev lib32ncurses5 lib32z1 lib32ncurses5-dev x11proto-core-dev lib32z-dev libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6 libncurses5-dev lib32readline6 libreadline-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool 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.
Just Incase

[ Guide ]Compiling WORKING 64 bit Android Kernel [ Le2 ] [ NOOB Friendly ]

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.

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