[GUIDE] Newbie-Proof Tutorial Howto Compile Kernel For Galaxy Ace incl. Screenshot - Galaxy Ace S5830 General

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

Related

[GUIDE] How To Compile TWRP Recovery for QVGA And Other Unsupported Devices.

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-TO] extract kernel from source, compile, and insert on GPE (510)

How to extract the boot image from your tablet, set up adb, compile a new kernel with cool options, and put it back on your device!
UPDATED for Lolipop 12-4-14
This is a complete guide from start to finish, copy and paste style. If you own a gpe510, or any other AOSP device and a computer running Debian Linux, you can do all of this.
If all you want is the modified kernel, download from here:
Sleekai Kernel For The LG GPad 8.3 V510(GPE)
​
I am hoping people will add to this with new ideas and patches in order to make the GPE a better device. I see the potential for all sorts of neat stuff.
This guide assumes a basic knowledge of linux operating systems. I am using a Debian 64 bit (wheezy stable) to compile my kernel. I have used many, many hours of the day to figure this out properly, with specific thanks going to Pete of Pete's Blog for his image tools.
But first, lets keep this simple. As usual, you are on your own if you brick your device, though I don't see how you could if you are paying attention!
There are dependencies for building your own kernel, and you will definitely want to use a 64 bit system as a 32 bit will not work properly for kitkat.
Here are all of the packages you will need, and they will draw in further dependencies when you install, but these are it! So, here we go:
Open a terminal, su to root and:
Code:
dpkg --add-architecture i386
##This will allow for the use of some 32 bit librarys that we will need for both adb and the kernel compile. Then:
Code:
apt-get update ; apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 libc6-i686:i386 lzop liblzo2-dev libgpm2:i386 git-core git gnupg flex bison gperf libsdl1.2-dev libesd0-dev build-essential zip curl gedit libncurses5-dev zlib1g-dev fakeroot lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
Next, you will need to install adb and have your permissions set up.
In order to do this you will need to go into the developer options on your device to enable debugging on your tablet. Go to settings/about tablet/build number, and tap on build number several times to unlock the developer options.
then:
You will need to create new udev rules for your device in/etc/udev/rules.d on your computer.
Use "lsusb" in your terminal to find the manufactures code of your device. it will show up as a nexus 4, or Google device.
You will need to create a file in your computer in /etc/udev/rules.d/99-android.rules.
You can use gedit if you like:
Code:
gedit /etc/udev/rules.d/99-android.rules
Put the following inside and save, changing the manufactures code as necessary to fit your device, and change “your-login” to your login name on your computer.
Code:
# Google Nexus devices
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", OWNER="your-login" # Google Nexus devices
18d1 is the manufacturers code.
You will then want to restart udev on your computer:
Code:
service udev restart
you will now have permissions to access your android device from user space.
Now to download adb and get started. You should probably not use adb from the Debian repositories, as it may be an older version. the V510 is using kitkat android and needs the latest build of adb to work properly. It is a good idea to get rid of any old adb files on your computer first. The code below will do just that.
Code:
apt-get purge android-tools-adb android-tools-fastboot
Now download the latest adb bundle from here:
http://developer.android.com/sdk/index.html
Move it into a new directory,
*note -the version number may be different.
Code:
mkdir ~/adb
Code:
cd ~/adb
Code:
unzip adt-bundle-linux-x86_64-20131030.zip
su to root and Move the bundle to /opt:
Code:
mv adt-bundle-linux-x86_64-20131030 /opt/android-sdk-linux-x86_64-20131030
Other google products reside in /opt, this should too. This takes a minute or so on slow machines.
Next we need to link adb to /usr/bin
Code:
ln -s /opt/android-sdk-linux-x86_64-20131030/sdk/platform-tools/adb /usr/bin
Code:
ln -s /opt/android-sdk-linux-x86_64-20131030/sdk/platform-tools/fastboot /usr/bin
We are ready to begin working on the device! first start the adb server and look for your device.
Code:
adb start-server
Code:
adb devices
You will then need to confirm the connection on your tablet screen to allow access from your computer.
Okay, wev'e got this first part set up. it's time to begin working on a kernel!
Lets get started.
I want to extract and build my zimage in $userspace, so open a terminal from /home and:
Code:
mkdir ~/android
Download the source package LG-V510(G-Pad 8.3 Google Play Edition)_Android_KK_V510_11c from here :
https://www.lg.com/global/support/opensource/opensourceList?types=ALL&search=lgv510
and open it to find three folders, including a kernel folder. Move the kernel folder to ~/android and then:
Code:
cd ~/android
Download the current eabi-4.6 Google tool chain to ~/android to cross compile your android kernel:
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
When it completes, enter ~/android/kernel and get ready to compile a new kernel from the source code.
Code:
cd ~/android/kernel
Do the following each time you compile another kernel. This insures the correct path.
Code:
export PATH=$PATH:~/android/arm-eabi-4.8/bin
Code:
arm-eabi-gcc --version
you should get:
Code:
arm-eabi-gcc (GCC) 4.6.x-google 20120106 (prerelease)
Copyright (C) 2011 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.
Continue on! we are not done yet!
Code:
export ARCH=arm
Code:
export SUBARCH=arm
Code:
export CROSS_COMPILE=arm-eabi-
Code:
export KERNEL_DEFCONFIG=palman_defconfig
Code:
make clean
Code:
make palman_defconfig
Doing the above prepares your kernel build environment, while the following code opens a interface to configure the kernel. You can simplify this later however you wish.
But for now,
Code:
make menuconfig
At this point make whatever changes you wish to the config file. for a list of the changes I have made, and that are in the kernel available to download, look in the sleekai kernel thread. (At start of thread, or in my signature).
After saving your changes,
Code:
make
Or conversely
Code:
make -o2
which will optimize the make. I recommend using simply "make" first, as the other may not properly show errors should any occur.
and go make a pot of coffee, and probably drink the whole pot! This will take a while.
At the end you will see that the "zimage is ready"
If you have errors, then you probably have dependency problems. If not, Yay! You compiled your first kernel, but we are not done yet!
The zimage you just produced is stored in /kernel/arch/arm/boot/zImage
To put both the zimage and any modules into a separate folder inside of ~/android so as to make extracting them easier:
Code:
mkdir ~/android/kernel_output
Code:
cp ~/android/kernel/arch/arm/boot/zImage ~/android/kernel_output/zImage
Code:
find ~/android/kernel -name "*.ko" -exec cp {} ~/android/kernel_output/ \;
The above code will find all the modules for your kernel. We don't need them for this tutorial, but it still is mighty handy!
Extract your boot image (boot.emmc.win) for the ramdisk You may also download the stock.zip from the sleekai kernel thread
Now make a backup to transfer to your computer.
Reboot to recovery on your tablet. I'm using TWRP. If you are using something else it should be just as easy.
Code:
adb reboot recovery
Only tick the boot
make a backup to your sd card. I changed the name to boot.bac to keep it simple
reboot
make sure the backup of boot is present using a file explorer. I am using ES File explorer.
On your computer, pull the file using adb
Code:
adb start-server
Code:
adb devices
Code:
adb pull /storage/sdcard1/TWRP/BACKUPS/LG0000606708987/boot.bac /home/sleek
sleek is my user name, replace with yours or use tilde.
What we are after is the "boot.emmc.win" file. We will only need this and the zImage to compile a new boot image and run it on your tablet.
The tools to extract the kernel and ramdisk from the boot.emmc.win you will need the following boot image tools installed on your computer.
So, again, lets keep this simple. All the tools are forked to my github for ease of use.
So lets install the tools! Ready?
As Root:
Code:
mkdir /usr/src/android
Code:
mkdir /usr/src/android/boot
Code:
cd /usr/src/android/
Code:
git clone https://github.com/sleekmason/bootimg-tools.git
Code:
cd bootimg-tools/libmincrypt/
Code:
gcc -c *.c -I../include
Code:
ar rcs libmincrypt.a *.o
Code:
cd ../mkbootimg
Code:
gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a
Code:
cp mkbootimg /usr/local/bin/
Code:
cd ../cpio
Code:
gcc mkbootfs.c -o mkbootfs -I../include
Code:
cp mkbootfs /usr/local/bin/
Code:
cd /usr/src/android/bootimg-tools/mkbootimg/
Code:
wget https://raw.github.com/sleekmason/bootimg-tools/master/mkbootimg/unmkbootimg.c
Code:
gcc -o unmkbootimg unmkbootimg.c
Code:
cp unmkbootimg /usr/local/bin/
Now everything is in place to make a new boot image for your tablet!
Finishing this up is easy.
As root, we made a directory in /usr/src/android/boot for your boot.emmc.win file to be torn apart:
Code:
cd /usr/src/android/boot
Copy your new zImage and the boot.emmc.win file you extracted from your device.
Note* "/home/sleek" is the path on my computer, and should be changed to reflect yours!
Code:
cp /home/sleek/android/kernel_output/zImage /usr/src/android/boot
Code:
cp /home/sleek/boot.emmc.win /usr/src/android/boot
Now unpack the boot.emmc.win file to get the ram disk
Code:
unmkbootimg -i boot.emmc.win
Now you may remove the current boot.emmc.win file, and the resultant kernel file as we will be making new ones, and rename the zImage file you moved here to "kernel".
Code:
rm boot.emmc.win kernel && mv zImage kernel
Now repack using the command given to you during the unpack:
Code:
mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x80208000 --ramdisk_offset 0x82200000 --second_offset 0x81100000 --tags_offset 0x80200100 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=palman lpj=67677 vmalloc=300M' --kernel kernel --ramdisk ramdisk.cpio.gz -o boot.emmc.win
Note* For 500 users this may be different. Simply use the command from the prompt.
You should now have a brand new boot.emmc.win image in /usr/src/android/boot!!
To push back on your device to test
Code:
adb reboot bootloader
Code:
fastboot boot boot.emmc.win
USING the above will only put your kernel build into memory and should not hurt your device if something goes wrong. Use the command below to make it permanent.
If everything works well, you should see the change you made to the /general/perf-localversion/ in your settings under kernel. from there it's up to you to hack away! make new and unique kernels!
If you want your kernel to survive reboot do;
Code:
fastboot flash boot boot.emmc.win
then:
Code:
fastboot reboot
You can expect a slow bootup on the first go around as your new kernel populates the widgets, etc..
NOTE*For the use of the latest eabi-4.7 google toolchain, you will need the libglibc libraries from the "testing" branch as gcc 4.7 is in testing. I advise completing the guide with eabi 4.6 first before trying 4.7.
The gamma correction though enabled in 4.6, isn't near as good as the native compile using 4.7. If you want the screen to look like it does in my kernels, you will need 4.7
For the eabi-4.7:
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7
That's it! Good luck! Remember, If you post a kernel you have made, you will need to show your kernel source, etc . . . Git hub is a good choice to keep track of changes you make. Best regards, Sleekmason
If you are a v500 user and want to build your own kernel!
First, read the above post as you will be following the steps listed there.​
There are just a couple of changes that you will need to do, and maybe a riddle to figure out as well. Read on.
You will need to download the v500 source from here: https://www.lg.com/global/support/opensource/opensourceList?superOsCategoryId=CAT00000001&osCategoryId=
Look for the LGV500 kernel source.
Where it says "palman" for the defconfig items, you will want to replace that with the defconfig for the 500, so replace palman with awifi-perf,
like this:
Code:
export KERNEL_DEFCONFIG=awifi-perf_defconfig
Code:
make awifi-perf_defconfig
Important
Follow the guide and build with the Google Toolchain eabi4.6 first
LG compiled for the 500 and 510 using the eabi4.6. It works, and will give you a feel for the process, and allow you to use your kernel.
Note*
I use the google toolchain eabi-4.7 for the sleekai kernels as it changes the gamma to reasonable defaults on the 510 without further tweaking. After compiling a kernel or two to get a feel for it, you should try using the 4.7 toolchain. To do so, you will probably need the libglibc libraries from the "testing" branch. Look it up.
caveat: I recieved a compile error for the v500 when I used the eabi-4.7 . . . . . yeah. You'll have to work that out.
There is a modified anykernel script for emmc devices out there (Search Google or here in xda). You will have to use the anykernel script after making your boot.emmc.win image as fastboot won't work on the 500. There may be another way .... But I don't know what it is.
Edit* There are now two different kernels for the LG GPad 8.3 V500(awifi) located in the development section of the forum.
Best of luck! -sleekmason
Can this be used to create a kernel for the non Google Play Edition Gpad to be able to allow us to install the Google Play edition ROM on it
Sent from my SM-N900W8 using Tapatalk
Canadoc said:
Can this be used to create a kernel for the non Google Play Edition Gpad to be able to allow us to install the Google Play edition ROM on it
Sent from my SM-N900W8 using Tapatalk
Click to expand...
Click to collapse
I would think so. I edited the above to show how to put the image back on your device. You should be able to use any source you wish to compile with. My thoughts are that you might wish to examine the differences in the ram disk if any.
sleekmason said:
Howdy, I would like to share how to download the kernel source for the gpe, compile a new custom kernel, and insert into your LG gpad GPE 510.
...
Click to expand...
Click to collapse
Thanks for the guide. Making GPE kernel was my next step in trying to get the GPE ROM to work on v510.
I just made guide for getting your Android build environment going if you want to use it on your blog or where ever.
http://forum.xda-developers.com/showthread.php?t=2629008
The problem with v500 is that it does not have fastboot so we can not flash kernel like how you can on v510.
@ AndroidUser00110001 Hi! I know that somebody tweaked the Any kernel to work on emmc devices... Maybe it could be adapted? Actually getting the menuconfig and make should be the same process as well as repacking the image. I take it just getting it back on the 500 device is the problem?
I will add your link to this post for setting up a build environment if that is okay.
sleekmason said:
@ AndroidUser00110001 Hi! I know that somebody tweaked the Any kernel to work on emmc devices... Maybe it could be adapted? Actually getting the menuconfig and make should be the same process as well as repacking the image. I take it just getting it back on the 500 device is the problem?
I will add your link to this post for setting up a build environment if that is okay.
Click to expand...
Click to collapse
Is that the koush any kernel? I was going to mess with that too. I just need a small break now. Took a few days to get new system exactly how I want it.
Go ahead and use guide...mo problem at all.
AndroidUser00110001 said:
Is that the koush any kernel? I was going to mess with that too. I just need a small break now. Took a few days to get new system exactly how I want it.
Go ahead and use guide...mo problem at all.
Click to expand...
Click to collapse
Yes, from here: http://forum.xda-developers.com/showthread.php?t=847265
I noted that boot was on block nncblk0p21 on our device, and not 22? better double check that. I tried it Anykernel as well to no avail when getting this set up. Fastboot is Awesome!
It's taxing to get it set up right. Seems like things change very often for the dependencies based on other package changes. I ussually go with testing but redid two partitions with stable. The 32 bit is just going to sit there, which seems kinda silly due to the need for extra packages in 64 to compile for 32 but whatever. Yeah.
AndroidUser00110001 said:
Thanks for the guide. Making GPE kernel was my next step in trying to get the GPE ROM to work on v510.
I just made guide for getting your Android build environment going if you want to use it on your blog or where ever.
http://forum.xda-developers.com/showthread.php?t=2629008
The problem with v500 is that it does not have fastboot so we can not flash kernel like how you can on v510.
Click to expand...
Click to collapse
I don't understand, what are the differences bettween the v500 and v510? they both have the same hardware, but not the same boot partition or something like that?
ayziaa said:
I don't understand, what are the differences bettween the v500 and v510? they both have the same hardware, but not the same boot partition or something like that?
Click to expand...
Click to collapse
The boot on the 500 cannot be fully unlocked.
This is not the appropriate place to ask that kind of question should be asked in general or in troubleshooting. Also, there are already many threads about this same question please use the search utility to find them. Thank you.
i was thinking of writing a tutorial about this as well for the v500 but this better than i would have done Well done...
sleekmason said:
Yes, from here: http://forum.xda-developers.com/showthread.php?t=847265
I noted that boot was on block nncblk0p21 on our device, and not 22? better double check that. I tried it Anykernel as well to no avail when getting this set up. Fastboot is Awesome!
It's taxing to get it set up right. Seems like things change very often for the dependencies based on other package changes. I ussually go with testing but redid two partitions with stable. The 32 bit is just going to sit there, which seems kinda silly due to the need for extra packages in 64 to compile for 32 but whatever. Yeah.
Click to expand...
Click to collapse
Another tool that i ported to the lg g pad a bit back along with loki-doki...
Quick hint, dont bother with direct mmc naming as qcom (i dont know if the other chip makers do the same thing, as i have only had qcom devices) has given us a simple naming scheme...
should only be used by people who know how to use this,
darkassain said:
i was thinking of writing a tutorial about this as well for the v500 but this better than i would have done Well done...
Another tool that i ported to the lg g pad a bit back along with loki-doki...
Quick hint, dont bother with direct mmc naming as qcom (i dont know if the other chip makers do the same thing, as i have only had qcom devices) has given us a simple naming scheme...
should only be used by people who know how to use this,
Click to expand...
Click to collapse
Thank you! Have you successfully used your script to push a kernel onto the 500 Or 510?
I would think this could be very handy for sharing a custom kernel for the 510, but would like to see somebody report a positive test result. Very cool!
sleekmason said:
Thank you! Have you successfully used your script to push a kernel onto the 500 Or 510?
I would think this could be very handy for sharing a custom kernel for the 510, but would like to see somebody report a positive test result. Very cool!
Click to expand...
Click to collapse
yes back before when there wasnt a overclocked kernel i basically used this to push it when i would compile just the kernel (didnt maintain so i now use dyn's)...
yes this is only for the v500 as this has the extra loki step, but it shouldnt be hard to modify so it does not do that extra step
darkassain said:
i was thinking of writing a tutorial about this as well for the v500 but this better than i would have done Well done...
Another tool that i ported to the lg g pad a bit back along with loki-doki...
Quick hint, dont bother with direct mmc naming as qcom (i dont know if the other chip makers do the same thing, as i have only had qcom devices) has given us a simple naming scheme...
should only be used by people who know how to use this,
Click to expand...
Click to collapse
Hi, can you just use a generic anykernel updater script too?
For example to flash a packed boot.img
Code:
run_program("/tmp/busybox", "dd", "if=/dev/block/platform/msm_sdcc.1/by-name/boot", "of=/tmp/boot.img");
run_program("/tmp/unpackbootimg", "-i", "/tmp/boot.img", "-o", "/tmp/");
run_program("/tmp/repack-ramdisk.sh");
run_program("/tmp/mkbootimg.sh");
run_program("/tmp/busybox", "dd", "if=/tmp/newboot.img", "of=/dev/block/platform/msm_sdcc.1/by-name/boot");
mako and flo can do like this.. I think HTC One as well, since they are all similar qcom chipsets maybe this device can too
poondog said:
Hi, can you just use a generic anykernel updater script too?
For example to flash a packed boot.img
Code:
run_program("/tmp/busybox", "dd", "if=/dev/block/platform/msm_sdcc.1/by-name/boot", "of=/tmp/boot.img");
run_program("/tmp/unpackbootimg", "-i", "/tmp/boot.img", "-o", "/tmp/");
run_program("/tmp/repack-ramdisk.sh");
run_program("/tmp/mkbootimg.sh");
run_program("/tmp/busybox", "dd", "if=/tmp/newboot.img", "of=/dev/block/platform/msm_sdcc.1/by-name/boot");
mako and flo can do like this.. I think HTC One as well, since they are all similar qcom chipsets maybe this device can too
Click to expand...
Click to collapse
thanks for reminding me the any kernel uploaded by me won't work as it doesn't parse Loki images xorrectly, I'll upload the correct one once I have access to my pc
darkassain said:
thanks for reminding me the any kernel uploaded by me won't work as it doesn't parse Loki images xorrectly, I'll upload the correct one once I have access to my pc
Click to expand...
Click to collapse
could you please re-post to a different thread rather than hijacking this thread, as your script does not work with the 510 currently and I do not want to go to get confused with my kernel how to. what started out to maybe become relevant apparently will not and so shouldn't be confused with what I'm doing here. I will be happy to try working with your script if you would open up an appropriate thread. Thank you.
Installed kenel and booted. Now to install trickster mod and fix the dang gamma.
gunnyman said:
Installed kenel and booted. Now to install trickster mod and fix the dang gamma.
Click to expand...
Click to collapse
Excellent!! Pleased to know that you are able to use it. Have you changed your gamma settings?
I did on mine and am pleased with the result. I'm using 248, 252, 255 using trickster mod What are you going with?
sleekmason said:
Excellent!! Pleased to know that you are able to use it. Have you changed your gamma settings?
I did on mine and am pleased with the result. I'm using 248, 252, 255 using trickster mod What are you going with?
Click to expand...
Click to collapse
havent messed around too much.
I had a thought about this and I think it would be awesome if we could incorporate faux123's bits for gamma and color control. His fauxcontrol offers much more granular control than trickster.
I'm thankful to have what we have, and THANK YOU for sharing it, but like any good geek I WANTS MOAR!!!!!
gunnyman said:
havent messed around too much.
I had a thought about this and I think it would be awesome if we could incorporate faux123's bits for gamma and color control. His fauxcontrol offers much more granular control than trickster.
I'm thankful to have what we have, and THANK YOU for sharing it, but like any good geek I WANTS MOAR!!!!!
Click to expand...
Click to collapse
me too! I'll look into it. There are other apps besides trickster to give you more control. I think at the kernel level everything we need is unlocked. And yeah, he knows his business like nobody else eh? I'm just persistent.

Help compiling kernel

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??????????

[Guide][Noobs Familiar]How To Build Android Kernel With Features!

{
"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"
}
What Is Kernel?
The kernel is a computer program that is the core of a computer's operating system, with complete control over everything in the system.[1] It is the first program loaded on start-up. It handles the rest of start-up as well as input/output requests from software, translating them into data-processing instructions for the central processing unit. It handles memory and peripherals like keyboards, monitors, printers, and speakers.
Is There A Connection Between Kernel And Android?
Haha,Sorry but yes.Kernel is the main component for Android.Basically Android devices use the Linux kernel, but it's not the exact same kernel other Linux-based operating systems use. There's a lot of Android specific code built in, and Google's Android kernel maintainers have their work cut out for them. OEMs have to contribute as well, because they need to develop hardware drivers for the parts they're using for the kernel version they're using. This is why it takes a while for independent Android developers and hackers to port new versions to older devices and get everything working. Drivers written to work with the Gingerbread kernel on a phone won't necessarily work with the Ice Cream Sandwich kernel. And that's important, because one of the kernel's main functions is to control the hardware. It's a whole lot of source code, with more options while building it than you can imagine, but in the end it's just the intermediary between the hardware and the software. So basically if any instruction is given to mobile it first gives the command to kernel for the particular task execution.​
Ah It's Work Time! Lets Get Started!​
Part – I​Setting Up Your Build Environment​Open The Terminal and Paste following Command!
Upgrade The Built-In Environments!
Code:
sudo apt-get update && sudo apt-get upgrade
Install Required Tools.
Code:
sudo apt-get install git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng
PART-I.II​​​Get The Kernel Source!​Now When It Comes About Kernel Source,Where You'll Find That?
No Worries,Search In Your Device Open Source Projects Websites To Get The Source OR You May Met With Github. Search In Github For Kernel Source For Your Device!
Here Are Some Sites,Where You Can Download Kernel Source Though:
For HTC: http://www.htcdev.com/
For Samsung: http://opensource.samsung.com/
For Sony: http://developer.sonymobile.com/wportal/devworld/search-downloads/opensource
For LG: http://opensource.lge.com/index
Note: If You've Download The Source Then Extract It In A Directory. Or If You Want To Clone/Download Source From Github Then Follow Next Steps!​
How To Download/Clone Kernel Source From Github?​To Clone From Github,You Have To Install Repo Tool!
A. Open The Terminal and Paste Following Command!
Code:
sudo apt-get install phablet-tools
1. To Clone Go To Your Kernel Source Page.Like This -->>
2.Then Click On Clone Or Download Button,And Copy The Link!
B. Open A Terminal And Type This Command!
Code:
git clone <the link that you copied from github> android/kernel
For Me I Type The Following -->>
Code:
git clone https://github.com/Alberteno/android_kernel_samsung_on7xelte.git android/kernel
Explaination:
1. <the link that you copied from github> -->> Replace With The Link You Copied From Github To Clone The Source!
2. android/kernel ->> This Is My Directory Where I Want To Clone It!
C. Done.You Cloned The Source!​
Part-II
How To Add Features To Kernel?
Ah.So Here I'm With Following Guides.What We're Gonna Learn Today?.Lets Go Ahed.
Here are some features you can add via cherry-picking.Check out those-> https://forum.xda-developers.com/showpost.php?p=77089212&postcount=41
How To Upstream Android Kernel?
Well,I'm Not Gonna Spam Or Do Somethings Like This,Here's A Simple Guide By @The Flash To Upstream!
Here Is The Link-->> [url]https://forum.xda-developers.com/android/software-hacking/reference-how-to-upstream-android-kernel-t3626913[/URL]
How To Add I/O Scheduler Or Governor To Kernel?
To Add Governor Or I/O Scheduler To Kernel,You Have To Learn Cherry-Picking! Well,I'm Not Gonna Make A Tutorial For That![Or Maybe I'll].For Now Follow What I Say In Next Steps.
A.
1. So Basically There's Many Governors/IO Schedulers Available In Internet To Add.Choose One Governor,Well I Choosed Nightmare Governor For Example. I'm Showing How To Add A Governor In The Guide.
2. Now What You Have To Do Is To Go To Github,And Type "Add Nightmare Governor" In Search Bar Then Hit Enter.
3. You'll Get Some Many Results,Open One Of Them That Include Many Files About The Governor.Like This -->>
4. Now Where You'll Find The Commit ID To Cherry-Pick It To Your Kernel Source? See Below Pick To Get Idea Which One Is The Idea -->>
5.Yay,So You Got It! Now Open A Terminal And Go To Your Kernel Source Folder! For Me I Typed -->>
Code:
cd android/kernel
6. Now To Cherry-Pick You Have To Fetch The Kernel Source From Which You'll Cherry-Pick.To Do That Type Following In Terminal -- >>
Code:
git remote add <anyname> <link of the kernel source from which you're taking the governor commit>
For Me I Typed This -->>
Code:
git remote add lol [url]https://github.com/B14CKB1RD-Kernel/B14CKB1RD_Kernel_OnePlus3_Unified.git[/url]
Explaination:
1. <anyname> - What Ever You Want.
2. <link of the kernel source from which you're taking the governor commit> - Where You'll Find? Check Below Image.The Blue Selected Image In URL Bar Is the "<link of the kernel source from which you're taking the governor commit>"
7.Then Type This In Terminal -->>
Code:
git fetch <anyname>
For Me I Typed This -->>
Code:
git fetch lol
B.
1.In Terminal Type -->>
Code:
git cherry-pick <commit id>
For Me I Typed This Change <commit id> with the id you copied from github-->>
[code]git cherry-pick 042b5123de94e9875e717efb0ac1d344fdf2282e
2.Now You'll Get Some Conflicts,How To Solve Them? Use This Guide By @jabza .
Here Is The Guide -->> [url]https://forum.xda-developers.com/showthread.php?t=2763236[/URL]
3.Solve The Conflicts And You're Done Adding Governor To Kernel!
How To Add Support Force Fast Charging?(Only For Snapdragon Devices)
1. In Kernel Source Go To "arch/arm/mach-msm" Folder.
2. Then Open The "Kconfig" File And The Following Code -->>
Code:
config FORCE_FAST_CHARGE
bool "Force AC charge mode at will"
default y
help
A simple sysfs interface to force adapters that
are detected as USB to charge as AC.
3. Save It,Then Open "Makefile" And Add The Following Code-->>
Code:
obj-$(CONFIG_FORCE_FAST_CHARGE) += fastchg.o
4. Save The Makefile,Now Create/Add The Fast Charge File In That Directory! Where Is That File? Here Is It -->> Here
5. Now Go To kernel source/drivers/usb/otg directory And Open "msm_otg.c" File, And Add The Following Code -->>
Code:
#ifdef CONFIG_FORCE_FAST_CHARGE
#include <linux/fastchg.h>
#define USB_FASTCHG_LOAD 1000 /* uA */
#endif
And This Code -->>
Code:
#ifdef CONFIG_FORCE_FAST_CHARGE
if (force_fast_charge == 1) {
mA = USB_FASTCHG_LOAD;
pr_info("USB fast charging is ON - 1000mA.\n");
} else {
pr_info("USB fast charging is OFF.\n");
}
#endif
6. Save msm_otg.c File.Now Go To "include/linux" Directory And Add "fastchg.h" File.Here's The Link For That File -->> Here
7. Well Done You've Added Force Fast Charging Support! :fingers-crossed:
How To Add Support Voltage Control For MSM Devices?
1. Go To arch/arm/mach-msm Folder,And Open "Kconfig" File,And Add Following Codes-->>
Code:
config CPU_VOLTAGE_TABLE
bool "Enable CPU Voltage Table via sysfs for adjustements"
default n
help
Krait User Votlage Control
2.Save Kconfig File.Now open "acpuclock-krait.c" File.Add This Code-->>
Code:
#ifdef CONFIG_CPU_VOLTAGE_TABLE
#define HFPLL_MIN_VDD 800000
#define HFPLL_MAX_VDD 1350000
ssize_t acpuclk_get_vdd_levels_str(char *buf) {
int i, len = 0;
if (buf) {
mutex_lock(&driver_lock);
for (i = 0; drv.acpu_freq_tbl[i].speed.khz; i++) {
/* updated to use uv required by 8x60 architecture - faux123 */
len += sprintf(buf + len, "%8lu: %8d\n", drv.acpu_freq_tbl[i].speed.khz,
drv.acpu_freq_tbl[i].vdd_core );
}
mutex_unlock(&driver_lock);
}
return len;
}
/* updated to use uv required by 8x60 architecture - faux123 */
void acpuclk_set_vdd(unsigned int khz, int vdd_uv) {
int i;
unsigned int new_vdd_uv;
mutex_lock(&driver_lock);
for (i = 0; drv.acpu_freq_tbl[i].speed.khz; i++) {
if (khz == 0)
new_vdd_uv = min(max((unsigned int)(drv.acpu_freq_tbl[i].vdd_core + vdd_uv),
(unsigned int)HFPLL_MIN_VDD), (unsigned int)HFPLL_MAX_VDD);
else if ( drv.acpu_freq_tbl[i].speed.khz == khz)
new_vdd_uv = min(max((unsigned int)vdd_uv,
(unsigned int)HFPLL_MIN_VDD), (unsigned int)HFPLL_MAX_VDD);
else
continue;
drv.acpu_freq_tbl[i].vdd_core = new_vdd_uv;
}
pr_warn("faux123: user voltage table modified!\n");
mutex_unlock(&driver_lock);
}
#endif /* CONFIG_CPU_VOTALGE_TABLE */
3.Save The File.Done! You've Added It To Your Kernel.
How To Add Init.d Support To Kernel?
1. Copy Your boot.img To A Folder In Ubuntu And Open A Terminal With boot.img directory.
2. Now Type The Following In Terminal -->>
Code:
abootimg -x boot.img
3. You'll Get 3 Files From It(bootimg.cfg, initrd.img, zImage)
4. Now Create A New Work Folder And Decompress "initrd.img" Using The Following Commands -->>
Code:
mkdir work
cd work
zcat ../initrd.img | cpio -i
5. Now Open The Work Folder.Now Open The "init.rc" File And Add This Line At The End Of This File -->>
Code:
# Execute files in /etc/init.d during boot
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
class late_start
user root
group root
6.Save "init.rc" File And You're Done!
Or Try This Guide By @alireza7991 -->> Here :laugh:
How To Make Kernel Boot In Permissive Mode(A Small Guide)
1. Go To "Kernel Source/security/selinux" Folder And Open "hooks.c".
2. Find This Line -->>
Code:
selinux_enforcing = enforcing ? 1 : 0;
3. Change It To -->>
Code:
selinux_enforcing = 0;// enforcing ? 1 : 0;
4. Now Save "hooks.c" File.Now Open "selinuxfs.c" File And Search For This Line -->>
Code:
if (new_value != selinux_enforcing) {
5. Add Below Code Above "if (new_value != selinux_enforcing) {" line -->>
Code:
new_value = 0;
6. Yo.You Finally Made The Kernel Boot In Permissive Mode,To Check If It Got Permissive Or Not -->> Go To Settings -> About Phone -> SE-Linux Status (You'll See Its "Permissive")
How To Build The Kernel?
1. Clone A Toolchain That Supports Your Device[
2. Point the Makefile To Your Compiler (run this from within the toolchain folder!!)
Code:
export CROSS_COMPILE=$(pwd)/bin/<toolchain_prefix>-
Example:
Code:
export CROSS_COMPILE=$(pwd)/bin/aarch64-linux-android-
3. Tell Makefile About The Architecture Of Your Device Using This Command -->>
Code:
export ARCH=<arch> && export SUBARCH=<arch>
Example:
Code:
export ARCH=arm64 && export SUBARCH=arm64
4. Locate Your Proper Defconfig File.Where You Will Found That?
Go To "arch/<arch>/configs" Folder,And There You'll Find A Defconfig File Along With Your Device Codename Like For S7 Edge, Its --> "exynos8890_hero2lte-defconfig"
5. Now Come Back To Main Kernel Source Directory Then Enter These Command To Start Building!
Code:
make clean
make mrproper
make <defconfig_name>
make -s -j$(nproc --all) [B][U]Or[/U][/B] make zImage -j4
6.And You're Done! Where You'll Find The zImage?
When Building Finished,The Terminal Will Show The Directory!
How To Flash The zImage?
1. Pull Your Device's Boot Image From The Latest Image Available For Your Device (Whether It Be A ROM Or Stock).
2. Download The Latest Android Image Kitchen From This thread
3. Run The Following With The Boot Image:
Code:
unpackimg.sh <image_name>.img
4. Locate The New zImage File And Replace It With Your Kernel Image (rename it to what came out of the boot image)
5. Run The Following To Repack:
Code:
repackimg.sh
6. Flash The New Boot Image With TWRP!​
Mentions:​
@LahKeda For Always Being With Me. (My AOSP Teacher)
@The Flash
@MZO
@krasCGQ
@flar2
@jazba
And All Devs Being With Me!
Some good stuff coming from you
Albe96 said:
6.And You're Done! Where You'll Find The zImage?
When Building Finished,The Terminal Will Show The Directory!
Click to expand...
Click to collapse
It won't if you use -s switch after make
Which will silent the output!
The resulting kernel image will be located at:
ARM: arch/arm/boot/zImage(-dtb)
ARM64: arch/arm64/boot/Image.gz(-dtb)
x86: arch/x86/boot/bzImage(-dtb)
ARM64 only:
If kernel image creation fails, complaining missing dtb, symlink dtb from ARM dts folder:
Code:
$ ln -s ../../../arm/boot/dts/<dtb-name>.dtb arch/arm64/boot/dts/<dtb-name>.dtb
Sent from my Redmi 3 using XDA Labs
krasCGQ said:
It won't if you use -s switch after make
Which will silent the output!
The resulting kernel image will be located at:
ARM: arch/arm/boot/zImage(-dtb)
ARM64: arch/arm64/boot/Image.gz(-dtb)
x86: arch/x86/boot/bzImage(-dtb)
ARM64 only:
If kernel image creation fails, complaining missing dtb, symlink dtb from ARM dts folder:
Click to expand...
Click to collapse
Thanks you sir! Will Update It Soon!
MZO said:
Some good stuff coming from you
Click to expand...
Click to collapse
But There's So New Though.I Just Explained My Guide To Help Some Noobs ?
I
Sent from my SAMSUNG-SM-N920A using Tapatalk
clmenz said:
I
Sent from my SAMSUNG-SM-N920A using Tapatalk
Click to expand...
Click to collapse
How to add to improve sound ??
Enviado desde mi XT1575 mediante Tapatalk
More feature please
lolnwl said:
More feature please
Click to expand...
Click to collapse
umm.Sure why not.But if I get a free time [emoji4]
Hi @Albe96
Can you please help me compile?
I have Samsung J7 prime SM-G610F (nougat).
I Have downloaded GCC "arm-linux-androideabi-4.9" ( as written in the readme_kernel.txt file of kernel source).
I am not sure if my device is 32-bit or 64-bit.
The readme_kernel.txt file points to 64-bit architecture so I am assuming its 64-bit.
Now the problem:-
When compiling as per your codes, when I type:
make clean,
I'm getting the error "make: *** No rule to make target 'clean'. Stop." and same for every other code after that.
Attaching the readme_kernel.txt file for your reference.
ashwini215 said:
Hi @Albe96
Can you please help me compile?
I have Samsung J7 prime SM-G610F (nougat).
I Have downloaded GCC "arm-linux-androideabi-4.9" ( as written in the readme_kernel.txt file of kernel source).
I am not sure if my device is 32-bit or 64-bit.
The readme_kernel.txt file points to 64-bit architecture so I am assuming its 64-bit.
Now the problem:-
When compiling as per your codes, when I type:
make clean,
I'm getting the error "make: *** No rule to make target 'clean'. Stop." and same for every other code after that.
Attaching the readme_kernel.txt file for your reference.
Click to expand...
Click to collapse
the error you're saying me is not a error I assume.Post full error log so I can look into it
Hi.how can we set kernel to permissive?
nikkali25 said:
Hi.how can we set kernel to permissive?
Click to expand...
Click to collapse
Yes and I think guide is already added
Albe96 said:
Yes and I think guide is already added
Click to expand...
Click to collapse
How to dis able tia and ready root kernel
Albe96 said:
the error you're saying me is not a error I assume.Post full error log so I can look into it
Click to expand...
Click to collapse
So, I corrected my previous mistake and finally was able to compile
Towards the end of compilation, I got this message :
/scripts/fips_crypto_utils.c: In function ‘main’:
./scripts/fips_crypto_utils.c:28:7: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration]
if (!strcmp ("-u", argv[1]))
^~~~~~
./scripts/fips_crypto_utils.c:52:10: warning: implicit declaration of function ‘update_crypto_hmac’ [-Wimplicit-function-declaration]
return update_crypto_hmac (vmlinux_file, hmac_file, offset);
^~~~~~~~~~~~~~~~~~
./scripts/fips_crypto_utils.c:82:10: warning: implicit declaration of function ‘collect_crypto_bytes’ [-Wimplicit-function-declaration]
return collect_crypto_bytes (in_file, section_name, offset, size, out_file);
^~~~~~~~~~~~~~~~~~~~
HMAC-SHA256(builtime_bytes.bin)= 80387d4cca5322a3de63d73fe615c492385801c8ae36494795eda733492d5a10
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
Is this anything to be concerned about?
Can I flash the kernel?
Have added the complete log.
I was able to complete with no errors! ( after running into a dozen )
Although I cannot find zimage anywhere.
I do notice that a bunch of folders / file's modified date has updated throughout the kernels source code folder .
I am building a Samsung exynos 7850 kernel .
Thanks for this great write up!
hightech316 said:
I was able to complete with no errors! ( after running into a dozen )
Although I cannot find zimage anywhere.
I do notice that a bunch of folders / file's modified date has updated throughout the kernels source code folder .
I am building a Samsung exynos 7850 kernel .
Thanks for this great write up!
Click to expand...
Click to collapse
It should be inside arch/(arm/arm64)/boot folder

Building Samsung Open-Source Kernel and disable DEFEX

I'm going to show you how to build a custom kernel, and a custom boot.img.
Requirements
A linux OS
Kernel source code from Samsung
Android Image Kitchen (Required for the SEANDROID metadata it appends automatically)
GCC Cross Compilation Toolchain 4.8 (You may just clone the repo with git, or download a zip)
Hypothetical workspace directory on the filesystem: /workspace, now prepare it like this:
/workspace/kernel - this is where the kernel source code will be, this is what we will build. Extract the downloaded Kernel.tar.gz here
/workspace/build - this is the kernel compilation result, populated by the build
/workspace/toolchain - this is the required cross-compilation toolchain you download or check-out from the google link
/workspace/kitchen - Extract Android Image Kitchen here
Click to expand...
Click to collapse
Go to http://opensource.samsung.com/reception.do and search for SM-J415, download one of the results, extract Kernel.tar.gz to /workspace/kernel. I believe SWA stands for South West Asia, and MAE - Middle-east Africa, it doesn't matter which you pick, it is related to radio regulations.
Now overwrite the file /workspace/kernel/build_kernel.sh with:
Code:
#!/bin/bash
# The cross compilation toolchain path
export TOOLCHAIN=$(pwd)/../toolchain/arm-linux-androideabi-4.8
# This is the directory for the compiled kernel
export OUTDIR="O=$(pwd)/../build"
export PATH=$TOOLCHAIN/bin:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-linux-androideabi-
export THREADS=$(nproc --all)
export COMMON_ARGS="-j$THREADS $OUTDIR arch=arm CFLAGS_MODULE=-fno-pic arch=arm"
if [ "$1" == "build" ]; then
make $COMMON_ARGS j4primelte_sea_open_defconfig
make $COMMON_ARGS
elif [ "$1" == "rebuild" ]; then
make $COMMON_ARGS
elif [ "$1" == "clean" ]; then
make $COMMON_ARGS distclean
make $COMMON_ARGS clean
else
echo "./build_kernel.sh build|rebuild|clean"
fi
Building kernel source code
Run the script:
$ cd /workspace/kernel/
edit: /workspace/kernel/arch/arm/configs/j4primelte_sea_open_defconfig
change CONFIG_SECURITY_DEFEX=y to CONFIG_SECURITY_DEFEX=n
$ bash build_kernel.sh build
It should build normally, if it fails there's something wrong with your OS setup. After a long time, you should see the compiled and compressed kernel with the DTP appended at:
/workspace/target/arch/arm/boot/zImage-dtb
The kernel configuration it created from the defconfig files in the kernel source tree is at
/workspace/target/.config
Build a new boot.img
$ cd /workspace/kitchen
$ bash unpackimg.sh /path/to/a/boot/or/recovery.img
Now you will have the unpacked kernel in: /workspace/kitchen/split_img/boot.img-zImage
Delete it
$ rm split_img/boot.img-zImage
Link the built custom kernel there instead
$ ln -s /workspace/target/arch/arm/boot/zImage-dtb /workspace/kitchen/split_img/boot.img-zImage
Now each time you create the boot.img, it will include your custom kernel instead.
Tweak the files and ramdisk as much as you want, and repackage the boot.img
$ bash repackimg.sh
Now you have a boot.img at /workspace/kitchen/image-new.img that is ready to flash to the device. You can unpack custom recoveries the same way as you unpacked boot.img to make them use your custom kernel.
Kernel configurations tried
CONFIG_SECURITY=n - boot loop
CONFIG_SECURITY_SELINUX=n - boot loop
CONFIG_SECURITY_DEFEX=n - works
CONFIG_DM_VERITY=n - works, does not prevent initramfs from using DM-VERITY, you still need some sort of ramdisk hack to disable verification of the next boot phase after initrd.
Often when editing the defconfig files, the same variables are declared in many different files so you might be better off using "sed' to change the variables, example:
$ grep -lr "CONFIG_SECURITY=y" | while read line; do sed -i 's/CONFIG_SECURITY=y/CONFIG_SECURITY=n/g' $line; done
When running "build_kernel.sh build", it will print "configuration written to .config" so verify that the variable was actually changed in the final config /workspace/build/.config
kapmino269 said:
and I think ,They aren't kernel see
Click to expand...
Click to collapse
No that is the latest kernel source code running on the latest firmware. You can use either of those 2 downloads from opensource.samsung.com
kapmino269 said:
it isn't working .
Click to expand...
Click to collapse
The kernel source code is on the Samsung opensource website.... there are two versions one that is MEA ( for Middle East and Africa roms) and the other one for SWA. It works if compiled properly
kapmino269 said:
ok
i have questions loop device depend on kernel and if it is .
How to add support?
Click to expand...
Click to collapse
It seems it depends on the kernel support but I haven't actually tried messing around that stuff
kapmino269 said:
it isn't working .
Click to expand...
Click to collapse
You need to install gcc, python and make before you run the command bash build_kernel.sh build
sudo apt install gcc make python
kapmino269 said:
I knew steps man I used Ubuntu for 2 years without windows .
thank you .
Click to expand...
Click to collapse
Do you tried make mrproper and make clean before you run build_kernel.sh?
kapmino269 said:
ok
i have questions loop device depend on kernel and if it is .
How to add support?
Click to expand...
Click to collapse
Type "make xconfig" in the kernel directory, and a window will open for configuring the .config file in that same directory.
Search for "Loopback device support" and add a checkmark (not a dot, so that the module is built into the kernel.)
kapmino269 said:
it isn't working .
Click to expand...
Click to collapse
Can you please provide a log or something? It sounds like you are missing dependencies in your operating system for building kernels.
how do you flash the new boot.img with a samsung device?
kapmino269 said:
By twrp
Click to expand...
Click to collapse
Thanks!!
I ended up using https://forum.xda-developers.com/showthread.php?t=2446269 which is pretty easy as well.
I am now stuck on how to enable wifi after flashing a different kernal.
Kernal = samsung opensource
Rom = nouget 7.1.1 (different to opensource kernal)
Any suggestions?
heavy load said:
Thanks!!
I ended up using https://forum.xda-developers.com/showthread.php?t=2446269 which is pretty easy as well.
I am now stuck on how to enable wifi after flashing a different kernal.
Kernal = samsung opensource
Rom = nouget 7.1.1 (different to opensource kernal)
Any suggestions?
Click to expand...
Click to collapse
Install the Magisk module LIBSECURE_STORAGE COMPANION
ashyx said:
Install the Magisk module LIBSECURE_STORAGE COMPANION
Click to expand...
Click to collapse
Thanks Ashyx, I had a play with your kernal on github, nice work there!
I ended up downloading a stock rom matching the samsung opensource kernal build number, worked out of the box.
kapmino269 said:
See that :
@ashyx any help
I NEED TO ADD SOME MODULES.
Click to expand...
Click to collapse
It's telling you the path to the defconfig doesn't exist.
Either the name is wrong or it doesn't exist in the config directory.
kapmino269 said:
This, I solved it yesterday, Thanks .
But I have 2 problems :
1- Device is arm and at bulid_kernel.sh tell me to use toolchain arch64 ,
Which I should Use arm or arm64 ,
I confused as cpu is arm64 .
https://www.qualcomm.com/products/snapdragon/processors/425
Or
Ndk
https://developer.android.com/ndk/downloads/index.html
2- Which command I should write after menuconfig
./build_kernel.sh
Or
make -jX .
Click to expand...
Click to collapse
Just use whichever is in the build script.
You will need to add menuconfig to build_kernel.sh before make or your changes will be lost.
Then run build_kernel.sh
kapmino269 said:
@ashyx ,all is ok .
The error from clang and there is 2 config files .
Fixed and I will test kernel but I have problem when compiling I choose lz4 type ,do U see I should choose another .
Also where is zimage now ,i compiled manually not with build_kernel.sh .
Click to expand...
Click to collapse
You don't need the export arguments which are contradictory anyway, as you have already defined your toolchain and architecture before hand.
Also the boot image does not need to be lz4. The compiler will tell you where the finished zImage is when completed. You should find it in the boot directory of the arm64 directory if you are not using OUT_DIR statements.
kapmino269 said:
Sorry ashyx this is last thing ,
-You told me later that device is arm not arm64 .
In Your twrp thread .
-Also defconfig of device in /arch/arm .
-Arch=arm in build_kernel.sh .
-Gsi system armaonly only work on the device .
-All apps told that device is arm .
I confused ,
Please tell that it is right to use arm64 tool chain .
Or How did U build it ?
By arm64 toolchain or arm toolchain ?
Very Thank U .
Click to expand...
Click to collapse
I was just going by the screen shot you posted. Like I said your commands are contradictory.
You have both arm and arm64 toolchains defined in the same script.
You also have an export statement for arm64 directly under a statement for an arm toolchain.
Not sure why you added both?
As far as I can see the architecture you're compiling for is arm, so you need an arm toolchain.
kapmino269 said:
It contains errors
Click to expand...
Click to collapse
This is the script I use.
You will need to modify the path to your toolchain.
can i use the source code to build kernel for android 10 one ui if the source built for mm

Categories

Resources