[GUIDE]Building any ROM from source for HTC One S aka ville! - HTC One S

Do you know about a ROM that it's not builded for our beloved One S? Do you want to port it for our device? This easy guide will help you.
Requirements:
A One S.
A relatively recent computer (Linux, OS X, or Windows) w/a reasonable amount of RAM and about 35 GB of free storage. The less RAM you have, the longer the build will take. Using SSDs results in faster builds than traditional hard drives.
A micro USB cable.
A decent Internet connection & reliable electricity
Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with what a recovery image such as ClockworkMod is, for example. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /, etc.
​HERE IS THE GUIDE.
Installing Build Packages
Open the terminal and type: (for 64-bit&32-bit)
Code:
sudo apt-get install bison build-essential curl flex git-core gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
In addition to the above, for 64-bit systems:
Code:
sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
Creating Directories
In order to start building ROMs you'll need to create some directories
Code:
mkdir -p ~/bin
mkdir -p ~/yourworkingdirectory
Installing the REPO command
Enter the following to download the "repo" binary:
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Now lets give this the proper permissions to make it runnable:
Code:
chmod a+x ~/bin/repo
Put the ~/bin directory in your path of execution
Make sure that the ~/bin directory you just created is in your path of execution so that you can easily run the repo command even when you're not in ~/bin.
Code:
export PATH=${PATH}:~/bin
Initialize the source repository
Code:
cd yourworkingdirectory
Now you'll need the repo init related to the rom you'd like to build. Here i will insert some of the I used. Anyway to find this you can go the rom's github and search for the manifest (android or platform-manifest).Just choose the right branch.
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo init -u git://github.com/LiquidSmooth/android.git -b kitkat
repo init -u git://github.com/SlimRoms/platform_manifest.git -b kk4.4-caf
Download the source code
This will download all the source code to your computer.Prepare to wait a long time while the source code downloads.
Code:
repo sync
Download device,kernel and vendor tree for Liquid
We will use CM ones. Thanks a lot.
Basically we need to add some projects to the download list. To do this we'll need a local_manifest.
Go in the .repo folder in your working directory(it's an hidden folder press ctrl+h). Create a new folder called "local manifests" then double click on it. Now you'll have to create a roomservice.xml file for the most of the ROMs and a slim_manifest.xml for SlimRoms, it's the same thing just the name it's different.
Open this file and paste this inside:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github"
fetch="git://github.com/" />
<project name="CyanogenMod/android_device_htc_ville" path="device/htc/ville" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_s4-common" path="device/htc/s4-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_htc_msm8960" path="kernel/htc/msm8960" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>
Now give another:
Code:
repo sync
and wait.
Do some modifications to the .mk files
Since we are using CM device tree we need to modify them for the choosen ROM.
Go into the device folder(device/htc/ville) and do some modifications. I will explain you what i mean using LiquidSmooth as example.
1) Create a new file called vendorsetup.sh . Open it and inside you'll have to write a script to add it to the lunch list.
Code:
add_lunch_combo liquid_ville-userdebug
You can choose if you want an userdebug version of the rom or an eng one just by writing eng instead of userdebug.
2) Now rename cm.mk into liquid.mk(for other ROMs this file should be renamed in a different way. Use an existing device tree to see the correct naming.)
3) Open the .mk file. You'll find something like this:
Code:
# Release name
PRODUCT_RELEASE_NAME := ville
# Boot animation
TARGET_SCREEN_HEIGHT := 960
TARGET_SCREEN_WIDTH := 540
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, device/htc/ville/device_ville.mk)
# Device naming
PRODUCT_DEVICE := ville
PRODUCT_NAME := cm_ville
PRODUCT_BRAND := htc
PRODUCT_MODEL := One S
PRODUCT_MANUFACTURER := HTC
# Set build fingerprint / ID / Product Name ect.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=htc_ville BUILD_FINGERPRINT=htc_europe/ville/ville:4.1.1/JRO03C/128506.8:user/release-keys PRIVATE_BUILD
You need to modify some things to make it buildable:
Code:
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
becomes:
Code:
# Inherit some common LiquidSmooth stuff.
$(call inherit-product, vendor/liquid/config/common_phone.mk)
To understand the changes you'll have to go in the vendor folder searching the rom specific vendor and open the config folder to see what .mk file you need.You need to use your brain to understand what you should write instead of cm every ROM has different naming conventions.
This:
Code:
PRODUCT_NAME := cm_ville
becomes:
Code:
PRODUCT_NAME := liquid_ville
4) Now rename cm.dependencies in liquid.dependencies(SlimRoms does not require this step for unsupported devices.)
Start the build
Code:
source build/envsetup.sh
If you created the vendorsetup.sh in the right way you will read the ville folder.
Code:
lunch
Now you have to choose the number near the ville in the list of the supported devices.
If you have done all in the correct way in your terminal you'll see a page like this:
View attachment 2470228
Build
After lunching you have to start the build using the right command:
For liquid:
Code:
time mka liquid
For others:
Code:
make bacon
make
brunch devicename
Wait some time till the build ends hopefully with no errors.​
Now You could think that i forgot you hboot 2.16 users.But this is not true. This is a cherry-pick that let you build every rom for 2.16 hboot.
Code:
cd device/htc/ville
git fetch http://review.cyanogenmod.org/CyanogenMod/android_device_htc_ville refs/changes/47/53647/9 && git cherry-pick FETCH_HEAD
Since you have no 4.4 recovery you'll need this other step:
Code:
Flashable via normal TWRP
add this line
SKIP_SET_METADATA := true
in device/htc/s4-common/BoardConfigCommon.mk
cherry-pick i think.
Code:
cd workingdirectory/build
git fetch http://review.cyanogenmod.org/CyanogenMod/android_build refs/changes/59/53559/6 && git cherry-pick FETCH_HEAD
​
Credits: http://wiki.cyanogenmod.org/w/Build_for_ville
and all the experience i got in this 2 months of building.

For most ROMS you'll have some overlays errors.
Just go in the overlay folder linked in the error and open config.xml. Just delete the lines in the error or search in the folder history the commit that you have to revert.
To revert a commit:
Code:
cd intheinteressedfolder
git revert thenumberofthecommit
Here is a screenshot of the what the number/name of the commit is:
View attachment 2470242

it might be a stupid question: so i dont need any programing skills?

Hai96 said:
it might be a stupid question: so i dont need any programing skills?
Click to expand...
Click to collapse
For building from source nope

phoenixita said:
For building from source nope
Click to expand...
Click to collapse
Ok, then I will test your Guide

Hai96 said:
Ok, then I will test your Guide
Click to expand...
Click to collapse
Added some lines in purple for 2.16 users.

@phoenixita Iam stucking at the point of doing modifications to the mk. files, i dont have a ville folder in my device folder...
View attachment 2471072

Hai96 said:
@phoenixita Iam stucking at the point of doing modifications to the mk. files, i dont have a ville folder in my device folder...
View attachment 2471072
Click to expand...
Click to collapse
Download device,kernel and vendor tree for Liquid
We will use CM ones. Thanks a lot.
Basically we need to add some projects to the download list. To do this we'll need a local_manifest.
Go in the .repo folder in your working directory(it's an hidden folder press ctrl+h). Create a new folder called "local manifests" then double click on it. Now you'll have to create a roomservice.xml file for the most of the ROMs and a slim_manifest.xml for SlimRoms, it's the same thing just the name it's different.
Open this file and paste this inside:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github"
fetch="git://github.com/" />
<project name="CyanogenMod/android_device_htc_ville" path="device/htc/ville" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_s4-common" path="device/htc/s4-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_htc_msm8960" path="kernel/htc/msm8960" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>
Now give another:
Code:
repo sync
and wait.

@phoenixita I had followed your guide and now I have the 3.0 liquid smooth build and it boots.
But the build process was very slow, my computer needed 4 hours to build this. Does it need only at the first building process so long or it's my computer ?
If I want to build paranoid android, what do I need to change?

Hai96 said:
@phoenixita I had followed your guide and now I have the 3.0 liquid smooth build and it boots.
But the build process was very slow, my computer needed 4 hours to build this. Does it need only at the first building process so long or it's my computer ?
If I want to build paranoid android, what do I need to change?
Click to expand...
Click to collapse
Paranoid android it's a different thing anyway rmbq has written a guide for porting PA.
4 hours it's okay...

i have another question
When I want to build AOKP,Slim Rom,... I need to create for every Rom a new working directory and download Repositorys,or?

Hai96 said:
i have another question
When I want to build AOKP,Slim Rom,... I need to create for every Rom a new working directory and download Repositorys,or?
Click to expand...
Click to collapse
Yes you need to download each source for each ROM you want to build in its own directory
---------- Post added at 09:02 PM ---------- Previous post was at 08:48 PM ----------
Hai96 said:
@phoenixita I had followed your guide and now I have the 3.0 liquid smooth build and it boots.
But the build process was very slow, my computer needed 4 hours to build this. Does it need only at the first building process so long or it's my computer ?
If I want to build paranoid android, what do I need to change?
Click to expand...
Click to collapse
Google how to set up ccache. It will reduce the time of the builds after you first initial build using it

phoenixita said:
Download device,kernel and vendor tree for Liquid
We will use CM ones. Thanks a lot.
Basically we need to add some projects to the download list. To do this we'll need a local_manifest.
Go in the .repo folder in your working directory(it's an hidden folder press ctrl+h). Create a new folder called "local manifests" then double click on it. Now you'll have to create a roomservice.xml file for the most of the ROMs and a slim_manifest.xml for SlimRoms, it's the same thing just the name it's different.
Open this file and paste this inside:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github"
fetch="git://github.com/" />
<project name="CyanogenMod/android_device_htc_ville" path="device/htc/ville" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_s4-common" path="device/htc/s4-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_htc_msm8960" path="kernel/htc/msm8960" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>
Now give another:
Code:
repo sync
and wait.
Click to expand...
Click to collapse
Can you incorporate the above instructions in the OP? You did lose me a bit.
Thanks for the guide perhaps a sticky?

ttaidapos said:
Can you incorporate the above instructions in the OP? You did lose me a bit.
Thanks for the guide perhaps a sticky?
Click to expand...
Click to collapse
they are in the OP...I've copied them........................................................

I want to build omni Rom for the One S but i get big Error after the lunch command...
Do you know what iam doing wrong?
View attachment 2474393

Hai96 said:
I want to build omni Rom for the One S but i get big Error after the lunch command...
Do you know what iam doing wrong?
View attachment 2474393
Click to expand...
Click to collapse
Have you renamed cm.mk in omni.Mk? And have you done the right chsnges?

phoenixita said:
Have you renamed cm.mk in omni.Mk? And have you done the right chsnges?
Click to expand...
Click to collapse
Yes I have renamed the .Mk files....
What do you mean with changes?
I have changed all the things from liquid to Omni
Gesendet von meinem HTC One S

Hai96 said:
Yes I have renamed the .Mk files....
What do you mean with changes?
I have changed all the things from liquid to Omni
Gesendet von meinem HTC One S
Click to expand...
Click to collapse
If you are just starting to build. Pick a different ROM than omni. It has a few more changes that needs made than the ones in this guide. And it will error with invalid integers which will be difficult for a new builder to fix.

WhiTeRhiNo said:
If you are just starting to build. Pick a different ROM than omni. It has a few more changes that needs made than the ones in this guide. And it will error with invalid integers which will be difficult for a new builder to fix.
Click to expand...
Click to collapse
I will give omni a try!

WhiTeRhiNo said:
If you are just starting to build. Pick a different ROM than omni. It has a few more changes that needs made than the ones in this guide. And it will error with invalid integers which will be difficult for a new builder to fix.
Click to expand...
Click to collapse
Can you name one Rom that can be build with this guide?

Related

[Solved] Building CM9

With there being a bit of an hiatus on CM9 development (waiting for HTC kernel source, working on JB), I thought I'd learn more about building ROMs.
I'm running Ubuntu 10.04 (and 12.04) under VMware Player on Windows 7 Home.
I downloaded the JB AOSP repository and built it successfully for the emulator.
Next, I wanted to build a working ROM, so I chose to do CM9 (ICS).
I've followed [TUTORIAL]Setting up and compiling CM9 from source
and some info regarding building JB:
nk111 said:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync
./build/envsetup.sh
brunch saga
Click to expand...
Click to collapse
Here's what I did:
repo init -u git://github.com/CyanogenMod/android.git -b ics
Added a "remote" to get the proprietary files for HTC devices by creating WorkingDir/.repo/local_manifest.xml
Note: An alternative to using nexx/proprietary_vendor_htc is to run ./extract-files.sh from WorkingDir/device/htc/saga with your PC connected to your phone (it used adb to pull down the proprietary files)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="https://github.com/" name="nexx" revision="ics" />
<project name="nexx/proprietary_vendor_htc" path="vendor/htc" remote="nexx" revision="ics" />
<!-- the following lines were added automatically by "brunch saga" command -->
<project name="CyanogenMod/android_device_htc_saga" path="device/htc/saga" remote="github" revision="ics" />
<project name="CyanogenMod/android_device_htc_msm7x30-common" path="device/htc/msm7x30-common" remote="github" revision="ics" />
<project name="CyanogenMod/htc-kernel-msm7x30" path="kernel/htc/msm7x30" remote="github" revision="android-msm-2.6.35-ics" />
</manifest>
repo sync
Note: the next bit adds the ROM Manager and Term packages which are required by CM
cd vendor/cm
./get-prebuilts
cd ../..
. build/envsetup.sh
brunch saga (I also tried breakfast saga; lunch;mka)
The build failed with these errors:
target SharedLib: audio.primary.msm7x30 (out/target/product/saga/obj/SHARED_LIBRARIES/audio.primary.msm7x30_intermediates/LINKED/audio.primary.msm7x30.so)
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/saga/obj/SHARED_LIBRARIES/audio.primary.msm7x30_intermediates/AudioHardware.o: in function android_audio_legacy::AudioHardware::setMicMute_nosync(bool):hardware/qcom/media/audio/msm7x30/AudioHardware.cpp:932: error: undefined reference to 'msm_device_mute'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/saga/obj/SHARED_LIBRARIES/audio.primary.msm7x30_intermediates/AudioHardware.o: in function android_audio_legacy::AudioHardware::AudioHardware():hardware/qcom/media/audio/msm7x30/AudioHardware.cpp:566: error: undefined reference to 'msm_reset_all_device'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/saga/obj/SHARED_LIBRARIES/audio.primary.msm7x30_intermediates/AudioHardware.o: in function android_audio_legacy::updateDeviceInfo(int, int, unsigned int, unsigned int):hardware/qcom/media/audio/msm7x30/AudioHardware.cpp:449: error: undefined reference to 'msm_device_mute'
collect2: ld returned 1 exit status
Note this error occurs both in Ubuntu 10.04 and 12.04
What am I missing and what do I need to do to get the error fixed?
Thanks
Edit:
Solution
The version of Ubuntu has nothing to do with the problem.
The errors point to some missing functions called by hardware/qcom/media/audio/msm7x30/AudioHardware.cpp
The modules in nexx/proprietary_vendor_htc are missing the required functions so copy them from a working CM9 ROM.
tuttifrutas said:
i mean you should run the file extract-files.sh, this will copy the files from your phone to the folder vendor/htc/saga/proprietary, just notice that your phone should have at least one of the latest cm9 nk111 roms.
or you can extract the nk111 cm9 rom to a folder, goto that folder and under sytem/lib, copy the needed .so files to the vendor/htc/saga/proprietary replacing the files on this folder
or you can add repository that is not nexx for example https://github.com/AOKPDS/proprietary_vendor_htc
you can check if the files contain that function by using this command in the folder vendor/htc/saga/proprietary
Code:
grep -R msm_device_mute .
My output
Code:
~/cm9/vendor/htc/saga/proprietary$ grep -R msm_device_mute
.Binary file ./libaudioalsa.so matches
Click to expand...
Click to collapse
Thanks Bill for the start and the steps, please keep updating the OP as you proceed on your journey.
I would also like to Build CM9 myself atleast once
Hi maybe you are missing some projects
try this on you local_manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_htc_saga" path="device/htc/saga" remote="github" revision="ics" />
<project name="CyanogenMod/android_device_htc_msm7x30-common" path="device/htc/msm7x30-common" remote="github" revision="ics" />
<project name="nexx/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="ics" />
</manifest>
i think you need to go to vendor/cm/ and excute get-prebuilds or something like that if you get some rommanager error
This is what my local_manifest.xml looks like:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="https://github.com/" name="nexx" revision="ics" />
<project name="nexx/proprietary_vendor_htc" path="vendor/htc" remote="nexx" revision="ics" />
<project name="CyanogenMod/android_device_htc_saga" path="device/htc/saga" remote="github" revision="ics" />
<project name="CyanogenMod/android_device_htc_msm7x30-common" path="device/htc/msm7x30-common" remote="github" revision="ics" />
<project name="CyanogenMod/htc-kernel-msm7x30" path="kernel/htc/msm7x30" remote="github" revision="android-msm-2.6.35-ics" />
</manifest>
The brunch saga command added these additional entries automatically.
I know this seems like a long shot and it may not fix the problem but it could be Ubuntu 12.04 causing problems. 10.04 is the best version. Also you don't need to add the kernel to the local manifest unless you're creating a custom one. It's already in the device tree
Sent from my Desire S using Tapatalk 2
Is your repository properly synchronized? If not it is probably your build machine
Sent from my Desire S using xda app-developers app
Thanks, guys. I'll try using Ubuntu 10 instead of 12.
Sent from my HTC Desire S
I did a complete reinstall on Ubuntu 10.04. But I still get the same errors. Note, I've updated the OP with more details on my environment and the steps I went through.
i got the same error when i tried to compile it on a Virtual machine. I'm not an expert but it seems to me that the file vendor/htc/saga/proprietary/libaudioalsa.so should have that function but it doesn't !? correct me if i'm wrong
try extracting the files from one of cm9 alpha builds using the script extract-files.sh under the folder device/htc/saga/
or just open the cm9 alpha zip file goto system/lib copy and replace the file libaudioalsa.so in the dir vendor/htc/saga/proprietary/
EDIT:
the proprietary repository, that is added using brunch saga, is the culprit it breaks the build
I managed to get a working build!
The errors point to some missing functions called by hardware/qcom/media/audio/msm7x30/AudioHardware.cpp
So I had a look at the code and found that there were two conditions that invoked the problem code:
#ifdef WITH_QCOM_RESETALL
and
#ifdef WITH_QCOM_VOIPMUTE
So I commented out these sections and, voila, it compiled!
Now, I have no idea what is the broader impact of what I've done, but the build work and runs on the phone.
So I'm changing this thread for [Q] to [Partial solution]
tuttifrutas said:
EDIT:
the proprietary repository, that is added using brunch saga, is the culprit it breaks the build
Click to expand...
Click to collapse
Can you please be a bit more specific? The CyanogenMod/android_device_htc_saga project adds the proprietary files only if you connect your phone and run ./extract-files.sh.
Are you saying:
Don't run extract-files.sh, or
Remove the CyanogenMod/android_device_htc_saga project, which doesn't make sense to me because it includes a lot more than just the proprietary files, or
????
BillGoss said:
Can you please be a bit more specific? The CyanogenMod/android_device_htc_saga project adds the proprietary files only if you connect your phone and run ./extract-files.sh.
Are you saying:
Don't run extract-files.sh, or
Remove the CyanogenMod/android_device_htc_saga project, which doesn't make sense to me because it includes a lot more than just the proprietary files, or
????
Click to expand...
Click to collapse
i mean you should run the file extract-files.sh, this will copy the files from your phone to the folder vendor/htc/saga/proprietary, just notice that your phone should have at least one of the latest cm9 nk111 roms.
or you can extract the nk111 cm9 rom to a folder, goto that folder and under sytem/lib, copy the needed .so files to the vendor/htc/saga/proprietary replacing the files on this folder
or you can add repository that is not nexx for example https://github.com/AOKPDS/proprietary_vendor_htc
you can check if the files contain that function by using this command in the folder vendor/htc/saga/proprietary
Code:
grep -R msm_device_mute .
My output
Code:
~/cm9/vendor/htc/saga/proprietary$ grep -R msm_device_mute
.Binary file ./libaudioalsa.so matches

[GUIDE] Building CM9 for i9003 from sources

Well I haven't seen any thread about it and wanted to share it.
Here you can follow this guide to build your own nightly and change what you want.
NOTES:
This is the way I did here, it could not be the best nor the correct way but it worked for me.
If you think that you could do something here in a better way, or something is wrong let me know and I will update this thread according.
Im following the original CM9 template here: http://wiki.cyanogenmod.com/wiki/Template:Build_from_source_(CM9)
I know there is the build.sh script from teamhacksung but haven't used here, If you think it can simplify this guide in any way I'll update it according.
I have done this on Ubuntu 12.04 - 64bits.
*** Of course you are the only responsible to follow this and flash anything to your phone.
There are chances to damage your phone or loosing very important data such as /efs partition, like the latests CWM updates did, its fixed aparently atm.
I recommend always have a backup of /efs partition. ***
Click to expand...
Click to collapse
IMPORTANT: Don't run any shell command logged on as root (sudo su / sudo -i), if any command asks for root permissions just do "sudo command"
1.- Prepare the Build Environment
Click to expand...
Click to collapse
NOTE: These steps only need to be performed once. If the build environment is already prepared, skip to Copy proprietary files.
Install the Android SDK
Install the Build Packages
For 64-bit systems:
Open a new terminal and type the following:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 g++-multilib mingw32 oracle-java7-installer pngcrush schedtool tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Create the Directories
You will need to set up some directories in your build environment.
To create them:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Install the Repository
Enter the following to download make executable the "repo" binary:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot / restart the terminal for these changes to take effect.
Now enter the following to initialize the repository:
Code:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync -j16
Where 16 is the number of jobs to do simultaneously, this will download 5~10gb so take a break.
2.- Sync Relevant Repositories and Download Propietary Files
Click to expand...
Click to collapse
NOTE: This only needs to be done the first time after installing the repository.
By default, CyanogenMod 9 only syncs the core android repositories and none of the device or kernel trees to save both bandwidth and time.
To sync the necessary components for the device you need to do the following:
Start a new terminal and change dir where your repo is actually installed, in this case ~/android/system
Code:
cd ~/android/system
Then, you will need to make some changes on a hidden folder called .repo, do the following in your terminal:
Code:
cd .repo
gedit local_manifest.xml
That will create a new file, you need to copy and paste this:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="teamhacksung/android_device_samsung_galaxysl" path="device/samsung/galaxysl" remote="github" revision="ics" />
<project name="teamhacksung/android_vendor_samsung_galaxysl" path="vendor/samsung/galaxysl" remote="github" revision="ics" />
<project name="teamhacksung/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="ics-samsung-2.6.35.7" />
<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="ics">
<copyfile dest="build.sh" src="samsung/build.sh" />
</project>
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" />
</manifest>
Click to expand...
Click to collapse
Save and close. You should have now a file called local_manifest.xml in ~/android/system/.repo/
Then, back in the terminal you must edit another .xml to fix an issue related with DHCP to make wifi work properly.
Code:
cd manifests
gedit default.xml
That will open the file to edit, then you should look (Ctrl+F) for this string: "dhcp" and replace the whole line (starts with "<" and and finishes with ">") for this one:
Code:
<project path="external/dhcpcd" name="CyanogenMod/android_external_dhcpcd" remote="github" revision="gb-release-7.2"/>
Save and close. Its almost done. Now you need to sync with the latest changes we did to the manifests, that will download the kernel, device, vendor, etc from teamhacksung repo:
Code:
cd ~/android/system
repo sync -j16
NOTE: If some hardware isn't functioning properly, you may need to run the above command again for updated proprietary files.
3.- Download Prebuilts
Click to expand...
Click to collapse
Download Prebuilts needed by the build:
Code:
~/android/system/vendor/cm/get-prebuilts
4.- Building CyanogenMod
Click to expand...
Click to collapse
Check for updates
First, check for updates in the source:
Code:
cd ~/android/system/
repo sync
Configure Build & Compile
First of all you must compile the kernel and replace the prebuilt one and modules with the new one (it's outdated).
Fortunately for you, just need to run a script and it's done automatically:
Code:
cd ~/android/system/kernel/samsung/latona
./build.sh
Now, the environment must be configured for the build process and then begin compilation for the Samsung Galaxy SL (i9003).
Code:
. build/envsetup.sh
brunch galaxysl
5.- Install
Click to expand...
Click to collapse
1.- Copy your .zip file from ~/android/system/out/target/product/galaxysl/cm-9-XXXXX-UNOFFICIAL-galaxysl.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 9 and place it on the root of the SD card.
2.- Flash both of these .zip files from recovery.
Credits to:
dhiru1602 and teamhacksung
For helping me to build mine flawlessly:
ganeshbiyer
loSconosciuto
alfrix > recommended me to use sun/oracle jdk (oracle-java7-installer) instead of openjdk (openjdk-7-jdk).
If you wish to use OpenJDK instead of Oracle JDK replace oracle-java7-installer with openjdk-7-jdk when Installing build packages stage.
If you want to manually install Sun-java jdk. follow the attached text in the zip. (Linux)
Could u build cm10 from sources please? Musn't be difficult...
luiseteyo said:
Could u build cm10 from sources please? Musn't be difficult...
Click to expand...
Click to collapse
Yes, sure you could build cm10 in the same way, just instead of:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
do:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
It won't boot of course, it need some changes in the kernel/ramdisk (and more) to work and you're using ics one.
Code:
<project name="teamhacksung/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="ics-samsung-2.6.35.7" />
It will look something like that when the jellybean kernel source is released:
Code:
<project name="teamhacksung/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="jellybean-samsung-2.6.35.7" />
<project name="teamhacksung/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="jb-samsung-2.6.35.7" />
Just wait for dhiru1602 to release his cm10 rom in the next days.
At least you can download cm10 base for now.
When I create the local_manifest.xml file in the .repo and fire up repo sync, I get a github duplicate remote error. I placed the file in the manifests folder of the .repo directory and the repo sync continues. Will this make the downloaded files incomplete? Can't test if the downloaded source can compile since my ISP limits download to 3GB per day.
jan3586 said:
When I create the local_manifest.xml file in the .repo and fire up repo sync, I get a github duplicate remote error. I placed the file in the manifests folder of the .repo directory and the repo sync continues. Will this make the downloaded files incomplete? Can't test if the downloaded source can compile since my ISP limits download to 3GB per day.
Click to expand...
Click to collapse
If there's a duplicate, repo tells you the exact project specified twice (once in local_manifest.xml and once in default.xml).
You need to find what you specified twice and correct it. If your local_manifest.xml looks like the one posted by frapeti, there shouldn't be problems, unless you did some changes into your default.xml, other than the dhcp one.
If you place your local_manifest.xml in .repo/manifest/, it's like as if it doesn't exist, so repo won't download anything of what there's specified in it.
jan3586 said:
When I create the local_manifest.xml file in the .repo and fire up repo sync, I get a github duplicate remote error. I placed the file in the manifests folder of the .repo directory and the repo sync continues. Will this make the downloaded files incomplete? Can't test if the downloaded source can compile since my ISP limits download to 3GB per day.
Click to expand...
Click to collapse
This is because remote definition for github is defined in default.xml and local_manifest.xml. The repo sync will continue for projects from default.xml but not for the ones in local_manifest.xml.
1. Try removing the remote definition for github from local_manifest.xml
2. Or rename all the references of github to something like githb.
That should solve the problem.
p.s. I did the second.
I am having a problem here...
I am trying to initilialize repo:
It gives me an error:
Code:
bash: /home/chinu/bin/repo: Permission denied
Then i tried to fork the repo first & then tried to initialize it:
Code:
repo init -u git://github.com/chinmayjade/platform_manifest.git -b jb
Still i am getting the same error.
EDIT:
Solved. Was a stupid error

[Guide]How to download/compile specific ROM parts

This is a tutorial about how to download and compile specific parts in aosp based roms (such as CM10)
Written for AOSP noobs like me a year ago.
Note: I wrote this tutorial actually for my blog, as a beginners repo/compile tut, but why not share here
Introduction:
Downloading rom sources is done with the tool “repo”, this is the most awesome downloader in existence. Not only it looks very cool, it also reaches top speed at all times. But it’s only for linux (which is good since when you are busy with aosp roms you should be on linux)
Why is it awesome? Since you decide yourself how many jobs (aka connections) you make with the server. This means you always will get top speed, there is probably no faster download method available on the Internet (except for speedtests, but they don’t count). Next to the downloading of specific parts it’s of course also handy to know how to actually compile them.
Download:
The easiest way of fetching for example a batch of AOSP apps is like this:
1. Choose the desired tag you want to use, in the example I will use android-4.2.2_r1
2. Now make a dir somewhere:
Code:
- mkdir ~/aosp-apps
- cd ~/aosp-apps
3. Download repo when not installed yet:
Code:
- curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
- chmod a+x ~/bin/repo
4. Enter the line that will download the initial manifest.
for AOSP:
Code:
- repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.2_r1
Enter your name and email address and wait until it completes
for CM
Code:
- repo init -u https://github.com/Cyanogenmod/android -b cm-10.1
5. Go in the hidden “.repo” dir and change the manifest
Code:
- cd .repo
- gedit manifest.xml (if you don’t have decent text editor such as “gedit”, install it! “sudo apt-get install gedit”
)
For example when you only want to download the apps, just remove all lines that are not app related. simple as that:
Code:
<?xml version=”1.0″ encoding=”UTF-8″?>
<manifest>
<remote name=”aosp”
fetch=”..” />
<default revision=”refs/tags/android-4.2.2_r1″
remote=”aosp”
sync-j=”4″ />
<project path=”packages/apps/BasicSmsReceiver” name=”platform/packages/apps/BasicSmsReceiver” />
<project path=”packages/apps/Bluetooth” name=”platform/packages/apps/Bluetooth” />
<project path=”packages/apps/Browser” name=”platform/packages/apps/Browser” />
<project path=”packages/apps/Calculator” name=”platform/packages/apps/Calculator” />
<project path=”packages/apps/Calendar” name=”platform/packages/apps/Calendar” />
<project path=”packages/apps/Camera” name=”platform/packages/apps/Camera” />
<project path=”packages/apps/CellBroadcastReceiver” name=”platform/packages/apps/CellBroadcastReceiver” />
<project path=”packages/apps/CertInstaller” name=”platform/packages/apps/CertInstaller” />
<project path=”packages/apps/Contacts” name=”platform/packages/apps/Contacts” />
<project path=”packages/apps/DeskClock” name=”platform/packages/apps/DeskClock” />
<project path=”packages/apps/Email” name=”platform/packages/apps/Email” />
<project path=”packages/apps/Exchange” name=”platform/packages/apps/Exchange” />
<project path=”packages/apps/Gallery” name=”platform/packages/apps/Gallery” />
<project path=”packages/apps/Gallery2″ name=”platform/packages/apps/Gallery2″ />
<project path=”packages/apps/HTMLViewer” name=”platform/packages/apps/HTMLViewer” />
<project path=”packages/apps/KeyChain” name=”platform/packages/apps/KeyChain” />
<project path=”packages/apps/Launcher2″ name=”platform/packages/apps/Launcher2″ />
<project path=”packages/apps/LegacyCamera” name=”platform/packages/apps/LegacyCamera” />
<project path=”packages/apps/Mms” name=”platform/packages/apps/Mms” />
<project path=”packages/apps/Music” name=”platform/packages/apps/Music” />
<project path=”packages/apps/MusicFX” name=”platform/packages/apps/MusicFX” />
<project path=”packages/apps/Nfc” name=”platform/packages/apps/Nfc” />
<project path=”packages/apps/PackageInstaller” name=”platform/packages/apps/PackageInstaller” />
<project path=”packages/apps/Phone” name=”platform/packages/apps/Phone” />
<project path=”packages/apps/Protips” name=”platform/packages/apps/Protips” />
<project path=”packages/apps/Provision” name=”platform/packages/apps/Provision” />
<project path=”packages/apps/QuickSearchBox” name=”platform/packages/apps/QuickSearchBox” />
<project path=”packages/apps/Settings” name=”platform/packages/apps/Settings” />
<project path=”packages/apps/SoundRecorder” name=”platform/packages/apps/SoundRecorder” />
<project path=”packages/apps/SpareParts” name=”platform/packages/apps/SpareParts” />
<project path=”packages/apps/SpeechRecorder” name=”platform/packages/apps/SpeechRecorder” />
<project path=”packages/apps/Stk” name=”platform/packages/apps/Stk” />
<project path=”packages/apps/Tag” name=”platform/packages/apps/Tag” />
<project path=”packages/apps/VideoEditor” name=”platform/packages/apps/VideoEditor” />
<project path=”packages/apps/VoiceDialer” name=”platform/packages/apps/VoiceDialer” />
</manifest>
When done, save it and go a dir back in the terminal
Code:
- cd ..
6. Download the packages
Code:
- repo sync -j16 (-j16 stands for 16 jobs max. This is for around a 100mbit line)
(With my 60mb/s connection I get max speed 7.2mb/s at -j8)
The packages will be download as quickly as possible to your harddrive now.
Compile:
To compile the obtained packages separately you will need a AOSP environment (or CM/AOKP etc). When you have a succesfull environment which is able to compile for your device you may enter:
Code:
- source build/envsetup.sh
- lunch (now choose your device, for example, full_ariesve-userdebug)
- now you’re theoretically ready to compile
to compile an app on the easiest way:
Code:
- make Appname -j8
where “Appname” is the name of the folder placed in packages/apps/..
This also counts for “SystemUI” which is not in that folder.
Code:
- make Calculator -j8 (for example)
And the -j param again stands for the number of jobs, remember that this is compiling and not downloading, so the “standard rule” with this is, number of cores of your CPU + 1.
Which makes a regular quad core (-j5) but makes a i7 CPU with Hyper threading (-j9). When using -j16 for example there could be moments that your cpu will be overloaded so much that your mouse will lag all over the place.
(Linux forces the cpu to perform higher then it actually should, resulting in a very strange fan sound in my case)
When having trouble, when it stops or just nags about some useless stuff.
You should try using the “-k” param, this tells the make command to keep going when a non-critical error occurs.
Code:
- make Calculator -k -j8
When having issues with the local module tags, you should enter this:
Code:
- make Calculator -k LOCAL_MODULE_TAGS=optional -j8
To compile other parts you also need to enter the folder name, here are some examples from /frameworks/base
Code:
- make policy (the power menu and lockscreen)
- make framework (the initial framework files)
- make framework-res (the initial framework resources)
- make services (the services.jar file)
or more examples:
Code:
- make sdk (builds the android sdk)
- make modules (builds all modules)
- make installclean (removes all staging directories, such as out/target/product/boardname/system)
- make clean (removes the whole /out directory)
:silly:
Good Job
this isnt so bad I will be giving your guide to people from my community who want to compile.
only problem is the cm branch you put jellybean you should put cm-10.1 if you are using googles 4.2.2 source
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
Unjustified Dev said:
this isnt so bad I will be giving your guide to people from my community who want to compile.
only problem is the cm branch you put jellybean you should put cm-10.1 if you are using googles 4.2.2 source
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
Click to expand...
Click to collapse
Thanks for mentioning
broodplank1337 said:
Thanks for mentioning
Click to expand...
Click to collapse
Can you teach me everything you know
Do you know how to cherry Pick? I need help merging it when it conflicts other strings
I want to learn everything im only 15 and I have time to learn now.
I plan on eventually building my own rom based off aosp here's my github
https://github.com/TeamRegular
I took a look at your projects and tutorials you are awesome.
This looks like a great tutorial :good: and when I saw it I thought it might answer a question I've been thinking about for a while now: would it be possible to compile Pie controls from Paranoid Android into one independent app?
I'm a n00b at compiling anything, I've attempted (and failed) to compile a kernel, so could you give me some direction on how air would do this? Thanks :laugh:

Bulding any rom from source for your android device.

I'm using HTC One S and LiquidSmooth as examples. It should work for all devices. Nexus should be a little different story.
Do you know about a ROM that it's not builded for our beloved One S? Do you want to port it for our device? This easy guide will help you.
Requirements:
A One S.
A relatively recent computer (Linux, OS X, or Windows) w/a reasonable amount of RAM and about 35 GB of free storage. The less RAM you have, the longer the build will take. Using SSDs results in faster builds than traditional hard drives.
A micro USB cable.
A decent Internet connection & reliable electricity
Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with what a recovery image such as ClockworkMod is, for example. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /, etc.
​HERE IS THE GUIDE.
Installing Build Packages
Open the terminal and type: (for 64-bit&32-bit)
Code:
sudo apt-get install bison build-essential curl flex git-core gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
In addition to the above, for 64-bit systems:
Code:
sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
Creating Directories
In order to start building ROMs you'll need to create some directories
Code:
mkdir -p ~/bin
mkdir -p ~/yourworkingdirectory
Installing the REPO command
Enter the following to download the "repo" binary:
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Now lets give this the proper permissions to make it runnable:
Code:
chmod a+x ~/bin/repo
Put the ~/bin directory in your path of execution
Make sure that the ~/bin directory you just created is in your path of execution so that you can easily run the repo command even when you're not in ~/bin.
Code:
export PATH=${PATH}:~/bin
Initialize the source repository
Code:
cd yourworkingdirectory
Now you'll need the repo init related to the rom you'd like to build. Here i will insert some of the I used. Anyway to find this you can go the rom's github and search for the manifest (android or platform-manifest).Just choose the right branch.
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo init -u git://github.com/LiquidSmooth/android.git -b kitkat
repo init -u git://github.com/SlimRoms/platform_manifest.git -b kk4.4-caf
repo init -u git://github.com/ChameleonOS/android.git -b kitkat-staging
Download the source code
This will download all the source code to your computer.Prepare to wait a long time while the source code downloads.
Code:
repo sync
Download device,kernel and vendor tree for Liquid
We will use CM ones. Thanks a lot.
Basically we need to add some projects to the download list. To do this we'll need a local_manifest.
Go in the .repo folder in your working directory(it's an hidden folder press ctrl+h). Create a new folder called "local manifests" then double click on it. Now you'll have to create a roomservice.xml file for the most of the ROMs and a slim_manifest.xml for SlimRoms, it's the same thing just the name it's different.
Open this file and paste this inside:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github"
fetch="git://github.com/" />
<project name="CyanogenMod/android_device_htc_ville" path="device/htc/ville" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_s4-common" path="device/htc/s4-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_htc_msm8960" path="kernel/htc/msm8960" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" />
</manifest>
Now give another:
Code:
repo sync
and wait.
Do some modifications to the .mk files
Since we are using CM device tree we need to modify them for the choosen ROM.
Go into the device folder(device/htc/ville) and do some modifications. I will explain you what i mean using LiquidSmooth as example.
1) Create a new file called vendorsetup.sh . Open it and inside you'll have to write a script to add it to the lunch list.
Code:
add_lunch_combo liquid_ville-userdebug
You can choose if you want an userdebug version of the rom or an eng one just by writing eng instead of userdebug.
2) Now rename cm.mk into liquid.mk(for other ROMs this file should be renamed in a different way. Use an existing device tree to see the correct naming.)
3) Open the .mk file. You'll find something like this:
Code:
# Release name
PRODUCT_RELEASE_NAME := ville
# Boot animation
TARGET_SCREEN_HEIGHT := 960
TARGET_SCREEN_WIDTH := 540
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, device/htc/ville/device_ville.mk)
# Device naming
PRODUCT_DEVICE := ville
PRODUCT_NAME := cm_ville
PRODUCT_BRAND := htc
PRODUCT_MODEL := One S
PRODUCT_MANUFACTURER := HTC
# Set build fingerprint / ID / Product Name ect.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=htc_ville BUILD_FINGERPRINT=htc_europe/ville/ville:4.1.1/JRO03C/128506.8:user/release-keys PRIVATE_BUILD
You need to modify some things to make it buildable:
Code:
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
becomes:
Code:
# Inherit some common LiquidSmooth stuff.
$(call inherit-product, vendor/liquid/config/common_phone.mk)
To understand the changes you'll have to go in the vendor folder searching the rom specific vendor and open the config folder to see what .mk file you need.
This:
Code:
PRODUCT_NAME := cm_ville
becomes:
Code:
PRODUCT_NAME := liquid_ville
4) Now rename cm.dependencies in liquid.dependencies(SlimRoms does not require this step for unsupported devices.)
Start the build
Code:
source build/envsetup.sh
If you created the vendorsetup.sh in the right way you will read the ville folder.
Code:
lunch
Now you have to choose the number near the ville in the list of the supported devices.
If you have done all in the correct way in your terminal you'll see a page like this:
View attachment 2470228
Build
After lunching you have to start the build using the right command:
For liquid:
Code:
time mka liquid
For others:
Code:
make bacon
make
brunch devicename
Wait some time till the build ends hopefully with no errors.​
Credits: http://wiki.cyanogenmod.org/w/Build_for_ville
and all the experience i got in this 2 months of building.
For most ROMS you'll have some overlays errors.
Just go in the overlay folder linked in the error and open config.xml. Just delete the lines in the error or search in the folder history the commit that you have to revert.
To revert a commit:
Code:
cd intheinteressedfolder
git revert thenumberofthecommit
Here is a screenshot of the what the number/name of the commit is:
View attachment 2470242
Enjoy.
Edited the title. And added a repo init!

