Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,101 Members 42,040 Now Online
XDA Developers Android and Mobile Development Forum
View Poll Results: Which phone you own
Arc / Arc S 475 37.73%
Neo / Neo V 194 15.41%
Ray 112 8.90%
Mini / MiniPro 123 9.77%
Active 25 1.99%
Live with WALKMAN 82 6.51%
X10 157 12.47%
X10 Mini / MiniPro 66 5.24%
X8 97 7.70%
Multiple Choice Poll. Voters: 1259. You may not vote on this poll

[DEV + HOWTO] KangXperiaProject - AOKP for Xperia (tutorial to compile from source)

Tip us?
 
championswimmer
Old
(Last edited by championswimmer; 16th September 2012 at 03:01 PM.) Reason: code boxes
#1  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7,532
Posts: 4,884
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
Tutorial [DEV + HOWTO] KangXperiaProject - AOKP for Xperia (tutorial to compile from source)

CONTENTS

Post #1 = General Info
Post #2 = [TUTORIAL] How to Compile AOKP for any Xperia phone
Post #3 = KangXperiaProject ROM threads list

================================================== ==============================================

WHAT is KangXperiaProject ??
We (that is KangXperiaProject Team) have tried to create a buildable source tree from which anyone can build AOKP for the Xperia line of devices

This is a combined work of all team members. (Supervenom , Championswimmer, Stelios97, Daveee10, Pikpok)

CREDITS
It is very important to mention here that nothing, yes i repeat NOTHING was possible without the awesome work done by FreeXperia team for the community. For all 2011 devices we are using their device trees almost untouched. So all the hardware work (making camera, sensors, gralloc, hardware acceleration etc work flawlessly) is purely the credit of FreeXperiaTeam (FXP, bin4ry, defer and Kali- )
If there is anyone whom you really need to thank for Xperia devices being able to run CM9/AOSP/AOKP/MIUI or whatever non-stock ROMs it's the great people like :
ZdZihu, FXP, Bin4ry, defer, Kali-, KeiranFTW, DoomLord, Androxyde, Achotjan, Azuzu and many many more.

The only thing that KXP team has done is made the devices and vendor trees fit into the groove of AOKP source tree and manage a buildable environment. Our contribution in KXP ROMs is much much less as compared to the contribution of Team Kang and Team FreeXperia. (Ofcourse on older devices we had to work a lot becuase FXP does not support them anymore)


GET YOUR AOKP ROM FOR XPERIA
Scroll down to Post#3 to see a list of AOKP ROMs available for Xperia phones (that are compiled from KXP source tree).

STATUS OF REPOS

The platform_manifest and source trees we maintain are usually always up-to-date. We can guarantee that the sources are usually always 'buildable' (i.e. the compilation will always be error-free if our source tree is used) but we cannot always guarantee that the builds that you compile will be 'bootable'. This is mainly because we do not own all the devices and hence cannot test if builds are booting or not. Whenever bugs are reported, we try to fix them if our scope of knowledge allows us to.

As of 22 August 2012
KXP-AOKP JB Repo : -
- repo can be synced
- buildable for all these devices
 
Code:
Arc/ArcS          aokp_anzu-userdebug
Live with Walkman aokp_coconut-userdebug
Mini              aokp_smultron-userdebug
Mini Pro          aokp_mango-userdebug
Active            aokp_satsuma-userdebug
S                 aokp_nozomi-userdebug
Acro S            aokp_hikari-userdebug
Neo               aokp_hallon-userdebug
Neo V             aokp_haida-userdebug
Play              aokp_zeus-userdebug
Play(CDMA)        aokp_zeusc-userdebug
Ray               aokp_urushi-userdebug
Pro               aokp_iyokan-userdebug

- all builds shall be bootable, but there might be enough bugs to not make it usable daily
KXP-AOKP ICS Repo : -
not actively maintained anymore, repo may not be buildable. we are working ONLY on JB now
- repo can be synced
- buildable for all these devices
 
Code:
Arc/ArcS          aokp_anzu-userdebug
Ray               aokp_urushi-userdebug
Neo               aokp_haida-userdebug
Neo(V)            aokp_hallon-userdebug
Pro               aokp_iyokan-userdebug
Play              aokp_zeus-userdebug
Play(CDMA)        aokp_zeusc-userdebug
Live with Walkman aokp_coconut-userdebug
Mini              aokp_smultron-userdebug
Mini Pro          aokp_mango-userdebug
Active            aokp_satsuma-userdebug
X10               aokp_es-userdebug09ra-userdebug
X8                aokp_shakira-userdebug
X10 MiniPro       aokp_robyn-userdebug
X10 Mini          aokp_mimmi-userdebug

- all builds are bootable
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | Kernel Kitchen| Xperia X10
PhilzTouchRecovery-Xperia | TWRPXperia | TWRP Xperia (Legacy)

My sources on github
List of donators
My download mirrors :
files.cs || Basketbuild || AndroidFileHost || Goo.im
Phones

Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1compact . Z1 . Z2 . Z Ultra . Tablet Z
The Following 43 Users Say Thank You to championswimmer For This Useful Post: [ Click to Expand ]
 
championswimmer
Old
(Last edited by championswimmer; 22nd August 2012 at 02:24 PM.)
#2  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7,532
Posts: 4,884
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
I'd like to give a quick rundown on how to compile AOKP from sources for all Xperia devices.

The KangXperiaProject had been working for past few weeks to try to set up and maintain a buildable repo for AOKP on all Xperia phones.

The skeleton of this tutorial is taken largely from this thread

This tutorial assumes that you are using Ubuntu (prefer to use 64 bit). If you use some other Linux distro then there might be minor changes in the way the environment is setup. Figure that out yourself

Source code is about 10GB in size. One single build will take about 8GB (10+8=18). For a full set of builds and for building for multiple devices i HIGHLY recommend more than 100 GB of free space on your harddrive.

1) You need the following:
-JDK 6 if you wish to build Ice Cream Sandwich. You can download it from java.sun.com. Or:
Code:
$ sudo apt-get install   sun-java6-jdk
-Python 2.4 -- 2.7, which you can download from python.org. Or:
Code:
$ sudo apt-get install python
-Git 1.7 or newer. You can find it at git-scm.com. Or:
Code:
$ sudo apt-get install   git-core
2) Install required packages. 64-bit (recommended)
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
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
$ sudo ln -s   /usr/lib/i386-linux-gnu/libX11.so.6   /usr/lib/i386-linux-gnu/libX11.so
if you wish to use adb for debugging or logging your builds you need to perform the steps hidden below.
 

3) Configure your USB.
Code:
$  gksudo gedit  /etc/udev/rules.d/51-android.rules
Inside of this blank text file insert:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"

#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"

#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"

#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"

#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"

#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"

#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"

#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"

#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"

#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"

#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"

#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"

#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"

#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"

#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"

#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"

#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"

#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"

#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"

#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"

#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"

#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"

#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"

#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"

#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"

#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"

#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"

#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
4) Save the file and close it and then issue this command:
Code:
$ sudo chmod a+r   /etc/udev/rules.d/51-android.rules
the line in red is most important, the other lines are not important if you are using adb only for xperia phones




5) Install the repo:
Code:
$  mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
restart your PC or log off and log on


6) Choose work directory:

Code:
$ mkdir -p ~/android/kxp 
$ cd ~/android/kxp
(the working directory could be anything you like. ~/android/kxp is an example)

7. Initialize the repo

Code:
$ repo init -u https://github.com/KangXperiaProject/platform_manifest.git -b jb
NOTE : to compile for ICS, use "-b ics" instead of "-b jb"
Only JB is maintained actively now. ICS repos are buildable but not anymore maintained.

7) When prompted, enter your real name and email address.

8) Gather the files:
Code:
Code:
$ repo sync -j1
if you have fast internet, you can use -j8 or -j16 for faster sync
total source will be around 10GB in size. please be patient


9) Compiling:
after complete sync
create the environment

Code:
 $ . build/envsetup.sh
now choose your device

Code:
$ lunch
pick your device according to the following list
 
Code:
Arc/ArcS          aokp_anzu-userdebug
Ray               aokp_urushi-userdebug
Neo               aokp_haida-userdebug
Neo(V)            aokp_hallon-userdebug
Pro               aokp_iyokan-userdebug
Play              aokp_zeus-userdebug
Play(CDMA)        aokp_zeusc-userdebug
Live with Walkman aokp_coconut-userdebug
Mini              aokp_smultron-userdebug
Mini Pro          aokp_mango-userdebug
Active            aokp_satsuma-userdebug
X10               aokp_es-userdebug09ra-userdebug
X8                aokp_shakira-userdebug
X10 MiniPro       aokp_robyn-userdebug
X10 Mini          aokp_mimmi-userdebug
S                 aokp_nozomi-userdebug



Now start the build process

Code:
mka -j4 otapackage
yes it's "mka" not "make"
you can obviously use make instead of mka but mka is faster and optimized specially for android building.
NOTE: the -j# number should be double the number of cores of your CPU (the CPU of the PC on which you are building)
Thus if you are on a quad core build machine use -j8

If compilation (i.e. the last step) takes too much time for your comfort, you can see this article written by cyanogenmod devs Koush and aremcee to make compile time less

After everybuild, we need to clean the directory... do it like this
Code:
 cd ~/android/kxp 
make clobber
("make clean" also works)

Before next build, sync repo again to get latest changes
Code:
repo sync -j2
Now build again
Code:
. build/envsetup.sh
lunch
Code:
mka -j4 otapackage
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | Kernel Kitchen| Xperia X10
PhilzTouchRecovery-Xperia | TWRPXperia | TWRP Xperia (Legacy)

My sources on github
List of donators
My download mirrors :
files.cs || Basketbuild || AndroidFileHost || Goo.im
Phones

Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1compact . Z1 . Z2 . Z Ultra . Tablet Z
The Following 28 Users Say Thank You to championswimmer For This Useful Post: [ Click to Expand ]
 
championswimmer
Old
(Last edited by championswimmer; 8th October 2012 at 09:02 PM.)
#3  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7,532
Posts: 4,884
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
AOKP(JB 4.1.1) ROMs for Xperia Phones
(which are maintined by KXP team members/friends)

Xperia Mini/MiniPro/Active/LiveWALKMAN
Xperia S
Xperia Acro S
Xperia Arc / Arc S
Xperia Ray
Xperia Play
Xperia Pro
Xperia Neo
Xperia Neo V


AOKP(ICS4.0.4) ROMs for Xperia Phones
(which are maintined by KXP team members/friends)

Xperia Arc / Arc S
Xperia Neo [cooked and optimized by kormatoes]
Xperia Neo(v) [cooked and optimized by kormatoes]
Xperia Ray
Xperia Pro
Xperia Play (GSM/CDMA)
Xperia Mini/MiniPro/Live/Active
Xperia X10
Xperia X8
Xperia X10 Mini
Xperia X10 MiniPro
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | Kernel Kitchen| Xperia X10
PhilzTouchRecovery-Xperia | TWRPXperia | TWRP Xperia (Legacy)

My sources on github
List of donators
My download mirrors :
files.cs || Basketbuild || AndroidFileHost || Goo.im
Phones

Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1compact . Z1 . Z2 . Z Ultra . Tablet Z
The Following 13 Users Say Thank You to championswimmer For This Useful Post: [ Click to Expand ]
 
mekayzer
Old
#4  
Senior Member
Thanks Meter 34
Posts: 288
Join Date: Oct 2010
On the last action, to build, isn't the make to use instead of mka ? typo ?
 
championswimmer
Old
#5  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7,532
Posts: 4,884
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
Quote:
Originally Posted by mekayzer View Post
On the last action, to build, isn't the make to use instead of mka ? typo ?
nope buddy... it's mka only... you can use make too ... but mka is faster
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | Kernel Kitchen| Xperia X10
PhilzTouchRecovery-Xperia | TWRPXperia | TWRP Xperia (Legacy)

My sources on github
List of donators
My download mirrors :
files.cs || Basketbuild || AndroidFileHost || Goo.im
Phones

Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1compact . Z1 . Z2 . Z Ultra . Tablet Z
The Following 4 Users Say Thank You to championswimmer For This Useful Post: [ Click to Expand ]
 
kormatoes
Old
#6  
kormatoes's Avatar
Recognized Contributor
Thanks Meter 3,888
Posts: 4,737
Join Date: Apr 2011
Location: newcastle upon tyne ne5

 
DONATE TO ME
Great thread

