FORUMS
Remove All Ads from XDA

[TUTORIAL]Compile rom from source[janice]

2,303 posts
Thanks Meter: 5,263
 
By KINGbabasula, Inactive Recognized Developer on 5th July 2013, 07:53 AM
Post Reply Email Thread
Compile rom from source for janice

Quote:

Quote:

0. Before you start make sure to have Ubuntu 12.04 installed, a decent internet connection and a fast pc (quad core, 4-8 GB ram)

Quote:

1. Setting up the build environment

Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer

Quote:

2. Installing required packages

Code:
sudo apt-get install git 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 tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \
  gcc g++ cpp gcc-multilib g++-4.6-multilib

sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

Quote:

3. Set up ccache

Code:
nano ~/.bashrc
Add these two lines

Code:
export USE_CCACHE=1
export CCACHE_DIR=#
Replace # with your cache directory

Press ctrl+x and then Y

Quote:

4. Setting up repo tool

Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Quote:

5. Create working directory and initialize the repo

Code:
mkdir #
cd #
repo init -u @
Replace # with the name of the working dir (choose one)

Replace @ with the platform_manifest (or android) repository (for AOKP @ = https://github.com/AOKP/platform_manifest.git -b jb-mr1)

Quote:

6. Set up local manifest

Code:
mkdir .repo/local_manifests
touch .repo/local_manifests/local_manifest.xml
nano .repo/local_manifests/local_manifest.xml
Add these lines to let the repo sync download the vendor, device tree and the kernel

4.3.1

Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="kernel/samsung/u8500" name="TeamCanjica/android_kernel_samsung_u8500" revision="cm-10.2" remote="github" />
<project path="device/samsung/janice" name="TeamCanjica/android_device_samsung_janice" revision="cm-10.2" remote="github" />
<project path="device/samsung/u8500-common" name="TeamCanjica/android_device_samsung_u8500-common" revision="cm-10.2" remote="github" />
<project path="vendor/samsung/u8500-common" name="TeamCanjica/android_vendor_samsung_u8500-common" revision="cm-10.2" remote="github" />
<project path="hardware/u8500" name="TeamCanjica/android_hardware_u8500" revision="cm-10.2" remote="github" />
<project path="patches" name="KINGbabasula/STE_patches" revision="cm-10.2" remote="github" >
<copyfile src="patch.sh" dest="patch.sh" />
</project>
</manifest>


4.4.2

Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="kernel/samsung/u8500" name="TeamCanjica/Samsung_STE_Kernel" revision="3.0.31" />
<project path="device/samsung/janice" name="TeamCanjica/android_device_samsung_janice" revision="cm-11.0" remote="github" />
<project path="device/samsung/u8500-common" name="TeamCanjica/android_device_samsung_u8500-common" revision="cm-11.0" remote="github" />
<project path="hardware/u8500" name="TeamCanjica/android_hardware_u8500" revision="cm-11.0" remote="github" />
<project path="vendor/samsung/u8500-common" name="TeamCanjica/android_vendor_samsung_u8500-common" revision="cm-11.0" remote="github" />
<project path="patches" name="KINGbabasula/STE_patches" revision="cm-11.0" remote="github" >
<copyfile src="patch.sh" dest="patch.sh" />
</project>
<project path="packages/apps/DeviceSettings" name="TeamCanjica/android_packages_apps_DeviceSettings" revision="master" />
</manifest>

Here editing the local_manifest.xml you can change/add/remove repositories to download to make sync faster

To remove a repository write this in the local_manifest.xml[/CODE]

Code:
<remove-project name="" />
Replace # with the name of the repository (example )

Quote:

7. Time to sync!

Ok this is a boring part...

Code:
repo sync -j#
Replace the # with the number of cores

It can take from 10 minutes to 2 hours. It depends by your connection and your pc specs

Quote:

8. Download arm-eabi-4.6 toolchains

Code:
cd prebuilt/linux-x86/toolchain
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6

The Following 32 Users Say Thank You to KINGbabasula For This Useful Post: [ View ] Gift KINGbabasula Ad-Free
 
 
5th July 2013, 07:54 AM |#2  
KINGbabasula's Avatar
OP Inactive Recognized Developer
Flag Treviso
Thanks Meter: 5,263
 
Donate to Me
More
Building

Quote:

Quote:

9. Applying the patches

Code:
. patch.sh

Quote:

10. Finally... Time to build!!!

This can be boring too if you have bad pc specs

Code:
. build/envsetup.sh

lunch full_janice-userdebug

make -j# otapackage
Replace # with the number of cores of your pc

The Following 22 Users Say Thank You to KINGbabasula For This Useful Post: [ View ] Gift KINGbabasula Ad-Free
5th July 2013, 07:54 AM |#3  
KINGbabasula's Avatar
OP Inactive Recognized Developer
Flag Treviso
Thanks Meter: 5,263
 
Donate to Me
More
If you edited something after building... Rebuild!

Quote:

cd to working dir and type this

Code:
. patch.sh

. build/envsetup.sh

lunch full_janice-userdebug

make clean

make -j# bacon
Replace # with the number of cores

The Following 13 Users Say Thank You to KINGbabasula For This Useful Post: [ View ] Gift KINGbabasula Ad-Free
5th July 2013, 07:54 AM |#4  
KINGbabasula's Avatar
OP Inactive Recognized Developer
Flag Treviso
Thanks Meter: 5,263
 
Donate to Me
More
Understanding where are the bugs

Quote:

The first thing to do to understand where the bugs are is taking logcat

Quote:

1.Open a terminal

2.cd to the adb folder

3.Write this to check that the device is recognized

Code:
adb devices
If serial shows continue

4.Now write this

Code:
adb logcat > logcat.txt
5.Wait 30 seconds and close the terminal

6.logcat.txt is the file containing the logcat

Or download my little tool from attachments and run logcat.bat

Quote:

Reading the logcat

Search for the

Code:
E/> = error
F/> = fatal

Attached Files
File Type: zip logcat.zip - [Click for QR Code] (456.2 KB, 59 views)
The Following 14 Users Say Thank You to KINGbabasula For This Useful Post: [ View ] Gift KINGbabasula Ad-Free
5th July 2013, 09:34 AM |#5  
Abhinandh Ajay's Avatar
Senior Member
Flag Chennai
Thanks Meter: 299
 
More
Thanks a lot. This was very useful. I'm going to try to compile an AOKP ROM later. :thumbup::thumbup::thumbup:

Sent from my GT-I9070 using xda premium
The Following User Says Thank You to Abhinandh Ajay For This Useful Post: [ View ] Gift Abhinandh Ajay Ad-Free
5th July 2013, 09:46 AM |#6  
assassin0408's Avatar
Senior Member
Thanks Meter: 323
 
More
Quote:
Originally Posted by Abhinandh Ajay

Thanks a lot. This was very useful. I'm going to try to compile an AOKP ROM later. :thumbup::thumbup::thumbup:

Sent from my GT-I9070 using xda premium

LOL.. Im done repo sync part of aokp.. Ok i let you to build aokp while I'm trying to repo sync again for liquid smooth.. do we need to fork and sync some repos from paul/diego ch github?

Sent from my GT-I9070 using xda premium
5th July 2013, 10:59 AM |#7  
KINGbabasula's Avatar
OP Inactive Recognized Developer
Flag Treviso
Thanks Meter: 5,263
 
Donate to Me
More
Quote:
Originally Posted by assassin0408

LOL.. Im done repo sync part of aokp.. Ok i let you to build aokp while I'm trying to repo sync again for liquid smooth.. do we need to fork and sync some repos from paul/diego ch github?

Sent from my GT-I9070 using xda premium

I don't remember exactly
The Following User Says Thank You to KINGbabasula For This Useful Post: [ View ] Gift KINGbabasula Ad-Free
5th July 2013, 02:29 PM |#8  
frapeti's Avatar
Inactive Recognized Developer
Flag Cordoba, Argentina
Thanks Meter: 4,273
 
Donate to Me
More
You need to sync device, vendor and kernel repos from TeamCanjica github

Sent from my GT-I9070 using xda app-developers app
The Following 2 Users Say Thank You to frapeti For This Useful Post: [ View ] Gift frapeti Ad-Free
5th July 2013, 02:42 PM |#9  
KINGbabasula's Avatar
OP Inactive Recognized Developer
Flag Treviso
Thanks Meter: 5,263
 
Donate to Me
More
Quote:
Originally Posted by frapeti

You need to sync device, vendor and kernel repos from TeamCanjica github

Sent from my GT-I9070 using xda app-developers app

Thank you!
This is what i didn't remeber
The Following User Says Thank You to KINGbabasula For This Useful Post: [ View ] Gift KINGbabasula Ad-Free
5th July 2013, 02:51 PM |#10  
KINGbabasula's Avatar
OP Inactive Recognized Developer
Flag Treviso
Thanks Meter: 5,263
 
Donate to Me
More
Edited and added 4th post. now should be all ok
The Following User Says Thank You to KINGbabasula For This Useful Post: [ View ] Gift KINGbabasula Ad-Free
5th July 2013, 03:10 PM |#11  
frapeti's Avatar
Inactive Recognized Developer
Flag Cordoba, Argentina
Thanks Meter: 4,273
 
Donate to Me
More
Quote:
Originally Posted by KINGbabasula

Edited and added 4th post. now should be all ok

Now you should switch to TeamCanjica repos instead of diego-ch (local_manifests), it's forked and updated from diego repos

Sent from my GT-I9070 using xda app-developers app
The Following User Says Thank You to frapeti For This Useful Post: [ View ] Gift frapeti Ad-Free
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes