[XPERIA X10 Android Development] x10forevers:
Xperia X10 specific device tree modifications

So, now you will have to add device tree and dependencies to local repo...

For that you have to copy sources from github to local directory and also device's repository

Let's start with it... (I am describing here how to setup device tree for cm10.1 from CMX10 repositories)

3A: Add Device tree and dependency for cm10.1​

- Go to your working directory and press ctrl+h - You will see .repo directory

- Open .repo and there make a folder named local_manifests

- In .repo/local_manifests right click and make a new document and name it to roomservice.xml and type this :

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
#Add hardware from Evervolv sources
<project path="hardware/qcom/display-legacy" name="Evervolv/android_hardware_qcom_display-legacy" revision="jellybean" />
<project path="hardware/qcom/gps-legacy" name="Evervolv/android_hardware_qcom_gps-legacy" revision="jellybean" />
#Add sources from CMX10 repo
<project path="hardware/atheros/wifi/libs" name="CMX10/android_hardware_atheros_wifi_libs" revision="cm-10.1" />
<project path="hardware/sony/DASH" name="CyanogenMod/android_hardware_sony_DASH" revision="cm-10.1" />
<project name="CMX10/android_device_semc_es209ra" path="device/semc/es209ra" revision="cm10.1" />
<project name="CMX10/proprietary_es209ra" path="vendor/semc/es209ra" revision="jellybean" />
<project name="CMX10/android_kernel_semc_es209ra" path="kernel/semc/es209ra" revision="master" />
</manifest>

- After copying this sources you have to sync repo

cd WORKING_DIRECTORY
repo sync

- You will not need any vendor specific changes for cm10.1 you can directly go to the step 3F for next instruction...

3B: Editing source for slimroms​

- Finish steps of 3A than we have to edit some details in device/semc/es209ra in local directory

- go to device/semc/es209ra and rename cm.mk file to slim.mk

- now open slim.mk file with text editor select all and copy paste following details:

## Specify phone tech before including full_phone
$(call inherit-product, vendor/slim/config/gsm.mk)

# Inherit some common slimrom stuff.
$(call inherit-product, vendor/slim/config/common_full_phone.mk)

# Inherit device configuration
$(call inherit-product, device/semc/es209ra/full_es209ra.mk)

# Boot Animation
TARGET_SCREEN_HEIGHT := 854
TARGET_SCREEN_WIDTH := 480

# Release name
PRODUCT_RELEASE_NAME := X10i

## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := es209ra
PRODUCT_NAME := slim_es209ra

#Set build fingerprint / ID / Product Name ect.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=LT18i BUILD_FINGERPRINT="SEMC/LT18i_1254-2184/LT18i:4.0.4/4.1.B.0.431/UL5_3w:user/release-keys" PRIVATE_BUILD_DESC="LT18i-user 4.0.4 4.1.B.0.431 UL5_3w test-keys"

- You also have to edit dependency file for slimrom

- Rename cm.dependencies to slim.dependencies, open it with text editor, select all and copy paste following details

[
{
"repository": "SlimRoms/hardware_libhardware_legacy",
"target_path": "hardware/libhardware_legacy",
"branch": "jellybean" [COLOR="Red"]<<< change branch according to your android version[/COLOR]
}
]

- Now go to the next post for editing vendor source....

3C: Editing source for aokp​

- Find of championswimmer's aokp source tree for aokp manifestations

- He has all working tree for x10..

- If you need any further help for aokp, ask here...

3D: Editing source for MoKee OpenSource​

- Finish steps of 3A than we have to edit some details in device/semc/es209ra in local directory

- go to device/semc/es209ra and rename cm.mk file to mokee.mk

- now open mokee.mk file with text editor select all and copy paste following details:

## Specify phone tech before including full_phone
$(call inherit-product, vendor/mk/config/gsm.mk)

# Inherit some common MoKee stuff.
$(call inherit-product, vendor/mk/config/common_full_phone.mk)

# Inherit device configuration
$(call inherit-product, device/semc/es209ra/full_es209ra.mk)

# Boot Animation
TARGET_SCREEN_HEIGHT := 854
TARGET_SCREEN_WIDTH := 480

# Release name
PRODUCT_RELEASE_NAME := X10i

## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := es209ra
PRODUCT_NAME := mk_es209ra

#Set build fingerprint / ID / Product Name ect.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=LT18i BUILD_FINGERPRINT="SEMC/LT18i_1254-2184/LT18i:4.0.4/4.1.B.0.431/UL5_3w:user/release-keys" PRIVATE_BUILD_DESC="LT18i-user 4.0.4 4.1.B.0.431 UL5_3w test-keys"

- Not done yet, Now go to next post for vendor specific changes

3E: Editing source for Paranoid Android and PAC-man​

- For Paranoid android you will need some extensive changes in vendor files, just finish step 3A and go to next step for vendor specific changes.

- No any device tree changes needed for PA and PAC-man

- If you want any other custom rom device tree, post github source code here and I will try to edit source for you and add it here

3F: Compilation of Rom​

- Now actual compilation start - Let's start

cd WORKING_DIRECTORY
. build/envsetup.sh
lunch

- Select your combo for cm it should be cm_es209ra-userdebug write appropriate number and than press Enter

- Than start building

make -j4
make otapackage -j4

- Here the number after -j indicates core of your PC+1 if you have 3 core pc you can use -j4

- Once you finish all the process you will find flashable zip in your out directory

​