[All In One Guide for Dummies] Porting ROMs/Building CM7 from Source/Themes |80% Done

Search This thread

spaarc

Retired Recognized Developer
Feb 15, 2011
784
940
Here you have it people , I may be wrong at some places so please excuse me :)

Requirements :
winzip
any file explorer on your desktop
2 ROMs ( one of X10 and other )

Suggestions :
Use ROMs from Phones like NexusOne , HTC Desire
all phones with QSD8250 and Adreno 200

Method:
Just do these changes to the files and have a Port which boots up

Delete :
/data folder
boot.img
/system/etc/firmware
/system/etc/init.d

Copy & Paste :
in /system/bin -

akmd2
am
bmgr
chargemon
charger
fix_permissions
hci_qcomm_init
hci_attach
ime
input
monkey
pm
port-bridge
qumxd
rild
updatemiscta
wlanmac
wlantool
ramdisk.tar/.gz

/system/etc :

replace all files in -
bluetooth
dhcpcd
wifi
firmware

copy the files -
apns-conf.xml
dbus.conf
DualMicControl
gps.conf
hosts
init* files
media-profiles.xml
resolv.conf
sensors.conf
sysctl.conf
vold.fstab

/system/lib folder :

delete and replace all files in:
/system/lib/modules
/system/lib/hw

copy the following files
in /system/lib/egl :
All EXCEPT libGLES_android.so

copy & replace these files :
libauth.so
libcm.so
libdiag.so
libdbus.so
libdss.so
libdsm.so
libgsl.so
libgstk_exp.so
libmiscta.so
libmmgsdilib.so
libmmipl.so
libmmjpeg.so
libnv.so
liboem_rapi.so
liboemcamera.so
liboncrpc.so
libpbmlib.so
libqmi.so
libqueue.so
libril.so
libril-qc-1.so
libuim.so
libwms.so
libwmsts.so

/system/usr/keychars -
es209ra_keypad.kcm
and delete the original file (example : passion_keypad.kcm OR bravo_keypad.kcm)

/system/usr/keylayout -
es209ra*.kl
do the same as with.kcm

Replace :-
Build.prop
META-INF folder

Cautions :-
Use the same version of android to port
You will need to change the build.prop to whatever you desire
You may need to edit the update-script

Porting gets over here !!!!!









WAIT I'll Complete it later
 
Last edited:

spaarc

Retired Recognized Developer
Feb 15, 2011
784
940
Many People want to know this right ?

Bro , Dude , Buddy , friend , mate WHICH FILES ARE FOR WHAT ??
what does akmd2 do ? what is it for ????

Here , I will try to provide you as many answers as I can :-

# Prebuilt kl keymaps
/system/usr/keylayout/es209ra_keypad.kl
/system/usr/keylayout/es209ra_handset.kl
/system/usr/keychars/es209ra_keypad.kcm.bin

## RIL related stuff [Responsible For GSM/DATA and Sim card]
/system/lib/libril.so
/system/bin/port-bridge
/system/bin/qmuxd
/system/lib/libauth.so
/system/lib/libcm.so
/system/lib/libdiag.so
/system/lib/libdll.so
/system/lib/libdsm.so
/system/lib/libdss.so
/system/lib/libgsdi_exp.so
/system/lib/libgstk_exp.so
/system/lib/libmmgsdilib.so
/system/lib/libnv.so
/system/lib/liboem_rapi.so
/system/lib/liboncrpc.so
/system/lib/libpbmlib.so
/system/lib/libqmi.so
/system/lib/libqueue.so
/system/lib/libuim.so
/system/lib/libril-qc-1.so
/system/lib/libwms.so
/system/lib/libwmsts.so

## Camera proprietaries
/system/lib/liboemcamera.so
/system/lib/libmmjpeg.so
/system/lib/libmmipl.so
/system/lib/libcamera.so
/system/lib/libopencore_common.so


