FORUMS
Remove All Ads from XDA

[CM] Building for expressltexx (GT-I8730)

939 posts
Thanks Meter: 655
 
By aureljared, Senior Member on 2nd November 2013, 10:20 AM
Post Reply Email Thread
There's an easy way to do whatever's discussed below, except for a) getting the SDK, b) syncing the repos, and c) building the ROM; and that way is using this script. But it's still better to do the steps below manually as it gets you acquainted with the terminal - you'll be using it a lot.

Thanks to @klvnhng for the original tutorial for mako
Credits to him.

You will need:
  • A computer running Ubuntu with at least 2GB memory and around 40-65 GB of free space
    • If you don't want to install Ubuntu, run it instead in VMWare Player or VirtualBox.
      • make sure you provide the virtual machine with the amount of recommended disk space or more
      • give it no less than 3-4GB of RAM
  • A (preferably fast) internet connection (trust me, you don't want to do this with a 256 or 512 kbps connection)
  • Familiarity with Android and Linux. Read up at source.android.com.

Setting up the build environment

1. Install JDK
DO NOT USE OPENJDK. Remove it by entering
Code:
sudo apt-get purge openjdk* icedtea* icedtea-6*
Install Oracle Java 6 by typing this into a terminal:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
Android SDK requires the x86 compatibility packages, ia32-libs. Install it by entering this:
Code:
sudo apt-get -y install ia32-libs
As an alternative, you can also do this (thanks to @jjchico):
Code:
sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
2. Android SDK
Download it here.

Extract it to a folder of your choice (in this guide, I will refer to it as ~/android/sdk).
Enter these commands into the terminal:
Code:
cd ~/android/sdk/adt-bundle/sdk/tools
./android sdk
Click Install packages. cd to ~/android/sdk/adt-bundle/sdk/platform-tools and type:
Code:
./adb
./fastboot
If you've done everything correctly, you should get a big block of text for both (which list all of the adb/fastboot commands).

3. Install required packages
Copy and paste this command into the terminal:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev \
ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 \
lib32z-dev libgl1-mesa-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
4. Install the repo command
Make directories called bin and android in your home folder, respectively.
Code:
mkdir -p ~/bin
mkdir -p ~/android
Download and setup the repo binary:
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now add it to your path:
Code:
export PATH="$PATH:~/bin"
And make sure it belongs in your path between subsequent reboots:
Code:
echo "export PATH="$PATH:~/android/sdk:~/bin"" >> ~/.bashrc
source ~/.bashrc
5. Configuring USB

You must configure USB to detect your Android device(s) properly.
Do this in a terminal:
Code:
curl https://raw.githubusercontent.com/aureljared/build-env-init/master/51-android.rules > ~/bin/51-android.rules
chmod a+r ~/bin/51-android.rules
sudo cp -vfp ~/bin/51-android.rules /etc/udev/rules.d/51-android.rules
6. Syncing up

The next step is to initialize the repository and download the source code to your computer.
Type the following lines into the terminal:
Code:
mkdir -p ~/android/cm-11.0
cd ~/android/cm-11.0
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
To download all the necessary device-specific files for our device, do this:
Code:
curl https://raw.githubusercontent.com/aureljared/android-manifests/expresslte-cm-11.0/local_manifest.xml >> .repo/local_manifests/local_manifest.xml
Now run
Code:
repo sync
You have now begun downloading all of the CM source code to your build directory. Depending on your internet speed, this can take from a couple of hours to a few days. If the sync interrupts, don't worry. Simply continue the sync (you don't have to restart completely, only the project you were downloading when the interrupt occured, lol) by entering:
Code:
repo sync
Some tips:
  • You can interrupt the process by pressing Ctrl + C, it will continue where it left off the next time anyway.
  • Remember, you need to cd into your build directory (~/android/cm-11.0, if you've been following this guide) for the command to work.
  • If you want only one project to be synced at a time, run repo sync -j1 instead.

This step takes a long time depending on your internet connection speed (FYI you're downloading ~20 GB of code!)

7. Building CM (yay!)

You must download the necessary pre-built apps:
Code:
~/android/cm-11.0/vendor/cm/get-prebuilts
Now let's build! cd to your build directory and run the following commands in the terminal:
Code:
. build/envsetup.sh
brunch expressltexx
Now, just let your computer do the rest. This step is very demanding for your computer, so you better leave it alone while it builds. Usually this takes an hour or more. Go get some sleep or eat something.

Done? If everything went correctly, cd to ~/android/cm-11.0/out/target/product/expresslte and you should see your newly built ROM entitled:
cm-11.0-20xxxxxx-UNOFFICIAL-expressltexx.zip

Congratulations! You've successfully built CM 11.0!

For re-builds (i.e. when the source code has been updated and you would like to make a new nightly), just do this:
Code:
cd ~/android/cm-11.0
make clobber
repo sync
. build/envsetup.sh
brunch expressltexx
Have fun building!
The Following 5 Users Say Thank You to aureljared For This Useful Post: [ View ] Gift aureljared Ad-Free
 
 
2nd November 2013, 11:45 AM |#2  
KINGbabasula's Avatar
Inactive Recognized Developer
Flag Treviso
Thanks Meter: 5,265
 
Donate to Me
More
Info 2
I suggest you to modify step 5 inserting before repo sync
Code:
mkdir .repo/local_manifests
cd .repo/local_manifests
wget https://raw.github.com/KINGbabasula/android_device_samsung_expresslte/cm-10.2/local_manifest.xml
cd ..
cd ..
This will download the specific necessary repos with repo sync
Then remove this in step 6
Code:
mkdir files
cd files
git clone https://github.com/KINGbabasula/proprietary_vendor_samsung.git
as it isn't needed
And change make clean with make clobber because with clobber it will rebuild faster

EDIT: And before step 6 you need to replace these 2 files with the 2 in the attachment
Code:
system/core/mkbootimg/bootimg.h
system/core/mkbootimg/mkbootimg.c
Attached Files
File Type: zip mkbootimg.zip - [Click for QR Code] (4.1 KB, 96 views)
2nd November 2013, 02:51 PM |#3  
OP Senior Member
Thanks Meter: 655
 
More
Quote:
Originally Posted by KINGbabasula

I suggest you to modify step 5 inserting before repo sync

Code:
mkdir .repo/local_manifests
cd .repo/local_manifests
wget https://raw.github.com/KINGbabasula/android_device_samsung_expresslte/cm-10.2/local_manifest.xml
cd ..
cd ..
This will download the specific necessary repos with repo sync
Then remove this in step 6
Code:
mkdir files
cd files
git clone https://github.com/KINGbabasula/proprietary_vendor_samsung.git
as it isn't needed
And change make clean with make clobber because with clobber it will rebuild faster

EDIT: And before step 6 you need to replace these 2 files with the 2 in the attachment
Code:
system/core/mkbootimg/bootimg.h
system/core/mkbootimg/mkbootimg.c

Original post updated.
Can you help me with ia32-libs?
It says that it's referred to by a handful of other packages but it has no installation candidates or something. The bottom line is that I can't install it.

I'm using 13.10 x64 on an ASUS K43SJ.
- Intel i5-2410M Quadcore (2.3GHz normal, 2.9GHz Turbo Boost)
- 2GB RAM available to Ubuntu VM

Sent from my International Galaxy Express using Tapatalk 4
The Following User Says Thank You to aureljared For This Useful Post: [ View ] Gift aureljared Ad-Free
2nd November 2013, 03:00 PM |#4  
KINGbabasula's Avatar
Inactive Recognized Developer
Flag Treviso
Thanks Meter: 5,265
 
Donate to Me
More
Quote:
Originally Posted by aureljared

Original post updated.
Can you help me with ia32-libs?
It says that it's referred to by a handful of other packages but it has no installation candidates or something. The bottom line is that I can't install it.

I'm using 13.10 x64 on an ASUS K43SJ.
- Intel i5-2410M Quadcore (2.3GHz normal, 2.9GHz Turbo Boost)
- 2GB RAM available to Ubuntu VM

Sent from my International Galaxy Express using Tapatalk 4

You have to apt-get install every missing library one by one

Inviato dal mio GT-I9070 utilizzando Tapatalk
The Following User Says Thank You to KINGbabasula For This Useful Post: [ View ] Gift KINGbabasula Ad-Free
6th November 2013, 07:30 AM |#5  
Member
Flag Sevilla
Thanks Meter: 43
 
More
Quote:
Originally Posted by aureljared


2. Android SDK
Download it here.

Extract it to a folder of your choice (in this guide, I will refer to it as ~/android/sdk).
Enter these commands into the terminal:

Code:
cd ~/android/sdk/adt-bundle/sdk/tools
./android sdk
Click Install packages. cd to ~/android/sdk/adt-bundle/sdk/platform-tools and type:
Code:
adb
fastboot

Shouldn't it be
Code:
./adb
./fastboot
Or have you added the sdk to your path?

I guess the compilation process will need the sdk. How does it find the sdk? Do you need to provide the path anywhere?

Thanks for the great tuto.
6th November 2013, 11:08 AM |#6  
Member
Flag Sevilla
Thanks Meter: 43
 
More
These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:

$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5

---------- Post added at 12:08 PM ---------- Previous post was at 11:29 AM ----------

These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:

$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
The Following User Says Thank You to jjchico For This Useful Post: [ View ] Gift jjchico Ad-Free
6th November 2013, 01:43 PM |#7  
OP Senior Member
Thanks Meter: 655
 
More
Quote:
Originally Posted by jjchico

These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:

$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5

---------- Post added at 12:08 PM ---------- Previous post was at 11:29 AM ----------

These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:

$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5

Quote:
Originally Posted by jjchico

Shouldn't it be

Code:
./adb
./fastboot
Or have you added the sdk to your path?

I guess the compilation process will need the sdk. How does it find the sdk? Do you need to provide the path anywhere?

Thanks for the great tuto.

Updated original post.

Sent from my GT-I8730 using Tapatalk
6th November 2013, 02:02 PM |#8  
Member
Flag Sevilla
Thanks Meter: 43
 
More
Thanks. Just note the missing double quotes in the export PATH.

Enviado desde mi GT-I9000 mediante Tapatalk
The Following User Says Thank You to jjchico For This Useful Post: [ View ] Gift jjchico Ad-Free
6th November 2013, 11:37 PM |#9  
OP Senior Member
Thanks Meter: 655
 
More
Quote:
Originally Posted by jjchico

Thanks. Just note the missing double quotes in the export PATH.

Enviado desde mi GT-I9000 mediante Tapatalk

Haha lol sorry. I was very sleepy when I updated last night.

Updated post.

My repo sync is finished with 65 out of 401 projects. ia32-libs now okay thanks to you @jjchico.

Sent from my GT-I8730 using Tapatalk
8th November 2013, 12:53 PM |#10  
Senior Member
Flag Sydney
Thanks Meter: 94
 
More
I get this
[email protected]:~/android/cm-10.2$ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
No command 'repo' found, did you mean:
Command 'repro' from package 'repro' (universe)
Command 'repl' from package 'nmh' (universe)
Command 'repl' from package 'mailutils-mh' (universe)
Command 'rep' from package 'rep' (universe)
repo: command not found
[email protected]:~/android/cm-10.2$

Any ideas? All seemed good before that
Bazzan
8th November 2013, 03:57 PM |#11  
Member
Flag Sevilla
Thanks Meter: 43
 
More
Check that repo is in the bin folder in your user main folder.
Check that repo is executable
chmod a+x ~/bin/repo

Enviado desde mi GT-I9000 mediante Tapatalk
The Following User Says Thank You to jjchico For This Useful Post: [ View ] Gift jjchico Ad-Free
Post Reply Subscribe to Thread

Tags
build, cm-10.2, express, expresslte, gt-i8730, i8730

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes