yashsingh1/xdaforums huggingface dataset:
[Android] Yamaha169:
kernel mods....

Would someone be willing to modify this kernel originally modded by samfirm.

To set selinux to permissive at boot?

This should allow a reboot while rooted.. which is all that this variant lacks.

Also if possible, fixing the MTP mode to always prompt when plugged in. (If it's not) I had an instance where mtp and PTp mode would no longer show up when connected to a laptop. Even ADB wouldn't recognize the device. I also tried the *#0808#* and set it that way... nothing worked, so I warranted the device.

Also if possible, fix the WiFi issue that comes with flashing this kernel.

It will not remember passwords unless you set value to false inside of build.prop to fix it...

All small mods... but I have no experience with modifying kernels. :(

https://drive.google.com/folderview?id=0B1dPgClURCHJRUY5cHF1SUxPc3M

This is for G928A that I swear nobody is working on still ;)
[Android] ryandxter:
Ask for help need senior devs

hello, can someone help me to explain how to modify stock kernel (qualcomm chipset)? I'm already dig up and search whole thread related on XDA & Github + watch youtube tutorial as refer but seems don't understand yet about how to set up things

pre-requisite that I'm done was:

1. Ubuntu Xenial

2. Grab kernel source from Sony

3. Grab toolchain (GCC linaro 4.9)

then what I don't understand like makeproper, patch, etc because not every script part on certain thread longer works / outdated for my latest kernel source

I'm would be glad if someone teach me trough more personal way by PM / Whatsapp

thanks for your help
[Android] neonkat:
1.is that ubuntu 16.04?i will recommend to go with ubuntu 14.04 because most guides are based on that so will be easy for you get help.

2.:good:

3.do not go with linaro atm because it shows warnings as build error and can make stuffs difficult for you.so you can use google's gcc 4.9 or go with uber tc 4.9.

everything is well explained here,i too was a noob one day(still a noob though :v)and these guides are gold for me.

just go through every step and if you feel issue,just drop a post here.;)
[Android] ryandxter:
1. yes it's LTS 16.04, okay then I'll starts from 14.04

3. my friend said it too will show warnings and fail compile, I'll try your advice gcc 4.9
[Android] neonkat:
3.i have used nearly all tc's and only found linaro to give error for warnings(though there is a easy way to stop that).
[Android] ryandxter:
hi I'm reached step 5 build's step part B, when I'm type "make -j" error exist like picture I'm attached below

I'm on 14.04 gcc 4.9 g++ 4.9
[Android] Hacker432:
Make j4 not j-4
[Android] neonkat:
*make -j4
[Android] Hacker432:
Oversight, sorry ^^
[Android] rocknegi:
rocknegi@rocknegi-VirtualBox:~/kernel$ make -j4

scripts/kconfig/conf --silentoldconfig Kconfig

CHK include/linux/version.h

CHK include/generated/utsrelease.h

UPD include/generated/utsrelease.h

CC scripts/mod/empty.o

/home/rocknegi/ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-makegcc: No such file or directory

Is your PATH set correctly?

scripts/Makefile.build:307: recipe for target 'scripts/mod/empty.o' failed

make[2]: *** [scripts/mod/empty.o] Error 2

scripts/Makefile.build:443: recipe for target 'scripts/mod' failed

make[1]: *** [scripts/mod] Error 2

Makefile:510: recipe for target 'scripts' failed

make: *** [scripts] Error 2

make: *** Waiting for unfinished jobs....

/home/rocknegi/kernel/scripts/gcc-version.sh: line 25: /home/rocknegi/ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-makegcc: No such file or directory

/home/rocknegi/kernel/scripts/gcc-version.sh: line 26: /home/rocknegi/ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-makegcc: No such file or directory

/home/rocknegi/kernel/scripts/gcc-version.sh: line 25: /home/rocknegi/ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-makegcc: No such file or directory

/home/rocknegi/kernel/scripts/gcc-version.sh: line 26: /home/rocknegi/ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-makegcc: No such file or directory
[Android] neonkat:
toolchain path not found.

i will recommend to use standalone toolchain rather than ndk.you can find google'es arm-eabi 4.9 or others like uber or linaro.

for standalone toolchain,go to kernel source and find *makefile*.under that,find "toolchain directory" line(use searh option) and put the location of your toolchain CORRECTLY.

this will save your time for retyping toolchain location.
[Android] rocknegi:
check the path
[Android] neonkat:
what command are you using?(the export cross compile)
[Android] neonkat:
First of all,use hide tags!

check this.

do changes as done there.
[Android] Hacker432:
[MENTION=5991747]neonkat[/MENTION]

Hi

I would like to ask you a question

I'm porting kernel v3.10.101 for my device but there aren't marshmallow ROMs yet

Can it boot with lollipop?

I ask this because I see all devs that they ports 3.10.49 for lollipop and 3.10.101 for marshmallows
[Android] rocknegi:
i dint get it what to do with it?
[Android] neonkat:
ofcourse you can.no need to port it,just head over to kernel.org,download the kernel updates as patch(or like your choice)and update your kernel.

it is generally termed as upgrading linux kernel.it does not depend on android version.

there is a nice video on youtube teaching you step by step on how to upgrade linux kernel.

or you can also cherry-pick them from some other custom kernel who have patched the kernel.(manual is better)
[Android] Hacker432:
Thank for the answer ;)
[Android] neonkat:
the file names and directory are given there which are modified.find the exact line in that file given and add the green ones and remove the red ones.after making all the given changes,your build errors will be fixed.

you can read about github on google.

edit:yeah, you can just use the gk tree and try to build a kernel out of it.
[Android] tschmid:
[MENTION=5991747]neonkat[/MENTION] may ask you how i can update this kernel: https://github.com/JideTechnology/remixos-kernel/tree/jide_sk1w?files=1 to support selinuxdb 30?

Ive patched this kernel to last 3.4 series (3.4.112) but selinux.h shows selinuxdb max as 26

Do you've any hint? Is it possible to use nvidia roth cm 13.0 kernel and put in eg Touchscreen drivers from jide kernel?

Many thanks

Thomas

Gesendet von meinem LG-D855 mit Tapatalk
[Android] neonkat:
i don't have a lot of info about that but i checked on google and its given that selinux policy 27+ requires 3.5 kernel(min.).

btw didn't get the second part.
[Android] tschmid:
Oh sh*t ? so its a hard part isnt it?

Cyanogenmod android_kernel_nvidia_roth has a cm13.0 branch, kernel version 3.4.10 but it has selinuxdb 30 defined and my kernel 3.4.112 not.

What do you recomment what i can do?

Gesendet von meinem LG-D855 mit Tapatalk
[Android] neonkat:
sorry i don't have info. about that.
[Android] rocknegi:
downloaded uber toolchain 4.9 arm from here https://bitbucket.org/UBERTC/arm-eabi-4.9.git

what path should i use? see ss attached

rocknegi@rocknegi-VirtualBox:~/kernel$ export ARCH=arm

rocknegi@rocknegi-VirtualBox:~/kernel$ export CROSS_COMPILE=/home/rocknegi/arm-eabi-4.9/bin/arm-eabi-

rocknegi@rocknegi-VirtualBox:~/kernel$ make armani_user_deconfig

make[1]: *** No rule to make target 'armani_user_deconfig'. Stop.

Makefile:496: recipe for target 'armani_user_deconfig' failed

make: *** [armani_user_deconfig] Error 2

rocknegi@rocknegi-VirtualBox:~/kernel$

if toolchain is not good please provide a link to better one [IMG="downloaded uber toolchain"]https://drive.google.com/open?id=0B210VGRWFHRCSC1JeXJqV3liZE0[/IMG]
[Android] neonkat:
toolchain is correct.try another config,cyanogenmod_armani_defconfig.
[Android] rocknegi:
I checked in kernel/arch/arm/config/

It's armani_user_deconfig only

I have used it earlier also :/

And the path I use in export Cross_compile is that correct ?
[Android] neonkat:
typo error,its defconfig.:v

path is correct.
[Android] neonkat:
because there was an build error.remember i sent you a link of github of god's kernel?

check the link.you will know what changes you need to make in source to fix build error.

*green one means to add and red ones to remove,you can read about github commits to understamd them
[Android] rocknegi:
i made the changes in my github forked repo how to sync it with my sources in pc??

i cant download github desktop app too. It fails every time downloading 115mb can you link me to an offline installer ??

i have 64 kb/s speed or upload the files plz
[Android] neonkat:
when you open your repository on git,there will be a clone/download option on the right side of page. check that there will be a download as zip option.

the zip file will be around 120-150 mb.

i too have that 60kb/s connection and git clone always give error to me after sometimes.:p

or you can also make changes locally(not diff.)as file name,directory and all stuffs are given there.
[Android] rocknegi:
rocknegi@rocknegi-VirtualBox:~/kernel$ make -j1

CHK include/linux/version.h

CHK include/generated/utsrelease.h

make[1]: 'include/generated/mach-types.h' is up to date.

CALL scripts/checksyscalls.sh

CHK include/generated/compile.h

GEN .version

CHK include/generated/compile.h

UPD include/generated/compile.h

CC init/version.o

LD init/built-in.o

LD .tmp_vmlinux1

drivers/built-in.o: In function `iris_fops_open':

/home/rocknegi/kernel/drivers/media/radio/radio-iris.c:5100: undefined reference to `radio_hci_smd_init'

Makefile:878: recipe for target '.tmp_vmlinux1' failed

make: *** [.tmp_vmlinux1] Error 1

getting this error
[Android] neonkat:
try this.
[Android] rocknegi:
i was also looking at this but all the changes were already merged in armani dev source
[Android] rocknegi:
tried make clean still same error :(
[Android] Hacker432:
[MENTION=5991747]neonkat[/MENTION]

Hi, I'm helping a user to compile TWRP but the img is too big

So I was thinking to compress the kernel but I've never done it

Do you have any suggestion?
[Android] neonkat:
you can reduce the kernel size by compression both kernel and ramdisk with xz compression.

for me,the zimage with gpio comp. was 6.3 mb but with xz,it reduced to 4.7 mb and xz compressed kernel are also fast.

or you can also change the partition size for recovery(in this case increase it).
[Android] Hacker432:
OK for the compression?

Menuconfig?
[Android] neonkat:
menuconfig or manually to defconfig.

find config_kernel_xz and enable it(=y)and disable gpio compression.

find config_rd_xz and enable it and disable config_rd_gpio.
[Android] Hacker432:
Thank you very much man :)
[Android] rocknegi:
[MENTION=5991747]neonkat[/MENTION]

i made the changes from here https://github.com/tarunkapadia93/gk_armani/tree/gk-r8/drivers/media/radio

and https://github.com/CyanogenMod/android_kernel_lge_g3/commit/6ad3bb738e3dd2d662d418aa123067d215e9fea4

still

rocknegi@rocknegi-VirtualBox:~/kernel$ make -j4

scripts/kconfig/conf --silentoldconfig Kconfig

CHK include/linux/version.h

CHK include/generated/utsrelease.h

UPD include/generated/utsrelease.h

make[1]: Nothing to be done for 'arch/arm/boot/dtbs'.

make[1]: 'include/generated/mach-types.h' is up to date.

CALL scripts/checksyscalls.sh

CHK include/generated/compile.h

CC init/version.o

CC kernel/sys.o

LD init/built-in.o

CC kernel/trace/trace.o

CC drivers/media/radio/radio-iris.o

CC [M] drivers/media/radio/radio-iris-transport.o

LD kernel/trace/built-in.o

CC kernel/module.o

LD drivers/media/radio/built-in.o

LD drivers/media/built-in.o

LD drivers/built-in.o

LD kernel/built-in.o

LD vmlinux.o