Sent from my Xperia neo using XDA Premium HD app
 
championswimmer
Old
#7  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7,532
Posts: 4,884
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
Quote:
Originally Posted by kormatoes View Post
Great thread

Sent from my Xperia neo using XDA Premium HD app
you can also begin making native builds for neo/neov using this method if you want...
haida and hallon are already present in the working tree and are buildable (as of now we do not make builds for hallon/haida because we do not want two aokp threads for same device )... but you and your team can anytime start building aokp from source using our trees, and we would be very happy
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | Kernel Kitchen| Xperia X10
PhilzTouchRecovery-Xperia | TWRPXperia | TWRP Xperia (Legacy)

My sources on github
List of donators
My download mirrors :
files.cs || Basketbuild || AndroidFileHost || Goo.im
Phones

Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1compact . Z1 . Z2 . Z Ultra . Tablet Z
The Following User Says Thank You to championswimmer For This Useful Post: [ Click to Expand ]
 
n1kolaa
Old
#8  
n1kolaa's Avatar
Senior Member
Thanks Meter 1,790
Posts: 2,633
Join Date: Oct 2011

 
DONATE TO ME
can you push aplha build for JEllY BEAN from sorces ?
Like my work? Please consider donating via PayPal
Remember If I have helped you hit the thanks button
and dont forget cm rule : DON'T ASK FOR ETA

My phones:
Xperia X8
Xperia Arc
Xperia Tipo

Idol mini
GALAXY NEXUS
My tablets:
NEXUS 7 WIFI
The Following User Says Thank You to n1kolaa For This Useful Post: [ Click to Expand ]
 
kormatoes
Old
#9  
kormatoes's Avatar
Recognized Contributor
Thanks Meter 3,888
Posts: 4,737
Join Date: Apr 2011
Location: newcastle upon tyne ne5

 
DONATE TO ME
Quote:
Originally Posted by championswimmer View Post
you can also begin making native builds for neo/neov using this method if you want...
haida and hallon are already present in the working tree and are buildable (as of now we do not make builds for hallon/haida because we do not want two aokp threads for same device )... but you and your team can anytime start building aokp from source using our trees, and we would be very happy
I need new pc bro ubunto it's not the best on it I will have a play tonight with it thanks for your great words much love Chris

Sent from my Xperia neo using XDA Premium HD app
 
championswimmer
Old
(Last edited by championswimmer; 12th July 2012 at 10:56 AM.)
#10  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7,532
Posts: 4,884
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
Quote:
Originally Posted by n1kolaa View Post
can you push aplha build for JEllY BEAN from sorces ?
maybe a week from now we can start doing that...
devices like Ray, Arc and Neo already have a stable milestone6 so next builds for these devices will be jellybean only

early builds MAY NOT be bootable, or have too many bugs to be usable...
also AOKP team have not properly set up a jb repo completely yet.
i myself have started the repo sync process for jb... it'll take me about 7-8 hours to complete the sync as i have slow internet...
jb repo is not buildable right now as it is pure aosp atm and to make xperia devices buildable many changes need to be committed

i also want to make it clear here that people like me, supervenom and pikpok are just "schoolboys" we are no major developers and cannot make hardware libraries from ground-up
we depend heavily on freexperia team's device and vendor source trees. the ics trees will provide a start but we will need some changes to that to make it 100% working and we do not know if our team of noobs can pull it off
and also it's hard to develop without devices... (supervenom owns an Xperia Play and I own an Xperia X10, while pikpok owns LiveWalkman... none of us own any hdpi 2011 device like ray, neo or arc)
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | Kernel Kitchen| Xperia X10
PhilzTouchRecovery-Xperia | TWRPXperia | TWRP Xperia (Legacy)

My sources on github
List of donators
My download mirrors :
files.cs || Basketbuild || AndroidFileHost || Goo.im
Phones

Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1compact . Z1 . Z2 . Z Ultra . Tablet Z

The Following 3 Users Say Thank You to championswimmer For This Useful Post: [ Click to Expand ]
Tags
aokp, compile, kangxperia, kangxperiaproject, xperia
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes