[HELP/Q&A][SourceBuilding,AllDevices] The Source Building Q&A Help Thread - Android Q&A, Help & Troubleshooting

I have been wandering around the question and answers forum for some time now...i noticed a thing that most of them who had errors building from source have been left un answered..
i assume the following reasons for this
1)no dev would really care to search through and help out
2)users are scared to pm dev's
3)their posts are getting lost due to no actiivity within seconds of posting
as a outcome of all the above
the user isn't getting help
so i thought of making a thread for just source build errors..
so this this thread will focus on providing answers for all the problems that you are facing while building from source......
now i would like the users to follow a format similar to this for reporting
1)A full error encountered (pastie or any similar site's
2)your device name
3)your device tree that you have used for compiling(github link)
4)which rom are you building(cm aokp etc)
5)The guide which you are using to build(link)
another kind request please spread the link for this thread as many may benefit from it....
and find developers who are interested in helping....
feel free to give suggestions....
Before you move ahead make sure you copy paste this into the terminal
32bit users(ics & below)
HTML:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind squashfs-tools zip curl pngcrush schedtool ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libwxgtk2.6-dev
64bit ( you need this in addition with 32bit packages)
HTML:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils gcc-4.3-multilib g++-4.3-multilib g++-multilib
common build errors
HTML:
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/YG/m805_892x/device_m805_892x.mk]]: "device/YG/m805_892x/m805_892x-vendor-blobs.mk" does not exist. Stop.
cause for problem
device_m805_892x.mk
Here in your device folder it is calling a make file which is required for compiling as in this case (device_m805_892x.mk) has a reference to
(device/YG/m805_892x/m805_892x-vendor-blobs.mk)
check if
(m805_892x-vendor-blobs.mk)
is there in vendors folder... as in this case this is not found ..
solution
1)remove the reference to that makefile..
2)check the path for makefile(these are case sensitive)
3)correct the makefile in vendor folder to match that in the makefile that has called it
2)
HTML:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/m805_892x/system/app/RomManager.apk'. Stop.
make: *** Waiting for unfinished jobs....
cause for the problem
Here the script is written to copy rommanager.apk to system app during the build process...
But the apk is missing which is stoping the make process
solution
cd into vendors/cm
then type this
HTML:
./get-prebuilts
IF some dev helps you out show your appreciation by using the thanks button

reserved 2

the last one reserved

dude, you rock..
anyways, im still building the same pac...since my initial build wouldn't boot, i decided to switch up some of the internals...
PHP:
build/core/base_rules.mk:171: *** frameworks/native/cmds/sensorservice: MODULE.TARGET.EXECUTABLES.sensorservice already defined by frameworks/base/cmds/sensorservice. Stop.
Ive asked this question so many times, im ready to go nuts...ive looked thru every file and i cant find where these are referenced...where do i redirect this? and any other that may error back the already defined?

Contribute :
So..... A great thread to help all the beginners and the developers ( as everybody are prone to make mistakes ) I'd like to help too
But at first.... With reference to the problems I've encountered so far from different users.. all tat i see is most of them forget to install the necessary packages that are required for the build....
I've made a general command tat would hold most of the packages that are required for the build
For 32 Bit :
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind squashfs-tools zip curl pngcrush schedtool ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libwxgtk2.6-dev
For 64 Bit :
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils gcc-4.3-multilib g++-4.3-multilib g++-multilib
Ps : I'd add more as and when needed as we encounter new problems
---------- Post added at 10:49 AM ---------- Previous post was at 10:49 AM ----------
Reserved just in case
---------- Post added at 10:53 AM ---------- Previous post was at 10:49 AM ----------
cbucz24 said:
dude, you rock..
anyways, im still building the same pac...since my initial build wouldn't boot, i decided to switch up some of the internals...
PHP:
build/core/base_rules.mk:171: *** frameworks/native/cmds/sensorservice: MODULE.TARGET.EXECUTABLES.sensorservice already defined by frameworks/base/cmds/sensorservice. Stop.
Ive asked this question so many times, im ready to go nuts...ive looked thru every file and i cant find where these are referenced...where do i redirect this? and any other that may error back the already defined?
Click to expand...
Click to collapse
It would help us more to understand the problem if u could provide the device tree that u r using ( Github Link )

cbucz24 said:
dude, you rock..
anyways, im still building the same pac...since my initial build wouldn't boot, i decided to switch up some of the internals...
PHP:
build/core/base_rules.mk:171: *** frameworks/native/cmds/sensorservice: MODULE.TARGET.EXECUTABLES.sensorservice already defined by frameworks/base/cmds/sensorservice. Stop.
Ive asked this question so many times, im ready to go nuts...ive looked thru every file and i cant find where these are referenced...where do i redirect this? and any other that may error back the already defined?
Click to expand...
Click to collapse
it seems that a single service (sensorservice) is defined in two places your tree would help... and spread the word about this thread as it ma help many people out just a request...
your error is like your destination is x
and there are two paths leading to it and you are confused which one to take..
so it has stopped ok try deleting
frameworks/base/cmds/sensorservice
or
frameworks/native/cmds/sensorservice
(one of two not both
)

I would like to share some solution to some basic build problems. I did copy this from my own thread here:
http://forum.xda-developers.com/showthread.php?t=1935162
Fix problems... This the learning part.. Fun but can be really anoying to.
First i got my self:
make otatools did not work.
-Try make -j4 out/host/linux-x86/bin/unpackbootimg
-put "unpackbootimg" in ~/android/system/out/host/linux-x86/bin then i copy it to ~/usr/bin and set chmod.
Im did see a download if it some place. Google.
-copy unpackbootimg to into /usr/bin If it is there, make it executable.
make executable: sudo chmod a+x /usr/bin/unpackbootimg
-Run make clubber from The ICS folder. Than restart pc might help to.
Nother problem that i did run into trying to make ext4 images:
make_ext4fs -s -l 0x40000000 -a data out/target/product/m805_892x/userdata.img out/target/product/m805_892x/data
Need size of filesystem
make: *** [out/target/product/m805_892x/userdata.img] Error 4
make: *** Waiting for unfinished jobs..
The sizes need to be in bytes it seems.
make_ext4fs does not support hex in the -l argument
DD dump you´re partitions and you see the amount of bytes.
I put this in my BoardConfig.mk like this:
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1073741824
Use this to finisch waiting jobs..:
make_ext4fs -s -l 1073741824 -a data out/target/product/m805_892x/userdata.img out/target/product/m805_892x/data
problem:
[email protected]:~/ICS$ make -j4 recoveryimage
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/YG/m805_892x/device_m805_892x.mk]]: "device/YG/m805_892x/m805_892x-vendor-blobs.mk" does not exist. Stop.
The error is somewhare found in this file:
device_m805_892x.mk I used the original file and start adding things again.
Problem:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/m805_892x/system/app/RomManager.apk'. Stop.
make: *** Waiting for unfinished jobs....
Copy: out/target/product/m805_892x/system/bin/compcache
Copy: out/target/product/m805_892x/system/bin/handle_compcache
[email protected]:~/ICS$
For that use the terminal and cd to:
cd /vendor/cm
run:
./get-prebuilts
This will download the RomManager.apk and bit of other stuff.

[email protected] said:
I would like to share some solution to some basic build problems. I did copy this from my own thread here:
http://forum.xda-developers.com/showthread.php?t=1935162
Fix problems... This the learning part.. Fun but can be really anoying to.
First i got my self:
make otatools did not work.
-Try make -j4 out/host/linux-x86/bin/unpackbootimg
-put "unpackbootimg" in ~/android/system/out/host/linux-x86/bin then i copy it to ~/usr/bin and set chmod.
Im did see a download if it some place. Google.
-copy unpackbootimg to into /usr/bin If it is there, make it executable.
make executable: sudo chmod a+x /usr/bin/unpackbootimg
-Run make clubber from The ICS folder. Than restart pc might help to.
Nother problem that i did run into trying to make ext4 images:
make_ext4fs -s -l 0x40000000 -a data out/target/product/m805_892x/userdata.img out/target/product/m805_892x/data
Need size of filesystem
make: *** [out/target/product/m805_892x/userdata.img] Error 4
make: *** Waiting for unfinished jobs..
The sizes need to be in bytes it seems.
make_ext4fs does not support hex in the -l argument
DD dump you´re partitions and you see the amount of bytes.
I put this in my BoardConfig.mk like this:
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1073741824
Use this to finisch waiting jobs..:
make_ext4fs -s -l 1073741824 -a data out/target/product/m805_892x/userdata.img out/target/product/m805_892x/data
problem:
[email protected]:~/ICS$ make -j4 recoveryimage
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/YG/m805_892x/device_m805_892x.mk]]: "device/YG/m805_892x/m805_892x-vendor-blobs.mk" does not exist. Stop.
The error is somewhare found in this file:
device_m805_892x.mk I used the original file and start adding things again.
Problem:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/m805_892x/system/app/RomManager.apk'. Stop.
make: *** Waiting for unfinished jobs....
Copy: out/target/product/m805_892x/system/bin/compcache
Copy: out/target/product/m805_892x/system/bin/handle_compcache
[email protected]:~/ICS$
For that use the terminal and cd to:
cd /vendor/cm
run:
./get-prebuilts
This will download the RomManager.apk and bit of other stuff.
Click to expand...
Click to collapse
i will add this to op... i will expalin the problem the cause for it and the fix for it..i will explain stuff and type it in general for all devices..btw thanks for the reply ... will update the op soon..

So I've subscribed to this thread and I'll help when I can I've built about seven different ROMs and have had to solve allot of issues lol
Sent from my SAMSUNG-SGH-I577 using xda premium

ktempleton said:
So I've subscribed to this thread and I'll help when I can I've built about seven different ROMs and have had to solve allot of issues lol
Sent from my SAMSUNG-SGH-I577 using xda premium
Click to expand...
Click to collapse
thank you for helping..i too have done a lot of source builds and faced hell lot of problems so i made this as a general thread to get help and help other's too...

Great Thread
Really very helpful thread for beginners. Keep on updating this thread. I will post my errors later

RishabhAd said:
Really very helpful thread for beginners. Keep on updating this thread. I will post my errors later
Click to expand...
Click to collapse
thank you for the support spread the thread so that more people get benfited...

Sticky please

Help Please
Getting this error while compiling for Samsung Galaxy Fit. I have used CM 10's device config & did changes as mentioned. Please any there help me
http://pastebin.com/QW2ViEDk

RishabhAd said:
Getting this error while compiling for Samsung Galaxy Fit. I have used CM 10's device config & did changes as mentioned. Please any there help me
http://pastebin.com/QW2ViEDk
Click to expand...
Click to collapse
Code:
packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMasService.java:394: cannot find symbol
symbol : variable REQUEST_TYPE_MESSAGE_ACCESS
location: class android.bluetooth.BluetoothDevice
BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS);
^
packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMasService.java:458: cannot find symbol
symbol : variable REQUEST_TYPE_MESSAGE_ACCESS
location: class android.bluetooth.BluetoothDevice
BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS);
The part thats causing u the errors... !!!!
check the files BluetoothMasService.java and BluetoothMasService.java with the one in CM10 repo nd see wat is missing

RishabhAd said:
Getting this error while compiling for Samsung Galaxy Fit. I have used CM 10's device config & did changes as mentioned. Please any there help me
http://pastebin.com/QW2ViEDk
Click to expand...
Click to collapse
What repo are you using I'll post a thread in aa min you need to get the repo for utackas repo because pa repo is broke
http://forum.xda-developers.com/showthread.php?p=35507138
Don't know if your using this repo but I was getting errors like that until I switched
Sent from my SAMSUNG-SGH-I577 using xda premium

wilfredcool007 said:
Code:
packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMasService.java:394: cannot find symbol
symbol : variable REQUEST_TYPE_MESSAGE_ACCESS
location: class android.bluetooth.BluetoothDevice
BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS);
^
packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMasService.java:458: cannot find symbol
symbol : variable REQUEST_TYPE_MESSAGE_ACCESS
location: class android.bluetooth.BluetoothDevice
BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS);
The part thats causing u the errors... !!!!
check the files BluetoothMasService.java and BluetoothMasService.java with the one in CM10 repo nd see wat is missing
Click to expand...
Click to collapse
I tried i think this is d error of source.
ktempleton said:
What repo are you using I'll post a thread in aa min you need to get the repo for utackas repo because pa repo is broke
http://forum.xda-developers.com/showthread.php?p=35507138
Don't know if your using this repo but I was getting errors like that until I switched
Sent from my SAMSUNG-SGH-I577 using xda premium
Click to expand...
Click to collapse
u compiled by using utacka's repo? n what is d size of source?

ktempleton said:
What repo are you using I'll post a thread in aa min you need to get the repo for utackas repo because pa repo is broke
http://forum.xda-developers.com/showthread.php?p=35507138
Don't know if your using this repo but I was getting errors like that until I switched
Sent from my SAMSUNG-SGH-I577 using xda premium
Click to expand...
Click to collapse
Ummm, how long has the pa repo been broken? I did see that someone said something about it. Reason I'm asking, In building PAC and part of the manifest pulls from PA doesn't it? Could that be causing my problems?
Sent from my PC36100 using Tapatalk 2

Have you erased one of those files the error pointed to
My PAC runs fine but when I ran it for the first time I had maybe four duplicates I had to take care of
Sent from my SAMSUNG-SGH-I577 using xda premium

ktempleton said:
Have you erased one of those files the error pointed to
My PAC runs fine but when I ran it for the first time I had maybe four duplicates I had to take care of
Sent from my SAMSUNG-SGH-I577 using xda premium
Click to expand...
Click to collapse
well, i think i have to switch one or two more items in my local_manifest...i saw that git links i was using are not going to be updated any longer due to another dev going forward with the project.
but before i can switch them all out, i have to make sure i have the links right..but github is down so im kinda stuck for a bit

Related

[Guide] Quick start compiling guides-cm9-kernels