## FIRMWARE
/system/etc/firmware/yamato_pfp.fw
/system/etc/firmware/yamato_pm4.fw
/system/etc/firmware/camfirm.bin

## ATHEROS WIFI [ WIFI modules for X10 ]
/system/lib/modules/athwlan.bin.z77
/system/lib/modules/data.patch.hw2_0.bin
/system/bin/wlan_mac
/system/bin/wlan_tool

## BT proprietary [ Bluetooth for X10 ]
/system/bin/hci_qcomm_init
/system/bin/hciattach

## Adreno 200 files [ Responsible for display i.e. the GPU ]
/system/lib/libgsl.so
/system/lib/egl/libGLESv1_CM_adreno200.so
/system/lib/egl/libq3dtools_adreno200.so
/system/lib/egl/libEGL_adreno200.so
/system/lib/egl/libGLESv2_adreno200.so

## Other libraries and proprietary binaries
/system/etc/vold.fstab [ SD Card ]
/system/etc/sensors.conf [Proximity sensors , etc]
/system/bin/akmd2

#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so

#hw [The lights between the HOME , Menu and back button ]
/system/lib/hw/copybit.qsd8k.so
/system/lib/hw/sensors.default.so
 
Last edited:

spaarc

Retired Recognized Developer
Feb 15, 2011
784
940
HOW TO MAKE THEMES

There are 2 types of themes you can make :-

1.Involving systemUI.apk and framework-res.apk
2.Involving the T-mobile Theme engine

I will begin with LEVEL (1)

There are two ways of doing this as well :D

1.Classic Way
2.The spaarc's cheap way (I use this one :D)

CLASSIC WAY

Requirements :-
1.A cool head :D
2.Apk Manager 4.4 (OR any APK editor , etc )
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme

Method :-
1.Use apk manager to decompile the original AND Themed apk's(i.e If you have a themed one)
2.ONLY Replace files found in /res/drawable-hdpi folder
3.ReCompile
4.Just replace Using RootExplorer or make a update.zip

Spaarc's Cheap Way

This is top secret , but i will tell it you :D

Requirements :-
1.Computer
2.7-zip
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme

Method :-
1.Use 7-zip to extract the apk
2.Replace files
3.Repack as zip using 7-zip again
4.Rename to ".apk"
5.Replace and Enjoy

T-MOBILE THEME CHOOSER

Follow this AWESOME guide
I don't have the time or patience of rewritting it in my cheeky tongue :D

Here , this completes your themeing guide
If you have any questions just Drop me a PM
 
Last edited:

spaarc

Retired Recognized Developer
Feb 15, 2011
784
940
HOW TO COMPILE CM7 ROMS FROM SOURCE

I have written this guide only for linux Users
Bibliography -
1.source.android.com
2.wiki.cyanogenmod.com

The guide starts here :-

Install the ADB

Install the Android SDK.

2.Install the Build Packages

Install using the package manager of your choice:

For 32-bit & 64-bit systems:

sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool

For 64-bit only systems:

sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib

NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.

NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:

sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"

This will get you all the resources you need to build your CyanogenMod ROM

3.Create the Directories

You will need to set up some directories in your build environment.

To create them:

mkdir -p ~/bin
mkdir -p ~/android/system

4.Install the Repository

Enter the following to download make executable the "repo" binary:

curl https://github.com/spaarc/tools_repo/repo > ~/bin/repo "OR" curl https://github.com/spaarc/tools_repo/blob/master/repo > ~/bin/repo
chmod a+x ~/bin/repo

NOTE: You may need to reboot for these changes to take effect.

Now enter the following to initialize the repository:

cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j16

5.Copy proprietary files

NOTE: This only needs done the first time you build.

You will need to have a Xperia X10 with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.

Connect the device to the computer and ensure that ADB is working properly.

cd ~/android/system/device/SEMC/es209ra/
./extract-files.sh

NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.

6.Download RomManager

NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.

Download RomManager which is needed by the build:

