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

Which phone you own


  • Total voters
    1,256
Search This thread

psyionx

Senior Member
Nov 30, 2010
229
50
Kota Kinabalu
need some advice

Hi, I'm somewhat noob to linux, so i need some help.
the setup of my pc..
the main HDD is set with dual boot windows 7 and recently just installed ubuntu(12.10) 64 bit with just 25 gig and 4 gig swap. 2 more HDD for other storage ntfs.

I have another 160 gig laying around that i can put it in. how can i make sure all the stuff to build goes into the new hdd? since you say its so big but my ubuntu just 25 gig partition size.
 

Hikari no Tenshi

Senior Member
Nov 12, 2011
551
1,666
Mykolaiv
Xiaomi Redmi Note 4
OnePlus 7
Hi. I'm getting error while building for smultron:

Code:
device/semc/smultron/overlay/packages/apps/Torch/res/values/config.xml:20: error: Resource at useCameraInterface appears in overlay but not in the base package; use <add-resource> to add.
make: *** [out/target/common/obj/APPS/Torch_intermediates/src/R.stamp] Error 1
make: *** Waiting for unfinished jobs...
Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest.

Please help to fix it.
 

championswimmer

Inactive Recognized Developer
Oct 22, 2011
5,018
8,446
New Delhi
android.championswimmer.tk
Hi. I'm getting error while building for smultron:

Code:
device/semc/smultron/overlay/packages/apps/Torch/res/values/config.xml:20: error: Resource at useCameraInterface appears in overlay but not in the base package; use <add-resource> to add.
make: *** [out/target/common/obj/APPS/Torch_intermediates/src/R.stamp] Error 1
make: *** Waiting for unfinished jobs...
Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest.

Please help to fix it.
shall be fixed
for now just remove the config.xml file :)
 
  • Like
Reactions: Hikari no Tenshi

matchung

Senior Member
anyone can help on this? i am blocked on this error during building aokp on ubuntu

Code:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Copying: out/target/common/obj/APPS/Launcher2_intermediates/classes-jarjar.jar
Copying: out/target/common/obj/APPS/Launcher2_intermediates/emma_out/lib/classes-jarjar.jar
Copying: out/target/common/obj/APPS/Launcher2_intermediates/classes.jar
target Java: LauncherRotationStressTest (out/target/common/obj/APPS/LauncherRotationStressTest_intermediates/classes)
make: *** No rule to make target `out/target/common/obj/APPS/LegacyCamera_intermediates/classes.jar', needed by `out/target/common/obj/APPS/LegacyCameraTests_intermediates/classes-full-debug.jar'.  Stop.

tia.
 

cj360

Senior Member
Oct 24, 2011
1,332
709
Had a similar problem. That's not showing what the error is, run 'make' without extra threads (no -j#) and see what its actually error-ing out on.

Sent from my Xperia Play using Tapatalk 2
 

championswimmer

Inactive Recognized Developer
Oct 22, 2011
5,018
8,446
New Delhi
android.championswimmer.tk
anyone can help on this? i am blocked on this error during building aokp on ubuntu

Code:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Copying: out/target/common/obj/APPS/Launcher2_intermediates/classes-jarjar.jar
Copying: out/target/common/obj/APPS/Launcher2_intermediates/emma_out/lib/classes-jarjar.jar
Copying: out/target/common/obj/APPS/Launcher2_intermediates/classes.jar
target Java: LauncherRotationStressTest (out/target/common/obj/APPS/LauncherRotationStressTest_intermediates/classes)
make: *** No rule to make target `out/target/common/obj/APPS/LegacyCamera_intermediates/classes.jar', needed by `out/target/common/obj/APPS/LegacyCameraTests_intermediates/classes-full-debug.jar'.  Stop.

tia.
need more lines of output to analyse error
 
K

Kolteabhiman

Guest
I sterted syncing the source


But around may be 85% my internet connection pissed


Now if i sync it again
Will it resume or again start it from scratch
 

matchung

Senior Member
I can now build the zip from source. But I have a problem on mobile data.

After flash the zip, I have not mobile data access anymore. I can dial in/out, SMS but 3G data.

When I take a look on APNs, there is not any entries inside. That's why I know I can not get mobile data.

