Just gonna jump right into it and Masterchief87 helped with this
Code:
Install packages needed to build
Note: Some of these may have changed some ,it has been a good 6 months since I have had to set up an environment. Feel free to post and changes or ask for help.
$ yaourt -S git gnupg flex bison gperf sdl wxgtk squashfs-tools curl ncurses zlib schedtool perl-switch zip unzip libxslt python2-virtualenv bc
$ yaourt -S gcc-multilib lib32-zlib ( For Arch Linux sudo mousepad /etc/pacman.conf and include multilib-testing & multilib. Then update packages sudo pacman -Syu)
$ yaourt libtinfo , then pick libtinfo-5 5-10 should be #5
# To build Android 6.0 and above you also need rsync.
$ yaourt -S rsync
# To install ncurses5-compat-libs you need
# to enter this key in your terminal first.
$ gpg --keyserver pgp.mit.edu --recv-keys C52048C0C0748FEE227D47A2702353E0F7E48EDB
$ yaourt -S ncurses5-compat-libs
# Before installing lib32-ncurses5-compat-libs I had to
# uninstall these packages due to conflicts and dependencies.
# this might or might not be necessary for you. If you are unable to
# install lib32-ncureses5-compat-libs because it conflicts with other
# installed packages, this should fix the problem.
$ sudo pacman -R lib32-ncurses lib32-libxml2 lib32-gconf lib32-libcroco lib32-libsoup lib32-llvm-libs lib32-readline lib32-js17 lib32-librsvg lib32-mesa lib32-rest lib32-cairo lib32-glew1.10 lib32-gtk3 lib32-polkit lib32-colord lib32-gtk2 lib32-pango lib32-libdbusmenu-gtk2 lib32-libindicator-gtk2 lib32-libappindicator-gtk2
# Install more necessary packages.
$ yaourt -S lib32-ncurses5-compat-libs
$ yaourt -S lib32-readline
$ yaourt -S make-3.81
$ yaourt -S pngcrush
$ yaourt -S pngquant
# Install java 7 and set it as default
$ yaourt -S jdk7-openjdk
$ sudo archlinux-java set java-7-openjdk
# Check java version.
$ java -version
# Output should look something like this.
# java version "1.7.0_91"
# OpenJDK Runtime Environment (IcedTea 2.6.3)
# (Arch Linux build 7.u91_2.6.3-3-x86_64)
# OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
# Install java 8 and set it as default
$ yaourt -S jdk8-openjdk
$ sudo archlinux-java set java-8-openjdk
$ java -version
# Output should look something like this.
# openjdk version "1.8.0_112"
# OpenJDK Runtime Environment (build 1.8.0_112-b15)
# OpenJDK 64-Bit Server VM (build 25.112-b15, mixed mode)
# Install repo and configure it to download the source
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
# Symlink make-3.81 and python2 to ~/bin
$ ln -s /usr/bin/make-3.81 ~/bin/make
$ ln -s /usr/bin/make-3.81-config ~/bin/make-config
$ ln -s /usr/bin/python2 ~/bin/python
$ ln -s /usr/bin/python2-config ~/bin/python-config
# Download the Android SDK from
# [url]http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz[/url]
# Then extract it to your home directory and rename to android-sdk
# Open and edit .bashrc with mousepad text editor.
$ mousepad ~/.bashrc
# Add these lines to the end of .bashrc (make sure you dont copy the *).
* export LANG=C
* export PATH=~/bin:$PATH
* export PATH=$PATH:~/android-sdk/tools/
* export PATH=$PATH:~/android-sdk/platform-tools/
* export USE_CCACHE=1
* export CCACHE_DIR=~/.ccache
* export JAVA_HOME=/usr/lib/jvm/java
# Save changes and close mousepad.
# Restart .bashrc.
$ source ~/.bashrc
# Run SDK Manager and install the platform-tools(adb, fastboot, etc...).
$ android sdk (Select platform-tools and install)
# Close SDK Manager
# Check make version. (It should be 3.81)
$ make --v
# Check python version. (It should be 2.7)
$ python --version
For those getting clang errors add this commit
[url]https://review.cyanogenmod.org/#/c/120824/[/url]
Note: This guide is tailored toward the XFCE version of Manjaro 15.09 and above. You can use this guide with other versions of Manjaro but there are some commands that will be slightly different. For example, mousepad is the text editor that comes with XFCE so if you install a different version you will have to find out the name of the text editor included in the version you installed and change the command accordingly.
Because there are already guides on YouTube and elsewhere, that show how to install Manjaro or replace another Linux distro with Manjaro we will not explain the installation process or hold anyone's hand when it comes to installation.
What did not exist was a simple user friendly guide explaining how to set up the build environment, which is why this is here.
ps: For those of you who may not already know, please refrain from quoting the whole op. It's bad manners.
Very nice work here my friend!
Masterchief87 said:
Thanks for the mention bro.
If anyone has a hard time with this I'll try to help where I can.
ps: For those of you who may not already know, please refrain from quoting the whole op. It's bad manners.
Click to expand...
Click to collapse
Hi,
can you please elaborate whole process in a simple way noob friendly .
rajlko said:
Hi,
can you please elaborate whole process in a simple way noob friendly .
Click to expand...
Click to collapse
Well are you even running Manjaro? If you're a noob, well you should probably start with a disrto like Ubuntu or mint. Manjaro is a Linux Arch base OS with a installer like Ubuntu.
Sent from my Nexus 5 using Tapatalk
D-FUSE said:
Well are you even running Manjaro? If you're a noob, well you should probably start with a disrto like Ubuntu or mint. Manjaro is a Linux Arch base OS with a installer like Ubuntu.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
at present I am using ubuntu 14.04 , a detailed guide will be very helpful.
rajlko said:
at present I am using ubuntu 14.04 , a detailed guide will be very helpful.
Click to expand...
Click to collapse
This is if you're running Manjaro
Sent from my Nexus 5 using Tapatalk
rajlko said:
Hi,
can you please elaborate whole process in a simple way noob friendly .
Click to expand...
Click to collapse
That's what @D-FUSE and I already did. Once you install Manjaro it is as easy as copy and paste.
rajlko said:
at present I am using ubuntu 14.04 , a detailed guide will be very helpful.
Click to expand...
Click to collapse
Manjaro already includes a GUI installer much like the installer for Ubuntu. Replacing Ubuntu with manjaro is very easy. There is already plenty of information related to installing Manjaro Linux to be found on Google and YouTube. Because there are already Install guides we don't need to go through the installation process in this guide. What did not already exist was a simple guide detailing how to successfully set up the build environment after installing Manjaro which is why this is here.
VECTUS said:
Very nice work here my friend!
Click to expand...
Click to collapse
How have you been bro?
Sent from my Nexus 5 using Tapatalk
D-FUSE said:
How have you been bro?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Thanks for this. Awesome guide, jumped ship on Ubuntu and moved over to Manjaro. Glad I made the switch.
obsolete1 said:
Thanks for this. Awesome guide, jumped ship on Ubuntu and moved over to Manjaro. Glad I made the switch.
Click to expand...
Click to collapse
I used Ubuntu for 3 year and about 3 months ago I tried Manjaro and haven't looked back!
Sent from my Nexus 5 using Tapatalk
D-FUSE said:
How have you been bro?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I'm good man... Work work work... Hope you are doing well my friend!
Thanks for this. Just recently switched both PCs to Manjaro xfce 15.12 and fell in love with it. Thanks for this up to date guide for installing an environment on it.
I myself just changed over to Manjaro. Thank you both for the simple guide on setting up my environment. This was way easier than have to bang my head against the wall to find all the packages....
Thanks again...
EDIT: Has anyone been able to build a bootable kernel from this? I cant seem to boot up.
The Sickness said:
I myself just changed over to Manjaro. Thank you both for the simple guide on setting up my environment. This was way easier than have to bang my head against the wall to find all the packages....
Thanks again...
EDIT: Has anyone been able to build a bootable kernel from this? I cant seem to boot up.
Click to expand...
Click to collapse
My kernel boots!!! #StayBroken I build hammerhead , fugu ,flo ,and flounder .
Sent from my Nexus 5 using Tapatalk
D-FUSE said:
My kernel boots!!! #StayBroken I build hammerhead , fugu ,flo ,and flounder .
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Im installing the gcc from AUR....gonna see if that solves the problem
The Sickness said:
Im installing the gcc from AUR....gonna see if that solves the problem
Click to expand...
Click to collapse
Are you having errors? Or will you're kernel not boot?
Sent from my Nexus 5 using Tapatalk
D-FUSE said:
Are you having errors? Or will you're kernel not boot?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
No errors.....it gets stuck on the S6 logo....not splash screen.
Have tried both 4.8 and 4.9 toolchains.
The Sickness said:
No errors.....it gets stuck on the S6 logo....not splash screen.
Have tried both 4.8 and 4.9 toolchains.
Click to expand...
Click to collapse
That's yo problem! Samsung !!!!!
Sent from my Nexus 5 using Tapatalk
D-FUSE said:
That's yo problem! Samsung !!!!!
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Yeah, tell me about it. First build I had to fix a duplicate entry in firmware........
I will figure it out.......hopefully
Related
Hi guys. U might not know me but in the past i've compiled my own custom kernel for galaxy ace. So in this tutorial i'll provide tutorial step by step howto compile kernel for anyone who wish to try. i'll try to make this as simple as possible for anyone to understand. But do excuse my poor english tho, its not my spoken language nor my native language
1- Most important of all is that u need to have linux installed in your pc. In this tutorial i use Fedora 17 gnome 64bit freshly installed, so i'll be providing indepth tutorial using fedora. But it really doesnt matter which distro i use; ubuntu, fedora, opensuse, debian, arch etc, in theory u can compile kernel in all linux distro u can think of, as long its linux. Sorry windows guys, no kernel compiling for u
Please note that i said installed. U need to have a linux distro installed, by dualbooting or by virtualisation using vmware or virtualbox, as long as its intalled. Livecd or liveusb enviroment wont work, mandatory need installed enviroment. But dont ask me howto install linux, google is always your friend, ask him/her
Click to expand...
Click to collapse
2- We need to setup our linux with suitable enviroment to build the kernel, by installing dev package etc. First we need to make sure that our system is uptodate. Old package combined with newer one can result in error when compiling. Open linux terminal and type
Code:
sudo yum upgrade
next is to install needed dev package for kernel compiling
Code:
sudo yum install gcc libstdc++ ncurses-devel java-1.7.0-openjdk java-1.7.0-openjdk-devel
Because i'm using 64bit fedora, i also need to install 32bit libs. Ignore this if you're using fedora 32bit.
Code:
sudo yum install glibc-devel.i686 gtk2-devel.i686 gtk-nodoka-engine.i686 libcanberra.i686 libcanberra-gtk2.i686 PackageKit-gtk-module.i686 GConf2.i686 ncurses-libs.i686 xulrunner.i686
Click to expand...
Click to collapse
3- Next is to download and install arm crosscompile toolchain. In this tutorial i use latest toolchain from Codesourcery
Choose to download the EABI release, for ARM processor
{
"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"
}
Download the linux installer as its easier to setup.
Click to expand...
Click to collapse
4- Now we can install the toolchain, but first we need to make it executable. Open terminal and do
Code:
chmod +x /path/to/file/arm-2011.09-69-arm-none-eabi.bin
or just right click on the file and tick to allow executing in permission tab
then just install it. Still in terminal, do
Code:
sh /path/to/file/arm-2011.09-69-arm-none-eabi.bin
and gui installer will appear. Just accept the default choice and continue with the installation until finish.
Click to expand...
Click to collapse
5- For extracting archive, i use this nice bash profile script as universal extract command. Edit bashrc profile file
Code:
gedit ~/.bashrc
and add this on the bottom of the file
Code:
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "don't know how to extract '$1'..." ;;
esac
else
echo "'$1' is not a valid file!"
fi
}
and save the file. U need to logout and relogin for this script to take effect.
Now create working dir for later use
Code:
mkdir ~/android && mkdir ~/android/kernel_compiling && mkdir ~/android/ramdisk_extract
Click to expand...
Click to collapse
6- Next, download ace's kernel source. U can grab stock kernel source from here. In this tutorial i download the GT-S5570-S5670-S5830_Opensource_GB.zip.
and extract it
Code:
extract ~/GT-S5570-S5670-S5830_Opensource_GB.zip
u'll get two file, GT-S5830_kernel.tar.gz and GT-S5830_platform.tar.gz. The GT-S5830_kernel.tar.gz is what we need, now extract and copy it into earlier working folder we created (the ~/android/kernel_compiling)
Code:
extract ~/GT-S5830_kernel.tar.gz && cp -R ~/kernel/* ~/android/kernel_compiling
Now that folder should have a bunch of folder and files in it. Thats our kernel source tree.
Click to expand...
Click to collapse
7- Grab boot.img from any stock rom and also wifi module (ar6000.ko) that came with the rom for that kernel. We will need that ar6000.ko later.
Now copy the boot.img into our earlier working folder (~/android/ramdisk_extract)
Code:
cp ~/boot.img ~/android/ramdisk_extract
Click to expand...
Click to collapse
8- Download this tool to extract ramdisk from the boot.img, and extract it into the same folder that we put our boot.img earlier
Code:
cd ~/android/ramdisk_extract && extract ~/Bootimgutils.zip
Now make those three file that we extracted executable
Code:
chmod +x ~/android/ramdisk_extract/mkbootimg && chmod +x ~/android/ramdisk_extract/repack_bootimg.pl && chmod +x ~/android/ramdisk_extract/repack_bootimg.pl
or just use the right click like step 4 above.
Click to expand...
Click to collapse
9- Time to extract ramdisk from the boot.img. Still in terminal do
Code:
cd ~/android/ramdisk_extract && BASE="0x$(od -A n -h -j 34 -N 2 boot.img|sed 's/ //g')0000" && echo $BASE
Note the output, eg
Code:
0x13600000
So thats our kernel base parameter
Now to extract ramdisk
Code:
cd ~/android/ramdisk_extract && ./split_bootimg.pl boot.img && mkdir ramdisk && cd ramdisk && gzip -dc ../boot.img-ramdisk.gz | cpio -i
Note the output, eg
Code:
Page size: 4096 (0x00001000)
Kernel size: 3137536 (0x002fe000)
Ramdisk size: 3153892 (0x00301fe4)
Second size: 0 (0x00000000)
What we need is the pagesize. Now we know that its 4096.
Now after we look into the ramdisk_extract folder theres a bunch of files produced, and in the folder itself contain another folder, ramdisk. In the ramdisk folder contains our actual extracted ramdisk including bootlogo, modules, scipts etc. In case u were wondering, this is where the famous cfroot autoroot script works its magic.
Click to expand...
Click to collapse
Still excited after all this terminal thingy? Good.. keep up the spirit
Now we continue.
10- From previous step we know that ace's kernel base parameter is 0x13600000 and pagesize is 4096. We now look into kernel repack script to make sure its right
Code:
gedit ~/android/ramdisk_extract/repack_bootimg.pl
and look for predefined base parameter and pagesize. It should look like this in line 19
Code:
system ("./mkbootimg --kernel $ARGV[0] --ramdisk ramdisk-repack.cpio.gz --base 0x13600000 --pagesize 4096 -o $ARGV[2]");
Good. The predefined kernel base parameter and pagesize is same with out earlier test result, so no need to alter the file.
Click to expand...
Click to collapse
11- We now need to find localversion of samsung's proprietary module in the extracted ramdisk. In terminal do
Code:
cd ~/android/ramdisk_extract/ramdisk/lib/modules && strings fsr.ko | grep vermagic
and it should produce output like this
Code:
vermagic=2.6.35.7-perf-CL382966 preempt mod_unload ARMv6
what needed is the -CL382966, thats the module localversion.
It depends on which stock boot.img we use. Different boot.img might have different output, what i've shown is what i got from boot.img that i'm using, yours might be different. Do note of the parameter, we need that later.
Click to expand...
Click to collapse
12- Now we look into our kernel source tree folder (~/android/kernel_compiling). There should be a file named make_kernel_GT-S5830.sh. We open that file
Code:
gedit ~/android/kernel_compiling/make_kernel_GT-S5830.sh
or
Code:
head ~/android/kernel_compiling/make_kernel_GT-S5830.sh
it contain something like this
Code:
make cooper_rev03_defconfig
make
edit that file abit to be
Code:
make clean
make cooper_rev03_defconfig
make
and save. Now we know that ace's defconfig (kernel config file) is cooper_rev03_defconfig.
it should be in ~/android/kernel_compiling/arch/arm/configs
now we edit the defconfig
Code:
gedit ~/android/kernel_compiling/arch/arm/configs/cooper_rev03_defconfig
and look for this line
Code:
CONFIG_LOCALVERSION="-perf"
and edit it to include our localversion we got from step 11 above. In my case its -CL382966 so i edited it to be
Code:
CONFIG_LOCALVERSION="-perf-CL382966"
Click to expand...
Click to collapse
13- Next we need to modify kernel makefile to include crosscompile toolchain path and define build for arm architecture
Code:
gedit ~/android/kernel_compiling/Makefile
and look for this section
Code:
#ARCH ?= $(SUBARCH)
#CROSS_COMPILE ?=
#CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
ARCH =arm
CROSS_COMPILE =../../toolchain/arm-eabi-4.4.3/bin/arm-eabi-
edit it to be
Code:
#ARCH ?= $(SUBARCH)
#CROSS_COMPILE ?=
#CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
ARCH =arm
CROSS_COMPILE =/home/anonymous/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-
Do note that the path to crosscompile toolchain is not the same as that for u. Lets say that your linux account username is johndoe, the correct path should be
Code:
CROSS_COMPILE =/home/johndoe/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-
so just change it accordingly.
Click to expand...
Click to collapse
14- Still editing the makefile from step 13 above, look for this section
Code:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks
and modify it to be
Code:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-w \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-error=unused-but-set-variable \
-Wno-format-security \
-fno-delete-null-pointer-checks
and save the file.
Click to expand...
Click to collapse
15- Moment of truth, now we compile the kernel!!
But do make sure that the script from step 12 above is executable
Code:
chmod +x ~/android/kernel_compiling/make_kernel_GT-S5830.sh
then, we compile!!
Code:
cd ~/android/kernel_compiling && ./make_kernel_GT-S5830.sh
if everything working according to plan, there should be a nice bunch of output tailing in terminal, dont close it!! Make yourself a nice hot cup of coffee and wait... wait... wait...
Click to expand...
Click to collapse
Look who's still reading
16- And wait untill it finish. On my dualcore asus laptop with 2gb ram it took a good 20 minutes to finish compiling. If nothing goes wrong, last output will be something like
Code:
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 7 modules
CC arch/arm/common/cpaccess.mod.o
LD [M] arch/arm/common/cpaccess.ko
CC arch/arm/mach-msm/dma_test.mod.o
LD [M] arch/arm/mach-msm/dma_test.ko
CC arch/arm/mach-msm/reset_modem.mod.o
LD [M] arch/arm/mach-msm/reset_modem.ko
CC arch/arm/oprofile/oprofile.mod.o
LD [M] arch/arm/oprofile/oprofile.ko
CC drivers/input/evbug.mod.o
LD [M] drivers/input/evbug.ko
CC drivers/net/wireless/libra/librasdioif.mod.o
LD [M] drivers/net/wireless/libra/librasdioif.ko
CC drivers/scsi/scsi_wait_scan.mod.o
LD [M] drivers/scsi/scsi_wait_scan.ko
Congratulations!! u just compile your own kernel
Click to expand...
Click to collapse
17- Next is to repack our newly compiled kernel with the extracted ramdisk from step 9 earlier. Our compiled kernel will be in form of zImage file, located in ~/android/kernel_compiling/arch/arm/boot.
So in terminal do
Code:
mv ~/android/ramdisk_extract/boot.img-kernel ~/android/ramdisk_extract/boot.img-kernel.bak && cp ~/android/kernel_compiling/arch/arm/boot/zImage ~/android/ramdisk_extract/boot.img-kernel && cd ~/android/ramdisk_extract && ./repack_bootimg.pl boot.img-kernel ramdisk bootnew.img
At last we did it. Our kernel is ready, look in ~/android/ramdisk_extract, theres a new file named bootnew.img. Thats what we accomplish this far. Now the bootnew.img can be flash using cwm or such. Remember the ar6000.ko in step 7 earlier? Thats the wifi module. If this compiled kernel flashed and boot fine, just replace phone default wifi module in /system/lib/modules with our own wifi module from step 7 and wifi will work
Click to expand...
Click to collapse
So thats it for now. I'll continue again with advanced steps like pulling patch from github to add cpu governor and disk io scheduler, compressing kernel with better lzma compression for smaller filesize and more stuff later
For now, kernel compiled using this guide should boot on original galaxy ace (not the "i" variant, because we using original ace source, not the "i" variant source. both using different hadware) running stock rom or rom based on stock (because we using stock ramdisk extracted from stock boot.img, will not work on cm because it uses its own ramdisk).
And credit also goes to ketut.kumajaya and madman for some info i got from them that i included in this guide.
another placeholder
No offence bro , nice guide and all , but if I remember all guides should be in General
This was sent from a Galaxy Ace. Problem?
Its development guide
Btw nice one
Gonna try it again on my pc
Hopefully this time my pc get the kernel to compile and dont stuck at some parts
Sent from my i9070 using xda premium
Great guide! I'm going to try it since its holiday now! Thanks!
Respecting others never hurt, let's build a better XDA community.
Nice guide
an0nym0us_ nice, I hope you will add to this guide how to make boot.img.
btw fedora is nice UI
going to install it instead of Linux mint
CoolCatGetHome said:
btw fedora is nice UI
going to install it instead of Linux mint
Click to expand...
Click to collapse
thats pure gnome 3.x where as mint comes with themed one / you installed different shell
@anonymous_ in ubuntu i don't think you can directly do sh packagename
you need to do
Code:
dpkg-reconfigure -plow dash
and select No and then run /bin/sh packagename
dragonnn said:
an0nym0us_ nice, I hope you will add to this guide how to make boot.img.
Click to expand...
Click to collapse
yes, thats what i intended with this tuts. until succesful creating boot.img, or maybe even further until creating cwm flashable zip.
madman said:
thats pure gnome 3.x where as mint comes with themed one / you installed different shell
@anonymous_ in ubuntu i don't think you can directly do sh packagename
you need to do
Code:
dpkg-reconfigure -plow dash
and select No and then run /bin/sh packagename
Click to expand...
Click to collapse
thank you. yes thats true for ubuntu, to change from using bash to sh.
but since this tuts is using fedora so i'm writing what relevant with fedora. fedora stil uses sh by default
Nice guide. Moved to General.
You have great english for a non-native speaker
And how universal is this? If I had the kernel source for any phone this might apply?
Sent from my Nexus S using xda premium
scoffyburito said:
You have great english for a non-native speaker
And how universal is this? If I had the kernel source for any phone this might apply?
Sent from my Nexus S using xda premium
Click to expand...
Click to collapse
pretty much universal.
got kernel source+boot.img for the ramdisk+correct base parameter+correct pagesize+correct defconfig and u can compile for any device.
an0nym0us_ said:
Hi guys. U might not know me but in the past i've compiled my own custom kernel for galaxy ace. So in this tutorial i'll provide tutorial step by step howto compile kernel for anyone who wish to try. i'll try to make this as simple as possible for anyone to understand. But do excuse my poor english tho, its not my spoken language nor my native language
Click to expand...
Click to collapse
A little late... lol... great work
Also to compile faster make -j[number of cores+1]
example
Dual core
make -j3
Sent from my GT-S5830 using XDA
scoffyburito said:
You have great english for a non-native speaker
And how universal is this? If I had the kernel source for any phone this might apply?
Sent from my Nexus S using xda premium
Click to expand...
Click to collapse
Just that module local version will not be applicable as only samsung kept fsr modules proprietory closed... Newer Samsung devices don't have it as i observed
Sent from Galaxy Ace which just landed on "MOON"
i get yum not found
SonyXperiaAce said:
i get yum not found
Click to expand...
Click to collapse
you should read that guide uses fedora as compiling system and you are probably new to linux as well as package managers and using ubuntu so steps are somewhat different
We can just guess that he use ubuntu, if so its apt-get.
But please dont tell u try that on windows cmd
Btw difference only for yum and apt-get, and package name. Anything else is the same. And ubuntu needs more dev package to be installed than fedora. Thats why I love fedora
So you want to build CyanogenMod and don't know where to start?
I wanted to make a step-by-step guide for installing and configuring everything necessary for building CM9 in a virtual machine (VM) on a Windows machine. There's a scattered information in the forums on most of this, but I wanted to bring it together and share what worked best for me for any newbies who want to try to get their feet wet with AOSP development, or who would just like to be able to have their own up to date builds from source.
Huge thanks go out to dmeadows013 and antp121. It was their guides I started with when doing this myself, and without them, I don't think I would have even known where to begin. Their guides are at http://forum.xda-developers.com/showthread.php?t=1810297 and http://forum.xda-developers.com/showpost.php?p=31530111&postcount=12
This guide is designed to allow people with no Linux or development experience to get up and running as quickly as possible. Though no prior knowledge should be required, I highly recommend that you pay attention to what you are doing, and research or ask about anything you have questions about so that you'll understand the process. I've divided this into multiple parts to make it easier to do in stages.
What you need:
1) A Windows computer, preferably with a CPU that supports hardware virtualization. Most relatively modern processors do, so if you've bought your computer in the last 4 or 5 years, it's probably fine. Without this, you won't be able to run 64-bit or multiple processor VM's. Your Windows OS doesn't have to be 64-bit, your CPU just needs to support hardware virtualization. I won't say that this will not work on a 32-bit VM, but I've never tried it, so I can't support it if it doesn't. If you want to try, just replace all of the references to 64-bit in this guide with 32-bit.
2) Plenty of memory. I recommend at least 4GB on the host computer. You can make it work on less, but more is better.
3) At least 60GB of free hard drive space during the install, at least 50GB of which will be used permanently.
4) Plenty of time on your hands. You don't want to be rushed while you're doing this the first time.
Preliminaries:
1) Go to https://www.virtualbox.org/wiki/Downloads and download the latest version of VirtualBox for Windows hosts. The current version as of this writing is 4.2.
2) From the same website, download the latest version of the Virtual Box Extension Pack.
3) Go to http://www.ubuntu.com/download/desktop and download the 64-bit version of Ubuntu Desktop 12.04.1 LTS. This version will be supported for at least two years and will provide a stable OS base for at least that length of time.
Install and configure VirtualBox:
1) Run the VirtualBox installer executable you downloaded in the preliminaries section. Choose the default options at every prompt.
2) During the installation, the software will ask you for permission to install drivers. Choose install when it asks.
3) When the installation is complete, uncheck the box to start the application, then click Finish.
4) Run the VirtualBox Extension Pack installer that you downloaded in the preliminaries, and click Install and Agree.
5) From the VirtualBox Manager, click New
6) Name your machine whatever you wish (Android Build Box, for example), select Linux as the type, and Ubuntu (64-bit) as the version. Click Next
7) Give the machine as much memory as you can spare and click Next. I've found myself to need at least 1536MB (1.5GB) as a minimum to build with. More memory will result in a faster build time. If you intend to give the machine more than one processor, you need to give it more memory as well.
8) On the Hard drive prompt, click Create
9) Choose VDI and click Next
10) Choose Dynamically allocated and click Next
11) Give the drive at least 50GB of space and click Create. As always, more is better. 50GB will give you enough room to work on a single copy of CM9 with a little breathing room. You need more if you want to work on multiple copies.
12) Choose your VM and click Settings
13) Click the Advanced tab in General settings. Set Shared Clipboard to Bidirectional. This will allow you to copy and paste between the virtual machine and your Windows host.
14) If you wish to give your VM access to more than one processor, click on System, then choose the Processor tab. Select the number of processors you wish your VM to use.
15) Click OK. Your VM is now configured.
Install Ubuntu 12.04.1:
1) In the VirtualBox Manager, choose your VM and click Settings.
2) Click Storage.
3) Click Empty, underneath the IDE Controller entry.
4) On the far right, under Attributes, click the small CD icon and click "Choose a virtual CD/DVD disk file..."
5) Choose the file ubuntu-12.04.1-desktop-amd64.iso that you downloaded earlier
6) Click OK
7) Make sure your VM is selected, and click Start.
8) As it boots, confirm the messages that appear, click "Do not show this message again" if desired.
9) After a few minutes, the VM will boot to a selection screen. Choose Install Ubuntu.
10) Click Download updates while installing and Install this third party software. Click Continue.
11) Leave Erase disk and install Ubuntu checked, then click Continue. This will only erase the virtual drive.
12) Click Install Now.
13) Choose your time zone and click Continue.
14) Choose your keyboard layout and click Continue.
15) Set up your username, password, and a machine name. REMEMBER THIS PASSWORD. You will need it, even if you enable Log in automatically. Click Continue.
16) Now sit back and relax. The installation will take a while.
17) When installation is complete, click Restart Now
18) When prompted, press Enter
19) The VM will reboot into your new Ubuntu installation.
A note about your new VM installation of Ubuntu: This is just like any other computer and should be treated as such. It needs to be properly shut down to prevent disk corruption. To shut down the system, click the gear icon in the upper right and choose Shut down. You should also keep the system properly updated, because when it is running, it is just as accessible to the Internet as any other computer on your network, so keep the security updates installed as you are notified.
Update Ubuntu 12.04.1 and install Guest Additions:
1) Log into your system with the user you created during installation. Ignore any warnings you may get about new drivers being available. We will take care of that in a bit.
2) Click the top icon of the sidebar (Dash Home), type update, and click Update Manager.
3) Click Install Updates
4) When prompted, enter your user password.
5) When updating is complete, click Restart Now
6) After restart, log back in.
7) In the VM Window menu, click Devices, then click Install Guest Additions...
8) Click Run and enter your password when prompted.
9) After process completes, reboot by clicking the gear in the upper right corner, clicking Shut Down, and clicking Restart.
Configure your build environment
1) Log into your Ubutntu system, open Firefox from the sidebar and go to http://www.oracle.com/technetwork/java/javase/downloads/jdk6u35-downloads-1836443.html
2) Click agree and download jdk-6u35-linux-x64.bin
3) Click on Dash Home, type terminal, and open the Terminal app.
4) Right click on Terminal in the sidebar and select Lock to Launcher.
5) Retrieve the build tools:
Code:
sudo apt-get install git-core 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 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool gcc-multilib g++-multilib pngcrush g++ gcc dpkg-dev
6) Unpack Java by typing the following commands in terminal:
Code:
chmod a+x ~/Downloads/jdk-6u35-linux-x64.bin
sudo mv ~/Downloads/jdk-6u35-linux-x64.bin /usr/lib
cd /usr/lib
sudo ./jdk-6u35-linux-x64.bin
7) Install Java by executing the following commands:
Code:
sudo mv jdk1.6.0_35/ jvm/
sudo rm jdk-6u35-linux-x64.bin
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_35/jre/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_35/bin/javac 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_35/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_35/bin/javadoc 1
8) Make Java 1.6 the default by typing the following commands individually, and selecing the jdk1.6.0_35 line in each (typically number 2):
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc
Create the build directories and retrieve the code:
1) Log into your Ubuntu system and open a terminal window
2) Create your build directories:
Code:
mkdir ~/android ~/android/bin ~/android/cm-10.1
3) Open your profile config:
Code:
gedit ~/.bashrc
4) Insert the following into the end of your profile:
Code:
ANDROID_JAVA_HOME=/usr/lib/jvm/jdk1.6.0_35
export ANDROID_JAVA_HOME
PATH=~/android/bin:$PATH
export PATH
5) To reload your profile, exit your terminal window and open a new one.
6) Download the repo binary:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/android/bin/repo
chmod a+x ~/android/bin/repo
7) Initialize and sync the repo (download the code). This will typically take a couple of hours the first time you run it:
Code:
cd ~/android/cm-10.1
repo init -u git://github.com/Chad0989/android.git -b cm-10.1
repo sync
8) Retrieve the prebuilts:
Code:
./vendor/cm/get-prebuilts
Build CM10.1
1) Now, all that's left is to build. If you want to get the latest code, run another repo sync (included here). It only retreives changes, so it should only take a few minutes from now on. Ignore warnings and let it build. As long as it doesn't crash, you're fine. It can take anywhere from an hour to half a day, depending on the resources you gave the VM:
Code:
cd ~/android/cm-10.1
repo sync
. build/envsetup.sh
make clobber
brunch vigor
2) Go get your freshly baked CM10.1 from ~/android/cm-10.1/out/target/product/vigor.
I hope this is useful for someone. This guide is the result of several days of learning on my part, and several hours of writing. If there is anything that doesn't work, let me know. I will probably be cleaning it up a bit in the near future, and I may add an FAQ and/or glossary if it appears that one is needed. I'll also attempt to keep it updated with the newest versions of the tools. Thanks for reading, and have fun building.
Special thanks to:
dmeadows013 and antp121 - For providing the guides that got me started. I couldn't have done any of this without you.
chad0989 - For AOSP on the Rezound.
IAmTheOneTheyCallNeo - For answering my stupid questions and inspiring me to get more involved
Snuzzo - For answering more stupid questions and giving more inspiration
synisterwolf - For being generally awesome and putting up with me in chat
puhleez - Who's environment issues inspired me to make this guide
Alternate instructions for setting up Debian:
After some discussions in the thread, I decided to switch to Debian for my build environment, because I hate Unity, and I've always liked Debian better anyway for a work system. I still recommend Ubuntu for most people, as it is the most noob friendly Linux build out there. If you're going to use Debian, or most of the other builds, you need a better understanding of the security model and an expectation that it's going to take a little more front end setup (that isn't covered here). However, if you want to use Debian, the instructions to configure the build environment are mostly the same. The only difference is the retrieval of the build tools. Debian names their 32-bit packages differently, so it changes to this:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev lib32ncurses5-dev x11proto-core-dev lib32libreadline6-dev libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc lib32z1-dev schedtool gcc-multilib g++-multilib pngcrush
Alternate instructions for building PAC-man:
The guide will be the same until the point where you initialize the repo (Create the build directories and retrieve the code, step 7). Instead of those steps, do the following:
Code:
mkdir ~/android/pac
cd ~/android/pac
repo init -u git://github.com/PAC-man/android.git -b cm-10.1
repo sync
There is no need to retrieve the prebuilts or set up the environment for PAC. The build script will do everything. To build, just do this:
Code:
cd ~/android/pac
repo sync
make clobber
./build-pac.sh vigor
Since this is a multi-device repo, the initial build will take a little longer, because the script will retrieve the missing pieces for vigor, and replace some things that are little different for us than the standard, but the build itself should be around the same time as a stock CM10.1 build.
This is pretty sweet. Thanks for this. When im bored at work next week I def give this a go.
Ive been wanting to try this but I don't think my little dual core laptop is up to it lol. Thanks for the write up
Sent from my ADR6425LVW using Tapatalk 2
Thank you. Now I can refer people to this page. I have never done it in a virtual box.
This is awesome Shrike. It will help encourage people to get into building roms that wouldn't have otherwise run across it. Things like this help to continue the android hobby and lifestyle that so many of us enjoy.
If anyone here is interested in setting up a VPS on our server so they can build roms on a virtual build box even if they don't have a powerful computer, just let me know.
Thank you so much. Too many people bothering me on gtalk about this.
This is an awesome guide. Definitely need start getting invovled with developing for Android. It would be cool we could get a guide on how to do this with the linaro tool chain also.
Great work and thanks for contributing
awesome going to read this later. thanks for the guide.
Wow man. I can' t thank you enough for spending the time to put this together. I struggled with getting it to work and after many attempts just gave up. I'll definitely be trying again, maybe this afternoon.
Thanks again!!
Thank you for this. I am working through the procedure now. Other than the location of the jvm in the initial install everything is looking good (details will follow when I confirm it wasn't an ID10T error on my part).
---------- Post added at 04:16 PM ---------- Previous post was at 04:11 PM ----------
merashallan said:
Thank you for this. I am working through the procedure now. Other than the location of the jvm in the initial install everything is looking good (details will follow when I confirm it wasn't an ID10T error on my part).
Click to expand...
Click to collapse
I figured out the problem. If you install the Oracle java before you install all the additional packages there will not be a directory named /usr/lib/jvm as the openjdk has not yet been installed. This also means you have to repeat step 7 after step 8 since there are no alternatives to Oracle java before step 7.
I think if you perform step 8 before step 5 the procedure will work.
Anyways it's looking like a good guide so far as it's saving me lots of time figuring out what I need.
doing my repo sync right meow.
merashallan said:
Thank you for this. I am working through the procedure now. Other than the location of the jvm in the initial install everything is looking good (details will follow when I confirm it wasn't an ID10T error on my part).
---------- Post added at 04:16 PM ---------- Previous post was at 04:11 PM ----------
I figured out the problem. If you install the Oracle java before you install all the additional packages there will not be a directory named /usr/lib/jvm as the openjdk has not yet been installed. This also means you have to repeat step 7 after step 8 since there are no alternatives to Oracle java before step 7.
I think if you perform step 8 before step 5 the procedure will work.
Anyways it's looking like a good guide so far as it's saving me lots of time figuring out what I need.
Click to expand...
Click to collapse
Thanks for the feedback. I've incorporated it in the the document.
This is awesome. I've always wondered how to go about compiling and such, but didn't want to bug any of the developers. This is definitely a start into developing! Thank you
Deleted
When you repo sync, where is the data supposed to go? in the root of HOME or in ANDROID/CM9? Mine went into the root of HOME.
h4ckers said:
When you repo sync, where is the data supposed to go? in the root of HOME or in ANDROID/CM9? Mine went into the root of HOME.
Click to expand...
Click to collapse
It should go to ~/android/cm9. There was a typo in step 7 of the build directory setup. Sorry about that. Fixed now.
nice job man
shrike1978 said:
It should go to ~/android/cm9. There was a typo in step 7 of the build directory setup. Sorry about that. Fixed now.
Click to expand...
Click to collapse
I noticed that. I copied everything to where it needs to go. Did this command again to make sure I had all the changes:
Code:
cd ~/android/cm9
repo sync
Still went to the root of HOME. Strange. After building a test, I will see what else I can do to fix my issue. Thanks for the guide and by chance do you know where to pull AOKP and MIUI? I saw Dmeadows' git but didn't know what to pull.
h4ckers said:
I noticed that. I copied everything to where it needs to go. Did this command again to make sure I had all the changes:
Code:
cd ~/android/cm9
repo sync
Still went to the root of HOME. Strange. After building a test, I will see what else I can do to fix my issue. Thanks for the guide and by chance do you know where to pull AOKP and MIUI? I saw Dmeadows' git but didn't know what to pull.
Click to expand...
Click to collapse
I haven't tried to build either yet, so I haven't the foggiest where to start. TBH, I'm not a particularly big fan of either, so I've never really looked into it. However, the build environment should be sane to build them if you can figure out where to get them and what code you need to merge.
How To Compile TWRP Recovery For QVGA And Other Unsupported Devices
Guys a humble request don't spam this thread. If you face any error reply to this thread or PM me i will help and after you build it please don't post your bugs here this thread is only for compiling and not for resolving bugs in your build. I can only help with the errors you face during compilation because i faced a lot .
I thank XDA members cybojenix, kD as i got an idea of how to make guides from them
I would also thank Dees_troy for the sources.
I have worked hard in creating this guide so when you release your build please give proper credits .
Click to expand...
Click to collapse
Minimum Requirements:-
1. RAM:- 4GB
2. HDD Space:- More than 18GB required for CM7 source code (I am going to use CM7 for this guide as CM9 is not yet supported for many devices).
3. Processor:- Equal to Core 2 Duo or Anything above it.
4. Internet Speed:- Minimum of 2 Mbps as we will be downloading files of large size.
5. Patience:- A lots of it needed to get success
Click to expand...
Click to collapse
Ok Lets Start With Step 1:- Setting Up Your Computer For Development.
Getting Linux
Please note your PC/Laptop must satisfy the minimum requirements to continue. If it doesn't contact any person who is developing for your device to develop this.
Click to expand...
Click to collapse
For compiling you need Linux the most common and free Linux available for development is Ubuntu. Go ahead choose your version and download it.
If you wish to use Ubuntu 10.04 64-Bit for Development use this link
http://releases.ubuntu.com/lucid/ubuntu-10.04.4-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 10.10 64-Bit for Development use this link
http://releases.ubuntu.com/maverick/ubuntu-10.10-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 11.04 64-Bit for Development use this link
http://releases.ubuntu.com/natty/ubuntu-11.04-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 11.10 64-Bit for Development use this link
http://releases.ubuntu.com/oneiric/ubuntu-11.10-desktop-amd64.iso
Click to expand...
Click to collapse
If you wish to use Ubuntu 12.04 64-Bit for Development use this link
http://releases.ubuntu.com/precise/ubuntu-12.04-desktop-amd64.iso
Click to expand...
Click to collapse
After downloading install it in a Virtual Machine or dual boot it alongside another OS you are using now. If you are using a Virtual Machine make sure you allocate more than 50GB of HDD space.
So far so good now that you have Linux installed :victory: you can proceed to the next step of setting up which is followed in the second post.
Setting Up Your Laptop/PC For Development.
Note:- You may be asked for a password when using sudo command.
Click to expand...
Click to collapse
Installing Python-2.7.5:-
First and foremost is installing Python. For those who are wondering what Python is well here is the answer Python is a language like C,C++,Java which primarily centers around Linux.
1. Open Terminal by hitting Ctrl+Alt+T.
2. Type or copy paste these codes into terminal (I prefer typing though )
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
tar -xvzf Python-2.7.5.tgz
cd Python-2.7.5
./configure --prefix=/usr/local/python2.7
make
sudo make install
sudo ln -s /usr/local/python2.7/bin/python /usr/bin/python2.7
3. Python is now installed to make sure type this code in terminal
Code:
python
and it should produce an output like this
Code:
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or " lincense" for more information.
>>>
4. If it shows something like that you are good to go.
5. Press Ctrl+D, close the terminal and proceed to install Java 6 JDK.
Installing Java 6 JDK:-
I have to thank cybojenix and kD for this part as it is theirs and i didn't write this part .
Click to expand...
Click to collapse
If you are using Ubuntu 12.04 follow these commands others skip this set of commands.
1. Download Java 6 JDK from here.
2. After Downloading copy that to the Downloads folder.
3. Open Terminal.
4. Type these commands one by one in the terminal
Code:
cd Downloads
chmod +x jdk-6u34-linux-x64.bin
sudo ./jdk-6u34-linux-x64.bin
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
If you are not using Ubuntu 12.04 follow these commands:-
1. Open terminal
2. Type these commands one by one in the Terminal.
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
If you had done those steps correctly then you must now have Java installed.
To check and make sure it is installed type this command in terminal.
Code:
java -version
and the output should be
Code:
java version "1.6.0_34"
Java(TM) SE Runtime Environment (build 1.6.0_34-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)
If the output was some thing similar you are now ready to install GNU Make.
Close the Terminal and proceed.
Installing GNU Make 3.81
Note:- Any other version of make either lower or higher won't work for compiling TWRP.
Click to expand...
Click to collapse
1. Open Terminal
2. Type these codes in terminal.
Code:
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.81
./configure
sudo make install
3. That's it now you got make installed.
To check and make sure that Make is installed type this command in Terminal.
Code:
make -v
and it shoud give the output
Code:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This Program built for x86_64-unknown-linux-gnu
If it was something smiliar to that you can close the terminal and proceed to the next step.
Ok now we got the big guns rolling it's now time for small guns without whom we can't compile yes I mean't the dependencies.
Open Terminal and apply these commands:-
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 gedit git schedtool
export USE_CCACHE=1
If you are using Ubuntu 10.10 apply this:-
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
If you are using Ubuntu 11.04 apply this:-
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
sudo apt-get install libx11-dev:i386
If you are using Ubuntu 12.04 apply this:-
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
sudo apt-get install libx11-dev:i386
sudo apt-get install libncurses5-dev:i386 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Good now you will have dependencies installed.
It is now time for SDK and ADB which will be continued in the next post.
Installing SDK and ABD
Installing SDK:-
1. Download Android SDK from here.
2. Extract it to your home folder.
3. Rename the folder to sdk.
4. Open the Terminal and type these commands
Code:
cd sdk/tools
./android sdk
5. A window should popup and there will will be a list of Packages.
6. Install Android SDK Tools and Android SDK Platform-Tools.
Checking ADB:-
Since you installed Android SDK Tools and Android SDK Platform-Tools ADB must now be checked and configured.
1. Enable USB Debugging in your device and connect your phone to computer.
2. Now execute these commands in Terminal
Code:
cd sdk/platform-tools
./adb devices
It should give the output as
Code:
List of devices attached 0123456789ABCDEF device-name (Note the number-letter combination may vary)
If it does give like that skip Adding Permissions.
Or if it gives the output as
Code:
List of devices attached ????????????????? no permissions
Don't worry we have add permission to your device that's it.
Adding Permissions:-
1. Open Terminal
2. Execute this command.
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
3. It should open text editor
4. Paste this line
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666"
5. Replace Vendor ID with your Vendor id given in the list.
For e.g if your vendor is Acer you will replace "xxxx" with "0502"
Here is a list of Vendor ID's
Code:
Acer - 0502
ASUS - 0b05
Dell - 413c
Foxconn - 0489
Fujitsu - 04c5
Fujitsu Toshiba - 04c5
Garmin-Asus - 091e
Google - 18d1
Hisense - 109b
HTC - 0bb4
Huawei - 12d1
K-Touch - 24e3
KT Tech - 2116
Kyocera - 0482
Lenovo -17ef
LG - 1004
Motorola - 22b8
MTK - 0e8d
NEC - 0409
Nook - 2080
Nvidia - 0955
OTGV - 2257
Pantech - 10a9
Pegatron - 1d4d
Philips - 0471
PMC-Sierra - 04da
Qualcomm - 05c6
SK Telesys - 1f53
Samsung - 04e8
Sharp - 04dd
Sony - 054c
Sony Ericsson - 0fce
Teleepoch - 2340
Toshiba - 0930
ZTE - 19d2
6. Save and close the editor.
7. Execute this command in Terminal.
Code:
sudo gedit /etc/udev/rules.d/99-android.rules
8. Again paste this line
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666"
Replace "xxxx" with Vendor ID.
9. Save it and close the file.
10. Execute these commands one by one in the Terminal
Code:
sudo chmod a+r /etc/udev/rules.d/99-android.rules
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Now RESTART your Ubuntu and type these codes in the Terminal.
Code:
cd sdk
./adb devices
You must not get the output with ???????????????? no permission still if you get it please reply below I will help.
Now we need to edit .bashrc so that we can access adb from anywhere
Execute these codes in the Terminal.
Code:
cd
sudo gedit .bashrc
It should open text editor copy paste this line at the end.
Code:
export PATH=${PATH}:~/sdk/tools
export PATH=${PATH}:~/sdk/platform-tools
Save it and close it.
Now in terminal type adb devices it should give output List of devices attached.
That's it you got Ubuntu, Python, Java 6 JDK, GNU Make-3.81, SDK and ADB ready.
Now you are ready to start development go on to the next step to download source code.
Intializing Repo And Download Source Code
Step 2:- Initializing Repository And Downloading Source Code
Initializing Repository
First step is to download the Repo which is essential to download the source code.
1. Open Terminal
2. Execute these commands one by one in Terminal
Code:
mkdir ~/bin
PATH=~/bin:$PATH
sudo apt-get install curl
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Downloading Source Code
After you have initialized the repo you are set to download the source code.
1. Open Terminal
2. Execute these commands one by one in Terminal
Code:
mkdir source
cd source
repo init -u git://github.com/Cyanogenmod/android.git -b gingerbread
sudo sysctl -w net.ipv4.tcp_window_scaling=0
repo sync -jx (Replace x with a number this number corresponds to number simultaneous download you want for e.g if you give 5 it will download 5 files at once so go on increase to whatever you like but be reasonable :D)
The Source Code is around 15GB - 17GB so have patience and more importantly HDD space.
Click to expand...
Click to collapse
.
The download will take hours if you are on slow connection like it will be a 2 days is 512kbps connection so if you are planning to develop please have a good internet connection with a reasonable fast speed. Every developer recommends more than 1Mbps and sometimes 4Mbps.
After downloading is finished go to source folder you must have many folders inside them. Also make a backup of the source folder just in case as we will modifying it so if something goes wrong you don't have to re-download it all again.
Go to the next step to start the actual development.
Modding Files And Stuff
Step 3:- Modding Files And Folders To Make Your Device Supportable.
First up is to compile a build of ClockworkMod.
Building ClockworkMod:-
1. Open Terminal
2. Type these commands one by one in Terminal
Code:
. build/envsetup.sh
lunch (it should show you list of devices select your device with their serial number select your device by typing the serial number)
make clean
make -j4 recoveryimage
If you didn't receive an error you are ready to compile TWRP for your device.
If you do receive and error reply to the post I will help you.
Modifying Files And Folder:-
The original Dees_Troy's build folder isn't gonna work as your device resolution doesn't support it. So I have patched the build folder with some extra libs added to prelink map and patched recovery folder with gui changes for smooth compilation.
If you have experience with using git you can clone the repo or you can download it directly from github.
Click to expand...
Click to collapse
If you are going to clone execute these commands in terminal. (Thanks to cybojenix for this so that there will no manual copying).
Code:
cd source
rm -rf build/
rm -rf bootable/recovery/
git clone git://github.com/chainhacker/TWRP_Build -b 2.3 build
git clone git://github.com/chainhacker/TWRP_Recovery -b 2.3 bootable/recovery
If you are going to download directly use the following link make sure you are downloading 2.3 branch and extract it.
Here is the link for the patched build folder------>TWRP_Build
Here is the link for the patched recovery folder------>TWRP_Recovery
After you have done downloading from the above two files.
Replace the contents of source/build folder with the patched one.
Similarly replace the contents of source/bootable/recovery folder with the patched one.
I have 240x320 resolution already in the patched ones but if your device is not 240x320 and also not supported by TWRP download a theme made by other members which has your device's resolution or create a theme. I didn't create the theme though I resized the images and made changes in ui.xml. If you are interested in theming follow the official TWRP theming guide in their website.
If you did find a theme or created it rename the theme folder to your device resolution folder for e.g. If your device resolution is 320x240 you would rename the folder as 320x240.
Copy the theme folder into source/bootable/recovery/gui/devices.
That's it finished the basic requirements next up is configuring BoardConfig.mk.
Editing BoardConfig.mk:-
1. Navigate to source/device/your_vendor/your_device.
your_vendor:- Vendor of your device e.g for me it is lge.
your_device:- Your device name.
Click to expand...
Click to collapse
2. Find BoardConfig.mk and open it in a text editor.
3. Come to the last and add these line
Code:
#twrp
DEVICE_RESOLUTION:= [I]your_device_resolution[/I] (e.g If your resolution is 240x320 type it)
RECOVERY_GRAPHICS_USE_LINELENGTH := true
2. Save it and close it.
Yay you have finished everything only thing left out is compiling which is carried out in the next post.
Psssst.......
After you have compiled your first successful build here are few other things that you could add to BoardConfig.mk
Note:- You can add this after finishing first successful build of recovery till then avoid these.
Click to expand...
Click to collapse
Code:
RECOVERY_SDCARD_ON_DATA := true -- this enables proper handling of /data/media on devices that have this folder for storage (most Honeycomb and devices that originally shipped with ICS like Galaxy Nexus)
BOARD_HAS_NO_REAL_SDCARD := true -- disables things like sdcard partitioning
TW_INCLUDE_DUMLOCK := true -- includes HTC Dumlock for devices that need it
TARGET_RECOVERY_GUI := true -- uses gui format instead of ui.xml
TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565" -- to change the colour
TARGET_USE_CUSTOM_LUN_FILE_PATH :=/sys/devices/platform/usb_mass_storage/lun0/file
TW_CUSTOM_POWER_BUTTON := 107 -- to get a power button on the home screen of recovery
TW_EXTERNAL_STORAGE_PATH := "/sdcard" -- default external storage path
TW_EXTERNAL_STORAGE_MOUNT_POINT := "sdcard" -- default external mount point
TW_FLASH_FROM_STORAGE := true -- enables you to flash zips form the sdcard (You don't neeed o add this it is activated by default)
TW_HAS_DOWNLOAD_MODE := false -- to enable download or more precisely enabling usb mass storage
TW_HAS_NO_RECOVERY_PARTITION := true -- do this only if you device has no partion to recovery
TW_INCLUDE_CRYPTO := false
TW_INCLUDE_JB_CRYPTO := false
TW_NEVER_UNMOUNT_SYSTEM := true -- always keeps the system mounted
TW_NO_BATT_PERCENT := false -- shows battery percentage
TW_NO_REBOOT_BOOTLOADER := true --- disables rebooting into bootloader
TW_NO_USB_STORAGE := false -- disabled usb storage
TW_SDEXT_NO_EXT4 := false
Compiling Recovery
Step 4:- Compiling Recovery
Finally you have come to the final part of the guide which is compiling recovery.
1. Open Terminal.
2. Execute these commands in Terminal
Code:
. build/envsetup.sh
lunch (Again select your device)
make -j4 recoveryimage
.
That's it when it is finished grab recovery.img from:
out/target/product/your_product_name/recovery.img
Flash it in your device test it fix the bugs and release it.
Wait if you don't want flash and just see how it looks so that you can flash another recovery if it is not working do these
I am not resposible if your device gets bricked in fastboot mode but mostly it won't happen though
Click to expand...
Click to collapse
1. Copy the recovery.img to sdk/platform-tools
2. Boot your device into fastboot mode.
3. Open Terminal
4. Execute these commands one by one in Terminal
Code:
fastboot devices (wait for your device to show up int terminal)
fastboot boot recovery.img
You can test out all the features except flash zip, backup and restore.
Victory :victory: you have successfully compiled TWRP recovery for your device go ahead have fun and enjoy.
If you really like my work express your gratitude by pressing the Thanks button. See you soon in another thread :victory: :laugh: :fingers-crossed:
Click to expand...
Click to collapse
Reserved
reserved just in case :fingers-crossed:
Contributions
You can Contribute to this guide by suggesting improvements and stuff are welcome PM about the contribution and i will add by giving credits to the person contributed
Does it make any difference if I want to compile it for an ARMV6 device?
Gesendet von meinem Skate mit Tapatalk 4 Beta
Joe4899 said:
Does it make any difference if I want to compile it for an ARMV6 device?
Gesendet von meinem Skate mit Tapatalk 4 Beta
Click to expand...
Click to collapse
Nope it won't make any difference it is just the same even if your device is ARMv6 or ARMv7. Make sure your device is supported by CM
Chain Hacker said:
Nope it won't make any difference it is just the same even if your device is ARMv6 or ARMv7. Make sure your device is supported by CM
Click to expand...
Click to collapse
i'm wondering if it will work for Tegra's device
666satyr666 said:
i'm wondering if it will work for Tegra's device
Click to expand...
Click to collapse
Yes it will work go ahead give it a shot :good:
So that's me again :laugh: Wanted to compile TWRP 2.6.0.0 for cm10.1 so I have set up everything so far but get an error when I try to compile
build/core/base_rules.mk:130: *** external/fuse/lib: MODULE.TARGET.STATIC_LIBRARIES.libfuse already defined by bootable/recovery/fuse.
Click to expand...
Click to collapse
Seems to be really stupid, so far I understand is the libfuse defined twice in recovery and base_rules.mk so think (thought ) it's an easy part - just to remove this libfuse from one of them... But I can't find something with "libfuse", "static libraries" or anything like that in base_rules.mk
Joe4899 said:
So that's me again :laugh: Wanted to compile TWRP 2.6.0.0 for cm10.1 so I have set up everything so far but get an error when I try to compile
Seems to be really stupid, so far I understand is the libfuse defined twice in recovery and base_rules.mk so think (thought ) it's an easy part - just to remove this libfuse from one of them... But I can't find something with "libfuse", "static libraries" or anything like that in base_rules.mk
Click to expand...
Click to collapse
I have never tried compiling 2.6.0.0 because Dees_Troy is evaluating my theme for my device such that it gets official support so if you are ready to use CM7 and TWRP 2.3.3.0 you can follow my guide and i can help you with the errors but any other version please ask Dees_Troy for the solution.
How I compile twrp if my phone is not officially/unofficially supported?is it possible?
Sended from my ascend g330 using tapatalk 4 [VIP]
andrea210701 said:
How I compile twrp if my phone is not officially/unofficially supported?is it possible?
Sended from my ascend g330 using tapatalk 4 [VIP]
Click to expand...
Click to collapse
It is possible after successful build with no bugs you can contact Dees_Troy for evaluation and get official support.
Sent from my LG-P350 using Tapatalk 2
Error detected
Hi, Chain Hacker.
Does it matter how to write address after "git://"?
I mean this:
Code:
[B]repo init -u git://github.com/Cyanogenmod/android.git -b gingerbread[/B]
Should it be like this:
Code:
[B]repo init -u git://github.com/Cyanogen[COLOR="Red"]M[/COLOR]od/android.git -b gingerbread[/B]
By the way, it's a very good manual for those who are just starting to understand how to compile
maximik1980 said:
Hi, Chain Hacker.
Does it matter how to write address after "git://"?
I mean this:
Code:
[B]repo init -u git://github.com/Cyanogenmod/android.git -b gingerbread[/B]
Should it be like this:
Code:
[B]repo init -u git://github.com/Cyanogen[COLOR="Red"]M[/COLOR]od/android.git -b gingerbread[/B]
By the way, it's a very good manual for those who are just starting to understand how to compile
Click to expand...
Click to collapse
No i doesnt matter at all the only thing that is case sensitive are the words after cyanogenmod as they must be written as it is so it is your wish whether you are gonna write Cyanogenmod or CyanogenMod and by the way thanks for the complement
Sent from my LG-P350 using Tapatalk 2
TWRP Recovery size...
Hi again...
I've managed to compile a TWRP-Recovery 2.6.0.1 based on CM9 for my Huawei Ascend Y101 (8186).
But I had to change recovery partition size in BoardConfig.mk (originally it was BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000, I changed it to 0x00600000), because without these changes it wasn't possible to build a recovery.img ("recovery.img is too large... etc.")
When I flashed it on my device, the TWRP recovery started and worked perfectly, but I wasn't able to boot my device. But it's not a problem for me, I understand why it wasn't able to boot very good.
The question is the following: is it possible to decrease somehow the source files' sizes of TWRP recovery (maybe images, don't know...) in order to compile the recovery.img that would be less than 4.85 MB (actually it's size is 5*095*424, it's more than my recovery partition....... )
By the way, the size of a CWM-recovery (cm9) that I've compiled is 4*489*216, so it fits like a glove :good: and works fine...
Thanks in advance. I understand that you compiled a TWPR recovery based on CM7, but I don't see much differences...
maximik1980 said:
Hi again...
I've managed to compile a TWRP-Recovery 2.6.0.1 based on CM9 for my Huawei Ascend Y101 (8186).
But I had to change recovery partition size in BoardConfig.mk (originally it was BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000, I changed it to 0x00600000), because without these changes it wasn't possible to build a recovery.img ("recovery.img is too large... etc.")
When I flashed it on my device, the TWRP recovery started and worked perfectly, but I wasn't able to boot my device. But it's not a problem for me, I understand why it wasn't able to boot very good.
The question is the following: is it possible to decrease somehow the source files' sizes of TWRP recovery (maybe images, don't know...) in order to compile the recovery.img that would be less than 4.85 MB (actually it's size is 5*095*424, it's more than my recovery partition....... )
By the way, the size of a CWM-recovery (cm9) that I've compiled is 4*489*216, so it fits like a glove :good: and works fine...
Thanks in advance. I understand that you compiled a TWPR recovery based on CM7, but I don't see much differences...
Click to expand...
Click to collapse
The difference is no on the source dude so relax. You have to modify your kernel and change the compression method to lzma. Contact Dees_Troy for this because i dont know how to change it. You can chat with him through IRC.
How can I build kernel with fixed screen calib?
a little work (your work) can change your life
1. download Builduntu - Preconfigured Android Compile Environment v2.1:
http://forum.xda-developers.com/showthread.php?t=2585828
do not forget to hit the thanks button
2. Set up a VM machine in VMplayer or VirtualBox
3. Open terminal and type (or paste):
cd ~
mkdir wave
cd wave
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
cd .repo
wget https://raw.github.com/Badadroid/android_wave_local_manifest/cm-11.0/local_manifest.xml
cd ..
repo sync -j8
4. wait
5. find proper file, change it
6. Open terminal and type (or paste):
cd wave
cd vendor/cm/
./get-prebuilts
cd ../../
. build/envsetup.sh
brunch wave
7. wait
8. enjoy
Pro tip:
if your processor supports virtualization, check if it's enabled in bios, it improve performance of VM
Agasharr said:
a little work (your work) can change your life
1. download Builduntu - Preconfigured Android Compile Environment v2.1:
http://forum.xda-developers.com/showthread.php?t=2585828
do not forget to hit the thanks button
2. Set up a VM machine in VMplayer or VirtualBox
3. Open terminal and type (or paste):
cd ~
mkdir wave
cd wave
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
cd .repo
wget https://raw.github.com/Badadroid/android_wave_local_manifest/cm-11.0/local_manifest.xml
cd ..
repo sync -j8
4. wait
5. find proper file, change it
6. Open terminal and type (or paste):
cd vendor/cm/
./get-prebuilts
cd ../../
. build/envsetup.sh
brunch wave
7. wait
8. enjoy
Pro tip:
if your processor supports virtualization, check if it's enabled in bios, it improve performance of VM
Click to expand...
Click to collapse
Hmmm.... can you make a kernel for neeraj ??? you know unix.... and change as per krishchat kernel....
Agasharr said:
a little work (your work) can change your life
1. download Builduntu - Preconfigured Android Compile Environment v2.1:
http://forum.xda-developers.com/showthread.php?t=2585828
do not forget to hit the thanks button
2. Set up a VM machine in VMplayer or VirtualBox
3. Open terminal and type (or paste):
cd ~
mkdir wave
cd wave
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
cd .repo
wget https://raw.github.com/Badadroid/android_wave_local_manifest/cm-11.0/local_manifest.xml
cd ..
repo sync -j8
4. wait
5. find proper file, change it
6. Open terminal and type (or paste):
cd wave
cd vendor/cm/
./get-prebuilts
cd ../../
. build/envsetup.sh
brunch wave
7. wait
8. enjoy
Pro tip:
if your processor supports virtualization, check if it's enabled in bios, it improve performance of VM
Click to expand...
Click to collapse
thank you very much sir,i shall remain grateful to you, already i have started downloading,it will take about 9 hrs
It's my humble request to all the developers to consider my request of screen calibration fix while making new kernel.
i tried each and every thing to do it myself,but failed.I was busy in same for 9-10 days,and resulted into nothing,i dont know how to compile kernel
neeraj797 said:
It's my humble request to all the developers to consider my request of screen calibration fix while making new kernel.
i tried each and every thing to do it myself,but failed.I was busy in same for 9-10 days,and resulted into nothing,i dont know how to compile kernel
Click to expand...
Click to collapse
To compile kernel only, see here : http://forum.xda-developers.com/showthread.php?t=2276481 step 1-6
zImage will be in ~yourdirectory/out/prouct/target/wave
i dont know how to compile kernel
Click to expand...
Click to collapse
I have the same problem.
http://forum.xda-developers.com/showthread.php?t=2276481
http://forum.xda-developers.com/showthread.php?t=1697618
Please, feel free to learn MORE.
Instead yelling, begging... be an b.p in a
There are many different ways to solve problems...
Please accept, that not many users have the same problem like you...
So you are not priority number 1.
Thanx for reading.
Best Regards
Agasharr said:
a little work (your work) can change your life
1. download Builduntu - Preconfigured Android Compile Environment v2.1:
http://forum.xda-developers.com/showthread.php?t=2585828
do not forget to hit the thanks button
2. Set up a VM machine in VMplayer or VirtualBox
3. Open terminal and type (or paste):
cd ~
mkdir wave
cd wave
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
cd .repo
wget https://raw.github.com/Badadroid/android_wave_local_manifest/cm-11.0/local_manifest.xml
cd ..
repo sync -j8
4. wait
5. find proper file, change it
6. Open terminal and type (or paste):
cd wave
cd vendor/cm/
./get-prebuilts
cd ../../
. build/envsetup.sh
brunch wave
7. wait
8. enjoy
Pro tip:
if your processor supports virtualization, check if it's enabled in bios, it improve performance of VM
Click to expand...
Click to collapse
builduntu not installing,i kept on trying for many days using different combinations and tools.tell me whether can't we do same thing using any other linux os?
neeraj797 said:
builduntu not installing,i kept on trying for many days using different combinations and tools.tell me whether can't we do same thing using any other linux os?
Click to expand...
Click to collapse
For the virtual box? Why not running an Ubuntu live CD?
(....or even better: installing Ubuntu aside Windows....)
(....or even even better: replacing Windows with Ubuntu ....)
neeraj797 said:
builduntu not installing,i kept on trying for many days using different combinations and tools.tell me whether can't we do same thing using any other linux os?
Click to expand...
Click to collapse
Ubuntu 12.04 64 bit is the better. (64 bit is needed)
Then follow this http://forum.xda-developers.com/showthread.php?t=2276481 step 1 and 2 (and maybe step 3) to set up build environment. Then follow what Agasharr says (from cd~)
To build kernel only, after ". build/envsetup.sh" :
lunch cm_wave-userdebug
make bootimage
BenzoX said:
Ubuntu 12.04 64 bit is the better. (64 bit is needed)
Then follow this http://forum.xda-developers.com/showthread.php?t=2276481 step 1 and 2 (and maybe step 3) to set up build environment. Then follow what Agasharr says (from cd~)
To build kernel only, after ". build/envsetup.sh" :
lunch cm_wave-userdebug
make bootimage
Click to expand...
Click to collapse
This will not work if you are running ubuntu via VMware or virtual box. Tried it on 13.10 eventhough the guide recommends 12.04 but i think the problem persists with every version. I suggest builduntu if you are using a virtual machine.
aashil16 said:
This will not work if you are running ubuntu via VMware or virtual box. Tried it on 13.10 eventhough the guide recommends 12.04 but i think the problem persists with every version. I suggest builduntu if you are using a virtual machine.
Click to expand...
Click to collapse
boss,already tried builuntu,but it did not work.a guy replied to me and said that this is because my processor is pentium and the oldest supported is core 2 duo
neeraj797 said:
boss,already tried builuntu,but it did not work.a guy replied to me and said that this is because my processor is pentium and the oldest supported is core 2 duo
Click to expand...
Click to collapse
Make a dual boot Ubuntu Windows. You'll need 40 Go for ubuntu (windows 7 included disk utility can shrink partition size so you don't even need to format your hard drive).
Agasharr said:
a little work (your work) can change your life
1. download Builduntu - Preconfigured Android Compile Environment v2.1:
http://forum.xda-developers.com/showthread.php?t=2585828
do not forget to hit the thanks button
2. Set up a VM machine in VMplayer or VirtualBox
3. Open terminal and type (or paste):
cd ~
mkdir wave
cd wave
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
cd .repo
wget https://raw.github.com/Badadroid/android_wave_local_manifest/cm-11.0/local_manifest.xml
cd ..
repo sync -j8
4. wait
5. find proper file, change it
6. Open terminal and type (or paste):
cd wave
cd vendor/cm/
./get-prebuilts
cd ../../
. build/envsetup.sh
brunch wave
7. wait
8. enjoy
Pro tip:
if your processor supports virtualization, check if it's enabled in bios, it improve performance of VM
Click to expand...
Click to collapse
i am getting following error while copying/pasting your first command.I am using luninux-a debian/ubuntu based os
neeraj797 said:
i am getting following error while copying/pasting your first command.I am using luninux-a debian/ubuntu based os
Click to expand...
Click to collapse
Set up build enviromnent first following steps 1-3 here : http://forum.xda-developers.com/showthread.php?t=2276481
neeraj797 said:
i am getting following error while copying/pasting your first command.I am using luninux-a debian/ubuntu based os
Click to expand...
Click to collapse
http://source.android.com/source/downloading.html
To install Repo:
Make sure you have a bin/ directory in your home directory and that it is included in your path:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Download the Repo tool and ensure that it is executable:
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Click to expand...
Click to collapse
neeraj797 said:
i am getting following error while copying/pasting your first command.I am using luninux-a debian/ubuntu based os
Click to expand...
Click to collapse
Information for you about error no command 'repo' found
I should not say more that Rebellos has already said http://forum.xda-developers.com/showpost.php?p=47926638&postcount=1739, but your screenshot is hard to believe: you are just copying/pasting without understanding you copy from an xda forum and it appears a contracted url with "..."
You are pasting
"wget https://raw.github.com/Badadroid/and...l_manifest.xml"
instead of
"wget https://raw.github.com/Badadroid/android_wave_local_manifest/cm-11.0/local_manifest.xml"
and of course in your screenshot appears a 404 error.
neeraj797 said:
i tried each and every thing to do it myself,but failed.I was busy in same for 9-10 days,and resulted into nothing,i dont know how to compile kernel
Click to expand...
Click to collapse
ash009 said:
I had the same ghost touch problem like u my status bar also kept coming down but the problem has stopped after I installed zendrokat by tigrouzen
Thanks tigrouzen,volk,rebellos and all other developers for making fully functional android for our waves
Sent from my GT-I9000 using xda app-developers app
Click to expand...
Click to collapse
but i face same even in tigrozen's rom too,but little than the roms by volk and rebellos
---------- Post added at 11:15 AM ---------- Previous post was at 11:09 AM ----------
hunktb said:
Information for you about error no command 'repo' found
I should not say more that Rebellos has already said http://forum.xda-developers.com/showpost.php?p=47926638&postcount=1739, but your screenshot is hard to believe: you are just copying/pasting without understanding you copy from an xda forum and it appears a contracted url with "..."
You are pasting
"wget https://raw.github.com/Badadroid/and...l_manifest.xml"
instead of
"wget https://raw.github.com/Badadroid/android_wave_local_manifest/cm-11.0/local_manifest.xml"
and of course in your screenshot appears a 404 error.
Click to expand...
Click to collapse
thanks a lot for finding mistake
---------- Post added at 11:17 AM ---------- Previous post was at 11:15 AM ----------
adfree said:
@ neeraj797
You can create new Thread if you want... or use my or others about compiling...
But this here is from volk204 about:
Code:
[ROM][WIP] CM11 Badadroid v4.1.1
Thanx.
Best Regards
Click to expand...
Click to collapse
sorry,what is that code about?how can i use it
Agasharr said:
http://source.android.com/source/downloading.html
Click to expand...
Click to collapse
your point 4 said "choose appropriate file",how can i do so here? is this error coz of repo command??????????
Hi there!
Following the hadk pdf from jolla porting guide.
I've got the sailfishos working on terminal android running. Booting on top attempting since monday tonight.
I'll explain more and I'll give more shots on working.
My issue now is to build the boot, recovery image to flash and boot it. The jolla sailfishos as a GUI operating system on Galaxy S3 I9300 model.
FIY : filename = sfa-i9300-ea-1.0.8.19-my1.tar.bz2
Instructions for chroot co,pilation on ubuntu amd64 x86_64 bit:
Code:
sudo mkdir -p /srv/mer/
mkdir -p $HOME/mer/
nano .bashrc
export $MER_ROOT=/srv/mer/
export $MER_ROOT=$HOME/mer/
ctrl +x to save and y
but type sudo apt-get install -y curl
for do the downloading file.
next do the following commands on terminal:
export $MER_ROOT=/srv/mer/
cd $HOME; curl -k -O https://img.merproject.org/images/mer-sdk/mer-i486-latest-sdk-rolling-chroot-armv7hl-sb2.tar.bz2 ;
sudo mkdir -p $MER_ROOT/sdks/sdk ;
cd $MER_ROOT/sdks/sdk ;
sudo tar --numeric-owner -p -xjf $HOME/mer-i486-latest-sdk-rolling-chroot-armv7hl-sb2.tar.bz2 ;
echo "export MER_ROOT=$MER_ROOT" >> ~/.bashrc
echo 'alias sdk=$MER_ROOT/sdks/sdk/mer-sdk-chroot' >> ~/.bashrc ; exec bash ;
echo 'PS1="MerSDK $PS1"' >> ~/.mersdk.profile ;
sdk
Now, do the following instructions:
$HOST>
nano $HOME/.hadk.env
export MER_ROOT="[/home/$user]"
export ANDROID_ROOT="$MER_ROOT/android/droid"
export VENDOR="[samsung]"
export DEVICE="[i9300]"
ctrl +x and y for save it.
nano $HOME/.mersdkubu.profile
function hadk() { source $HOME/.hadk.env${1:+.$1}; echo "Env setup for $DEVICE"; }
export PS1="HABUILD_SDK [\${DEVICE}] $PS1"
hadk
save it again
nano $HOME/.mersdk.profile
function hadk() { source $HOME/.hadk.env${1:+.$1}; echo "Env setup for $DEVICE"; }
hadk
now save this file.
Now in ctrl + alt + x, it will show a terminal:
type this:
sdk
type your password
hadk
TARBALL=ubuntu-quantal-android-rootfs.tar.bz2
curl -O http://img.merproject.org/images/mer-hybris/ubu/$TARBALL
UBUNTU_CHROOT=/parentroot/$MER_ROOT/sdks/ubuntu
sudo mkdir -p $UBUNTU_CHROOT
sudo tar --numeric-owner -xvjf $TARBALL -C $UBUNTU_CHROOT
hadk
ubu-chroot -r /parentroot/$MER_ROOT/sdks/ubuntu
exit
git config --global user.name "Your Name"
git config --global user.email "Your email"
back again for
hadk
cd $HOME
mkdir -p $HOME/mer/android/droid
repo init -u git://github.com/mer-hybris/android.git -b hybris-10.1
repo sync
after this, you will have HABUILD_SDK
DEVICE=i9300
export $DEVICE
source build/envsetup.sh
breakfast $DEVICE
now type
make hybris-hal
But now as a ota file for flashing on i9300, in this last 2 days in my laptop core2Duo Extreme I'm facing overheating.
So, everyone can test it.
Code:
A little change on mount fixups.
Go to the directory hybris/hybris-boot
nano mount-fixups on i9305| encore)
put the "i9305" | "encore" | "i9300")
Script for booting sailfishingos on an android terminal. This script is to mount the binds folders and for fixing for preventing the /dev/null issue when we all boot the chroot sailfishos.
name of the script : sailfishos.sh - made it on the /extsdCard/ folder.
1) nano /extSdCard/sailfishos.sh and copy the following code
2) ctrl +x to save it
3) bash sailfishos.sh
Code:
su
mount -o bind /dev /data/.stowaways/sailfishos/dev
mount -o bind /proc /data/.stowaways/sailfishos/proc
mount -o bind /sys/ /data/.stowaways/sailfishos/sys
chroot /data/.stowaways/sailfishos/ /bin/su -
echo "nameserver 8.8.8.8" > /etc/resolv.conf
Code:
Procedures:
1) get cm 10.1 flash it.
2) recovery mode to flash it.
3) download my sailfish i9300 tar.bz2 from d-h.st
4) Copy it for your /extSdCard
Code:
Procedures inside adb:
1) sudo adb kill-server
2) sudo adb start-server
3) adb devices
4) adb shell
5) su
6) cd /extSdCard/
8) mkdir -p /data/.stowaways/sailfishos
8) tar --numeric-owner -xvf filename -C /data/.stowaways/sailfishos
9) mount -o bind /dev /data/.stowaways/sailfishos/dev
10) mount -o bind /proc /data/.stowaways/sailfishos/proc
11) mount -o bind /sys /data/.stowaways/sailfishos/sys
finally:
chroot /data/.stawaways/sailfishos/ /bin/su-
you'll see sailfish os version something 15
try this on it:
cd /
ls
[LINK] http://d-h.st/gX5 [/LINK]
See folders on it.
PS: I'll give more shots also more instructions very soon. Thanx.
Another PS: I'll give more news about Jolla sailfish os very soon.
But I need to tell this, I've got i9300 defconfig kernel for Jolla sailfishos very similar to defconfig i9305 kernel and I got it compiled with very success on hadk Ubuntu chroot on mine Ubuntu 14.04 LTS version.
astronfestmon said:
Hi there!
Following the hadk pdf from jolla porting guide.
I've got the sailfishos working on terminal android running. Booting on top attemptinh since yesterday tonight.
Code:
Procedures:
1) get cm 10.1 flash it.
2) recovery mode to flash it.
3) download my sailfish i9300 tar.bz2 from d-h.st
4) Copy it for your /extSdCard
Code:
Procedures inside adb:
1) sudo adb kill-server
2) sudo adb start-server
3) adb devices
4) adb shell
5) su
6) cd /extSdCard/
8) mkdir -p /data/.stowaways/sailfishos
8) tar --numeric-owner -xvf filename -C /data/.stowaways/sailfishos
9) mount -o bind /dev /data/.stowaways/sailfishos/dev
10) mount -o bind /proc /data/.stowaways/sailfishos/proc
11) mount -o bind /sys /data/.stowaways/sailfishos/sys
finally:
chroot /data/.stawaways/sailfishos/ /bin/su-
you'll see sailfish os version something 15
try this on it:
cd /
ls
[LINK] http://d-h.st/gX5 [/LINK]
sees folders on it.
Click to expand...
Click to collapse
Screenshots?
Sent from my SM-G900F using XDA Free mobile app
Fantastic... I'll give a try. Plz provide some more details, screenshots & new features from your currently running sailfish os. Thanx for sharing
i fed with adb commands & not able to flash
Uhm ... I gonna wait for this ...
Sent from my SM-G900F using XDA Free mobile app
how to install ?
When I had the rom for flashing in recovery. I'll explain it.
For now, it can be installed through the adb, to work it inside the android terminal.
astronfestmon said:
When I had the rom for flashing in recovery. I'll explain it.
For now, it can be installed through the adb, to work it inside the android terminal.
Click to expand...
Click to collapse
any update on this?
I followed the above procedure and I can see the Sailfish version and the files list from adb. What next?
EDIT: Just saw your PS in OP
In the end of the week probably I'll release the boot kernel working on.
astronfestmon said:
In the end of the week probably I'll release the boot kernel working on.
Click to expand...
Click to collapse
I've successfully built boot and recovery images, packed the zip for flashing in recovery but there is a problem with the boot.img.
I'm trying to find out why it doesn't boot (the phone stays at the galaxy logo)
The actual guide for porting misses some stuff and there are errors here and there. Besides, there is a problem with the trusty chroot, quantal is working.
Aye. I've notice that.
I'm fixing some issues in quantal chroot.
E.g. inside the sources.list I add the 12.04 lts mirrors. Made by a website with the sources.list for 12.04 lts mirrors.
Yeah. I've done the boot kernel image and it made the same as you.
But with meld diff I've compared the i9305 defconfig with mine i9300 defconfig.
I'm going to test it with the changes meld diff made with a comparison with i9305 defconfig.
Now I made a make systemtarball and I'll try a make bootimage or a make factory_image for it.
astronfestmon said:
Aye. I've notice that.
I'm fixing some issues in quantal chroot.
E.g. inside the sources.list I add the 12.04 lts mirrors. Made by a website with the sources.list for 12.04 lts mirrors.
Yeah. I've done the boot kernel image and it made the same as you.
But with meld diff I've compared the i9305 defconfig with mine i9300 defconfig.
I'm going to test it with the changes meld diff made with a comparison with i9305 defconfig.
Now I made a make systemtarball and I'll try a make bootimage or a make factory_image for it.
Click to expand...
Click to collapse
It would be great if you could make it to boot.
I will try to compile the kernel with CONFIG_CMDLINE="console=tty0" . I'm hoping that would direct kernel panic message to the screen so we could idenfity what the problem is with booting hybris-boot.img
So... Any development?
Sent from my Nexus 5 using XDA Premium 4 mobile app
Hi! All of you! I'm doing efforts between these days. In these vacation days. I'll report more when I got home back.
astronfestmon said:
Hi! All of you! I'm doing efforts between these days. In these vacation days. I'll report more when I got home back.
Click to expand...
Click to collapse
Hi, I've also been trying to port sailfish os to i9300. I've been successful in creating an image that works, i.e. got it to boot into sailfish but there are some issues that I haven't been able to fix, like for instances, the wlan is detected but fails to establish a connection with any network, GSM is also not working. A full list with details can be found here https://wiki.merproject.org/wiki/Adaptations/libhybris
Maybe we should try to work together to get a fully functional sailfish os image
Cheers
---------- Post added 19th August 2014 at 12:01 AM ---------- Previous post was 18th August 2014 at 11:12 PM ----------
redrum781 said:
I've successfully built boot and recovery images, packed the zip for flashing in recovery but there is a problem with the boot.img.
I'm trying to find out why it doesn't boot (the phone stays at the galaxy logo)
The actual guide for porting misses some stuff and there are errors here and there. Besides, there is a problem with the trusty chroot, quantal is working.
Click to expand...
Click to collapse
The phone may be stuck at the galaxy logo, but there's a way to debug to find out what's wrong, follow this steps (only tested on linux):
1) connect your phone with the computer, the initramfs in boot.img will create a network interface (phone's ip is: 192.168.2.15) and enable a telnet deamon (default port: 23) and also a udhcp server, so luckily the computer will ask for an ip that everything will be set up automatically. If not try configuring static ip (192.168.2.20 and adding a route to 192.168.2.0)
2) telnet 192.168.2.15
3) when you're in the telnet session, you can check /diagnostic.log (i think) it will show why the boot failed. It is possible to execute commands into the init, by writing to (/init-ctl/stdin)
When logged into the telnet session it will dump a bit of information, be sure to read it as is useful .
Also check HADK 9.2 Operating Blind on an Existing Device
PS: the files may contain mistakes as I wrote this post without checking for the correct names (I don't have sailfish flashed at the moment).
Also consider visiting the IRC channel (#sailfishos-porters), if you're not doing it already
Hope it helps
rusty88 said:
Hi, I've also been trying to port sailfish os to i9300. I've been successful in creating an image that works, i.e. got it to boot into sailfish but there are some issues that I haven't been able to fix, like for instances, the wlan is detected but fails to establish a connection with any network, GSM is also not working. A full list with details can be found here https://wiki.merproject.org/wiki/Adaptations/libhybris
Maybe we should try to work together to get a fully functional sailfish os image
Cheers
---------- Post added 19th August 2014 at 12:01 AM ---------- Previous post was 18th August 2014 at 11:12 PM ----------
The phone may be stuck at the galaxy logo, but there's a way to debug to find out what's wrong, follow this steps (only tested on linux):
1) connect your phone with the computer, the initramfs in boot.img will create a network interface (phone's ip is: 192.168.2.15) and enable a telnet deamon (default port: 23) and also a udhcp server, so luckily the computer will ask for an ip that everything will be set up automatically. If not try configuring static ip (192.168.2.20 and adding a route to 192.168.2.0)
2) telnet 192.168.2.15
3) when you're in the telnet session, you can check /diagnostic.log (i think) it will show why the boot failed. It is possible to execute commands into the init, by writing to (/init-ctl/stdin)
When logged into the telnet session it will dump a bit of information, be sure to read it as is useful .
Also check HADK 9.2 Operating Blind on an Existing Device
PS: the files may contain mistakes as I wrote this post without checking for the correct names (I don't have sailfish flashed at the moment).
Also consider visiting the IRC channel (#sailfishos-porters), if you're not doing it already
Hope it helps
Click to expand...
Click to collapse
Will this os improve our device? Whats the pro and the con for a change (if it works finaly)?[emoji4]
MaxAndroided said:
Will this os improve our device? Whats the pro and the con for a change (if it works finaly)?[emoji4]
Click to expand...
Click to collapse
well maxAndroided all I can say at the moment is that the OS looks very promising... the UI is very smooth. Is another approach to mobile interaction based on gestures. I'm really loving it, sadly I can used it for day to day activities yet.
The jolla phone at the moment is able to run android apps and hopefully soon that will be available for any image built for android phones. So what that means is that if you don't find a suitable native app for sailfish os, you can always run your favorite android app in sailfish os
Anyone that wants to help bring sailfish os to i9300 is welcome to help, so if you have any idea on how to debug and fix the issues let me know
PS: if any one would like to try it, take a look at my previous post here
rusty88 said:
well maxAndroided all I can say at the moment is that the OS looks very promising... the UI is very smooth. Is another approach to mobile interaction based on gestures. I'm really loving it, sadly I can used it for day to day activities yet.
The jolla phone at the moment is able to run android apps and hopefully soon that will be available for any image built for android phones. So what that means is that if you don't find a suitable native app for sailfish os, you can always run your favorite android app in sailfish os
Anyone that wants to help bring sailfish os to i9300 is welcome to help, so if you have any idea on how to debug and fix the issues let me know
PS: if any one would like to try it, take a look at my previous post here
Click to expand...
Click to collapse
@rusty88, I am no developer/expert, but is there any way we can try and use I9300 native libraries or binaries to make GSM (or some other functionality for that matter) work? maybe RIL libs/binaries for GSM?
msri3here said:
@rusty88, I am no developer/expert, but is there any way we can try and use I9300 native libraries or binaries to make GSM (or some other functionality for that matter) work? maybe RIL libs/binaries for GSM?
Click to expand...
Click to collapse
yes @msri3here technically that is what i'm doing, its using RIL lib based on cm10.1.3 that was working fine before I flash sailfish, but on sailfish the log that RIL daemon dumps is really a mess and haven't figure out why is failing. One thing that I've notice is that RILD (one of its child process) creates the socket at /dev/socket/rild but it's killed afterwards, the sockets disappear and the process restarts all over again
Stracing RILD is not helping either as it seems that everything is Ok.
I'm trying to buy a new smartphone for day to day use so I can dedicate more time to debug on my i9300.
rusty88 said:
well maxAndroided all I can say at the moment is that the OS looks very promising... the UI is very smooth. Is another approach to mobile interaction based on gestures. I'm really loving it, sadly I can used it for day to day activities yet.
The jolla phone at the moment is able to run android apps and hopefully soon that will be available for any image built for android phones. So what that means is that if you don't find a suitable native app for sailfish os, you can always run your favorite android app in sailfish os
Anyone that wants to help bring sailfish os to i9300 is welcome to help, so if you have any idea on how to debug and fix the issues let me know
PS: if any one would like to try it, take a look at my previous post here
Click to expand...
Click to collapse
tried your rom but stuck on "samsung galaxy s 3 gt-i9300" screen nothing is happening plus if i touch the screen i get a response from the capacitive buttons but thats all