~/android/system/vendor/cyanogen/get-rommanager

7.Building CyanogenMod

Check for updates

First, check for updates in the source:

cd ~/android/system/
repo sync

Configure Build & Compile

Now, the environment must be configured to build and the ROM compiled, from code, for the Xperia X10

. build/envsetup.sh && brunch es209ra

Install

Copy your .zip file from ~/android/system/out/target/product/es209ra/update.cm-XXXXX-signed.zip to the root of the SD card.

Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.

Flash both of these .zip files from recovery.
 
Last edited:

spaarc

Retired Recognized Developer
Feb 15, 2011
784
940
That is nothing ,
The first post is incomplete

I also have to write how to compile Aosp ROM s

Which files are for what , which you r porting

I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...

sent from my Android powered smart phone
 
That is nothing ,
The first post is incomplete

I also have to write how to compile Aosp ROM s

Which files are for what , which you r porting

I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...

sent from my Android powered smart phone

Why dont you type it up on notepad or ms word so you dont have to keep stopping and people than going it is only half complete and crap like that. If you type it all up in notepad then you can just copy/paste here and then it will all me done.

Just saying what I would do and just trying to help

Sent from my X10i using xda premium
 

spaarc

Retired Recognized Developer
Feb 15, 2011
784
940
I don't have time to do it that's why ...
I'll complete it in this week
I don't care what people say

sent from my Android powered smart phone
 
  • Like
Reactions: pficrx

spaarc

Retired Recognized Developer
Feb 15, 2011
784
940
Main part of the guide is over
approx 2/3 left :D

Really really exhausted , TC and bring me new ROMS :D:D:D:D:D:D
 
  • Like
Reactions: pficrx

sahibunlimited

Senior Member
Jul 13, 2011
6,839
2,442
Nagpur
Thanks can u do like a guide of porting roms from the phones with different gpu/cpu?
Paji tussi great hoo!!:D:D

Sent from my X10i using xda premium
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so
is that all for offline charging?

i am working on integrating offline charger in main kernel ramdisk... so that it will be independent of all things in /system

:)
 

spaarc

Retired Recognized Developer
Feb 15, 2011
784
940
If I can't do it how could I teach you ?
It is next to impossible
Bit still editing the init.rc in ramdisk should do the trick

sent from my Android powered smart phone
 
  • Like
Reactions: pficrx

sahibunlimited

Senior Member
Jul 13, 2011
6,839
2,442
Nagpur
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?
 

spaarc

Retired Recognized Developer
Feb 15, 2011
784
940
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?

No nothing more ,
Did you copy the ramdisk ?
Send me a logcat

sent from my Android powered smart phone
 
  • Like
Reactions: sahibunlimited

