Project Developer
Welcome
This is a guide for all those who want to build for their Xiaomi redmi1s [Armani] Device but do not neccesasarily have the knowledge or experience.
This is an unofficial guide for the building of custom ROMs and other mods for the Xiaomi Redmi1s. This is a work in progress, with additions being made as often as possible. This thread has already grown with the help of the devs established in this forum. BMP777 began this project a year ago when I was using a Samsung GS II Skyrocket. BMP777 started another alike thread called PR II in the LGOG forum a while back as well. I have since moved on to a ONE, but both threads remain to this day. and Started by Me on Xperia Arc The point is this: everyone who uses this site has a desire for modding, customizing, and/or otherwise altering their device. Unfortunately, many have no idea how to go about doing these things for themselves. As such, there is a lot of dissatisfaction among developers about receiving constant demands, suggestions, and requests for updates. This thread is meant to give those who want to step up and build for themselves the means to do so. It is an ever-changing thread, with all assistance welcomed.
READ ME:
On one hand, it should go without saying that if you have no knowledge and/or experience with building, java, C++, and various other tools, you probably shouldn't begin here. At the same time, it is possible to learn to build, provided you can read, follow directions, and aren't too lazy to RESEARCH.
OH YEAH, and you better have patience. This isn't easy. It will be work. The quickest way to get flamed is to show yourself to be lazy. If you think that with a couple clicks, you can have your own flashy ROM, forget it. But, if you do want to learn, this is a good place to get started. I have no ego about this; I started the same way and just want to help everyone learn to build their own ROM. But, everyone will struggle to get to a successful point, and lazy, unmotivated people just irritate those who have had to learn from scratch too. Tutorials will be posted for any new thing learned and built as time and space allow. ALL ARE WELCOME AND ALL QUESTIONS ARE TOO. But, seriously, if it's a really ridiculous one, I/we reserve the right to screw with you about it.
ALWAYS REMEMBER:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thread Disclaimer:
The instructions and extras posted here are to be used at your own risk. I am working hard to provide good, workable tutorials that will make successful building much easier. Nevertheless, I am not responsible if you lose your files, brick your device, or inadvertently cause a nuclear war. If you are seeking absolute perfection, RUN NOW WHILE YOU STILL CAN!!
Thread Navigation :
# 2 > Setting Up Build enviorment
# 3 > Building instructions & How To Build Using Linaro Toolchain
# 4 > Kernel building and CCACHE
# 5 > reserved for future
Build Enviorment Set up :
This is a combination of the steps offered in the threads 'Compile JB on Ubuntu' and TeamChopsticks CyanogenMod.
Special thanks to dastin1015 and TeamChopsticks.
Tip: Allocate at least 75 gigs of space for the building of ONE ROM. If you install ccache, you will want 90. A complete build directory can use as much as 100 gigs, so make sure you have plenty of room. One of the ways to fail out a build is too use all of your partition before acquiring all the necessary files.
Here are the steps from those 2 tutorials in correct order:
0.1 ))
Install Gedit
Code:
# gedit
sudo apt-get install gedit
1) You need the following:
-JDK 6 if you wish to build Jellybean.
Code:
[COLOR="Black"]$ sudo apt-get install oracle-java7-installer
-Python 2.4 -- 2.7, which you can download from python.org.[/COLOR]
Or:
Code:
[COLOR="black"]$ sudo apt-get install python
-Git 1.7 or newer. You can find it at git-scm.com.[/COLOR]
Or:
Code:
[COLOR="black"]$ sudo apt-get install git-core[/COLOR]
-Android SDK:
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the SDK and place it in your home directory.
I renamed my SDK to android-sdk to make it easier to navigate to – this tutorial assumes you've done that as well.
Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
Add these lines at the bottom of the file:
Code:
[COLOR="black"]# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin[/COLOR]
Find your .profile file and add this at the bottom of the file:
Code:
[COLOR="black"]PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.[/COLOR]
To check for updates issue this into your terminal:
Code:
[COLOR="black"]$ android[/COLOR]
2) Install required packages. 64-bit (recommended)
Code:
[COLOR="black"]$ 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 lib32readline-gplv2-dev lib32z-dev
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown
libxml2-utils lzop schedtool[/COLOR]
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
[COLOR="black"]$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so[/COLOR]
Code:
[COLOR="black"]$ 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-glx:i386
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so[/COLOR]
3) Configure your USB.
Code:
[COLOR="black"]$ gksudo gedit /etc/udev/rules.d/51-android.rules[/COLOR]
Inside of this blank text file insert:
Code:
[COLOR="black"]#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"[/COLOR]
4) Save the file and close it and then issue this command:
Code:
[COLOR="black"]$ sudo chmod a+r /etc/udev/rules.d/51-android.rules[/COLOR]
5) Install the repo:
Code:
[COLOR="black"]$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo[/COLOR]
Create your work directory:
Code:
[COLOR="black"]mkdir ~/"your directory name here" For example: mkdir ~/cm10
cd ~/cm10[/COLOR]
Building Instructions : For CyanogenMod
Unofficial
CM-11.0 [Android-4.4.x]
To get started with Android/CyanogenMod, you'll need to get familiar with Git and Repo.
To initialize your local repository using the CyanogenMod trees, use a command like this:
first create folder named " cm "
Code:
mkdir cm
enter into cm
Code:
cd ~/cm
For CM - 11.0 kitkat 4.4.x
Code:
[COLOR="black"]repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
Please see the CyanogenMod Wiki for building instructions.
For more information on this Github Organization and how it is structured, please read the wiki article.
Create and edit device.xml in .repo:
Code:
[COLOR="black"]gedit .repo/local_manifests/device.xml[/COLOR]
Add this to the device.xml:
For CM 11.0 KitKat 4.4.x
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- armani Specific -->
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" />
<project path="hardware/qcom/fm" name="CyanogenMod/android_hardware_qcom_fm" revision="cm-11.0" />
<project path="kernel/xiaomi/armani" name="armani-dev/android_kernel_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="device/xiaomi/armani" name="armani-dev/android_device_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="vendor/xiaomi" name="armani-dev/proprietary_vendor_xiaomi" remote="github" revision="cm-11.0" />
</manifest>
Code:
[COLOR="black"]. build/envsetup.sh (notice the period and space)
vendor/cm/get-prebuilts
[/COLOR]
then
Code:
brunch armani
CM-12.0 [Android -5.0.x]
For CM - 12.0
Code:
[COLOR="black"]repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
Please see the CyanogenMod Wiki for building instructions.
For more information on this Github Organization and how it is structured, please read the wiki article.
Create and edit device.xml in .repo:
Code:
[COLOR="black"]gedit .repo/local_manifests/device.xml[/COLOR]
Add this to the device.xml:
For CM 12.0
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- armani Specific -->
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-12.0" />
<project path="hardware/qcom/fm" name="CyanogenMod/android_hardware_qcom_fm" revision="cm-12.0" />
<project path="kernel/xiaomi/armani" name="armani-dev/android_kernel_xiaomi_armani" remote="github" revision="cm-12.0" />
<project path="device/xiaomi/armani" name="armani-dev/android_device_xiaomi_armani" remote="github" revision="cm-12.0" />
<project path="vendor/xiaomi" name="armani-dev/proprietary_vendor_xiaomi" remote="github" revision="cm-12.0" />
</manifest>
Repo Sync again to grab device stuff
Code:
repo sync
Code:
[COLOR="black"]. build/envsetup.sh (notice the period and space)
[/COLOR]
then
Code:
brunch armani
Building Instructions : For Carbon Rom
Unofficial
To get started with the Carbon-Dev sources, you'll need to get familiar with Git and Repo.
Getting Started
To get started with the Carbon-Dev sources, you'll need to get familiar with Git and Repo.
Create the Directories
You will need to set up some directories in your build environment.
To create them run:
Code:
[COLOR="black"]mkdir -p ~/carbon[/COLOR]
Install the Repository
You may need to reboot for these changes to take effect. Now enter the following to initialize the repository:
Code:
[COLOR="black"]cd ~/carbon[/COLOR]
Repositories:
Before you continue --> run this in the terminal
Code:
[COLOR="black"]repo init -u https://github.com/CarbonDev/android.git -b kk[/COLOR]
after it does its thing
Code:
[COLOR="black"]mkdir .repo/local_manifests
touch .repo/local_manifests/device.xml
gedit .repo/local_manifests/device.xml[/COLOR]
Add this to the device.xml:
For Carbon Rom kk
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- armani Specific -->
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" />
<project path="hardware/qcom/fm" name="CyanogenMod/android_hardware_qcom_fm" revision="cm-11.0" />
<project path="kernel/xiaomi/armani" name="armani-dev/android_kernel_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="device/xiaomi/armani" name="armani-dev/android_device_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="vendor/xiaomi" name="armani-dev/proprietary_vendor_xiaomi" remote="github" revision="cm-11.0" />
</manifest>
save and exit then
Code:
[COLOR="black"]repo sync[/COLOR]
after everything syncs
Code:
[COLOR="black"]gedit vendor/carbon/vendorsetup.sh[/COLOR]
and add this to the bottom:
Code:
[COLOR="black"]add_lunch_combo carbon_device-userdebug[/COLOR]
save and exit.. then
Code:
[COLOR="black"]See The Below link and make the Following Changes in your Repo[/COLOR]
https://github.com/tarunkapadia93/a...mmit/738f266a3b14da2ed578f55e2bc8f488f4240c14
Code:
[COLOR="black"]. build/envsetup.sh[/COLOR]
Code:
[COLOR="black"]brunch device[/COLOR]
Next Tutorial is Strictly Not for beginners
Building with Linaro 4.8 toolchain
Checkout these toolchains customised for arm v7 and scorpion Cpu here http://forum.xda-developers.com/showthread.php?t=2098133
thanks @Christopher83
Go into Terminal and navigate to the root folder of your source tree, then:
Code:
[COLOR="Black"]prebuilts/gcc/linux-x86/arm/[/COLOR]
Run:
Code:
[COLOR="black"]wget http://releases.linaro.org/13.06/components/toolchain/gcc-linaro/4.8/gcc-linaro-4.8-2013.06.tar.bz2[/COLOR]
Run:
Code:
[COLOR="black"]bunzip2 *.tar.bz2[/COLOR]
Run:
Code:
[COLOR="black"]tar -xvf *.tar[/COLOR]
Using your file manager, navigate to the root folder of your source tree again.
Navigate To "/build", in your root folder.
Run:
Code:
[COLOR="black"]gksudo gedit envsetup.sh[/COLOR]
change the line in bold, to look exactly like this one:
Code:
[COLOR="black"]case $ARCH in
x86) toolchaindir=x86/i686-linux-android-4.6/bin
;;
[B]arm) toolchaindir=arm/gcc-linaro-4.8-2013.06[/B] [COLOR="Red"]<--------[/COLOR]
;;
mips) toolchaindir=mips/mipsel-linux-android-4.6/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
[/COLOR]
Exit out and open new. Initialize and build. That's it! Makes you wonder why you never did it before, right?
Not so fast. You may have build issues, you may not. I had a few lengthy sets of errors in gsm calltracker and another .java file that was solved by using Meld and making it look exactly like a successful build's file. More as I learn.......
Thanks to infected_ for this tut; his post can be found here: [/COLOR]
http://forum.xda-developers.com/showpost.php?p=42976693&postcount=12
This is a work in progress. Many more pieces of information will be added and this is meant to be an ever-changing thread. If you see something that is outdated or incorrect, please let me know ASAP, so I can make the correction. Also, make sure that any info offered can be and has been confirmed as functional.
Ccache
CCACHE
Here is a brief tutorial on the installation of Ccache, which can shorten build times drastically :
If you have room on your build system you can speed
your builds up considerably by using ccache. ccache is a compiler
cache. It speeds up re-compilation of C/C++ code by caching
previous compiles and detecting when the same compile is
being done again.
Install it with apt-get:
Code:
[COLOR="Black"]sudo apt-get install ccache[/COLOR]
Set environment vars for Android use:
(I put these exports in my .bashrc)
Code:
[COLOR="Black"]export USE_CCACHE=1
export NDK_CCACHE=ccache[/COLOR]
Set a cache size of 10G for optimal results:
Code:
[COLOR="black"]ccache -M 10G[/COLOR]
Check the status of your cache with the command:
Code:
[COLOR="black"]ccache -s [/COLOR]
Returns:
Code:
[COLOR="black"]
cache directory /home/Jarvis/.ccache
cache hit 106673
cache miss 18379
called for link 3758
preprocessor error 5
not a C/C++ file 4425
unsupported compiler option 678
no input file 4565
files in cache 36758
cache size 3.2 Gbytes
max cache size 10.0 Gbytes[/COLOR]
Really Useful things
Here are some relevant topics/tutorials/sites:
Download | Ubuntu - www.ubuntu.com/download
Official Ubuntu Documentation: Help for all versions. - https://help.ubuntu.com/
How To Windows Dual Boot: - https://help.ubuntu.com/community/WindowsDualBoot
How To Use The Terminal: Commandline stuff. - https://help.ubuntu.com/community/UsingTheTerminal/
[HOW TO] Beginners Guide to Android ROM Development - http://forum.xda-developers.com/showthread.php?t=1272270 (courtesy of isidromxz)
[Tutorial] Compile JB on Ubuntu - http://forum.xda-developers.com/showthread.php?t=1762641 (courtesy of dastin1015)
[CM10] [PPA] Cyanogenmod Compiler v0.6 - http://forum.xda-developers.com/showthread.php?t=1789190 (courtesy of lithid-cm)
[Wiki] How to: Gerrit - http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit
[Wiki] How to: Git - http://wiki.cyanogenmod.com/wiki/Howto:_Git
[Guide] How to: upload repo with commit history - http://forum.xda-developers.com/showthread.php?t=2727886 (courtesy of Mazda [Alex Cruz])
[Wiki] How to: Connect to device with SSH - http://wiki.cyanogenmod.com/wiki/Howto:_Connect_to_Device_with_SSH
Here is an easy-to-use page on common Linux commands: - http://www.pixelbeat.org/cmdline.html
Linux Newbie Guide : - http://www.unixguide.net/linux/linuxshortcuts.shtml
Also, Team Chopsticks has a good page with some useful tips as well, located here:
http://www.teamchopsticks.org/p/contributing.html (thanks to bdusmc for the tip)
Here is a link to LIFEHACKER's command line tutorials. Very good stuff!! : http://lifehacker.com/5743814/become-a-command-line-ninja-with-these-time+saving-shortcuts
CyanogenMod git : - https://github.com/CyanogenMod
LegacyXperia git : - https://github.com/LegacyXperia
Original Beanstalk thread : - http://forum.xda-developers.com/showthread.php?t=2091900
Beanstalk git : - https://github.com/scotthartbti?tab=repositories
The Muppets git : - https://github.com/TheMuppets
Thanks to:
CyanogenMod
david279
jsevi83,
Kra1o5
MallardDuck
ktempleton
AdhvanIt
Mazda
matthew0776
spleef
M4570D0N
car vs driver
BMP777
Need Help ?
You can always Hit me up on IRC [FREENODE] at #armani-dev
Click to expand...
Click to collapse
wow....thanks bro it will really help a lot to new user just like me
Thanks....................
Luffy.d said:
wow....thanks bro it will really help a lot to new user just like me
Click to expand...
Click to collapse
That's the aim bro to provide support for all guys who want to learn
Guide Updated according to R17 Changes
Really awesome thread here man.
Keep it coming!
Peace.
rebelos said:
Need Help ?
Click to expand...
Click to collapse
tried to compile AOSPA legacy 4.6 for unofficial device (armani/redmi 1s), since this tutorial is outdated
http://forum.xda-developers.com/showthread.php?t=1863547
and I haven't found any updated guide, I tried to compile it like CM11 (using local_manifests, etc) but stuck when building
http://hastebin.com/opiteyogux.md
I use device tree from https://github.com/armani-dev/android_device_xiaomi_armani with several change (local not committed to github) :
1. rename cm.mk to pa.mk also change cm_armani to pa_armani in PRODUCT_NAME
2. rename cm.dependencies to pa.dependencies adjust qcom_common to use AOSPA-legacy/android_device_qcom_common
3. added add_lunch_combo pa_armani-userdebug to envsetup.sh
anything I have missed? since I think I don't need to manually add files into vendor/pa folder
http://forum.xda-developers.com/showpost.php?p=30958881&postcount=2 aren't this obsolete in PA 4?
dels07 said:
tried to compile AOSPA legacy 4.6 for unofficial device (armani/redmi 1s), since this tutorial is outdated
http://forum.xda-developers.com/showthread.php?t=1863547
and I haven't found any updated guide, I tried to compile it like CM11 (using local_manifests, etc) but stuck when building
http://hastebin.com/opiteyogux.md
I use device tree from https://github.com/armani-dev/android_device_xiaomi_armani with several change (local not committed to github) :
1. rename cm.mk to pa.mk also change cm_armani to pa_armani in PRODUCT_NAME
2. rename cm.dependencies to pa.dependencies adjust qcom_common to use AOSPA-legacy/android_device_qcom_common
3. added add_lunch_combo pa_armani-userdebug to envsetup.sh
anything I have missed? since I think I don't need to manually add files into vendor/pa folder
http://forum.xda-developers.com/showpost.php?p=30958881&postcount=2 aren't this obsolete in PA 4?
Click to expand...
Click to collapse
see this git https://github.com/darknightmare it has everything u need
Regards
dels07 said:
tried to compile AOSPA legacy 4.6 for unofficial device (armani/redmi 1s), since this tutorial is outdated
http://forum.xda-developers.com/showthread.php?t=1863547
and I haven't found any updated guide, I tried to compile it like CM11 (using local_manifests, etc) but stuck when building
http://hastebin.com/opiteyogux.md
I use device tree from https://github.com/armani-dev/android_device_xiaomi_armani with several change (local not committed to github) :
1. rename cm.mk to pa.mk also change cm_armani to pa_armani in PRODUCT_NAME
2. rename cm.dependencies to pa.dependencies adjust qcom_common to use AOSPA-legacy/android_device_qcom_common
3. added add_lunch_combo pa_armani-userdebug to envsetup.sh
anything I have missed? since I think I don't need to manually add files into vendor/pa folder
http://forum.xda-developers.com/showpost.php?p=30958881&postcount=2 aren't this obsolete in PA 4?
Click to expand...
Click to collapse
make the pa.mk to pa_armani.mk if you still get error then go to vendor/pa/products n copy paste pa_armani.mk there go to the androidproduct.mk add in this line
Code:
ifeq (pa_amami,$(TARGET_PRODUCT))
PRODUCT_MAKEFILES += $(LOCAL_DIR)/pa_armani.mk
endif
Guide updated according to latest Github Changes
Edit: Updated the Guide again
regards
Thanks, will try after my exams.
Many Thanks Super Thread . I Will Request Your Please Make Step By Step Kernel Build For New User Who Want Kernel For Redmi 1S ..
manoranjan2050 said:
Many Thanks Super Thread . I Will Request Your Please Make Step By Step Kernel Build For New User Who Want Kernel For Redmi 1S ..
Click to expand...
Click to collapse
Kernel Compiling is not recommended for new user.. needs a certain degree of experience with source compiling to move onto kernels
guide is ready for r19 sources compiling
Guide Updated with R20 changes and Also added Carbon ROM Tutorial
credits: carbon maintainer for our device @Tarun93
Guide Updated with R20 changes and Also added Carbon ROM Tutorial
credits: carbon maintainer for our device @Tarun93
Related
After a read the impatience of a lot of people claiming for updates and news builds without checking before that devs got's a life, I decide to start the thread that will explain step by step how to compile CM10 from asn sources for the GSM version of the HTC Wildfire S, that means no love for marvelc.
Excuse me the incoherences and the incomprehensible stuff of my bad english.
Before you start doing nothing you agree that you're going to experiment, and that I'm not the culprit if you lose all of your files on the computer, or if you broke it.
¿Your first build?
1 - You need to download and install an .iso image of an Linux distribution, in this case we're going to use Ubuntu 12.04, so I recommend it, you can donwload from here:
http://www.ubuntu.com/download/desktop
P.D: DON'T USE THE WINDOWS DOWNLOADER
If you don't know how to install the .iso file after downloading I recomment you this tutorial:
http://howtoubuntu.org/how-to-install-ubuntu-12-04-precise-pangolin/
You've already Ubuntu installed and you're ready, so let's start with fun!
2 - We need to install a few packages that are needed to compile, so you must to start Terminal, which is the command line program for Ubuntu, like CMD is on Windows, then type this:
Code:
sudo apt-get install git-core gnupg flex bison gperf libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev libc6-dev ia32-libs x11proto-core-dev lib32z-dev mingw32 tofrodos python-markdown python python-lunch libxml2-utils xsltproc libx11-dev:i386
This will need about 10 min more or less.
3 - Now we need to dowload and install JDK 6 from Sun Java webpage, and then install it, I recommend to follow this tutorial:
http://www.printandweb.ca/2012/04/manually-install-oracle-jdk-6-for.html
Okay, we got all the libraries that we need to compile the sources, but... Where's the source?
This is the most annoying part of the procces, the code size is about 7 or 8 GB, so if you didn't got the NASA widthband, you might need to be patience, on my computer at 300 kbps it needs about 6 or 7 hours to download all.
Okey, let's stop speaking and start working.
4 - Type this on terminal, this'll download the repo script that you need to manage and get all the proyects that compose Jellybean:
Code:
mkdir ~/bin; curl [url]https://dl-ssl.google.com/dl/googlesource/git-repo/repo[/url] > ~/bin/repo; chmod a+x ~/bin/repo;sudo gedit .bashrc
It'll ask your Ubuntu password (if you got one) and then an text file'll be open, add in the bottom of it this line:
Code:
export PATH=${PATH}:~/bin
5 - Now, we need to create a working directory to place the source and our builds, I recommend to keep a good folder organization, so type this on terminal:
Code:
mkdir -p ~/building/cyanogenmod/jellybean; cd ~/building/cyanogenmod/jellybean
6 - Now we need to specify whith what version of android we're going to work, in this case jellybean so type this:
Code:
PATH=~/bin:$PATH; repo init -u git://github.com/CyanogenMod/android.git -b jellybean
7 - Now there's only one step before start the download of the code, type this:
Code:
gedit .repo/local_manifest.xml
Now an empty file'll appear, you must to copy and paste this inside it:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="cryptomilk"
fetch="git://git.cryptomilk.org/" />
<project name="projects/marvel/kernel_htc_msm7227.git" path="kernel/htc/msm7227" remote="cryptomilk" />
<project name="CyanogenMod/android_device_htc_common" path="device/htc/common" revision="refs/heads/gingerbread" />
<project name="projects/marvel/android_device_htc_msm7x27-recovery.git" path="device/htc/msm7x27-recovery" remote="cryptomilk" />
<project name="projects/marvel/android_device_htc_msm7x27-common.git" path="device/htc/msm7x27-common" remote="cryptomilk" />
<project name="projects/marvel/android_device_htc_marvel-common.git" path="device/htc/marvel-common" remote="cryptomilk" />
<project name="projects/marvel/android_device_htc_marvel.git" path="device/htc/marvel" remote="cryptomilk" />
<project name="projects/marvel/android_vendor_qcom_msm7x27.git" path="vendor/qcom/msm7x27" remote="cryptomilk" />
<project name="projects/marvel/android_vendor_htc_marvel.git" path="vendor/htc/marvel" remote="cryptomilk" />
</manifest>
8 - Now type this on terminal:
Code:
gedit .repo/manifest.xml
Another text file will appear, you should find this line:
Code:
<project path="hardware/qcom/display" name="CyanogenMod/android_hardware_qcom_display" />
And replace for this one:
Code:
<project path="hardware/qcom/display" name="LibertyICS/android_hardware_qcom_display" />
9 - Now type this on terminal:
Code:
repo sync
This'll download all the code, so go out and enjoy the day
¿Building again?
Now I'm sure that you got all the source and wants to build NOW
1 - So let's go, you only need to copy and paste this into a terminal emulator, after going into the folder where we locate the source, in this case it's ~/building/cyanogenmod/jellybean:
Code:
cd ~/building/cyanogenmod/jellybean;repo sync;./vendor/cm/get-prebuilts;cd bionic;git fetch http://review.cyanogenmod.com/CyanogenMod/android_bionic refs/changes/31/14631/1 && git cherry-pick FETCH_HEAD;cd ..;cd hardware/msm7k;git fetch http://review.cyanogenmod.com/CyanogenMod/android_hardware_msm7k refs/changes/58/15058/3 && git cherry-pick FETCH_HEAD;cd ..;cd ..;source build/envsetup.sh; lunch cm_marvel-eng;export USE_CCACHE=1
The lasts line will resync all the changes from upstream, get all prebuilts apps, patch camera and gps fixes on upstream and prepare the source to build for our phone.
2 - Now, we only need to type one line more, and the build might start then:
Code:
make -jx bacon
You should replace the x from -jx for number of cores in your CPU by two, for example if you got an 4 core machine (like me):fingers-crossed: you should put "make -j8 bacon".
3 - Now the build will start, it normally takes one hour and half, so be patience.
When it's finished you get something like this:
Code:
Package complete: /home/oliver/building/cyanogenmod/jellybean/out/target/product/marvel/update-cm-10.0.0-RC0-marvel-UNOFFICIAL-signed.zip
Happy compiling!:laugh:
This is mine!:silly:
This too!
how about windows like using putty? Just like dudeman1996
I respect your work.Thanks
OliverG96 said:
After a read the impatience of a lot of people claiming for updates and news builds without checking before that devs got's a life, I decide to start the thread that will explain step by step how to compile CM10 from asn sources for the GSM version of the HTC Wildfire S, that means no love for marvelc.
Excuse me the incoherences and the incomprehensible stuff of my bad english.
Before you start doing nothing you agree that you're going to experiment, and that I'm not the culprit if you lose all of your files on the computer, or if you broke it.
¿Your first build?
1 - You need to download and install an .iso image of an Linux distribution, in this case we're going to use Ubuntu 12.04, so I recommend it, you can donwload from here:
http://www.ubuntu.com/download/desktop
P.D: DON'T USE THE WINDOWS DOWNLOADER
If you don't know how to install the .iso file after downloading I recomment you this tutorial:
http://howtoubuntu.org/how-to-install-ubuntu-12-04-precise-pangolin/
You've already Ubuntu installed and you're ready, so let's start with fun!
2 - We need to install a few packages that are needed to compile, so you must to start Terminal, which is the command line program for Ubuntu, like CMD is on Windows, then type this:
Code:
sudo apt-get install git-core gnupg flex bison gperf libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev libc6-dev ia32-libs x11proto-core-dev lib32z-dev mingw32 tofrodos python-markdown python python-lunch libxml2-utils xsltproc libx11-dev:i386
This will need about 10 min more or less.
3 - Now we need to dowload and install JDK 6 from Sun Java webpage:
http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html
Select jdk-6u34-linux-i586.bin if you got an x86 machine, or select jdk-6u34-linux-x64.bin if you got an x64 machine.
Then you must to move into the directory where's the bin file you've downloaded using the Terminal, an type this:
Code:
chmod +x jdk-6u34-linux-x64.bin
./jdk-6u34-linux-x64.bin
sudo chown root. -R jdk1.6.0_34/
sudo mv jdk1.6.0_34/ /usr/lib/jvm/
sudo update-alternatives --install "/usr/bin/java" "java" \
"/usr/lib/jvm/jdk1.6.0_34/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" \
"/usr/lib/jvm/jdk1.6.0_34/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" \
"/usr/lib/jvm/jdk1.6.0_34/bin/javaws" 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
Okay, we got all the libraries that we need to compile the sources, but... Where's the source?
This is the most annoying part of the procces, the code size is about 7 or 8 GB, so if you didn't got the NASA widthband, you might need to be patience, on my computer at 300 kbps it needs about 6 or 7 hours to download all.
Okey, let's stop speaking and start working.
4 - Type this on terminal, this'll download the repo script that you need to manage and get all the proyects that compose Jellybean:
Code:
mkdir ~/bin; curl [url]https://dl-ssl.google.com/dl/googlesource/git-repo/repo[/url] > ~/bin/repo; chmod a+x ~/bin/repo;sudo gedit .bashrc
It'll ask your Ubuntu password (if you got one) and then an text file'll be open, add in the bottom of it this line:
Code:
export PATH=${PATH}:~/bin
5 - Now, we need to create a working directory to place the source and our builds, I recommend to keep a good folder organization, so type this on terminal:
Code:
mkdir -p ~/building/cyanogenmod/jellybean; cd ~/building/cyanogenmod/jellybean
6 - Now we need to specify whith what version of android we're going to work, in this case jellybean so type this:
Code:
PATH=~/bin:$PATH; repo init -u git://github.com/CyanogenMod/android.git -b jellybean
7 - Now there's only one step before start the download of the code, type this:
Code:
gedit .repo/local_manifest.xml
Now an empty file'll appear, you must to copy and paste this inside it:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="cryptomilk"
fetch="git://git.cryptomilk.org/" />
<project name="projects/marvel/kernel_htc_msm7227.git" path="kernel/htc/msm7227" remote="cryptomilk" />
<project name="CyanogenMod/android_device_htc_common" path="device/htc/common" revision="refs/heads/gingerbread" />
<project name="projects/marvel/android_device_htc_msm7x27-recovery.git" path="device/htc/msm7x27-recovery" remote="cryptomilk" />
<project name="projects/marvel/android_device_htc_msm7x27-common.git" path="device/htc/msm7x27-common" remote="cryptomilk" />
<project name="projects/marvel/android_device_htc_marvel-common.git" path="device/htc/marvel-common" remote="cryptomilk" />
<project name="projects/marvel/android_device_htc_marvel.git" path="device/htc/marvel" remote="cryptomilk" />
<project name="projects/marvel/android_vendor_qcom_msm7x27.git" path="vendor/qcom/msm7x27" remote="cryptomilk" />
<project name="projects/marvel/android_vendor_htc_marvel.git" path="vendor/htc/marvel" remote="cryptomilk" />
</manifest>
8 - Now type this on terminal:
Code:
gedit .repo/manifest.xml
Another text file will appear, you should find this line:
Code:
<project path="hardware/qcom/display" name="CyanogenMod/android_hardware_qcom_display" />
And replace for this one:
Code:
<project path="hardware/qcom/display" name="LibertyICS/android_hardware_qcom_display" />
9 - Now type this on terminal:
Code:
repo sync
This'll download all the code, so go out and enjoy the day
¿Building again?
Now I'm sure that you got all the source and wants to build NOW
1 - So let's go, you only need to copy and paste this into a terminal emulator, after going into the folder where we locate the source, in this case it's ~/building/cyanogenmod/jellybean:
Code:
cd ~/building/cyanogenmod/jellybean;repo sync;./vendor/cm/get-prebuilts;cd bionic;git fetch http://review.cyanogenmod.com/CyanogenMod/android_bionic refs/changes/31/14631/1 && git cherry-pick FETCH_HEAD;cd ..;cd hardware/msm7k;git fetch http://review.cyanogenmod.com/CyanogenMod/android_hardware_msm7k refs/changes/58/15058/3 && git cherry-pick FETCH_HEAD;cd ..;cd ..;source build/envsetup.sh; lunch cm_marvel-eng;export USE_CCACHE=1
The lasts line will resync all the changes from upstream, get all prebuilts apps, patch camera and gps fixes on upstream and prepare the source to build for our phone.
2 - Now, we only need to type one line more, and the build might start then:
Code:
make -jx bacon
You should replace the x from -jx for number of cores in your CPU by two, for example if you got an 4 core machine (like me):fingers-crossed: you should put "make -j8 bacon".
3 - Now the build will start, it normally takes one hour and half, so be patience.
When it's finished you get something like this:
Code:
Package complete: /home/oliver/building/cyanogenmod/jellybean/out/target/product/marvel/update-cm-10.0.0-RC0-marvel-UNOFFICIAL-signed.zip
Happy compiling!:laugh:
Click to expand...
Click to collapse
i have already ubuntu installed so its cool.but is this have same all CM10 bugs?or its 100% working rom?
davidang said:
how about windows like using putty? Just like dudeman1996
Click to expand...
Click to collapse
Have no idea of how to set up putty
Enviado desde mi Wildfire S A510e usando Tapatalk 2
crossfire77 said:
i have already ubuntu installed so its cool.but is this have same all CM10 bugs?or its 100% working rom?
Click to expand...
Click to collapse
Ot's like any other cm10 rom, the same issues.
Enviado desde mi Wildfire S A510e usando Tapatalk 2
OliverG96 said:
Ot's like any other cm10 rom, the same issues.
Enviado desde mi Wildfire S A510e usando Tapatalk 2
Click to expand...
Click to collapse
oh thats sad.what meaning of that much hassle? haha thnx.
OliverG96 said:
¿Building again?
Now I'm sure that you got all the source and wants to build NOW
1 - So let's go, you only need to copy and paste this into a terminal emulator, after going into the folder where we locate the source, in this case it's ~/building/cyanogenmod/jellybean:
Code:
cd ~/building/cyanogenmod/jellybean;repo sync;./vendor/cm/get-prebuilts;cd bionic;git fetch http://review.cyanogenmod.com/CyanogenMod/android_bionic refs/changes/31/14631/1 && git cherry-pick FETCH_HEAD;cd ..;cd hardware/msm7k;git fetch http://review.cyanogenmod.com/CyanogenMod/android_hardware_msm7k refs/changes/58/15058/3 && git cherry-pick FETCH_HEAD;cd ..;cd ..;source build/envsetup.sh; lunch cm_marvel-eng;export USE_CCACHE=1
The lasts line will resync all the changes from upstream, get all prebuilts apps, patch camera and gps fixes on upstream and prepare the source to build for our phone.
Click to expand...
Click to collapse
it's all done without single error, but when I put command above into terminal:
firt seems it's all ok,
"Fetching projects: 100% (321/321), done.
bionic/: discarding 1 commits
hardware/msm7k/: discarding 1 commits
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 142 100 142 0 0 223 0 --:--:-- --:--:-- --:--:-- 297
100 310k 100 310k 0 0 270k 0 0:00:01 0:00:01 --:--:-- 270k
Archive: ./vendor/cm/proprietary/Term.apk
inflating: ./vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so
From http://review.cyanogenmod.com/CyanogenMod/android_bionic
* branch refs/changes/31/14631/1 -> FETCH_HEAD
[detached HEAD 6cf80c4] bionic: Add NASTY_PTHREAD_CREATE_HACK
Author: Steve Kondik <[email protected]>
3 files changed, 15 insertions(+)
From http://review.cyanogenmod.com/CyanogenMod/android_hardware_msm7k
* branch refs/changes/58/15058/3 -> FETCH_HEAD
[detached HEAD 9198a41] librpc: Don't mask lower bytes on program version 0x00020002
Author: Ricardo Cerqueira <[email protected]>
1 file changed, 2 insertions(+), 2 deletions(-)
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/htc/marvel/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash"
and next line error:
build/core/config.mk:348: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com. Stop.
Device marvel not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for marvel not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/config.mk:348: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com. Stop.
** Don't have a product spec for: 'cm_marvel'
** Do you have the right repo manifest?
Click to expand...
Click to collapse
I did everything as U wrote, what I need to do, I want to try this, please ?
thank U,
cheers !
j00k3r said:
it's all done without single error, but when I put command above into terminal:
firt seems it's all ok,
"Fetching projects: 100% (321/321), done.
bionic/: discarding 1 commits
hardware/msm7k/: discarding 1 commits
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 142 100 142 0 0 223 0 --:--:-- --:--:-- --:--:-- 297
100 310k 100 310k 0 0 270k 0 0:00:01 0:00:01 --:--:-- 270k
Archive: ./vendor/cm/proprietary/Term.apk
inflating: ./vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so
From http://review.cyanogenmod.com/CyanogenMod/android_bionic
* branch refs/changes/31/14631/1 -> FETCH_HEAD
[detached HEAD 6cf80c4] bionic: Add NASTY_PTHREAD_CREATE_HACK
Author: Steve Kondik <[email protected]>
3 files changed, 15 insertions(+)
From http://review.cyanogenmod.com/CyanogenMod/android_hardware_msm7k
* branch refs/changes/58/15058/3 -> FETCH_HEAD
[detached HEAD 9198a41] librpc: Don't mask lower bytes on program version 0x00020002
Author: Ricardo Cerqueira <[email protected]>
1 file changed, 2 insertions(+), 2 deletions(-)
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/htc/marvel/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash"
and next line error:
I did everything as U wrote, what I need to do, I want to try this, please ?
thank U,
cheers !
Click to expand...
Click to collapse
Try to type on terminal:
java -version
And give me the output.
Enviado desde mi Wildfire S A510e usando Tapatalk 2
OliverG96 said:
Try to type on terminal:
java -version
And give me the output.
Enviado desde mi Wildfire S A510e usando Tapatalk 2
Click to expand...
Click to collapse
********@********-System-Product-Name:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless
Try: sudo apt-get install <selected package>
********@********-System-Product-Name:~$
hope it will help, thank U for Your effort.
cheers !
j00k3r said:
********@********-System-Product-Name:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless
Try: sudo apt-get install <selected package>
********@********-System-Product-Name:~$
hope it will help, thank U for Your effort.
cheers !
Click to expand...
Click to collapse
Can you do 3 step of installing jdk again and give me every output that you got?
It's the problem that you haven't got java installed correctly.
Enviado desde mi Wildfire S A510e usando Tapatalk 2
OliverG96 said:
Can you do 3 step of installing jdk again and give me every output that you got?
It's the problem that you haven't got java installed correctly.
Enviado desde mi Wildfire S A510e usando Tapatalk 2
Click to expand...
Click to collapse
it's a huge list so i will not c/p cos it will look like wtf
i put it in .txt so U have it in attachment.
cheers !
j00k3r said:
it's a huge list so i will not c/p cos it will look like wtf
i put it in .txt so U have it in attachment.
cheers !
Click to expand...
Click to collapse
Have no idea of what are you doing vrong, but I've a found a tutorial which I follow a few months ago to install it, so I'll edit the 3 step and add the link for it instead of all the commands.
http://www.printandweb.ca/2012/04/manually-install-oracle-jdk-6-for.html
hey Oliver, what do U think is there any chance that problem is x64 version of ubuntu that i'm using ?
maybe U write commands for x86, i don't know, don't have any other idea...
i intsalled latest version followed tut what U give as U can see:
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Click to expand...
Click to collapse
cheers !
j00k3r said:
hey Oliver, what do U think is there any chance that problem is x64 version of ubuntu that i'm using ?
maybe U write commands for x86, i don't know, don't have any other idea...
i intsalled latest version followed tut what U give as U can see:
cheers !
Click to expand...
Click to collapse
Are you getting the same issues?
Enviado desde mi Wildfire S A510e usando Tapatalk 2
damn yes.
the main problem now is, hmm, I am very stubborn and will not stop until this **** works ! :laugh:
j00k3r said:
damn yes.
the main problem now is, hmm, I am very stubborn and will not stop until this **** works ! :laugh:
Click to expand...
Click to collapse
The issue you got is this again?
Code:
build/core/config.mk:348: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com. Stop.
Device marvel not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for marvel not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/config.mk:348: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com. Stop.
** Don't have a product spec for: 'cm_marvel'
** Do you have the right repo manifest?
i try every single thing from the start, fresh, and again, yes, that's D error, to bad, no luck for me...
I've spent some time in the last couple of days trying to set up a Linux box to compile my own Cyanogenmod ROM and have run into some issues that are not mentioned in the official CM Wiki (http://wiki.cyanogenmod.org/w/Build_for_odin). You can start there, but to make things easier, I wanted to put everything in ONE single post so others don't have to go looking around different sources. Feel free to make any comments and suggestions.
This can easily be moved to a wiki if that's deemed more appropriate, but I just wanted to put it somewhere.
First, get yourself a 64 bit PC or VM (you can use Virtualbox) and install Ubuntu 12.04 LTS. You can install the latest version, but LTS builds have longer support and are more stable. If you're only using it for building ROMs, it's nice to be more consistent. Make sure you have at LEAST 35 GB, but the more the better. 100 GB are best if you have the space.
Once you have Ubuntu up and running, fire up a terminal, and get ready to type (or copy and paste). These steps are taken from Here
You need java, and you need the RIGHT java environment. We must get rid of any undesired ones that come with Ubuntu. These will be reinstalled if you do an update or install updates, so always make sure you are running the right version by default.
Remove unwanted JREs
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Now we add a repository that contains the proper Sun Java 1.6 JRE (this repository works as of 7/30/13, but it might disappear due to Oracle licensing claims)
Code:
sudo add-apt-repository ppa:webupd8team/java
Once the PPA is added, Ubuntu will know where to install the correct packages from. Next we copy and paste:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
The above command will update the repository database and then install the JRE. Follow the onscreen prompts to accept the license agreement, and when done, you should be able to confirm you have the right version by typing
Code:
java -version
And it should return something like this:
java version “1.6.0_37″
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Now we install the packages needed to build and compile properly. Copy and paste this whole line:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python lzop
This might take a while, since the package manager has to download and install all those packages.
When done, we set up 'repo' which is the script in charge of downloading all the source code and files you will need to build your ROM. Copy and paste this into your terminal:
Code:
mkdir ~/bin && curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to add the new folder created above into your path (so you can run repo from anywhere). I use vi, but nano is more friendly:
Code:
sudo nano ~/.bashrc
At the very bottom, add this
Code:
export PATH=~/bin:$PATH
Save the file, exit the text editor, and then run
Code:
source ~/.bashrc
In the terminal, create a folder where you would like to have your code stored. If you have more than one drive, pick the fastest one. Avoid USB external drives, SSD is best. The official CM guide suggests:
Code:
mkdir ~/android/system
Go into the newly created folder and initialize your repo
Code:
cd ~/android/system
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
In the line above, you can pick 10.1 if you want to build Jelly Bean 4.2.2 or 10.2 for Jelly Bean 4.3.
Once the repo is initialized, it's time to have it pull EVERYTHING. This next command will take a while, depending on your internet connection:
Code:
repo sync
You can run the 'repo sync' command as often as you want. Doing this will get the latest version of any code on the CM repository, so make sure you do it often.
When you have all the data synced up and downloaded to your build box, you need to do some Odin (code name for the Xperia ZL) specific steps. These are taken from the CM Wiki
You need to get the pre-built apps, this should only need to be done once.
Code:
cd ~/android/system/vendor/cm
./get-prebuilts
Now we get the build environment ready:
Code:
source build/envsetup.sh
breakfast odin
You will notice that you will get some errors regarding missing files in the vendor/ directory. The CM guide tells you to pull the ZL blobs through USB, but thankfully, these files are hosted on the internet. To get them, once the 'breakfast' command is done, fire up your favorite text editor:
Code:
nano ~/home/system/.repo/local_manifests/roomservice.xml
Your XML file will look like this
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_sony_odin" path="device/sony/odin" remote="github" />
<project name="CyanogenMod/android_device_sony_common" path="device/sony/common" remote="github" />
<project name="CyanogenMod/android_device_sony_qcom-common" path="device/sony/qcom-common" remote="github" />
<project name="CyanogenMod/android_device_sony_fusion3-common" path="device/sony/fusion3-common" remote="github" />
<project name="CyanogenMod/android_kernel_sony_apq8064" path="kernel/sony/apq8064" remote="github" />
<project name="CyanogenMod/android_packages_apps_FMRadio" path="packages/apps/FmRadio" remote="github" />
<project name="CyanogenMod/android_hardware_sony_DASH" path="hardware/sony/DASH" remote="github" />
</manifest>
After the last project line, you will add the following (add it before the </manifest> line
Code:
<project name="TheMuppets/proprietary_vendor_sony" path="vendor/sony" remote="github" />
So it looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_sony_odin" path="device/sony/odin" remote="github" />
<project name="CyanogenMod/android_device_sony_common" path="device/sony/common" remote="github" />
<project name="CyanogenMod/android_device_sony_qcom-common" path="device/sony/qcom-common" remote="github" />
<project name="CyanogenMod/android_device_sony_fusion3-common" path="device/sony/fusion3-common" remote="github" />
<project name="CyanogenMod/android_kernel_sony_apq8064" path="kernel/sony/apq8064" remote="github" />
<project name="CyanogenMod/android_packages_apps_FMRadio" path="packages/apps/FmRadio" remote="github" />
<project name="CyanogenMod/android_hardware_sony_DASH" path="hardware/sony/DASH" remote="github" />
<project name="TheMuppets/proprietary_vendor_sony" path="vendor/sony" remote="github" />
</manifest>
Save the file, and run a repo sync again
Code:
repo sync
Now execute the breakfast command again. You don't need to execute the 'source build/envsetup.sh' command unless you open a new terminal window.
Code:
breakfast odin
Turn on caching
Code:
export USE_CCACHE=1
And you're ready to build!
Code:
brunch odin
When the build completes, cd into the $OUT folder
Code:
cd $OUT
And you will have a zip file ready to flash. It will be called something like this
Code:
cm-10.2-20130731-UNOFFICIAL-odin.zip
and you will have a
Code:
recovery.img
file that you can use to flash to your bootloader. If you already have a CM build or a working recovery, you can skip that part and just flash the zip.
If you get any build errors, check the CM wiki. A lot of errors are due to running out of disk space, hence why it's important to give your VM a lot of it.
That's it! You have built a ROM!
Awesome man!! Thanks for teaching us
thanks for the guide,
when I get to:
"Now we install the packages needed to build and compile properly. Copy and paste this whole line:"
I do so but am presented with:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'lib32z1-dev' instead of 'lib32z-dev'
bzip2 is already the newest version.
libbz2-1.0 is already the newest version.
libreadline6 is already the newest version.
readline-common is already the newest version.
zip is already the newest version.
zip set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch
libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 8.0.4-0ubuntu0.6)
Recommends: libgl1-mesa-dri:i386 (>= 7.2)
E: Unable to correct problems, you have held broken packages.
Can you help?
Thanks
redmongoose said:
thanks for the guide,
when I get to:
"Now we install the packages needed to build and compile properly. Copy and paste this whole line:"
I do so but am presented with:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'lib32z1-dev' instead of 'lib32z-dev'
bzip2 is already the newest version.
libbz2-1.0 is already the newest version.
libreadline6 is already the newest version.
readline-common is already the newest version.
zip is already the newest version.
zip set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch
libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 8.0.4-0ubuntu0.6)
Recommends: libgl1-mesa-dri:i386 (>= 7.2)
E: Unable to correct problems, you have held broken packages.
Can you help?
Thanks
Click to expand...
Click to collapse
It means some dependencies are missing. It tells you right there. Looks like you need to install libglapi-mesa:i386, so do
sudo apt-get install "package name"
to install any missing dependencies
Hi,
First of all thanks for that guide, it really helped. I guess there is one step missing:
After customizing the local manifest file, you need to do repo sync to pull the files, which are needed to brunch..
hutilicious said:
Hi,
First of all thanks for that guide, it really helped. I guess there is one step missing:
After customizing the local manifest file, you need to do repo sync to pull the files, which are needed to brunch..
Click to expand...
Click to collapse
You're welcome and thank you for the heads up. I updated the guide with this information.
How much RAM should I allocate to the VM?
Project Developer
Welcome
This is a guide for all those who want to build for their Xperia M Device but do not neccesasarily have the knowledge or experience.
This is an unofficial guide for the building of custom ROMs and other mods for the Xperia M. This is a work in progress, with additions being made as often as possible. This thread has already grown with the help of the devs established in this forum. BMP777 began this project a year ago when I was using a Samsung GS II Skyrocket. BMP777 started another alike thread called PR II in the LGOG forum a while back as well. I have since moved on to a ONE, but both threads remain to this day. and Started by Me on Xperia Arc The point is this: everyone who uses this site has a desire for modding, customizing, and/or otherwise altering their device. Unfortunately, many have no idea how to go about doing these things for themselves. As such, there is a lot of dissatisfaction among developers about receiving constant demands, suggestions, and requests for updates. This thread is meant to give those who want to step up and build for themselves the means to do so. It is an ever-changing thread, with all assistance welcomed.
READ ME:
On one hand, it should go without saying that if you have no knowledge and/or experience with building, java, C++, and various other tools, you probably shouldn't begin here. At the same time, it is possible to learn to build, provided you can read, follow directions, and aren't too lazy to RESEARCH.
OH YEAH, and you better have patience. This isn't easy. It will be work. The quickest way to get flamed is to show yourself to be lazy. If you think that with a couple clicks, you can have your own flashy ROM, forget it. But, if you do want to learn, this is a good place to get started. I have no ego about this; I started the same way and just want to help everyone learn to build their own ROM. But, everyone will struggle to get to a successful point, and lazy, unmotivated people just irritate those who have had to learn from scratch too. Tutorials will be posted for any new thing learned and built as time and space allow. ALL ARE WELCOME AND ALL QUESTIONS ARE TOO. But, seriously, if it's a really ridiculous one, I/we reserve the right to screw with you about it.
ALWAYS REMEMBER:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thread Disclaimer:
The instructions and extras posted here are to be used at your own risk. I am working hard to provide good, workable tutorials that will make successful building much easier. Nevertheless, I am not responsible if you lose your files, brick your device, or inadvertently cause a nuclear war. If you are seeking absolute perfection, RUN NOW WHILE YOU STILL CAN!!
Thread Navigation :
# 2 > Setting Up Build enviorment
# 3 > Building instructions & How To Build Using Linaro Toolchain
# 4 > Kernel building and CCACHE
# 5 > reserved for future
XDA:DevDB Information
Project Developer, a Tool/Utility for the Sony Xperia Z
Contributors
officiallysonyrebel, car vs driver , BMP777, @Saki3d , @FXP , @kali , @codeworkx , @cdesai
Version Information
Status: Testing
Created 2013-11-29
Last Updated 2013-12-03
Necessary Files for Xperia M :
Tip :For Building any Rom for Xperia Z u need these specific device files
1 . first is "sony.xml"
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Nicki bits -->
<project path="device/sony/nicki" name="CyanogenMod/android_device_sony_nicki" remote="github" revision="cm-11.0" />
<project path="kernel/sony/msm8x27" name="CyanogenMod/android_kernel_sony_msm8x27" remote="github" revision="cm-11.0" />
<!-- common sony bits -->
<project path="device/sony/qcom-common" name="CyanogenMod/device_sony_qcom-common" remote="github" revision="cm-11.0" />
<project path="device/sony/common" name="CyanogenMod/device_sony_common" remote="github" revision="cm-11.0" />
<project path="hardware/sony/DASH" name="CyanogenMod/android_hardware_sony_DASH" remote="github" revision="cm-11.0" />
<!-- sony vendor bits -->
<project path="vendor/sony" name="TheMuppets/proprietary_vendor_sony" remote="github" revision="cm-11.0" />
</manifest>
Build Enviorment Set up :
This is a combination of the steps offered in the threads 'Compile JB on Ubuntu' and TeamChopsticks CyanogenMod.
Special thanks to dastin1015 and TeamChopsticks.
Tip: Allocate at least 75 gigs of space for the building of ONE ROM. If you install ccache, you will want 90. A complete build directory can use as much as 100 gigs, so make sure you have plenty of room. One of the ways to fail out a build is too use all of your partition before acquiring all the necessary files.
Here are the steps from those 2 tutorials in correct order:
0.1 ))
Install Gedit
Code:
# gedit
sudo apt-get install gedit
1) You need the following:
-JDK 6 if you wish to build Jellybean.
Code:
[COLOR="Black"]$ sudo apt-get oracle-java7-installer
-Python 2.4 -- 2.7, which you can download from python.org.[/COLOR]
Or:
Code:
[COLOR="black"]$ sudo apt-get install python
-Git 1.7 or newer. You can find it at git-scm.com.[/COLOR]
Or:
Code:
[COLOR="black"]$ sudo apt-get install git-core[/COLOR]
-Android SDK:
Download the SDK here: http://developer.android.com/sdk/index.html
Extract the SDK and place it in your home directory.
I renamed my SDK to android-sdk to make it easier to navigate to – this tutorial assumes you've done that as well.
Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.
Add these lines at the bottom of the file:
Code:
[COLOR="black"]# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin[/COLOR]
Find your .profile file and add this at the bottom of the file:
Code:
[COLOR="black"]PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"
You have now successfully installed the Android SDK.[/COLOR]
To check for updates issue this into your terminal:
Code:
[COLOR="black"]$ android[/COLOR]
2) Install required packages. 64-bit (recommended)
Code:
[COLOR="black"]$ 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 lib32readline-gplv2-dev lib32z-dev
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown
libxml2-utils lzop schedtool[/COLOR]
On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
[COLOR="black"]$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so[/COLOR]
Code:
[COLOR="black"]$ 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-glx:i386
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so[/COLOR]
3) Configure your USB.
Code:
[COLOR="black"]$ gksudo gedit /etc/udev/rules.d/51-android.rules[/COLOR]
Inside of this blank text file insert:
Code:
[COLOR="black"]#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"[/COLOR]
4) Save the file and close it and then issue this command:
Code:
[COLOR="black"]$ sudo chmod a+r /etc/udev/rules.d/51-android.rules[/COLOR]
5) Install the repo:
Code:
[COLOR="black"]$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo[/COLOR]
Create your work directory:
Code:
[COLOR="black"]mkdir ~/"your directory name here" For example: mkdir ~/cm10
cd ~/cm10[/COLOR]
Setup local manifest:
Code:
[COLOR="Black"]mkdir .repo/local_manifests
touch .repo/local_manifests/sony.xml
gedit .repo/local_manifests/sony.xml[/COLOR]
Building Instructions : For CyanogenMod :: AOKP :: Carbon roms :: Beanstalk
Unofficial
To get started with Android/CyanogenMod, you'll need to get familiar with Git and Repo.
To initialize your local repository using the CyanogenMod trees, use a command like this:
first create folder named " cm "
Code:
mkdir cm
enter into cm
Code:
cd ~/cm
For CM - 11.0 kitkat 4.4.x
Code:
[COLOR="black"]repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
Please see the CyanogenMod Wiki for building instructions.
For more information on this Github Organization and how it is structured, please read the wiki article.
Create and edit semc.xml in .repo:
Code:
[COLOR="black"]gedit .repo/local_manifests/sony.xml[/COLOR]
Add this to the semc.xml:
For CM 11.0 KitKat 4.4.x
copy paste semc.xml for kikat 4.4 from above
then
Code:
[COLOR="Black"]repo sync[/COLOR]
Code:
[COLOR="black"]. build/envsetup.sh (notice the period and space)
vendor/cm/get-prebuilts
[/COLOR]
then
Code:
brunch c1905
Special thanks to scott.hart.bti for his hard work -
From terminal
1. type
Code:
[COLOR="black"]cd[/COLOR]
.
This will bring you to your root folder.
2. type
Code:
[COLOR="black"]mkdir beanstalk[/COLOR]
.
This will create a folder named beanstalk.
3. type
Code:
[COLOR="black"]cd beanstalk[/COLOR]
.
This will take you to the beanstalk directory created from previous step
4. type
Code:
[COLOR="black"]repo init -u git://github.com/scotthartbti/android.git -b kk44[/COLOR]
.
This will setup the folders to be synced.
5. For Beanstalk KitKat 4.4.x
copy paste sony.xml for kikat 4.4 from above
then
Code:
[COLOR="Black"]repo sync[/COLOR]
apply patches for 4.4
9. Outside of terminal, navigate to beanstalk/vendor/cm. Double click on the get-prebuilts file and select run in terminal. This will fetch necessary files needed to build and place them where they need to be.
10. Type
Code:
[COLOR="Black"]. build/envsetup.sh && brunch c1905 [/COLOR]
11. Previous step will start building beanstalk for your device. The process takes anywhere from 1 - 3 hours depending on your computer.
12. Once completed, it will say package complete and you will have a beanstalk named zip file in your out folder.
Unofficial
Special thanks to spleef and ktempleman for laying this out
This set of instructions is unverified. If you build successfully or have build issues, please post here so we can confirm or fix what isn't working
First:
Code:
[COLOR="Black"]mkdir aokp[/COLOR]
then
Code:
[COLOR="black"]cd aokp[/COLOR]
then
Code:
[COLOR="black"]repo init -u https://github.com/AOKP/platform_manifest.git -b kitkat[/COLOR]
after it does its thing
Code:
[COLOR="black"]mkdir .repo/local_manifests
touch .repo/local_manifests/sony.xml
gedit .repo/local_manifests/sony.xml[/COLOR]
copy paste semc.xml for kikat 4.4 from above
save and exit then
Code:
[COLOR="black"]repo sync[/COLOR]
after everything syncs
Code:
[COLOR="black"]gedit vendor/aokp/vendorsetup.sh[/COLOR]
and add this to the bottom:
Code:
[COLOR="black"]add_lunch_combo aokp_c1905 -userdebug[/COLOR]
save and exit.. then
Code:
[COLOR="black"]. build/envsetup.sh[/COLOR]
Code:
[COLOR="black"]brunch c1905 [/COLOR]
For more on AOKP building, try here: http://aokp.co/learn/so-you-want-to-build-aokp-jb-ubuntu-1204
And Here: https://github.com/AOKP
Unofficial
Getting Started
To get started with the Carbon-Dev sources, you'll need to get familiar with Git and Repo.
Create the Directories
You will need to set up some directories in your build environment.
To create them run:
Code:
[COLOR="black"]mkdir -p ~/carbon[/COLOR]
Install the Repository
You may need to reboot for these changes to take effect. Now enter the following to initialize the repository:
Code:
[COLOR="black"]cd ~/carbon[/COLOR]
Repositories:
Before you continue --> run this in the terminal
Code:
[COLOR="black"]repo init -u https://github.com/CarbonDev/android.git -b kk[/COLOR]
after it does its thing
Code:
[COLOR="black"]mkdir .repo/local_manifests
touch .repo/local_manifests/sony.xml
gedit .repo/local_manifests/sony.xml[/COLOR]
copy paste sony.xml for kikat 4.4 from above
save and exit then
Code:
[COLOR="black"]repo sync[/COLOR]
after everything syncs
Code:
[COLOR="black"]gedit vendor/carbon/vendorsetup.sh[/COLOR]
and add this to the bottom:
Code:
[COLOR="black"]add_lunch_combo carbon_c1905 -userdebug[/COLOR]
save and exit.. then
Code:
[COLOR="black"]. build/envsetup.sh[/COLOR]
Code:
[COLOR="black"]brunch c1905 [/COLOR]
To get started with AORP, you'll need to get familiar with Git and Repo.
To initialize your local repository using the AORP trees, use a command like this:
first create folder named " AORP "
Code:
mkdir AORP
enter into AORP
Code:
cd ~/AORP
For kitkat 4.4.x
Code:
[COLOR="black"]repo init -u git://github.com/AORP/android.git -b kk[/COLOR]
Then to sync up:
Code:
[COLOR="black"]repo sync[/COLOR]
Please see the CyanogenMod Wiki for building instructions.
For more information on this Github Organization and how it is structured, please read the wiki article.
Create and edit sony.xml in .repo:
Code:
[COLOR="black"]gedit .repo/local_manifests/semc.xml[/COLOR]
Add this to the semc.xml:
For KitKat 4.4.x
copy paste sony.xml for kikat 4.4 from above
then
Code:
[COLOR="Black"]repo sync[/COLOR]
Code:
[COLOR="black"]. build/envsetup.sh (notice the period and space)
vendor/cm/get-prebuilts
[/COLOR]
then
Code:
brunch c1905
Next Tutorial is Strictly Not for beginners
Building with Linaro 4.8 toolchain
Go into Terminal and navigate to the root folder of your source tree, then:
Code:
[COLOR="Black"]prebuilts/gcc/linux-x86/arm/[/COLOR]
Run:
Code:
[COLOR="black"]wget http://releases.linaro.org/13.06/components/toolchain/gcc-linaro/4.8/gcc-linaro-4.8-2013.06.tar.bz2[/COLOR]
Run:
Code:
[COLOR="black"]bunzip2 *.tar.bz2[/COLOR]
Run:
Code:
[COLOR="black"]tar -xvf *.tar[/COLOR]
Using your file manager, navigate to the root folder of your source tree again.
Navigate To "/build", in your root folder.
Run:
Code:
[COLOR="black"]gksudo gedit envsetup.sh[/COLOR]
change the line in bold, to look exactly like this one:
Code:
[COLOR="black"]case $ARCH in
x86) toolchaindir=x86/i686-linux-android-4.6/bin
;;
[B]arm) toolchaindir=arm/gcc-linaro-4.8-2013.06[/B] [COLOR="Red"]<--------[/COLOR]
;;
mips) toolchaindir=mips/mipsel-linux-android-4.6/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
[/COLOR]
Exit out and open new. Initialize and build. That's it! Makes you wonder why you never did it before, right?
Not so fast. You may have build issues, you may not. I had a few lengthy sets of errors in gsm calltracker and another .java file that was solved by using Meld and making it look exactly like a successful build's file. More as I learn.......
Thanks to infected_ for this tut; his post can be found here: [/COLOR]
http://forum.xda-developers.com/showpost.php?p=42976693&postcount=12
This is a work in progress. Many more pieces of information will be added and this is meant to be an ever-changing thread. If you see something that is outdated or incorrect, please let me know ASAP, so I can make the correction. Also, make sure that any info offered can be and has been confirmed as functional.
Thanks to:
CyanogenMod
scott.hart.bti
Team Carbon
david279
MallardDuck
ktempleton
AdhvanIt
matthew0776
spleef
M4570D0N
car vs driver
PecanCM
BMP777
Kernel Building and Ccache
Building your first kernel
:
This is a set of steps to get you building your first kernel. Special thanks to thewadegeek for putting this tutorial together. His thread can be found here: http://forum.xda-developers.com/showthread.php?t=1748297
Step 1. Build Environment
A. Install Ubuntu 12.04(Not holding your hand here, if you can't do this you shouldn't be messing with kernels)
B. Required packages: git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib, and Adb.
C. Open a terminal
D. Type
Code:
[COLOR="black"]mkdir android[/COLOR]
E. Type
Code:
[COLOR="black"]cd android[/COLOR]
G.Type
Code:
[COLOR="black"]mkdir kernel[/COLOR]
Step 2. Your Source
A. Open your Terminal Prompt
B. Type
Code:
[COLOR="black"]cd android/kernel[/COLOR]
C. Type
Code:
[COLOR="black"]git clone git://github.com/DooMLoRD/android_prebuilt_toolchains.git toolchains[/COLOR]
D. Now comes the tricky part, you need to have some-type of source for your kernel. Check the following two sites for your device as appropriate. Once you have it download it is extracted/cloned into a folder in your kernel directory.
http://developer.sonymobile.com/wpor...ads/opensource
Step 3. Modifications
This is the part people are curious about, they want to make modifications to the kernel to make it "special". Start all these from the root directory of your kernel source.
Mod 1. Applying a patch
A. Download the patch you wish to apply, in this case this one should work.
B. Save that file as "kernelPatch" in your kernel directory.
C. Open a Terminal
D. Move into the root directory of the kernel you wish to patch.
E. Type
Code:
[COLOR="black"]patch -p1 < ../kernelPatch[/COLOR]
Mod 2. Adding a Governor Alone
A. Open "drivers/cpufreq/Kconfig"
B. Add the following lines in appropriate spot amongst the other govenor's
Code:
[COLOR="Black"]config CPU_FREQ_DEFAULT_GOV_SMARTASS
bool "smartass"
select CPU_FREQ_GOV_SMARTASS
select CPU_FREQ_GOV_PERFORMANCE
help
Use the CPUFreq governor 'smartass' as default.
[/COLOR]
Code:
[COLOR="Black"]config CPU_FREQ_GOV_SMARTASS
tristate "'smartass' cpufreq governor"
depends on CPU_FREQ
help
smartass' - a "smart" optimized governor!
If in doubt, say N.[/COLOR]
C. Open "drivers/cpufreq/Makefile"
D. Add the following line in the appropriate spot.
Code:
[COLOR="Black"] obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS) += cpufreq_smartass.o[/COLOR]
E. Create a file called "drivers/cpufreq/cpufreq_smartass.c"
F. Put the following code in that file.
http://pastebin.com/f0Bk9kVZ
G. open "include/linux/cpufreq.h"
H. Under the "Cpufreq Default" section add
Code:
[COLOR="Black"]#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS)
extern struct cpufreq_governor cpufreq_gov_smartass;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_smartass)[/COLOR]
Ok there is a governor added, do the exact same steps for any other one's you would like to add.
Step 4. Getting a Config file
Option A. Pulling a config file from a kernel.
A. Hook up a device that is using a kernel similar to one you are using as your base.
B. Open a terminal
C. Change to your root kernel directory
D. Type
Code:
[COLOR="black"]adb pull /proc/config.gz[/COLOR]
E. Type
Code:
[COLOR="black"]gunzip config.gz[/COLOR]
F. Type
Code:
[COLOR="black"]mv config arch/arm/configs/<your_config_name>_defconfig[/COLOR]
Option B. Using the manufacturers config.
Unfortunately as stated above, not all kernels support the "/proc/config.gz" method. You can typically find a manufacturer's configuration file in "arch/arm/configs". I believe the one for my HTC Flyer was called "flyer_hc_defconfig", so look for a layout similar to that one. Also read the README to get a better idea of how to modify it. I would personally make a copy of it called "<your_config_name>_defconfig" and use that as my base.
Step 5. Building
Time to start the real "build" section of this tutorial.
Part A. Pre-build Steps
A. Open terminal and change to the root of your kernel directory
B. Type
Code:
[COLOR="black"]export ARCH=arm[/COLOR]
C. Type
Code:
[COLOR="black"]export CROSS_COMPILE=~/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-[/COLOR]
Part B. The First Build
A. Type
Code:
[COLOR="black"]make <your_config_name>_defconfig[/COLOR]
B. Type
Code:
[COLOR="black"]make menuconfig[/COLOR]
and make the required changes to use any modules you added or similar changes.
C. Type
Code:
[COLOR="black"]make -j<maximum number of jobs>[/COLOR]
Part C. Re-Builds
A. Type
Code:
[COLOR="black"]make clean[/COLOR]
B. Type
Code:
[COLOR="black"]make oldconfig[/COLOR]
C. Type
Code:
[COLOR="black"]make -j<maximum number of jobs>[/COLOR]
Part D. Building Modules
You have two options:
A. Type
Code:
[COLOR="black"]make modules[/COLOR]
B. Type
Code:
[COLOR="black"]make path/to/your/module.ko[/COLOR]
The above steps explained:
Part A.(These steps are required every time you close your terminal and re-open it to build again.)
A. Ok shouldn’t need to explain this.
B. This command sets your target architecture.
C. Defines the path to the toolchain we are going to use to compile our kernel. You can change this to point towards whatever toolchain you have downloaded or feel like using, the way it is currently configured it will use the Linaro toolchain that we downloaded above.
Part B.(These only need to be run the first time you build a kernel.)
A. Load's your configuration file from earlier.
B. Open up a menu to configure your kernel. It will use the config file you loaded in the previous step as a base.
C. Viola start the build. I typically allow 1 job per core, so on my quad core machine I put "make -j4". Just raising that number will not make your build faster, your processor needs to be able to support the number of jobs you are assigning it.
Part C. (Use the command's when you are building any-time outside of the first)
A. This command gets rid of any old/outdated binaries or modules you compiled before, and let's start fresh. I like to run it every I build unless my changes are really small and localized.
B. A very awesome command, it parses through what has changed and only prompts you about new options.
C. See the explanation for the above "Part C.".
Part D.(Use these for just building kernel modules.)
A. This will re-build all modules.
B. Will rebuild just the module you need. Very useful when you need to rebuild a WiFi module.
Step 6. Now what
Ok we have now started our build and we are waiting for it to finish, so there are two possible outcomes:
Outcome A. Build Succeeds
W00t!! You have a kernel built by your self from source. There are a couple things you need in-order to use this kernel on your device any ".ko" modules and the zImage binary. If you pay attention to the output of your compiler then you will see the location of those objects. However the following commands will make your life a bit easier(Thanks Recognized Developer Hacre):
A. Open a terminal
B. Change to your root kernel directory
C. Type
Code:
[COLOR="black"]mkdir ../<your_kernel>_output[/COLOR]
D. Type
Code:
[COLOR="black"]cp arch/arm/boot/zImage ../<your_kernel>_output/zImage[/COLOR]
E. Type
Code:
[COLOR="black"]find . -name "*.ko" -exec cp {} ../<your_kernel>_output \;[/COLOR]
The above steps explained:
A-C. Self-Explanatory
D. Move our kernel binary into our output folder
E. This handy bit of magic finds all ".ko" modules and also copies them into your output file.
You will also need to assemble a kernel image containing a initramfs for your device, along with the kernel binary and such. That however is beyond the scope of this tutorial. To get started though try searching the following phrases.
Code:
[COLOR="Black"]building android kernel image
xda build kernel image
xda unpack boot.img[/COLOR]
Outcome B. Build Fails
Oh dear. It failed. Well guess what...this is going to happen..a LOT. Get used to it, and get used to googling and experimenting with different solutions. The following are some tips that will help you with debugging your issues.
Running a "Clean" build
A. Backup your config file - Type
Code:
[COLOR="black"]cp .config ../backupConfig[/COLOR]
B. Re-run the build process using just your defconfig from earlier.
Limiting Output(Thanks Hacre.)
A. Another good tip is to run "make -j1" to get the error, as it will limit the amount of text you need to scroll through.[/COLOR]
[/CENTER]
Building TWRP recovery - http://forum.xda-developers.com/showthread.php?t=1943625
Building CWM recovery - http://forum.xda-developers.com/showthread.php?t=1866545
CCACHE
Here is a brief tutorial on the installation of Ccache, which can shorten build times drastically :
If you have room on your build system you can speed
your builds up considerably by using ccache. ccache is a compiler
cache. It speeds up re-compilation of C/C++ code by caching
previous compiles and detecting when the same compile is
being done again.
Install it with apt-get:
Code:
[COLOR="Black"]sudo apt-get install ccache[/COLOR]
Set environment vars for Android use:
(I put these exports in my .bashrc)
Code:
[COLOR="Black"]export USE_CCACHE=1
export NDK_CCACHE=ccache[/COLOR]
Set a cache size of 10G for optimal results:
Code:
[COLOR="black"]ccache -M 10G[/COLOR]
Check the status of your cache with the command:
Code:
[COLOR="black"]ccache -s [/COLOR]
Returns:
Code:
[COLOR="black"]
cache directory /home/jocala/.ccache
cache hit 106673
cache miss 18379
called for link 3758
preprocessor error 5
not a C/C++ file 4425
unsupported compiler option 678
no input file 4565
files in cache 36758
cache size 3.2 Gbytes
max cache size 10.0 Gbytes[/COLOR]
Really Useful things
Here are some relevant topics/tutorials/sites:
Download | Ubuntu - www.ubuntu.com/download
Official Ubuntu Documentation: Help for all versions. - https://help.ubuntu.com/
How To Windows Dual Boot: - https://help.ubuntu.com/community/WindowsDualBoot
How To Use The Terminal: Commandline stuff. - https://help.ubuntu.com/community/UsingTheTerminal/
[HOW TO] Beginners Guide to Android ROM Development - http://forum.xda-developers.com/showthread.php?t=1272270 (courtesy of isidromxz)
[Tutorial] Compile JB on Ubuntu - http://forum.xda-developers.com/showthread.php?t=1762641 (courtesy of dastin1015)
[CM10] [PPA] Cyanogenmod Compiler v0.6 - http://forum.xda-developers.com/showthread.php?t=1789190 (courtesy of lithid-cm)
[Wiki] How to: Gerrit - http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit
[Wiki] How to: Git - http://wiki.cyanogenmod.com/wiki/Howto:_Git
[Wiki] How to: Connect to device with SSH - http://wiki.cyanogenmod.com/wiki/Howto:_Connect_to_Device_with_SSH
Here is an easy-to-use page on common Linux commands: - http://www.pixelbeat.org/cmdline.html
Linux Newbie Guide : - http://www.unixguide.net/linux/linuxshortcuts.shtml
Also, Team Chopsticks has a good page with some useful tips as well, located here:
http://www.teamchopsticks.org/p/contributing.html (thanks to bdusmc for the tip)
Here is a link to LIFEHACKER's command line tutorials. Very good stuff!! : http://lifehacker.com/5743814/become-a-command-line-ninja-with-these-time+saving-shortcuts
CyanogenMod git : - https://github.com/CyanogenMod
PecanCM git : - https://github.com/RonGokhale
Original Beanstalk thread : - http://forum.xda-developers.com/showthread.php?t=2091900
Beanstalk git : - https://github.com/scotthartbti?tab=repositories
The Muppets git : - https://github.com/TheMuppets
rebelos said:
Necessary Files for Xperia M :
Tip :For Building any Rom for Xperia Z u need these specific device files
1 . first is "sony.xml"
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/sony/qcom-common" name="CyanogenMod/android_device_sony_qcom-common" remote="github" revision="cm-11.0" />
<project path="device/sony/common" name="CyanogenMod/android_device_sony_common" remote="github" revision="cm-11.0" />
<project path="device/sony/c1905" name="RonGokhale/android_device_sony_c1905" remote="github" revision="cm-11.0" />
<project path="vendor/sony" name="RonGokhale/proprietary_vendor_sony" remote="github" revision="cm-11.0" />
<project path="kernel/sony/nicki" name="RonGokhale/android_Kernel_sony_nicki" remote="github" revision="cm-11.0" />
<project path="hardware/sony/DASH" name="CyanogenMod/android_hardware_sony_DASH" remote="github" revision="cm-11.0" />
</manifest>
Click to expand...
Click to collapse
bro small mistake
use this <project path="vendor/sony/c1905" name="RonGokhale/android_vendor_sony_c1905" remote="github" revision="cm-11.0" />
not <project path="vendor/sony" name="RonGokhale/proprietary_vendor_sony" remote="github" revision="cm-11.0" />
and i think u should add this
<project path="vendor/sony" name="TheMuppets/proprietary_vendor_sony" remote="github" revision="cm-11.0" />
am i ri8 or wrong?
bcoz there is no RonGokhale/proprietary_vendor_sony
and frameworks/av patch to fix camera hal loading : https://gist.github.com/RonGokhale/8129635
how to add this patch...
ansebovi said:
bro small mistake
use this <project path="vendor/sony/c1905" name="RonGokhale/android_vendor_sony_c1905" remote="github" revision="cm-11.0" />
not <project path="vendor/sony" name="RonGokhale/proprietary_vendor_sony" remote="github" revision="cm-11.0" />
and i think u should add this
<project path="vendor/sony" name="TheMuppets/proprietary_vendor_sony" remote="github" revision="cm-11.0" />
am i ri8 or wrong?
bcoz there is no RonGokhale/proprietary_vendor_sony
and frameworks/av patch to fix camera hal loading : https://gist.github.com/RonGokhale/8129635
how to add this patch...
Click to expand...
Click to collapse
fixed it thanks using ron's version jus forgot a derp
to use diff patch u need to download patch file and
patch -p1 < name.diff
nive tutorial...
i have xm dual... can u make guide to port rom like aokp cm etc to duall sim?
n spec pc to build rom
like 64bit/32bit
ram 4gb up
Internet connection
and how many bandwith needed?
many thanks
Minions_Army said:
nive tutorial...
i have xm dual... can u make guide to port rom like aokp cm etc to duall sim?
n spec pc to build rom
like 64bit/32bit
ram 4gb up
Internet connection
and how many bandwith needed?
many thanks
Click to expand...
Click to collapse
dunno but cm 10 with dual sim support can be ported easily "u must know what u are doing first "
and
64 bit
4 gb (atleast)
trust me u donot want to do it on a 512 kbps connection
I am facing some weird errors while building carbon.
first of all it says carbon.mk not found but when i rename cm.mk to carbon.mk its says videopackage2.mk not found any help here?
icoolguy1995 said:
I am facing some weird errors while building carbon.
first of all it says carbon.mk not found but when i rename cm.mk to carbon.mk its says videopackage2.mk not found any help here?
Click to expand...
Click to collapse
yes.. u need to properly edit device specific sources see
these commits here
https://github.com/CarbonDev/androi...mmit/61f7484bf7067262b3432a0a5bc585d8c5cc16dd
https://github.com/CarbonDev/androi...mmit/18ee3c6389088ed87a8febb328cb15f185fd0f4e
it will give u idea.. regarding building carbon
Edit:- Btw can u test slimroms for me i have a slimkat weekly 3.6 build available for XM if it boots i will add XM to Slim Official weeklies
rebelos said:
yes.. u need to properly edit device specific sources see
these commits here
https://github.com/CarbonDev/androi...mmit/61f7484bf7067262b3432a0a5bc585d8c5cc16dd
https://github.com/CarbonDev/androi...mmit/18ee3c6389088ed87a8febb328cb15f185fd0f4e
it will give u idea.. regarding building carbon
Edit:- Btw can u test slimroms for me i have a slimkat weekly 3.6 build available for XM if it boots i will add XM to Slim Official weeklies
Click to expand...
Click to collapse
If you don't personally have the device, then it isn't getting official Slim
cybojenix said:
If you don't personally have the device, then it isn't getting official Slim
Click to expand...
Click to collapse
i know
i m purchasing it this week only i will submit it to slim after i get my hands on it! and i feel it is stable for users
Sorry mate i can't, and btw thanks for the help.
tutorial updated with latest local_manifest.xml
Can guide me to compilie AOKP
it gives bunch of errors..
icoolguy1995 said:
Can guide me to compilie AOKP
it gives bunch of errors..
Click to expand...
Click to collapse
upload errors here ..
I don't know if are there any other guide to build Cyanogen Mod for Samsung Galaxy W GT-i8150 Wonder on this Forum.
But i would like to share my experience to make your life more simple.
Requirements
Ubuntu (I think any version is OK).
Some packages for Ubuntu.
Java.
The source for Cyanogen Mod.
Repos for our phone.
An open mind.
Good internet connection to download everythings.
Download Ubuntu
Click here to go in Ubuntu website.
Choose 64 bit version.
I suggest to install it as host system, not on a virtual machine.
Click to expand...
Click to collapse
Download Required Tools and Packages
Enable i386 Architecture:
Code:
sudo dpkg --add-architecture i386
sudo apt-get update
Install Java:
Code:
sudo apt-get install openjdk-6-jdk
Install Git Core:
Code:
sudo apt-get install git-core
Download Packages for Ubuntu:
sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-glx \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev
Click to expand...
Click to collapse
Then you have to apply this one too:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now you muse create file to for USB configurations:
Code:
gedit /etc/udev/rules.d/51-android.rules
Insert the following code
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Click to expand...
Click to collapse
Make sure to have permissions for that file.
Code:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Install Repo
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Click to expand...
Click to collapse
Create The Working Folder
mkdir cm
cd cm
Click to expand...
Click to collapse
Download Cyanogen Mod Source
I use CM-10.1 as booted example.
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync
Click to expand...
Click to collapse
Download Phone Repos
After downloading Cyanogen Mod source, you have to enable your device, so do in this way.
mkdir .repo/local_manifests
gedit .repo/local_manifests/roomservice.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="gh"
fetch="git://github.com/" />
<project path="device/samsung/ancora" name="arco/android_device_samsung_ancora" remote="gh" revision="cm-10.1_ion" />
<project path="kernel/samsung/msm7x30-common" name="arco/samsung-kernel-msm7x30" remote="gh" revision="cm-10.1_ion" />
<project path="vendor/samsung/ancora" name="arco/android_vendor_samsung_ancora" remote="gh" revision="cm-10.1_ion" />
<project path="hardware/qcom/media-caf" name="arco/android_hardware_qcom_media-caf" remote="gh" revision="cm-10.1" />
<project path="hardware/qcom/display-caf" name="arco/android_hardware_qcom_display-caf" remote="gh" revision="cm-10.1" />
<project path="hardware/qcom/audio-caf" name="arco/android_hardware_qcom_audio-caf" remote="gh" revision="cm-10.1" />
</manifest>
Download the repos by repo sync
Click to expand...
Click to collapse
Apply Patch For Camera
Download the patch that i attach in the thread.
Copy it into the root of Cynogen Mod
chmod a+x cm-10.1
./cm-10.1
Press enter after finish.
OK, Let's Compile The Rom
After we configure computer, system and repos, it's time for compilation, so follow this one.
. vendor/cm/get-prebuilts
make clean
make clobber
. build/envsetup.sh
lunch (select the number of ancora)
brunch ancora otapackage
Click to expand...
Click to collapse
Now sit and watch a movie on YouTube or TV while this compile our rom, work good, you should got something like this one
Special thank to who help me and spend time to got CM booted without problems
Original article from here.
Confuse step
Apply Patch For Camera
Download the patch that i attach in the thread.
Copy it into the root of Cynogen Mod
chmod a+x cm-10.1
./cm-10.1
Press enter after finish.
OK, Let's Compile The Rom
Dear
i Confuse of that step, where is the root of Cyanogen Mod, you never said that before. i was repo sync on cm directory, but no one file on there.
i wanna to patch this on the source seek-for-android/wiki/BuildingTheSystem. i really help your help.
I really appreciate your help for it.
thanks for advanced
---------- Post added at 10:48 AM ---------- Previous post was at 10:42 AM ----------
sir can you explain final step of this guide, that's very make me confuse.
i really appreciate your help, thanks for advanced.
sparcoima said:
Apply Patch For Camera
Download the patch that i attach in the thread.
Copy it into the root of Cynogen Mod
chmod a+x cm-10.1
./cm-10.1
Press enter after finish.
OK, Let's Compile The Rom
Dear
i Confuse of that step, where is the root of Cyanogen Mod, you never said that before. i was repo sync on cm directory, but no one file on there.
i wanna to patch this on the source seek-for-android/wiki/BuildingTheSystem. i really help your help.
I really appreciate your help for it.
thanks for advanced
---------- Post added at 10:48 AM ---------- Previous post was at 10:42 AM ----------
sir can you explain final step of this guide, that's very make me confuse.
i really appreciate your help, thanks for advanced.
Click to expand...
Click to collapse
ok you have to download cm-10.1.zip archive from attacched files then extract the patch into the root of your source then type chmod a+x cm-10.1 then run by ./cm-10.1 will repo sync your source and fix CameraHAL error during compilation.
once the commits are installed press enter and build your rom, many developers use my guide and work successfully is for cyanogen mod but i guess will work for other roms. if have any problem pm me..thanx
This is a guide for building LineageOS 14.1 for Wileyfox Swift.
The intention of this post is to give interested users a step-by-step guide to build LineageOS for Swift on their own.
It's seems to me that nowadays many contributors on XDA are not willing to share their expertise but they seem to forget that building a ROM is a collaboration of many people. While I was trying to build this ROM I experienced the lack of willingness to help so I am posting this guide to prevent other users to go through the same time-consuming trial-and-error processes.
Of course, some preconditions apply:
You need enough RAM to build the ROM
You need to set up a build environment (either by setting up a virtual machine or better by using Linux)
For building my own ROM, I was using Ubuntu 16.10 and 8GB of memory.
Let's go through the process step by step.
1. Setting up the building environment:
Execute the following commands inside your terminal:
sudo apt update
sudo apt upgrade
sudo apt install bison build-essential curl wget flex git gnupg libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libxml2 libxml2-utils lzop maven pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev bc ccache automake lzop gperf zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools schedtool dpkg-dev liblz4-tool make optipng libwxgtk3.0-dev openjdk-8-jdk
2. Make a folder where you put the android source and change to that folder:
mkdir LineageOS
cd LineageOS
3. Download the repo-script from google and put it to /usr/bin:
wget https://storage.googleapis.com/git-repo-downloads/repo
sudo cp repo /usr/bin/repo
rm repo
4. Make it executable:
sudo chmod a+x /usr/bin/repo
5. Set up git:
git config --global user.name "YOUR USERNAME"
git config --global user.email [email protected]
6. Fetch the sources:
repo init -u https://github.com/LineageOS/android.git -b cm-14.1
repo sync
source build/envsetup.sh
breakfast crackling
7. Modify the roomservice.xml (find it here: .repo/local_manifests/) to get a working ROM for Wileyfox Swift:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_device_wileyfox_crackling" path="device/wileyfox/crackling" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_device_cyanogen_msm8916-common" path="device/cyanogen/msm8916-common" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_kernel_cyanogen_msm8916" path="kernel/cyanogen/msm8916" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />
<project name="TheMuppets/proprietary_vendor_wileyfox" path="vendor/wileyfox" remote="github" revision="cm-14.1" />
<project name="TheMuppets/proprietary_vendor_qcom_binaries" path="vendor/qcom/binaries" remote="github" revision="cm-14.1" />
</manifest>
8. Update the sources:
repo sync
breakfast crackling
9. Start the build process
brunch crackling
10. Finish
You will find the ROM under out/target/product/crackling
11. Optional: If you want to have root access with your ROM, also execute this in your terminal (before brunch):
export WITH_SU=true
12. Troubles: If you have 8GB RAM or less, the building process might stop and complain about jack-server.
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g"
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g"
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server
I also wondered why theres no 'plain lineageos' image - so:
Thank you !
Thank you
I compiled and installed it but WIFI doesnt seem to work for me.
'Solved' it...
Worked a treat, thank you so much!
Just a tip for anyone compiling this on a Digital Ocean droplet or some other headless server: install ImageMagick too, without it the compile failes. I used the 12 CPU/32GB RAM, Ubuntu 16.10 droplet and the build took just over an hour.
Thanks again
Mike