[GUIDE] Compiling Cyanogenmod7 from Source - Blade General

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.

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

[TUTORIAL ] Beginning development-the easy way

Ok so this is a guide that me and my friend made for compiling ROMs for our LG-P350 Now, this is pretty much universal and can be used for general development
This is the stuff you will need :
Ubuntu-can be found on the Ubuntu website http://www.ubuntu.com/start-download?distro=desktop&bits=64&release=lts (this is a direct link to the Ubuntu 12.04 64-bit version)
Python (included)
GNU Make
Java Development Kit (JDK) 6
Git
Before you can do anything you need to install Ubuntu. You can go with newer versions but i still think that 10.10 is best and this guide is adapted to it. You can install it like dual boot or use Wubi (Windows Ubuntu Installer). However if you choose Wubi there is a good chance that you won't have enough storage, so that's not recommended.Those who want to dual-boot check out this post http://forum.xda-developers.com/showpost.php?p=34669858&postcount=26
NOTE: You can do this in a virtual machine (for example VM Ware and Virtual box) but it will be a lot slower unless you have a VERY strong CPU and a LOT of RAM.
Generally Python is not needed since it's already in Ubuntu. However if you want to install it separately here's how:
First of all open the terminal. Now copy/paste these codes (one by one) and execute them:
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
make test
sudo make install ([B]NOTE[/B]: [I]You will be asked for your password, enter it and press enter[/I])
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Now you need Sun JDK 6. Same procedure as with Python:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
For those who get package error try these:
Code:
sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo update-java-alternatives -s java6-jdk
Now that JDK is installed it's time for GNU Make:
First of all download GNU Make from link given. Download version 3.82
Now extract the downloaded file to your Home directory.
Go to Home directory and change the name of GNU Make To make
Now open the Terminal and type the following codes
Link: http://ftp.gnu.org/gnu/make/
Code:
cd make
./configure
sudo make install
Now make is installed.
Next, we are going to install the dependencies:
FOR UBUNTU 10.10
Codes to type in terminal :
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils xsltproc
export USE_CCACHE=1
If that method didn't work then try this:
You use the same commands BUT the first one is:
sudo apt-get install git-core gnupg flex bison gperf build-essential
Now it should download some stuff. When its done you need to do the same for the rest in the right order.
NOTE: Since I don't remember the right order i will just put the commands how they should be written if you get error read what's missing and put that in first.
Here are the rest of the lines:
Code:
sudo apt-get install zip curl
sudo apt-get install zlib1g-dev
sudo apt-get install libc6-dev
sudo apt-get install lib32ncurses5-dev
sudo apt-get install ia32-libs
sudo apt-get install x11proto-core-dev
sudo apt-get install libx11-dev
sudo apt-get install lib32readline5-dev
sudo apt-get install lib32z-dev
sudo apt-get install libgl1-mesa-dev g++-multilib
sudo apt-get install mingw32
sudo apt-get install tofrodos python-markdown
sudo apt-get install libxml2-utils
sudo apt-get install xsltproc
FOR UBUNTU 12.04
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 mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now for the Android SDK, ADB and ADB path:
1. SDK (Software-Development-Kit) :
Go to this link and download the Android SDK for Linux:
http://developer.android.com/sdk/index.html
After downloading it, extract it to the Home folder. You can probably extract where you want and change all the steps below to to fit your set up, but I like putting it in Home folder.
When you have extracted it in the Home folder change the name of the folder of android-sdk-linux to sdk.
Then open the Terminal and run these codes:
Code:
cd ~/sdk/tools/
./android sdk
When you run this, a window will pop up. For this you only need "Android SDK Tools" and "Android SDK Platform-tools". Just check these two and install them.
2. ADB (Android-Debug-Bridge):
Run this command to see if your ADB works. You have to have your android device connected in debugging mode.
Run these codes in the Terminal :
Code:
cd ~/sdk/platform-tools ./adb devices
When you entered the codes above, you should see something similar to this:
List of devices attached 0123456789ABCDEF device
NOTE: If you see output like given bellow we need to give the device permissions. Don't worry I had this too when I set my computer up for the first time.
List of devices attached ???????????? no permissions
Here is how we fix it:
Open the Terminal and type this:
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
After you've entered it, a window will pop up that will be blank. Now add the following commands and save it.
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
Now save this File And follow the given codes
After you've entered those codes type these codes in too.
Code:
sudo service udev restart
sudo adb kill-server
sudo adb start-server
After you've entered those codes, restart Ubuntu.
Now to see if the problem is solved type these codes in:
Code:
cd ~/sdk/platform-tools ./adb devices
If everything is ok a output similar to this will be shown:
List of devices attached 0123456789ABCDEF device
Now to add the ADB path to system, so you don't have to cd to the SDK folder every time you want to use ADB:
So, first open up .bashrc with these codes:
Code:
sudo gedit ~/.bashrc
A window will pop up and there will be some text there. Scroll down to the bottom and add these lines:
Code:
export PATH=${PATH}:~/sdk/tools
export PATH=${PATH}:~/sdk/platform-tools
After you've done that, save it and reboot Ubuntu.
If everything is ok, you will get some output when you type the following codes in the terminal.
Code:
./adb devices
OR
Code:
adb shell
If you see:
Code:
adb not found[CODE]
Then it means you've done something wrong and ADB is not configured.
Next is GIT:
Open the browser and download git from given link
[URL]http://git-core.googlecode.com/files/git-1.7.9.6.tar.gz[/URL]
Extract GIT-1.7.9.6.tar.gz to your home directory
Rename the folder you extracted to from GIT-1.7.9.6.tar.gz to git
After you've done that, enter the following codes in the Terminal
[CODE]sudo aptitude build-dep git-core
sudo apt-get install zlib1g-dev
cd git
./configure
make
sudo make install
NOTE: If it doesn't work then install from this link:
http://kibyegon.wordpress.com/2010/0...u-lucid-10-04/
If the commands from above are not working then try this:
Code:
sudo apt-get install git-core
sudo apt-get install git
git
If it worked it should show this:
Code:
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]
[-p|--paginate|--no-pager] [--no-replace-objects]
[--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
[--help] COMMAND [ARGS]
The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and merge with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
See 'git help COMMAND' for more information on a specific command.
Now we will download the Repo and get the source code:
Codes to type in the Terminal :
Code:
mkdir ~/bin
PATH=~/bin:$PATH
sudo apt-get install curl
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
mkdir source
cd source
Ok so up to this part its mostly universal. However after this you need to sync up sources for your device. This will probably take a long time depending on your internet speed since the source is very big (also it will take up a lot of drive space: 14-30GB). After that you should build.
How to build
First you will need to get proprietary drivers from your device.
Connect your device via USB and enter the following commands (from the root of your source repository):
Code:
cd device/xxx/xxx where x is the path to your device
./extract-files.sh
cd ../../..
NOTE: Some developers can include these files in the source itself or can make them available for download from their Github page. Check that out with your developer for more info.
And start the build:
Code:
. build/envsetup.sh xxx
NOTE:Here x also varies since its unique for every device model
Now Android is building. You may need to wait a long time (depending on your hardware-mainly CPU and RAM for example I have a quad core 2.92Ghz CPU and 6GB of HyperX DDR3 ram and it took me about 10min for CM7 and about 20-30 min for CM9).Once it's done you should get this message:
Code:
Package complete:xxx.zip
That is your flashable .zip file you install from recovery.
Credits: Many thanks go to Keyur Maru who helped me learn how to develop and for making the base of this guide.
Reference: http://source.android.com/source/downloading.html
Very good tutorial for beginner
sangosnip69 said:
Very good tutorial for beginner
Click to expand...
Click to collapse
Thanks we tried our best since this is supposed to boost our dev base for our LG
Definitely one to try at home!
Sent from my GT-I9100 using xda premium
Wow 10min is real fast!! I recently tried CM9 directly from one of the Dev's forked repo and after about 4hours of build I got some build error! I need to get a better computer soon if I plan to get my hands real dirty! And if I may I have few suggestions - please mention that it will take a while to download the full repo from google sources else beginners may end up thinking something is wrong(which I did since it took me one full day to sync everything) and that it needs atleast 20-30GB disk space too..(Coz not everyone has Ubuntu as the only OS, I have three in my lapi!!)
A very good guide on the whole for a beginner!!!
pranks1989 said:
Wow 10min is real fast!! I recently tried CM9 directly from one of the Dev's forked repo and after about 4hours of build I got some build error! I need to get a better computer soon if I plan to get my hands real dirty! And if I may I have few suggestions - please mention that it will take a while to download the full repo from google sources else beginners may end up thinking something is wrong(which I did since it took me one full day to sync everything) and that it needs atleast 20-30GB disk space too..(Coz not everyone has Ubuntu as the only OS, I have three in my lapi!!)
A very good guide on the whole for a beginner!!!
Click to expand...
Click to collapse
Very true a great in depth and very informative tutorial for noobs like i was this would have helped me a lot.... Great work
btw pranks1989 i can help you with compiling for defy.... I used to compile roms from eppy's and quarx2k github and never got a error once it else onece eppy pinted out the mistake i was doing.... just send me a pm of your errors and i will try help
Great start for me!
You have been thanked!
Great start for me!
What would the procedure be if you want to create a rom that you can flash via Odin or Heimdall on a Mac client?
The guide I've been looking for ever since I had my first Android device (actually, my Optimus Me is my first Android device)...
Thanks for this great guide. I will try it today.
I already compiled a Rom, it took me 40 min. AMD 8 Core 3,1 MHz and 16 GB DDR3
But when i try a different device i always get errors, i hope your Guide will get me in to it.
serendipityguy said:
You have been thanked!
Great start for me!
What would the procedure be if you want to create a rom that you can flash via Odin or Heimdall on a Mac client?
Click to expand...
Click to collapse
I don't know but it's surely different for odin(I'm not sure that you can).And I don't know on mac either since I use ubuntu and windows. You can look up info on this on the official Android dev website.
Sent from my Optimus Me using xda premium
nerot said:
I don't know but it's surely different for odin(I'm not sure that you can).And I don't know on mac either since I use ubuntu and windows. You can look up info on this on the official Android dev website.
Sent from my Optimus Me using xda premium
Click to expand...
Click to collapse
Odlicno objasnjeno za pocetnike. Svaka cast
Good Beginners Guide. Thank you.
But 90% of it can also be found here:
http://source.android.com/source/initializing.html
This is what i used to build android for the pandaboard a few weeks ago.
And then I have a few questions.
1.
Why do you compile git when you can also download it from apt-sources? Imho this is just confusing for beginners.
2.
Where do you use git in your tutorial?
3.
Didn't you forget lunch and make at the very end of your tutorial?
". build/envsetup.sh" only sets up the environment, imho
(see also here: http://source.android.com/source/building.html)
nerot said:
First you will need to get proprietary drivers from your device.
Connect your device via USB and enter the following commands (from the root of your source repository):
Code:
cd device/xxx/xxx where x is the path to your device
./extract-files.sh
cd ../../..
Click to expand...
Click to collapse
How do I find out what the path is from my device?
I would add the option to install Ubuntu in a VM. Both VMWare player and VirtualBox are free and well supported. This way one can actually create some pre-packaged images with which one can start development right away. In fact I've already made two of them a year ago (one for Froyo and one for Gingerbread):
http://forum.xda-developers.com/showthread.php?t=881845
http://forum.xda-developers.com/showthread.php?t=1022407
One might also make on for ICS (for that Ubuntu 12.04 is also good, and since VMWare Player is free one could use that instead of VirtualBox, as VMWP has more user-friendly features)
If I had a nickle for every time I've seen a thread like this, I would have... a nickle.
Thank you from the bottom of my /dev/hda1
sztupy said:
I would add the option to install Ubuntu in a VM. Both VMWare player and VirtualBox are free and well supported. This way one can actually create some pre-packaged images with which one can start development right away. In fact I've already made two of them a year ago (one for Froyo and one for Gingerbread):
http://forum.xda-developers.com/showthread.php?t=881845
http://forum.xda-developers.com/showthread.php?t=1022407
One might also make on for ICS (for that Ubuntu 12.04 is also good, and since VMWare Player is free one could use that instead of VirtualBox, as VMWP has more user-friendly features)
Click to expand...
Click to collapse
True however unless you have a LOT of ram and a hexa-core CPU compilation under a vm is significantly slower and that's why I didn't add it.But the procedure is the same anyway.
Sent from my Optimus Me using xda premium
Gigadroid said:
How do I find out what the path is from my device?
Click to expand...
Click to collapse
Google is your friend
Sent from my Optimus Me using xda premium
TheBadFish said:
Good Beginners Guide. Thank you.
But 90% of it can also be found here:
http://source.android.com/source/initializing.html
This is what i used to build android for the pandaboard a few weeks ago.
And then I have a few questions.
1.
Why do you compile git when you can also download it from apt-sources? Imho this is just confusing for beginners.
2.
Where do you use git in your tutorial?
3.
Didn't you forget lunch and make at the very end of your tutorial?
". build/envsetup.sh" only sets up the environment, imho
(see also here: http://source.android.com/source/building.html)
Click to expand...
Click to collapse
1.Idk I found this thing simple as well
2.I will review it later since I'm on my phone now and its 00:13 here
3.I don't think it's necessary since I use the same procedure for my rom compilation. I will add it tough just in case someone gets an error.Thanks for the tip.
Sent from my Optimus Me using xda premium
I'll try this on my six core seeing as it would make a perfect devving machine.
just following
Just posting here to follow. I will have to try this tonight. This looks awesome!

[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 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

[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.
In case

Resources