MODPOST vmlinux.o

GEN .version

CHK include/generated/compile.h

UPD include/generated/compile.h

CC init/version.o

LD init/built-in.o

LD .tmp_vmlinux1

drivers/built-in.o: In function `iris_fops_open':

/home/rocknegi/kernel/drivers/media/radio/radio-iris.c:5100: undefined reference to `radio_hci_smd_init'

Makefile:878: recipe for target '.tmp_vmlinux1' failed

make: *** [.tmp_vmlinux1] Error 1

rocknegi@rocknegi-VirtualBox:~/kernel$
[Android] rocknegi:
i have got the zImage all errors fixed

now what to do
[Android] neonkat:
pack it into boot.img.either use some mkbootimg tool(make a quick google search)or take existing boot.img of rom,unpack it(android image kitchen)add new zimage and repack it.

else use anykernel script.
[Android] rocknegi:
i used this https://github.com/khanfrd/mkbootimg_tools to unpack boot.img of tipsy rom

now wherer to put this zImage and reoack it?
[Android] neonkat:
replace the zimage in that folder with you new zimage and use the repack command.

this will give a boot-new.img,rename that to boot.img and flash.
[Android] rocknegi:
the zimage was not there i have placed it there

---------- Post added at 10:23 AM ---------- Previous post was at 10:12 AM ----------

getting this error while repacking

rocknegi@rocknegi-VirtualBox:/sources/sf_Compressed/mkbootimg_tools-master$ ./mkboot namefolderout newimgname.img

mkbootimg from namefolderout/img_info.

./mkboot: line 145: /sources/sf_Compressed/mkbootimg_tools-master/mkbootfs: No such file or directory

kernel : kernel

ramdisk : new_ramdisk

page size : 2048

kernel size : 8649976

ramdisk size : 20

dtb size : 188416

base : 0x00000000

kernel offset : 0x00008000

ramdisk offset : 0x01000000

tags offset : 0x00000100

dtb img : dt.img

cmd line : console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=armani zcache.enabled=1 androidboot.selinux=permissive

ramdisk is gzip format.

./mkboot: line 101: /sources/sf_Compressed/mkbootimg_tools-master/mkbootimg: No such file or directory

Make boot.img Error! pls check img_info file.
[Android] neonkat:
Make boot.img Error! pls check img_info file
[Android] rocknegi:
nothing here
[Android] neonkat:
looks like some script error.if you have windows,then try using android image kitchen for windows(just drag and drop).
[Android] freaky2xd:
Do I have to install Ubuntu 12 or is a newer version also legit?
[Android] neonkat:
go for ubuntu 14.04 LTS.
[Android] riyosakura:
Is this a good way to start kernel development? Or is there any better way than this one?

I'm about to learn how to build custom kernel for my device moto x1 (ghost), using snapdragon s4 pro.
[Android] neonkat:
ofcourse,yes!these are basics.
[Android] abhishekstar:
Error while making

Getting multiple target error ..compilation stops
[Android] freaky2xd:
Should I use Ubuntu 12.04 or is Ubuntu 16.04 also appropriate for kernel modding?

---------- Post added at 08:51 AM ---------- Previous post was at 08:50 AM ----------

Am I allowed to build public github things like a breathing notification led into my kernel?
[Android] neonkat:
all support but i recommend 14.04.

yep.
[Android] pec0ra:
Any Ubuntu version will work.

You can include any other person's work into your kernel... but you have to follow the license's rules. For an Android kernel, this mostly means that you have to publish your sources too (you have to do it anyway if you publish your kernel)

Then if the person you use the work from is a XDA member, you should mention that it is his work. He will surely appreciate it and if someone has development questions about this particular feature he knows who to ask.
[Android] Ferrumlan:
Ty i built my first kernel, but now it's image.gz how to make it boot.img?
[Android] neonkat:
there will be an Image because you must be building for arm64.just rename it to zImage and replace with one from stock boot.img.

you will get a split_img folder,replace there with the stock zimage and RENAME IT.