Top Liked Posts

  • There are no posts matching your filters.
  • 66
    Here you have it people , I may be wrong at some places so please excuse me :)

    Requirements :
    winzip
    any file explorer on your desktop
    2 ROMs ( one of X10 and other )

    Suggestions :
    Use ROMs from Phones like NexusOne , HTC Desire
    all phones with QSD8250 and Adreno 200

    Method:
    Just do these changes to the files and have a Port which boots up

    Delete :
    /data folder
    boot.img
    /system/etc/firmware
    /system/etc/init.d

    Copy & Paste :
    in /system/bin -

    akmd2
    am
    bmgr
    chargemon
    charger
    fix_permissions
    hci_qcomm_init
    hci_attach
    ime
    input
    monkey
    pm
    port-bridge
    qumxd
    rild
    updatemiscta
    wlanmac
    wlantool
    ramdisk.tar/.gz

    /system/etc :

    replace all files in -
    bluetooth
    dhcpcd
    wifi
    firmware

    copy the files -
    apns-conf.xml
    dbus.conf
    DualMicControl
    gps.conf
    hosts
    init* files
    media-profiles.xml
    resolv.conf
    sensors.conf
    sysctl.conf
    vold.fstab

    /system/lib folder :

    delete and replace all files in:
    /system/lib/modules
    /system/lib/hw

    copy the following files
    in /system/lib/egl :
    All EXCEPT libGLES_android.so

    copy & replace these files :
    libauth.so
    libcm.so
    libdiag.so
    libdbus.so
    libdss.so
    libdsm.so
    libgsl.so
    libgstk_exp.so
    libmiscta.so
    libmmgsdilib.so
    libmmipl.so
    libmmjpeg.so
    libnv.so
    liboem_rapi.so
    liboemcamera.so
    liboncrpc.so
    libpbmlib.so
    libqmi.so
    libqueue.so
    libril.so
    libril-qc-1.so
    libuim.so
    libwms.so
    libwmsts.so

    /system/usr/keychars -
    es209ra_keypad.kcm
    and delete the original file (example : passion_keypad.kcm OR bravo_keypad.kcm)

    /system/usr/keylayout -
    es209ra*.kl
    do the same as with.kcm

    Replace :-
    Build.prop
    META-INF folder

    Cautions :-
    Use the same version of android to port
    You will need to change the build.prop to whatever you desire
    You may need to edit the update-script

    Porting gets over here !!!!!









    WAIT I'll Complete it later
    21
    Many People want to know this right ?

    Bro , Dude , Buddy , friend , mate WHICH FILES ARE FOR WHAT ??
    what does akmd2 do ? what is it for ????

    Here , I will try to provide you as many answers as I can :-

    # Prebuilt kl keymaps
    /system/usr/keylayout/es209ra_keypad.kl
    /system/usr/keylayout/es209ra_handset.kl
    /system/usr/keychars/es209ra_keypad.kcm.bin

    ## RIL related stuff [Responsible For GSM/DATA and Sim card]
    /system/lib/libril.so
    /system/bin/port-bridge
    /system/bin/qmuxd
    /system/lib/libauth.so
    /system/lib/libcm.so
    /system/lib/libdiag.so
    /system/lib/libdll.so
    /system/lib/libdsm.so
    /system/lib/libdss.so
    /system/lib/libgsdi_exp.so
    /system/lib/libgstk_exp.so
    /system/lib/libmmgsdilib.so
    /system/lib/libnv.so
    /system/lib/liboem_rapi.so
    /system/lib/liboncrpc.so
    /system/lib/libpbmlib.so
    /system/lib/libqmi.so
    /system/lib/libqueue.so
    /system/lib/libuim.so
    /system/lib/libril-qc-1.so
    /system/lib/libwms.so
    /system/lib/libwmsts.so

    ## Camera proprietaries
    /system/lib/liboemcamera.so
    /system/lib/libmmjpeg.so
    /system/lib/libmmipl.so
    /system/lib/libcamera.so
    /system/lib/libopencore_common.so


    ## FIRMWARE
    /system/etc/firmware/yamato_pfp.fw
    /system/etc/firmware/yamato_pm4.fw
    /system/etc/firmware/camfirm.bin

    ## ATHEROS WIFI [ WIFI modules for X10 ]
    /system/lib/modules/athwlan.bin.z77
    /system/lib/modules/data.patch.hw2_0.bin
    /system/bin/wlan_mac
    /system/bin/wlan_tool

    ## BT proprietary [ Bluetooth for X10 ]
    /system/bin/hci_qcomm_init
    /system/bin/hciattach

    ## Adreno 200 files [ Responsible for display i.e. the GPU ]
    /system/lib/libgsl.so
    /system/lib/egl/libGLESv1_CM_adreno200.so
    /system/lib/egl/libq3dtools_adreno200.so
    /system/lib/egl/libEGL_adreno200.so
    /system/lib/egl/libGLESv2_adreno200.so

    ## Other libraries and proprietary binaries
    /system/etc/vold.fstab [ SD Card ]
    /system/etc/sensors.conf [Proximity sensors , etc]
    /system/bin/akmd2

    #offline charger
    /system/bin/chargemon
    /system/bin/updatemiscta
    /system/lib/libmiscta.so

    #hw [The lights between the HOME , Menu and back button ]
    /system/lib/hw/copybit.qsd8k.so
    /system/lib/hw/sensors.default.so
    10
    HOW TO COMPILE CM7 ROMS FROM SOURCE

    I have written this guide only for linux Users
    Bibliography -
    1.source.android.com
    2.wiki.cyanogenmod.com

    The guide starts here :-

    Install the ADB

    Install the Android SDK.

    2.Install the Build Packages

    Install using the package manager of your choice:

    For 32-bit & 64-bit systems:

    sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool

    For 64-bit only systems:

    sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib

    NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.

    NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:

    sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"

    This will get you all the resources you need to build your CyanogenMod ROM

    3.Create the Directories

    You will need to set up some directories in your build environment.

    To create them:

    mkdir -p ~/bin
    mkdir -p ~/android/system

    4.Install the Repository

    Enter the following to download make executable the "repo" binary:

    curl https://github.com/spaarc/tools_repo/repo > ~/bin/repo "OR" curl https://github.com/spaarc/tools_repo/blob/master/repo > ~/bin/repo
    chmod a+x ~/bin/repo

    NOTE: You may need to reboot for these changes to take effect.

    Now enter the following to initialize the repository:

    cd ~/android/system/
    repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
    repo sync -j16

    5.Copy proprietary files

    NOTE: This only needs done the first time you build.

    You will need to have a Xperia X10 with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.

    Connect the device to the computer and ensure that ADB is working properly.

    cd ~/android/system/device/SEMC/es209ra/
    ./extract-files.sh

    NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.

    6.Download RomManager

    NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.

    Download RomManager which is needed by the build:

    ~/android/system/vendor/cyanogen/get-rommanager

    7.Building CyanogenMod

    Check for updates

    First, check for updates in the source:

    cd ~/android/system/
    repo sync

    Configure Build & Compile

    Now, the environment must be configured to build and the ROM compiled, from code, for the Xperia X10

    . build/envsetup.sh && brunch es209ra

    Install

    Copy your .zip file from ~/android/system/out/target/product/es209ra/update.cm-XXXXX-signed.zip to the root of the SD card.

    Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.

    Flash both of these .zip files from recovery.
    9
    HOW TO MAKE THEMES

    There are 2 types of themes you can make :-

    1.Involving systemUI.apk and framework-res.apk
    2.Involving the T-mobile Theme engine

    I will begin with LEVEL (1)

    There are two ways of doing this as well :D

    1.Classic Way
    2.The spaarc's cheap way (I use this one :D)

    CLASSIC WAY

    Requirements :-
    1.A cool head :D
    2.Apk Manager 4.4 (OR any APK editor , etc )
    3.Original Framework-res.apk and SystemUI.apk
    4.Themed Framework-res.apk and SystemUI.apk
    OR
    4.Many .PNG Images , In order to theme

    Method :-
    1.Use apk manager to decompile the original AND Themed apk's(i.e If you have a themed one)
    2.ONLY Replace files found in /res/drawable-hdpi folder
    3.ReCompile
    4.Just replace Using RootExplorer or make a update.zip

    Spaarc's Cheap Way

    This is top secret , but i will tell it you :D

    Requirements :-
    1.Computer
    2.7-zip
    3.Original Framework-res.apk and SystemUI.apk
    4.Themed Framework-res.apk and SystemUI.apk
    OR
    4.Many .PNG Images , In order to theme

    Method :-
    1.Use 7-zip to extract the apk
    2.Replace files
    3.Repack as zip using 7-zip again
    4.Rename to ".apk"
    5.Replace and Enjoy

    T-MOBILE THEME CHOOSER

    Follow this AWESOME guide
    I don't have the time or patience of rewritting it in my cheeky tongue :D

    Here , this completes your themeing guide
    If you have any questions just Drop me a PM
    3