First of all this is not a hand holding thread. this is only for people serious about compiling. compiling is actually pretty easy, its debugging, adding features, porting, and cleaning up for mass use thats a little more difficult.
pre-setup
get linux, ubuntu is preferred and the most supported. you'll need around 25gb free or more. wubi works but make sure its big enough. The best setup is of course a real linux setup. personally i have a 100gb ext4 partition with ubuntu 11.10 and a second 100gb ext4 partition just for compiling.
im not going into how to get ubuntu running or any of that as you shouldnt try compiling if you are unable to install ubuntu using google. hint dual boot if you want to keep windows.
setup
most of what we will be doing will be done in the terminal. if you dont like the terminal or dont know how to use it. go away, seriously.
you need to find and install
Python 2.5 -- 2.7, which you can download from python.org.
next copy paste this into terminal
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo apt-get install git
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 xsltproc
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
ok now that you have the basics its time to make your life easier.
optional only if you have at least 10+gb free
Code:
Setting up ccache
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.
Put the following in your .bashrc or equivalent.
export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.
export CCACHE_DIR=<path-to-your-cache-directory>
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code.
prebuilt/linux-x86/ccache/ccache -M 50G
This setting is stored in the CCACHE_DIR and is persistent.
all right your all set up lets get some source
getting source
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
git clone [email protected]hoton-dev-team/sunfire.git -b ics device/moto/sunfire/
git clone [email protected]hoton-dev-team/proprietary_vendor_motorola.git -b ics vendor/moto/sunfire/
./vendor/cm/get-prebuilts
note you may have issues with syncing
alright on to building
building
several ways to build based on what you are doing
preferred is
Code:
. build/envsetup.sh && brunch sunfire
but
Code:
. build/envsetup.sh
breakfast sunfire
mka bacon
works too.
basically run . build/envsetup.sh first
then you pick what to build with lunch,brunch, or breakfast
then you make,mka, or make bacon.
dont forget to make clean or make clobber between builds.
ill edit later on down the road.
Making kernels
pre-setup
Okay first of all you need to complete the above tutorial up to the getting source. so you wont have to do the building portion.
*Can you build kernels without android source, simple answer is yes, complicated answer is no. With the android source installed you have access to the proper tools. While personally i dont compile kernels with the older cross compilers of android, however this can be problematic and can lead to issues compiling. The dhd.ko is a great example. I have rebased hours of work to get dhd.ko to compile. To save everyone else my headache im going to show everyone the official way to compile kernels, not the cutting edge unsupported stuff that i do. *
setup
in terminal
cd "to your cyanogenmod source folder" we will use cyanogenmod for the tutorial
Code:
mkdir kernel
mkdir kernel/tegra
mkdir kernel/tegra-temp
mkdir kernel/compiled
mkdir kernel/compiled/modules
mkdir vendor/authentec
mkdir vendor/authentec/safenet
mkdir vendor/bcm
mkdir vendor/bcm/wlan
mkdir vendor/bcm/wlan/osrc
now hit this website and download
vendor-bcm-wlan-osrc.tgz
vendor-authentec-safenet.tgz
kernel-tegra.tgz
if you notice the file name, that is where it must be extracted.
now that you have the source, lets go on
compile
Code:
export PLATFORM_DIR="path to your cyanogenmod/android source"
export KERNEL_BUILD_OUT=$PLATFORM_DIR/kernel/tegra-temp
export ARCH=arm
export CROSS_COMPILE=$PLATFORM_DIR/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
export KERNEL_SRC=$PLATFORM_DIR/kernel/tegra
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT KBUILD_DEFCONFIG=tegra_sunfire_android_defconfig defconfig modules_prepare
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT DEPMOD=out/host/linux-x86/bin/depmod INSTALL_MOD_PATH=$KERNEL_BUILD_OUT modules
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT DEPMOD=out/host/linux-x86/bin/depmod INSTALL_MOD_PATH=$KERNEL_BUILD_OUT modules_install
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT zImage
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT DEPMOD=out/host/linux-x86/bin/depmod INSTALL_MOD_PATH=$KERNEL_BUILD_OUT M=$PLATFORM_DIR/vendor/authentec/safenet/vpndriver modules
export LINUXSRCDIR=$KERNEL_SRC
export LINUXBUILDDIR=$PLATFORM_DIR/kernel/tegra-temp
make -C $PLATFORM_DIR/vendor/bcm/wlan/osrc/open-src/src/dhd/linux
cp kernel/tegra-temp/arch/arm/boot/zImage kernel/compiled
cp vendor/authentec/safenet/vpndriver/vpnclient.ko kernel/compiled/modules
cp vendor/bcm/wlan/osrc/open-src/src/dhd/linux/dhd.ko kernel/compiled/modules
now this will give you your modules and the zimage. to make a boot.img use android-utility to extract an existing boot.img. then replace the zimage and build the boot.img.
third post
Thanks
Thank you joker just what i needed to start and play around and get to learning,testing is all fine but creating is the real key.Thank you very much and all fellow devs for all your time and help means alot to some of us.Have a good weekend!
Thanks joker
Sent from my MB855 using xda premium
thanks... already got a dual boot....just..need..a..bigger..hdd. uggg Thanks again for all you do on here.
second post on how to compile a kernel? ;P
You forgot to add that getting everything right with the vendor and device tree is also one of the hardest parts...
mrinehart93 said:
You forgot to add that getting everything right with the vendor and device tree is also one of the hardest parts...
Click to expand...
Click to collapse
amen to that
Sent from my MB855 using Tapatalk
Will do, eventually
shabbypenguin said:
second post on how to compile a kernel? ;P
Click to expand...
Click to collapse
Sent from my MB855 using XDA App
Thanks. That helps a lot. Was already working on a setup.
Sent from my MB855 using Tapatalk
No the hardest part is when you fix something and it breaks something else, so you fix it, then something unrelated breaks, finally you get it semi fixed and run a make clobber and it fails again. So you have to revert and start over.
mrinehart93 said:
You forgot to add that getting everything right with the vendor and device tree is also one of the hardest parts...
Click to expand...
Click to collapse
Sent from my MB855 using XDA App
jokersax11 said:
No the hardest part is when you fix something and it breaks something else...
Click to expand...
Click to collapse
Haha! Sounds like my truck!
I'm downloading 198-7 kernel now I'll make a guide to building soon.
Sent from my MB855 using XDA App
ok kernel guide in place.
May be an oddball question, maybe not.
I've read the thread, have 100+ TB of hdd space and am d/l-ing what I need to get setup for a dual boot system.
Would I be able to attempt to port features of other kernels into a cm9 or other kernel. (I do have a particular mod in mind is why I ask)
I'm a MoPho-er
possible, depending on the mod, source and your skill.
FernBch said:
May be an oddball question, maybe not.
I've read the thread, have 100+ TB of hdd space and am d/l-ing what I need to get setup for a dual boot system.
Would I be able to attempt to port features of other kernels into a cm9 or other kernel. (I do have a particular mod in mind is why I ask)
I'm a MoPho-er
Click to expand...
Click to collapse
Sent from my MB855 using XDA App
jokersax11 said:
possible, depending on the mod, source and your skill.
Sent from my MB855 using XDA App
Click to expand...
Click to collapse
Mod is slide2wake, looking for source (unless I'm being dense the links I find are not source downloads), and for skills, well lets say, I usually catch on quick and can figure most things out easily. A few years back I dabbled with the command line stuff. It wasn't hard, didn't do too bad, but it's been a while.
Most times I can find the answers to my questions and can figure things out just fine, so I won't post up asking unless I'm totally stumped.
I'm a MoPho-er
i forgot all about that mod... did he ever post source for it?
Some great info I need to look into this more later love messing around with stuff like this
Sent from my MB855 using xda premium

[TUT] Compile CM9 from source for the Xperia Play [UBUNTU]

Just before we start, Google says:
Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 90GB (or more) for a full set of builds.
Click to expand...
Click to collapse
Google also test compiling on Ubuntu 10.04 LTS, but I used 10.10, 32 bit. These instructions are for Ubuntu version 10.04-11.10
To install JDK6 (needed):
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
FOR 64bit: You will need the required packages, so open up your terminal and enter:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
On Ubuntu 10.10:
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
Code:
sudo apt-get install libx11-dev:i386
FOR 32bit (what I used): You will need the required packages, so open up your terminal and enter:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc
Now, onto downloading the source
First of all, you need to get the google repo tool, in a terminal:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Then reboot the PC
Now, we will actually initialize the repository:
Code:
mkdir -p ~/android/ics/
cd ~/android/ics/
repo init -u git://github.com/CyanogenMod/android.git -b ics
Then enter your name and email address
Then:
Code:
repo sync -j8
if you have bad internet, use a smaller number than 8, eg. 4 or 2
Now, wait for the repo to sync (all 6GB of it )
Then after that is done, you need to setup vendor and device trees for our device
In the terminal again:
Code:
cd ~/android/ics/vendor/
git clone https://github.com/koush/proprietary_vendor_semc.git -b ics semc
Then:
Code:
cd ~/android/ics/device/
mkdir semc
cd semc
git clone https://github.com/CyanogenMod/android_device_semc_msm7x30-common.git -b ics msm7x30-common
git clone https://github.com/CyanogenMod/android_device_semc_zeus.git -b ics zeus
git clone https://github.com/CyanogenMod/android_device_semc_zeus-common.git -b ics zeus-common
to sync changes since last sync:
Code:
cd ~/android/ics/
repo sync
get CM props:
Code:
cd ~/android/ics/vendor/cm/
./get-prebuilts
then to build :
Setup environment:
Code:
cd ~/android/ics/
. build/envsetup.sh
then to get device list:
Code:
lunch
Now, select the number that is cm_zeus-userdebug
Now to finally build:
Code:
make -j4 bacon
again, you can use a higher value than 4 if you have more cores and more ram.
My specs:
Intel Core 2 Duo @ 1.8GHz
4GB RAM
VirginMedia 50Mbps broadband
My time:
Time to sync: 2hours+
Time to compile: 5+ hours, using -j16 which made my laptop VERY laggy
Enjoy, run into any issues, post here please
Troubleshooting:
Getting this: http://pastebin.com/Cy55wKZK ?
FIX:
In a file manager open up the directory: android/ics/frameworks/base/telephony/tests/ and delete the telephonytests folder
this is harmless
then recompile again
Reserved again
Sent from my Xperia Play using Tapatalk
In case you forget what that thing you're working on was for?
Only joking, good luck and all that.
MilkyJoePD said:
In case you forget what that thing you're working on was for?
Only joking, good luck and all that.
Click to expand...
Click to collapse
Which thing? I happen to be working on a lot of things lol
But I was thinking, maybe I could provide something similar to CM Night lies, but obviously not every night?
Sent from my Xperia Play using Tapatalk
Keiran this is awesome =)
Sent from my R800i using xda premiu
IE-coRe said:
Keiran this is awesome =)
Sent from my R800i using xda premiu
Click to expand...
Click to collapse
Thanks, tutorial is now live
Is there a way to implement chevyowner's CDMA changes into it for the zeusc build? Should I contact him to do so after the compile completes?
CrimsonKnight13 said:
Is there a way to implement chevyowner's CDMA changes into it for the zeusc build? Should I contact him to do so after the compile completes?
Click to expand...
Click to collapse
we don't have a zeusc vendor or device tree for ICS yet, but I can get one set up
What I need from chevyowner is a list of changes he made to get it working on CDMA
Keiran
KeiranFTW said:
we don't have a zeusc vendor or device tree for ICS yet, but I can get one set up
What I need from chevyowner is a list of changes he made to get it working on CDMA
Keiran
Click to expand...
Click to collapse
Want me to send you the libs and build.prop?
Sent from my R800x using Tapatalk
paxChristos said:
Want me to send you the libs and build.prop?
Sent from my R800x using Tapatalk
Click to expand...
Click to collapse
There was a change in libs too? I thought it was only a build.prop hack?
Can you send me libs? I only have build.prop changes, and have merged them
anyway: https://github.com/keiranFTW/android_device_semc_zeusc <-- tis CDMA zeusc device configuration for CM9
should work
KeiranFTW said:
There was a change in libs too? I thought it was only a build.prop hack?
Can you send me libs? I only have build.prop changes, and have merged them
Click to expand...
Click to collapse
Sent you a pm with the files,
Thanks for the make files (off to sync cm9 )
Sent from my R800x using Tapatalk
Hi keiran,
Have you managed to compile fxp113 for me yet?
Sorry to chase just need to know what I have to work with
Sent from my R800i using XDA
paxChristos said:
Sent you a pm with the files,
Thanks for the make files (off to sync cm9 )
Sent from my R800x using Tapatalk
Click to expand...
Click to collapse
Cheers, will get CM9 zeusc vendor tree set up then too
pricey2009 said:
Hi keiran,
Have you managed to compile fxp113 for me yet?
Sorry to chase just need to know what I have to work with
Sent from my R800i using XDA
Click to expand...
Click to collapse
Forgot about that, will get you a download link tomorrow night if I can?
Newest CM9 ICS change log:
Data works brilliantly, although I never get H, just 3G
New adreno libs are there, faster rendering and all.
Some launcher shizz I didn't read
New CM9 boot animation when I add it into the make files
Reboot option works, unless used by ROM Manager
I think that hw decoder will be fixed soon, because I seen something about it on CM code review, about qualcomm omx which fixes video. Not sure it is working though, but there are tons of devices all with the same problem, it will be fixed
Ty,
Keiran
Sent from my Xperia Play using Tapatalk
KeiranFTW said:
There was a change in libs too? I thought it was only a build.prop hack?
Can you send me libs? I only have build.prop changes, and have merged them
anyway: https://github.com/keiranFTW/android_device_semc_zeusc <-- tis CDMA zeusc device configuration for CM9
should work
Click to expand...
Click to collapse
Once you have the libs merged, I'll start compiling myself
Do you still have artifacts on certain menus and settings? Great tut btw gona update my Ubuntu partion.
sent from my xperia play running cm7
http://pastebin.com/UfSU5Wf6 that is as far as i can get it to go.
chevyowner said:
http://pastebin.com/UfSU5Wf6 that is as far as i can get it to go.
Click to expand...
Click to collapse
Ouch.
Have you tried Googling the error? Do you have the right version of Java set up?
Edit:
Do you have a vendor tree for zeusc? ~/android/ics/vendor/semc/zeusc? If not I can get one setup tonight.
Sent from my Xperia Play using Tapatalk
Hi i have following problem, did every step like in the tutorial but at
PHP:
mkdir -p ~/android/ics/
cd ~/android/ics/
repo init -u git://github.com/CyanogenMod/android.git -b ics
Terminal says: /home/christian/bin/repo: Line 1 : Syntaxerror unexpected word 'newline'
/home/christian/bin/repo: Line 1 : `<!DOCTYPE html>'
can someone help me?
---------- Post added at 09:31 AM ---------- Previous post was at 09:18 AM ----------
ok fixed the problem
Nice one KeiranFTW. Ran into some trouble install the JDK on 11.10. Had to install it from a ppa in the end. Details here.
Currently building. Shall see what happens

[HOWTO] Compile Roms for the X+ in a nut shell

Ok guys i'm doing this as there's only two AOSP dev's (AOSP\CM\AOKP\PA) also i want to help get more people into developing.
This tutorial covers BOTH the AT&T and the International
This tutorial assumes you WONT be using a virtual machine but Linux installed onto your hard drive.
Prerequisites:
Able to read
Able to think
Not wanting your hand to be held
Able to use Linux
Ubuntu 10.04 > 12.04 (one of those)
AT LEAST 80gb free on your hard drive
Time
Patience
fastish internet
coffee (or tea or beer)
Computer Specs MINIMUM Dual core cpu and 4gb of ram and a ubuntu based OS 64bit
So your ready and read everything above lets get the show on the road.
if you are using ubuntu 10.04 to 11.10, you will need these files:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils xsltproc openjdk6-jdk
end of 10.04 > 11.10 section
if you are using Ubuntu 12.04 > you will need these files:
Code:
sudo apt-get install git 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 tofrodos \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 openjdk-7-jdk
and then run this command:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
if you get any errors showing up simply remove the offending package it's moaning about and install it manually later, i wont hold your hand with this.
end of 12.04 > section
now you have all those packages you want to grab the android source, for this tutorial i'll be using CM10.1 (4.2.2)
1st you will need to grab repo:
you need to make this folder for it to go into
mkdir ~/bin
PATH=~/bin:$PATH this is to tell linux where the bin folder is (in a nutshell)
now to Download the Repo script and ensure it is executable:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
ok that's that part done, now to grabbing the source and so on:
1st you need to make a folder to dump the source in, my folder layout is like this ~/Android/AOSP422 or ~/Android/CM10.1
but you can do it however you want
so for the benefits of this tutorial i'll be using ~/Android/CM10.1
mkdir ~/Android/CM10.1
cd ~/Android/CM10.1
thats the folder created and you have cd'd into it now to grab the source
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
this is telling repo where the source is and what BRANCH to pull so we are pulling cm-10.1
once all that is done do the next command
repo sync -j# (the # = number of cores + 1) so on my i5 it only has 4cores so it's -j5 (but you can do a little bigger on a repo sync i tend to do a -j16 on my i5 for repo)
now go grab a coffee this can take a little while.
once all that is done and dusted you'll be wanting to start building, hold your horses you still need the device specific stuff, so make sure you are in the root of the CM.10.1 Directory, then type the following command:
for the AT&T X+ it's
AT&T will be updated in the near future. Please don't ask for it right now.
for the International X+ it's
git clone https://github.com/HoxPlusCMOfficial/android_device_htc_enrc2b -b cm-10.1 device/htc/enrc2b
git clone https://github.com/HoxPlusCMOfficial/android_vendor_htc_enrc2b -b master vendor/htc/enrc2b
git clone https://github.com/HoxPlusCMOfficial/android_kernel_htc_enrc2b -b master kernel/htc/enrc2b
git clone https://github.com/HoxPlusCMOfficial/android_device_htc_tegra3-common.git -b cm-10.1 device/htc/tegra3-common
that will grab down my CM10.1 device specific source
once that's downloaded
Get the CM prebuilts by doing the following:
cd vendor/cm/
./get-prebuilts
then cd back to the root dir
then the following commands to get the build going
. build/envsetup.sh
brunch evitareul or enrc2b depending on which device your building for.
and the build will get started, this can take anywhere from 4hrs > 30minutes
once it's all finished it will tell you where your zip file has poped out.
enjoy and don't forget if you used this tutorial link back to it in your rom op.
recommended reading:
http://source.android.com/source/initializing.html
and
http://wiki.cyanogenmod.org/w/Development
-Lloir
reserved just in case (might use this one for kernel building)
Might just try this for ****s and giggles
Sent from my HTC One X using Tapatalk 2
Hey Lloir, I'll be reading for years, but can you point me to the link on the cyanogenmod site or wherever, that explains why I did (repo sync -j#) and what exactly it did please, and thank you.
Edit: Found the info I was looking for, sorry, had some many tabs open, I didn't think to google.
Is it possible to setup in a virtual machine? If so what's needs to be done different? Thanks.
yes it is, you would need AT LEAST a quad core + 8gb of ram (2cores and 4gb for the virtual machine)
Good, simple guide
I think there might be a step missing before brunch:
Code:
cd vendor/cm
./get-prebuilts
...because the first time I ran brunch enrc2b I got this error:
Code:
make: *** No rule to make target `vendor/cm/proprietary/Term.apk', needed by `/android/cm-10.1/out/target/product/enrc2b/system/app/Term.apk'. Stop.
make: *** Waiting for unfinished jobs....
Woops my bad, thanks for pointing it out
Sent from my HTC One X+ using Tapatalk 2
Also, I needed to install lib32ncurses5-dev (sudo apt-get install lib32ncurses5-dev) on Ubuntu 12.04 amd64 to avoid the following errors when doing 'make menuconfig' for the kernel:
Code:
cripts/kconfig/mconf.o: In function `show_help':
mconf.c:(.text+0x744): undefined reference to `stdscr'
scripts/kconfig/mconf.o: In function `main':
mconf.c:(.text.startup+0x66): undefined reference to `initscr'
mconf.c:(.text.startup+0x6d): undefined reference to `stdscr'
scripts/kconfig/lxdialog/checklist.o: In function `print_arrows':
checklist.c:(.text+0x41): undefined reference to `wmove'
checklist.c:(.text+0x61): undefined reference to `acs_map'
checklist.c:(.text+0x69): undefined reference to `waddch'
checklist.c:(.text+0x7b): undefined reference to `waddnstr'
checklist.c:(.text+0x8c): undefined reference to `wmove'
checklist.c:(.text+0xb3): undefined reference to `acs_map'
checklist.c:(.text+0xbb): undefined reference to `waddch'
checklist.c:(.text+0x10b): undefined reference to `acs_map'
I don't think that compiling your own kernel is necessary, and it's not part of Lloir's instructions, but I thought I'd post this here because I imagine that people who are interested in compiling Cyanogenmod might also be interested in compiling a kernel for it as well.
Hey Lloir when I get to the git clone command I get an error fatal: could not create leading directories of '/device/htc/evitareul': Permission denied. When I googled it I found this:
The fix for this error: “fatal: could not create leading directories of '…': Permission denied” was much different than what I thought it would be. I'd think if permission was denied, it would be caused by folder or file mode. Not the case!
But let me take a step back and explain how I encountered this error. It was getting generated during a deployed using vlad. Thankfully the error report included the command that vlad was trying to execute. I tried running it manually and received the same response, so I broke it up into its pieces, then tried running them on the remote target. That revealed it was actually an ssh-key problem.
Wow! I'm surprised that the explanation was so far off the mark.
Anyway, all it took was to login to the remote target, ssh to the git origin remote server, accept the key, and away I went. Whee…
I'm going to play with it, but any pointers would be good. Using 12.04
EDIT: Is your git link dead?
n1gh7m4r3 said:
Hey Lloir when I get to the git clone command I get an error fatal: could not create leading directories of '/device/htc/evitareul': Permission denied. When I googled it I found this:
The fix for this error: “fatal: could not create leading directories of '…': Permission denied” was much different than what I thought it would be. I'd think if permission was denied, it would be caused by folder or file mode. Not the case!
But let me take a step back and explain how I encountered this error. It was getting generated during a deployed using vlad. Thankfully the error report included the command that vlad was trying to execute. I tried running it manually and received the same response, so I broke it up into its pieces, then tried running them on the remote target. That revealed it was actually an ssh-key problem.
Wow! I'm surprised that the explanation was so far off the mark.
Anyway, all it took was to login to the remote target, ssh to the git origin remote server, accept the key, and away I went. Whee…
I'm going to play with it, but any pointers would be good. Using 12.04
Click to expand...
Click to collapse
i typo'd don't do the /device just do device/ , or you could just cd into device mkdir htc cd into htc then git clone into there
BTW I'm glad many of you can read this tutorial, i'am awful at doing instructions for other people...if anyone has opinions on the way it's written please PM or re-write it and PM me and i'll replace the current one with a friendlier version.
-Lloir
Anyone know how to fix these errors:
Code:
Install: /android/cm-10.1/out/target/product/enrc2b/system/bin/dhcpcd
Install: /android/cm-10.1/out/target/product/enrc2b/system/bin/keystore
Install: /android/cm-10.1/out/target/product/enrc2b/system/bin/make_ext4fs
Install: /android/cm-10.1/out/target/product/enrc2b/system/bin/netcfg
target Executable: netd (/android/cm-10.1/out/target/product/enrc2b/obj/EXECUTABLES/netd_intermediates/LINKED/netd)
target Executable: vold (/android/cm-10.1/out/target/product/enrc2b/obj/EXECUTABLES/vold_intermediates/LINKED/vold)
target SharedLib: libpixelflinger (/android/cm-10.1/out/target/product/enrc2b/obj/SHARED_LIBRARIES/libpixelflinger_intermediates/LINKED/lib
pixelflinger.so)
/android/cm-10.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-li
nux-androideabi/bin/ld: /android/cm-10.1/out/target/product/enrc2b/obj/STATIC_LIBRARIES/libbt-brcm_bta_intermediates/libbt-brcm_bta.a(bta_a
g_sco.o): in function bta_ag_create_sco:external/bluetooth/bluedroid/bta/./ag/bta_ag_sco.c:538: error: undefined reference to 'BTM_SetWBSCo
dec'
/android/cm-10.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-li
nux-androideabi/bin/ld: /android/cm-10.1/out/target/product/enrc2b/obj/STATIC_LIBRARIES/libbt-brcm_bta_intermediates/libbt-brcm_bta.a(bta_a
g_sco.o): in function bta_ag_create_sco:external/bluetooth/bluedroid/bta/./ag/bta_ag_sco.c:542: error: undefined reference to 'BTM_ConfigI2
SPCM'
/android/cm-10.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-li
nux-androideabi/bin/ld: /android/cm-10.1/out/target/product/enrc2b/obj/STATIC_LIBRARIES/libbt-brcm_bta_intermediates/libbt-brcm_bta.a(bta_a
g_sco.o): in function bta_ag_sco_disc_cback:external/bluetooth/bluedroid/bta/./ag/bta_ag_sco.c:218: error: undefined reference to 'BTM_SetW
BSCodec'
/android/cm-10.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-li
nux-androideabi/bin/ld: /android/cm-10.1/out/target/product/enrc2b/obj/STATIC_LIBRARIES/libbt-brcm_bta_intermediates/libbt-brcm_bta.a(bta_a
g_sco.o): in function bta_ag_sco_conn_rsp:external/bluetooth/bluedroid/bta/./ag/bta_ag_sco.c:1529: error: undefined reference to 'BTM_Confi
gI2SPCM'
collect2: ld returned 1 exit status
make: *** [/android/cm-10.1/out/target/product/enrc2b/obj/SHARED_LIBRARIES/bluetooth.default_intermediates/LINKED/bluetooth.default.so] Err
or 1
make: *** Waiting for unfinished jobs....
Note: I didn't make the libGL.so symlink at first, but I have now and I've gone back and run brunch enrc2b again and I still get the same error.
woops i forgot all about that, the fix is'nt merged into CM yet
do the following
cd external/bluetooth/
rm -rf bluedroid
git clone https://github.com/maxwen/bluedroid.git
wait for that to download and then cd back into the root dir
(this will be needed for both devices when building)
n1gh7m4r3 said:
EDIT: Is your git link dead?
Click to expand...
Click to collapse
no....it's working, i just cloned from it to check to see if it was working
Code:
Package Complete: /android/cm-10.1/out/target/product/enrc2b/cm-10.1-20130313-UNOFFICIAL-enrc2b.zip
frankoid said:
Code:
Package Complete: /android/cm-10.1/out/target/product/enrc2b/cm-10.1-20130313-UNOFFICIAL-enrc2b.zip
Click to expand...
Click to collapse
grats :good:
Lloir said:
BTW I'm glad many of you can read this tutorial, i'am awful at doing instructions for other people...if anyone has opinions on the way it's written please PM or re-write it and PM me and i'll replace the current one with a friendlier version.
Click to expand...
Click to collapse
I personally found it very useful. I've built CM before for other devices, but I didn't realise how easy it was to build it using an unofficial device tree - I didn't know it was simply a case of dropping the device tree into devices/.
frankoid said:
I personally found it very useful. I've built CM before for other devices, but I didn't realise how easy it was to build it using an unofficial device tree - I didn't know it was simply a case of dropping the device tree into devices/.
Click to expand...
Click to collapse
my device tree is a very lazy tree, it's supposed to have a vendor tree, but i've slammed it all into one.
These instructions pretty much cover any ROM, except for where you grab the source from..
Sent from my HTC One X+ using Tapatalk 2
the ATT git clone command should be: git clone https://bitbucket.org/Lloir/android_device_htc_evitareul.git and not: git clone https://[email protected]/Lloir/an..._evitareul.git -b CM10.1
I believe this is/was my problem.
EDIT: or perhaps git clone https://bitbucket.org/Lloir/android_device_htc_evitareul.git -b CM10.1
EDIT2: It isn't showing correctly in the thread. replace the ... with device, and it should work.