or you can use anykernel script or varunchitre's flashable zip.
[Android] ShlCar347:
Can anyone tell me which packages do I need for compiling a kernel in Ubuntu 16.04, and the commands to get them!

I've used this

sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2

Do I need any more required files?
[Android] Droidcore:
any help?

In file included from include/linux/rwsem.h:40:0,
from include/linux/mm_types.h:10,
from include/asm-generic/pgtable.h:7,
from /home/rootz/kernel/ctx/arch/arm64/include/asm/pgtable.h:454,
from /home/rootz/kernel/ctx/arch/arm64/include/asm/io.h:30,
from include/linux/clocksource.h:19,
from include/clocksource/arm_arch_timer.h:19,
from /home/rootz/kernel/ctx/arch/arm64/include/asm/arch_timer.h:27,
from /home/rootz/kernel/ctx/arch/arm64/include/asm/timex.h:19,
from include/linux/timex.h:65,
from include/linux/sched.h:17,
from arch/arm64/kernel/asm-offsets.c:21:
arch/arm64/include/generated/asm/rwsem.h:1:31: fatal error: asm-generic/rwsem.h: No such file or directory
#include <asm-generic/rwsem.h>
^
compilation terminated.
make[1]: *** [arch/arm64/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
HOSTLD scripts/mod/modpost
[Android] neonkat:
modify to:

#include "asm-generic/rwsem.h"
[Android] Droidcore:
drivers/video/msm/mdss/mdss_dsi_panel.c: In function 'mdss_dsi_panel_config_res_properties':
drivers/video/msm/mdss/mdss_dsi_panel.c:2017:33: warning: passing argument 2 of 'mdss_panel_parse_te_params' makes integer from pointer without a cast
error, forbidden warning: mdss_dsi_panel.c:2017
make[4]: *** [drivers/video/msm/mdss/mdss_dsi_panel.o] Error 1
make[3]: *** [drivers/video/msm/mdss] Error 2
make[2]: *** [drivers/video/msm] Error 2
make[1]: *** [drivers/video] Error 2
make[1]: *** Waiting for unfinished jobs....

try add powersuspend
[Android] Droidcore:
fix
[Android] xDARKMATT3Rx:
mdss_mdp.h: No such file or directory

Hi everyone,

I am having a bit of an issue with an error stopping me from compiling stock source that seems to be for a missing file, however I checked and the file it says is missing is actually there. I have looked all over and can't seem to find a solution to this. Do you have any idea what I can do to fix this?

CC drivers/video/msm/mdss/mdss_dsi.o

In file included from drivers/video/msm/mdss/mdss_debug.h:19:0,

from drivers/video/msm/mdss/mdss_dsi.c:30:

drivers/video/msm/mdss/mdss_mdp_trace.h:25:51: fatal error: ../../drivers/video/msm/mdss/mdss_mdp.h: No such file or directory

#include "../../drivers/video/msm/mdss/mdss_mdp.h"

^

compilation terminated.

make[4]: *** [drivers/video/msm/mdss/mdss_dsi.o] Error 1

make[3]: *** [drivers/video/msm/mdss] Error 2

make[2]: *** [drivers/video/msm] Error 2

make[1]: *** [drivers/video] Error 2

make[1]: *** Waiting for unfinished jobs....
[Android] Hacker432:
Where did you find the missing file?(path to it please)
[Android] robcore:
Whoo! I can help! Lol sorry just excited that my countless hours of OCD are paying off.

Based on the error output, looks like three files have a line that looks like this:

#include "mdss_mdp.h"

That means they expect that header file in the same directory they are in.

What I would do is open a terminal, cd to the root of your kernel directory, and type

find -name '*mdss_mdp.h*' | sort -d

Odds are the file will be located in include/linux/mdss_mdp.h

If that's the case, open all three files:

drivers/video/msm/mdss/mdss_debug.h

drivers/video/msm/mdss/mdss_dsi.c

drivers/video/msm/mdss/mdss_mdp_trace.h

And change

#include "mdss_mdp.h"

to

#include <linux/mdss_mdp.h>

Which instructs the compiler to look for the header file in the appropriate location.

Or, If the file is found elsewhere, simply move it to

drivers/video/msm/mdss/

If the file isn't found in your tree, you need to recheck your sources because a crucial header should not be missing. Or make sure you didn't check an option in your config that isn't supported for your target.
[Android] 2111002640:
hi guys, i using htc butterfly 2 (b2ul) i try this command "adb pull proc/config.gz" but it sad file not found :( how can i get file config.gz ????
[Android] _that:
You forgot a slash:

adb pull /proc/config.gz

If that still doesn't work, your kernel wasn't built with embedded config.
[Android] Deadly:
Then no need of make menuconfig.. its just a menu interface to edit .config file under folder name "common" in source.. if you just want to build without modifying then use command "make"... or "make -j2" or "make -j3" if you have dual or quad core CPU in PC to speed up make process..

hit thanks button! If above post helps u..

Sent from my GT-S6102
[Android] triptosyll:
Well now I get this error:

http://pastebin.com/VnE5Yhzb

Any idea?

The files is there, and that's the correct directory its in. I opened the file myself, so why does it say that it can't open it?

________________________________

Bacon in my coffee, please? You don't have bacon?! Unacceptable!!
[Android] varun.chitre15:
Good tutorial :)

I have a problem here though

I have put the .c files, did all necessary changes in Kconfig and Makefile and did 'make clean' and everything needed for cleaning. Then started the compilation process.

Now my problem is, the .o files which are object files for those .c files of governors are not getting generated

i.e for cpufreq_smartass.c there should be a cpufreq_smartass.o file generated during compilation right?

Only object files for stock governors are getting generated i.e conservative, ondemand etc but not the one I added

But it is not getting generated

What could be the issue?

Did I miss anything?
[Android] Deadly:
You are using 64 or 32 bit os? If 64 you need to download a tool which can run 32 bit code.. I forgot name.. search in Google.. starts from I..

hit thanks button! If above post helps u..

Sent from my GT-S6102
[Android] triptosyll:
U can't elaborate? Cuz I have NO IDEA what u might b talking about. A while back I got the 32 bit libraries. Is that what ur talking about?

________________________________

Bacon in my coffee, please? You don't have bacon?! Unacceptable!!
[Android] Deadly:
Yup that's what I meant.. sorry I'm away from PC and typing on mobile is not my thing.. hope pm helps you..

hit thanks button! If above post helps u..

Sent from my GT-S6102
[Android] triptosyll:
Anybody have any idea why I get this error?

________________________________

Bacon in my coffee, please? You don't have bacon?! Unacceptable!!
[Android] lithid-cm:
Does that file exists?
[Android] thicklizard:
have you tried make menuconfig and looking at cpu powermanagement?
[Android] triptosyll:
Yep, with a lot of info in it. I don't know why it says it can't open it, cuz its there. And its in the directory it says it should b in.

________________________________

Bacon in my coffee, please? You don't have bacon?! Unacceptable!!
[Android] lithid-cm:
what are you typing to compile the kernel?
[Android] triptosyll:
Make -j

________________________________

Bacon in my coffee, please? You don't have bacon?! Unacceptable!!
[Android] anryl:
Include/linux/cpufreq.h

Makefile

Kconfig-iosched

Odesláno z mého HTC EVO 3D X515m pomocí Tapatalk 2
[Android] blazingwolf:
You need a number after the -j. This number is dependent on how many cores your pc has. So a dual core could be -j4 (you can usually double the amount of cores you have).

So the command should be "make -j4".
[Android] incarnation95:
Thanks for the thread mate:D

Loved reading it
[Android] triptosyll:
Yeah I know. I was just telling him the way I got the build running. When I do it on my comp, I always put a number after the -j. Thanks tho man!

________________________________

Bacon in my coffee, please? You don't have bacon?! Unacceptable!!