[Q]How To Build Ubuntu Touch For S2vep?

Hello mate i am trying to build an image of Ubuntu Touch by following their official guide with the following steps:
Install Required Packages​
Installing required packages between 12.04 and 13.10.
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
Then install packages:
sudo apt-get install git gnupg flex bison gperf build-essential \
zip bzr 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 ubuntu-dev-tools tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool bsdiff
Click to expand...
Click to collapse
Install JDK 6​
Type in the terminal the following command to install JDK 6.
sudo apt-get install openjdk-6-jdk
Click to expand...
Click to collapse
Install PPA Tools​
OK we need to install Android PPA Tools and Phablet Tools
To install PPA Tools type in the terminal:
sudo add-apt-repository ppahablet-team/tools
Then add the following command line if you are using 12.04:
sudo add-apt-repository ppa : ubuntu-sdk-team/ppa
To install PPA Tools type:
sudo apt-get update
sudo apt-get install ubuntu-device-flash
To install Phablet Tools:
sudo apt-get install phablet-tools
Click to expand...
Click to collapse
Making Working_Directory​
Now we need to make a directory that should be used to download Ubuntu Touch sources, type in the terminal:
mkdir /root/WORKING_DIRECTORY
Click to expand...
Click to collapse
Download Sources​
Now it's time to get Ubuntu Touch source code that's will take from
1 hour to 3 hours depends from your internet connection's speed
(I have a 8mb dsl and take about 1 hours and 30 minutes so type:
ubuntu-dev-bootstrap -c /root/WORKING_DIRECTORY
Click to expand...
Click to collapse
Enable S2vep​
Our device doesn't has official support to port, so we should create it manually by following this steps:
1-Cd to WORKING_DIRECTORY.
2-Type mkdir .repo/local_manifests/ .
3-create a file called roomservice.xml so type: gedit .repo/local_manifests/roomservice.xml and insert the following elements:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="git://github.com/" name="gh" />
<project name="KINGbabasula/android_kernel_samsung_i9105P" path="kernel/samsung/i9105P" remote="gh" revision="cm-10.1" />
<project name="KINGbabasula/android_device_samsung_s2vep" path="device/samsung/s2vep" remote="gh" revision="cm-10.1" />
</manifest>
4-Type repo sync to download s2vep's source.
Click to expand...
Click to collapse
Extracting Blobs Files​
I can't find extract-files.sh on KINGbabasula's btw you can do it if having one:
1-Type cd device/samsung/s2vep .
2-Run ./extract-files.sh .
P.S. :make sure to have enable debug and accept the connection that appear on your phone.
Click to expand...
Click to collapse
Brunch and Build​
When you are ready type the following command:
make -# otapackage (change # with the numbers of your cores).
P.S: i use this and not brunch because i don't have vendor files.
Click to expand...
Click to collapse
I got this error during compilation by attacched image and my questions are for devs and expert users:
1-Can i use original stock android 4.2.2 vendor?
2-Are my steps is correct to compile Ubuntu Touch?
3-Which sources is recommend to use?
@KINGbabasula @skullface1
thanks for any idea or answer or suggestions that can help me
I hope someone will help you, it would be fantastic if we can get it working
Porting Ubuntu Touch On S2 Plus i9105P
lukypuie said:
I hope someone will help you, it would be fantastic if we can get it working
Click to expand...
Click to collapse
Yeah man i know that, where can i get the vendor of s2 plus?
What do you mean by vendor?
Thanka
SethPDA said:
What do you mean by vendor?
Click to expand...
Click to collapse
I mean about blobs files that we can extract them by extract-file.sh by the way i just compile one for ubuntu touch but i don't think to get booting
Use this manifest, also if you got it working release it :3
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="git://github.com/" name="gh" />
<project name="SamsungBCM-Cyanogenmod/android_kernel_samsung_galaxys2plus-common" path="kernel/samsung/galaxys2plus-common" remote="gh" revision="cm-10.1" />
<project name="SamsungBCM-Cyanogenmod/android_device_samsung_s2vep" path="device/samsung/s2vep" remote="gh" revision="cm-10.1" />
<project name="SamsungBCM-Cyanogenmod/proprietary_vendor_samsung" path="vendor/samsung" remote="gh" revision="cm-11.0" />
</manifest>
Thanks
LuK1337 said:
Use this manifest, also if you got it working release it :3
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="git://github.com/" name="gh" />
<project name="SamsungBCM-Cyanogenmod/android_kernel_samsung_galaxys2plus-common" path="kernel/samsung/galaxys2plus-common" remote="gh" revision="cm-10.1" />
<project name="SamsungBCM-Cyanogenmod/android_device_samsung_s2vep" path="device/samsung/s2vep" remote="gh" revision="cm-10.1" />
<project name="SamsungBCM-Cyanogenmod/proprietary_vendor_samsung" path="vendor/samsung" remote="gh" revision="cm-11.0" />
</manifest>
Click to expand...
Click to collapse
Really? can i use cm-11 and cm-10.1 revisions together? i'll try it later, if get booting i'll release but in Original Android Section? thanks
haky 86 said:
Really? can i use cm-11 and cm-10.1 revisions together? i'll try it later, if get booting i'll release but in Original Android Section? thanks
Click to expand...
Click to collapse
I think you can use cm-11.0 kernel for cm-10.1 too.
Thanks
Ok i build a flashable ubuntu touch for s2 plus using old roomservice.xml but boot stuck on animation then reboot automatically, i try to format cache, my phone shutdown on animation, so i am going to try using your configuration
haky 86 said:
Ok i build a flashable ubuntu touch for s2 plus using old roomservice.xml but boot stuck on animation then reboot automatically, i try to format cache, my phone shutdown on animation, so i am going to try using your configuration
Click to expand...
Click to collapse
Try flash on older bootloader (4.1.2).
Thanks
LuK1337 said:
Try flash on older bootloader (4.1.2).
Click to expand...
Click to collapse
I'll take your option in cosideration because i clean everything and resync again by the way if i repo sync phanlet-saucy should i flash saucy armf too?
haky 86 said:
I'll take your option in cosideration because i clean everything and resync again by the way if i repo sync phanlet-saucy should i flash saucy armf too?
Click to expand...
Click to collapse
I don't really know, but also you will need to fix device tree (WiFi, NFC)
Not only that. You need a new ril etc.
Sent from my GT-I9105P using XDA Premium 4 mobile app
OK
CoolDevelopment said:
Not only that. You need a new ril etc.
Sent from my GT-I9105P using XDA Premium 4 mobile app
Click to expand...
Click to collapse
So that should be extracted from phone by extract-files.sh and is that necessary to be cm10.1?
haky 86 said:
So that should be extracted from phone by extract-files.sh and is that necessary to be cm10.1?
Click to expand...
Click to collapse
That needs to be coded
Sent from my GT-I9105P using XDA Premium 4 mobile app
Thanks
CoolDevelopment said:
That needs to be coded
Sent from my GT-I9105P using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Ok i got it, by the here the result of second test :/ and here the actual roomservice.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="KINGbabasula/android_device_samsung_s2vep" path="device/samsung/s2vep" remote="github" revision="cm-10.1" />
<project name="KINGbabasula/android_kernel_samsung_i9105P" path="kernel/samsung/i9105P" remote="github" revision="cm-10.1" />
<project name="CoolDevelopment/proprietary_vendor_samsung" path="vendor/samsung/dlx" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
</manifest>
Click to expand...
Click to collapse
change
Code:
<project name="KINGbabasula/android_kernel_samsung_i9105P" path="kernel/samsung/i9105P" remote="github" revision="cm-10.1" />
to
Code:
<project name="KINGbabasula/android_kernel_samsung_i9105P" path="kernel/samsung/galaxys2plus-common" remote="github" revision="cm-10.1" />
Something new?
Not yet
lukypuie said:
Something new?
Click to expand...
Click to collapse
Nothing new, i have a few questions
-can i extract the boot.img from original firmware?
-is that necessary to edit vendor/cm/vendorsetup.sh by add_lunch_combo $cm_i9105P or cm_s2vep?
i am watching this 2 video to fix bootlop part 1 and part 2.
is still a work in progress
haky 86 said:
Nothing new, i have a few questions
-can i extract the boot.img from original firmware?
-is that necessary to edit vendor/cm/vendorsetup.sh by add_lunch_combo $cm_i9105P or cm_s2vep?
i am watching this 2 video to fix bootlop part 1 and part 2.
is still a work in progress
Click to expand...
Click to collapse
Why you can't compile kernel?
Sent from my GT-I9105P using XDA Premium 4 mobile app

Categories

Resources