[CM] Building for expressltexx (GT-I8730)

There's an easy way to do whatever's discussed below, except for a) getting the SDK, b) syncing the repos, and c) building the ROM; and that way is using this script. But it's still better to do the steps below manually as it gets you acquainted with the terminal - you'll be using it a lot.
Thanks to @klvnhng for the original tutorial for mako
Credits to him.
You will need:
A computer running Ubuntu with at least 2GB memory and around 40-65 GB of free space
If you don't want to install Ubuntu, run it instead in VMWare Player or VirtualBox.
make sure you provide the virtual machine with the amount of recommended disk space or more
give it no less than 3-4GB of RAM
A (preferably fast) internet connection (trust me, you don't want to do this with a 256 or 512 kbps connection)
Familiarity with Android and Linux. Read up at source.android.com.
Setting up the build environment
1. Install JDK
DO NOT USE OPENJDK. Remove it by entering
Code:
sudo apt-get purge openjdk* icedtea* icedtea-6*
Install Oracle Java 6 by typing this into a terminal:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
Android SDK requires the x86 compatibility packages, ia32-libs. Install it by entering this:
Code:
sudo apt-get -y install ia32-libs
As an alternative, you can also do this (thanks to @jjchico):
Code:
sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
2. Android SDK
Download it here.
Extract it to a folder of your choice (in this guide, I will refer to it as ~/android/sdk).
Enter these commands into the terminal:
Code:
cd ~/android/sdk/adt-bundle/sdk/tools
./android sdk
Click Install packages. cd to ~/android/sdk/adt-bundle/sdk/platform-tools and type:
Code:
./adb
./fastboot
If you've done everything correctly, you should get a big block of text for both (which list all of the adb/fastboot commands).
3. Install required packages
Copy and paste this command into the terminal:
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-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
4. Install the repo command
Make directories called bin and android in your home folder, respectively.
Code:
mkdir -p ~/bin
mkdir -p ~/android
Download and setup the repo binary:
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now add it to your path:
Code:
export PATH="$PATH:~/bin"
And make sure it belongs in your path between subsequent reboots:
Code:
echo "export PATH="$PATH:~/android/sdk:~/bin"" >> ~/.bashrc
source ~/.bashrc
5. Configuring USB
You must configure USB to detect your Android device(s) properly.
Do this in a terminal:
Code:
curl https://raw.githubusercontent.com/aureljared/build-env-init/master/51-android.rules > ~/bin/51-android.rules
chmod a+r ~/bin/51-android.rules
sudo cp -vfp ~/bin/51-android.rules /etc/udev/rules.d/51-android.rules
6. Syncing up
The next step is to initialize the repository and download the source code to your computer.
Type the following lines into the terminal:
Code:
mkdir -p ~/android/cm-11.0
cd ~/android/cm-11.0
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
To download all the necessary device-specific files for our device, do this:
Code:
curl https://raw.githubusercontent.com/aureljared/android-manifests/expresslte-cm-11.0/local_manifest.xml >> .repo/local_manifests/local_manifest.xml
Now run
Code:
repo sync
You have now begun downloading all of the CM source code to your build directory. Depending on your internet speed, this can take from a couple of hours to a few days. If the sync interrupts, don't worry. Simply continue the sync (you don't have to restart completely, only the project you were downloading when the interrupt occured, lol) by entering:
Code:
repo sync
Some tips:
You can interrupt the process by pressing Ctrl + C, it will continue where it left off the next time anyway.
Remember, you need to cd into your build directory (~/android/cm-11.0, if you've been following this guide) for the command to work.
If you want only one project to be synced at a time, run repo sync -j1 instead.
This step takes a long time depending on your internet connection speed (FYI you're downloading ~20 GB of code!)
7. Building CM (yay!)
You must download the necessary pre-built apps:
Code:
~/android/cm-11.0/vendor/cm/get-prebuilts
Now let's build! cd to your build directory and run the following commands in the terminal:
Code:
. build/envsetup.sh
brunch expressltexx
Now, just let your computer do the rest. This step is very demanding for your computer, so you better leave it alone while it builds. Usually this takes an hour or more. Go get some sleep or eat something.
Done? If everything went correctly, cd to ~/android/cm-11.0/out/target/product/expresslte and you should see your newly built ROM entitled:
cm-11.0-20xxxxxx-UNOFFICIAL-expressltexx.zip
Congratulations! You've successfully built CM 11.0!
For re-builds (i.e. when the source code has been updated and you would like to make a new nightly), just do this:
Code:
cd ~/android/cm-11.0
make clobber
repo sync
. build/envsetup.sh
brunch expressltexx
Have fun building!​
I suggest you to modify step 5 inserting before repo sync
Code:
mkdir .repo/local_manifests
cd .repo/local_manifests
wget https://raw.github.com/KINGbabasula/android_device_samsung_expresslte/cm-10.2/local_manifest.xml
cd ..
cd ..
This will download the specific necessary repos with repo sync
Then remove this in step 6
Code:
mkdir files
cd files
git clone https://github.com/KINGbabasula/proprietary_vendor_samsung.git
as it isn't needed
And change make clean with make clobber because with clobber it will rebuild faster
EDIT: And before step 6 you need to replace these 2 files with the 2 in the attachment
Code:
system/core/mkbootimg/bootimg.h
system/core/mkbootimg/mkbootimg.c
KINGbabasula said:
I suggest you to modify step 5 inserting before repo sync
Code:
mkdir .repo/local_manifests
cd .repo/local_manifests
wget https://raw.github.com/KINGbabasula/android_device_samsung_expresslte/cm-10.2/local_manifest.xml
cd ..
cd ..
This will download the specific necessary repos with repo sync
Then remove this in step 6
Code:
mkdir files
cd files
git clone https://github.com/KINGbabasula/proprietary_vendor_samsung.git
as it isn't needed
And change make clean with make clobber because with clobber it will rebuild faster
EDIT: And before step 6 you need to replace these 2 files with the 2 in the attachment
Code:
system/core/mkbootimg/bootimg.h
system/core/mkbootimg/mkbootimg.c
Click to expand...
Click to collapse
Original post updated.
Can you help me with ia32-libs?
It says that it's referred to by a handful of other packages but it has no installation candidates or something. The bottom line is that I can't install it.
I'm using 13.10 x64 on an ASUS K43SJ.
- Intel i5-2410M Quadcore (2.3GHz normal, 2.9GHz Turbo Boost)
- 2GB RAM available to Ubuntu VM
Sent from my International Galaxy Express using Tapatalk 4
aureljared said:
Original post updated.
Can you help me with ia32-libs?
It says that it's referred to by a handful of other packages but it has no installation candidates or something. The bottom line is that I can't install it.
I'm using 13.10 x64 on an ASUS K43SJ.
- Intel i5-2410M Quadcore (2.3GHz normal, 2.9GHz Turbo Boost)
- 2GB RAM available to Ubuntu VM
Sent from my International Galaxy Express using Tapatalk 4
Click to expand...
Click to collapse
You have to apt-get install every missing library one by one
Inviato dal mio GT-I9070 utilizzando Tapatalk
aureljared said:
2. Android SDK
Download it here.
Extract it to a folder of your choice (in this guide, I will refer to it as ~/android/sdk).
Enter these commands into the terminal:
Code:
cd ~/android/sdk/adt-bundle/sdk/tools
./android sdk
Click Install packages. cd to ~/android/sdk/adt-bundle/sdk/platform-tools and type:
Code:
adb
fastboot
Click to expand...
Click to collapse
Shouldn't it be
Code:
./adb
./fastboot
Or have you added the sdk to your path?
I guess the compilation process will need the sdk. How does it find the sdk? Do you need to provide the path anywhere?
Thanks for the great tuto.
These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:
$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
---------- Post added at 12:08 PM ---------- Previous post was at 11:29 AM ----------
These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:
$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
jjchico said:
These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:
$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
---------- Post added at 12:08 PM ---------- Previous post was at 11:29 AM ----------
These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:
$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
Click to expand...
Click to collapse
jjchico said:
Shouldn't it be
Code:
./adb
./fastboot
Or have you added the sdk to your path?
I guess the compilation process will need the sdk. How does it find the sdk? Do you need to provide the path anywhere?
Thanks for the great tuto.
Click to expand...
Click to collapse
Updated original post.
Sent from my GT-I8730 using Tapatalk
Thanks. Just note the missing double quotes in the export PATH.
Enviado desde mi GT-I9000 mediante Tapatalk
jjchico said:
Thanks. Just note the missing double quotes in the export PATH.
Enviado desde mi GT-I9000 mediante Tapatalk
Click to expand...
Click to collapse
Haha lol sorry. I was very sleepy when I updated last night.
Updated post.
My repo sync is finished with 65 out of 401 projects. ia32-libs now okay thanks to you @jjchico.
Sent from my GT-I8730 using Tapatalk
I get this
[email protected]:~/android/cm-10.2$ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
No command 'repo' found, did you mean:
Command 'repro' from package 'repro' (universe)
Command 'repl' from package 'nmh' (universe)
Command 'repl' from package 'mailutils-mh' (universe)
Command 'rep' from package 'rep' (universe)
repo: command not found
[email protected]:~/android/cm-10.2$
Any ideas? All seemed good before that
Bazzan
Check that repo is in the bin folder in your user main folder.
Check that repo is executable
chmod a+x ~/bin/repo
Enviado desde mi GT-I9000 mediante Tapatalk
"6. Building CM (yay!)"
"In order to make a working build, you have to get the proprietary files (mainly device build files and drivers) for the device."
so how do I get the propriety files and where do I put them? ADB from your phone?
After this you direct us to prebuilt apps so it appears there is a step missing unless I am pulling proprietary files down from KINGbabasula's Github
Bazzan
bazzan said:
"6. Building CM (yay!)"
"In order to make a working build, you have to get the proprietary files (mainly device build files and drivers) for the device."
so how do I get the propriety files and where do I put them? ADB from your phone?
After this you direct us to prebuilt apps so it appears there is a step missing unless I am pulling proprietary files down from KINGbabasula's Github
Bazzan
Click to expand...
Click to collapse
Yeah, the files are located somewhere in KINGbabasula's github. If you want to use ADB then refer to the text file located in android_device_samsung_expresslte.
Or if you want to download the files themselves, do this in a terminal:
Code:
mkdir proprietary
cd proprietary
git clone https://github.com/KINGbabasula/proprietary_vendor_samsung.git
The files will be located in proprietary/proprietary_vendor_samsung/expresslte.
Sent from my GT-I8730 using Tapatalk
Finally got build going. Thanks for the tutorial @aureljared. You were not kidding when you said takes a while. Not too sure where to from here. Welcome suggestions if anyone wants me to try anything
Bazzan
URGENT
Before proceeding to build any more ROMs, let me ask some questions.
What toolchain for building the kernel are you using? Toolchains that might work are arm-eabi-4.4.3 upwards or linaro 4.4.3 upwards.
What is your configuration for the kernel? It is written to a file called ".config" insinde the kernel source.
Have you applied any kind of patch to the code before compiling? If so, what?
Click to expand...
Click to collapse
Thank you for your time. Your answers to the above questions will be highly appreciated and will be of utmost importance. There is also a good chance that we might build a proper kernel with your reports!
:good: :victory:
Sent from my GT-I8730 using Tapatalk
aureljared said:
URGENT
Before proceeding to build any more ROMs, let me ask some questions.
What toolchain for building the kernel are you using? Toolchains that might work are arm-eabi-4.4.3 upwards or linaro 4.4.3 upwards.
What is your configuration for the kernel? It is written to a file called ".config" insinde the kernel source.
Have you applied any kind of patch to the code before compiling? If so, what?
Thank you for your time. Your answers to the above questions will be highly appreciated and will be of utmost importance. There is also a good chance that we might build a proper kernel with your reports!
:good: :victory:
Sent from my GT-I8730 using Tapatalk
Click to expand...
Click to collapse
No toolchain experience at all. Just substituted kernels from elsewhere. Maybe if you are leaning toward Linaro, I should find myself a tutorial for arm-eabi-4.4.3 upwards and give that a go. then we can cover more ground.
Bazzan
bazzan said:
No toolchain experience at all. Just substituted kernels from elsewhere. Maybe if you are leaning toward Linaro, I should find myself a tutorial for arm-eabi-4.4.3 upwards and give that a go. then we can cover more ground.
Bazzan
Click to expand...
Click to collapse
Sure.
I'm not saying that I'm relying on Linaro now, it's just that Linaro is a toolchain developed by a consortium of technology companies including Samsung that aims to build Linux kernels that perform extremely well on mobile devices.
CM 10.2 uses Linaro 12.09, I think.
I tried building with Linaro a couple of days ago but make threw me some errors, the most confusing being something like this
Code:
make [cypress_touchkeys.o] *** Error 2
I don't even know what Cypress is.
Sent from my GT-I8730 using Tapatalk
aureljared said:
Sure.
I'm not saying that I'm relying on Linaro now, it's just that Linaro is a toolchain developed by a consortium of technology companies including Samsung that aims to build Linux kernels that perform extremely well on mobile devices.
CM 10.2 uses Linaro 12.09, I think.
I tried building with Linaro a couple of days ago but make threw me some errors, the most confusing being something like this
Code:
make [cypress_touchkeys.o] *** Error 2
I don't even know what Cypress is.
Sent from my GT-I8730 using Tapatalk
Click to expand...
Click to collapse
Cannot help with Cypress. Some time ago I downloaded a file called GT-I8730_JB_Opensource.zip - not sure where I found it.
It appears to be what is says it is. Within it is a text file called README_Kernel.txt
It has the following
################################################################################
1. How to Build
- get Toolchain
From android git server , codesourcery and etc ..
- arm-eabi-4.4.3
- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
EX) export CROSS_COMPILE= $(android platform directory you download)/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
Ex) export CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.4.3/bin/arm-eabi- // check the location of toolchain
$ export ARCH=arm
$ make msm8930_express_defconfig
$ make
2. Output files
- Kernel : arch/arm/boot/zImage
- module : drivers/*/*.ko
3. How to Clean
$ make clean
################################################################################
Way out of my depth but will try sometime next week to give it a go with arm-eabi-4.4.3. Major interview Monday so nothing before then.
Bazzan
bazzan said:
Cannot help with Cypress. Some time ago I downloaded a file called GT-I8730_JB_Opensource.zip - not sure where I found it.
It appears to be what is says it is. Within it is a text file called README_Kernel.txt
It has the following
################################################################################
1. How to Build
- get Toolchain
From android git server , codesourcery and etc ..
- arm-eabi-4.4.3
- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
EX) export CROSS_COMPILE= $(android platform directory you download)/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
Ex) export CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.4.3/bin/arm-eabi- // check the location of toolchain
$ export ARCH=arm
$ make msm8930_express_defconfig
$ make
2. Output files
- Kernel : arch/arm/boot/zImage
- module : drivers/*/*.ko
3. How to Clean
$ make clean
################################################################################
Way out of my depth but will try sometime next week to give it a go with arm-eabi-4.4.3. Major interview Monday so nothing before then.
Bazzan
Click to expand...
Click to collapse
That's from Samsung. It contains the kernel source as you already have seen
It's stock 3.4.0 so I don't know if it will work with CM :good:
Sent from my GT-I8730 using Tapatalk
Quote from jt1134:
jt1134 said:
I use the d2 family kernel source.
For stock ROMs and CM10, you can use the source and ramdisk provided by samsung.
For CM10.1 or higher, you'll have to get your hands very dirty. IMO the easiest route would be to port the missing drivers from stock samsung source to the msm8930-common kernel, and modifying it to work with them. This is how I did it for the I437 : http://review.cyanogenmod.org/#/c/47947/ . You may then use the serrano device trees as a template once the kernel is ready.
Click to expand...
Click to collapse
Updated first post with this info.
Sent from my GT-I8730 using Tapatalk

Errors during kernel compilation

Hi, now I'm trying to compile kernel from official sources for Google Pixel 4a (sunfish). I've got some errors, so I need some help.
UPD: I'm using Ubuntu 20.04 through WSL
What I did:
1. cloned this repo
2. downloaded toolchains from this repo. I tried every version except 7.x. First, I tried tools from google's repo, but i've got errors like "there's no gcc" or "gcc is too old -- you are using 4.9 instead of 5.1", so I found other repo.
3. Installed this packages:
sudo apt-get install git gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig ccache u-boot-tools
Click to expand...
Click to collapse
4. followed this xda guide.
5. of course, set CROSS_COMPILE and CROSS_COMPILE_ARM32 in toolchain folders, also set
export ARCH=arm64 && export SUBARCH=arm64
6. run
make clean
make mrproper
make sunfish_defconfig
make -j$(nproc --all)
7. here is terminal output (pastebin). If you scroll, you can see, that there are errors during compilation process. And as I understand, process was stopped because of this errors.
I hope someone could help me to find out where is the problem.
Hi, did you solve the problem?
I encounter the same error recently, and I'm also curious about the solution
Thanks a lot

Categories

Resources