But if i reflashed other ROMS, my ISP APN entry came back. This makes me mad :(.

Can any help on this? thx.
 

cj360

Senior Member
Oct 24, 2011
1,332
709
Make sure your using the right branch in your default.xml.
Which one are you trying to sync?

Sent from my R800i using Tapatalk 2
 

mastero9017

Senior Member
Mar 30, 2013
487
1,605
Cracow
xdaforums.com
I can't sync repositories... :(
 

Attachments

  • aokp.jpg
    aokp.jpg
    13.3 KB · Views: 299

championswimmer

Inactive Recognized Developer
Oct 22, 2011
5,018
8,446
New Delhi
android.championswimmer.tk
hi guys,
goo.im has always been great

i build my ROMs on their servers, they host my files, they mirror AOKP, CM, PA and all major ROMs,
they host the famous "gapps"

without them KXP would not be as awesome an experience as it is,
without them a lot of things would not be as good as they are

they happen to need some help and I feel obliged to forward the request to people I know
see this blog post http://goo.im/blog/36 and donate a few bucks to them if possible
 

Top Liked Posts

  • There are no posts matching your filters.
  • 43
    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
    28
    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"
    
    [COLOR=Red]#Sony Ericsson
    SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"[/COLOR]
    
    #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
    13
    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
    4
    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 ;)
    4
    That error was because of my stupidity sorry for that
    But now im heaving real error right now i was about thee hours in to building and then this pops out

    Code:
    Finding NOTICE files: out/target/product/hallon/obj/NOTICE_FILES/hash-timestamp
    Combining NOTICE files: out/target/product/hallon/obj/NOTICE.html
    Installed file list: out/target/product/hallon/installed-files.txt
    Target system fs image: out/target/product/hallon/obj/PACKAGING/systemimage_intermediates/system.img
    Install system fs image: out/target/product/hallon/system.img
    Package target files: out/target/product/hallon/obj/PACKAGING/target_files_intermediates/aokp_hallon-target_files-eng.tenacious.zip
    Package OTA: out/target/product/hallon/aokp_hallon-ota-eng.tenacious.zip
    device/semc/msm7x30-common/releasetools/semc_ota_from_target_files -v \
    	   -p out/host/linux-x86 \
    	   -k build/target/product/security/testkey \
    	   --no_assert=false \
    	   --backup=true \
    	   --override_device=MT15i,MT15a,hallon \
    	   out/target/product/hallon/obj/PACKAGING/target_files_intermediates/aokp_hallon-target_files-eng.tenacious.zip out/target/product/hallon/aokp_hallon-ota-eng.tenacious.zip
    
    Given a target-files zipfile, produces an OTA package that installs
    that build.  An incremental OTA is produced if -i is given, otherwise
    a full OTA is produced.
    
    Usage:  ota_from_target_files [flags] input_target_files output_ota_package
    
      -b  (--board_config)  <file>
          Deprecated.
    
      -k (--package_key) <key> Key to use to sign the package (default is
          the value of default_system_dev_certificate from the input
          target-files's META/misc_info.txt, or
          "build/target/product/security/testkey" if that value is not
          specified).
    
          For incremental OTAs, the default value is based on the source
          target-file, not the target build.
    
      -i  (--incremental_from)  <file>
          Generate an incremental OTA using the given target-files zip as
          the starting build.
    
      -w  (--wipe_user_data)
          Generate an OTA package that will wipe the user data partition
          when installed.
    
      -n  (--no_prereq)
          Omit the timestamp prereq check normally included at the top of
          the build scripts (used for developer OTA packages which
          legitimately need to go back and forth).
    
      -e  (--extra_script)  <file>
          Insert the contents of file at the end of the update script.
    
      -a  (--aslr_mode)  <on|off>
          Specify whether to turn on ASLR for the package (on by default).
    
      --backup <boolean>
          Enable or disable the execution of backuptool.sh.
          Disabled by default.
    
      --override_device <device>
          Override device-specific asserts. Can be a comma-separated list.
    
      -p  (--path)  <dir>
          Prepend <dir>/bin to the list of places to search for binaries
          run by this script, and expect to find jars in <dir>/framework.
    
      -s  (--device_specific) <file>
          Path to the python module containing device-specific
          releasetools code.
    
      -x  (--extra)  <key=value>
          Add a key/value pair to the 'extras' dict, which device-specific
          extension code may look at.
    
      -v  (--verbose)
          Show command lines being executed.
    
      -h  (--help)
          Display this usage message and exit.
    
    ** option --no_assert not recognized **
    make: *** [out/target/product/hallon/aokp_hallon-ota-eng.tenacious.zip] Error 2

    to make it permanent fix, just comment
    # --no_assert=false \

    it's in /build/core/MakeFile at line around 1200