[GUIDE]How to build kernel from Samsung Source/Edit ramdisk[n5110/n5100] - Galaxy Note 8.0 (Tablet) Android Development

{
"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"
}
Team FAH-Q Presents....
Hey guys the following tutorial is for any thinkerers of Stock Samsung Kernel for Samsung Note 8(n5110/n5100)
*Most kernels work the same way but my guide is using this source
Step One:
Download the samsung kernel source for your device
- www.opensource.samsung.com
- search for your device(in this case I'm using n5110)
- now download source(in this case MI1 source)
- download Beastools as you will need them later.
Step Two:
After source is downloaded you will have a giant zip file
- unzip GT-N5110_SEA_JB_Opensource_Update2.zip
- next you need to unzip the Kernel.tar.gz file(any zip manager should work)
Step Three:
Now you have your source to build your zImage(kernel) so lets get the toolchain!
- get Toolchain from android git server , codesourcery and etc ... arm-eabi-4.4.3
Step Four:
Lets edit the Makefile so it uses the toolchain.
- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
Ex) CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.4.3/bin/arm-eabi- // check the location of toolchain
Step Five:
To build the kernel follow these steps.
- Open a terminal
- cd to the location of your kernel source
- exceuted the following two commands:
make kona_01_defconfig
make
- give it some time as it can take up to hours to build depending on your build machine.
Step Six:
Once zImage and modules are built get them together with the ramdisk.
- the following are the locations where to find kernel and modules:
kernel/drivers/scsi/scsi_wait_scan.ko
kernel/drivers/net/wireless/bcmdhd/dhd.ko
kernel/arch/arm/boot/zImage
Step Seven:
Lets extract the ramdisk from a stock boot.img or a recovery.img file.
*use the beastools.zip file attached to this post to complete the following.
- unzip my beastools.zip and place boot.img in the same extracted folder.
- open a terminal and cd to the extracted beastools
- run this command to split ramdisk and zImage:
./split_boot boot.img (if using recovery.img just replace boot.img with recovery.img)
*I have included a script by the name of Unpack_kernel.sh that can save you the last step by just running this command:
./Unpack_kernel.sh (this is if you're lazy lol)
Step Eight:
With your ramdisk extracted make whatever changes you want to it(such as making kernel insecure or whatever)
- grab modules and place them in the ramdisk: ramdisk/lib/modules/ (replace old modules or wifi wont work).
- after modules are placed and ramdisk changes are done continue to step nine.
Step Nine:
Place the ramdisk and zImage in the same beastools unzipped folder
- to repack kernel you can use the script I included called pack_kernel.sh by running( ./pack_kernel.sh)
or
- run the commands on your own:
#Ramdisk Repacking
./mkbootfs ramdisk | gzip > ramdisk-new.gz
cd ramdisk
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
cd ../
#Boot.img repacking
./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz -o new_boot.img
Step 10:
You will now have your new kernel named new_boot.img
- rename it to boot.img and flash it through heimdall or make it into a flashable for CWM/TWRP.
My Kernel using these steps and making boot.img insecure/enabling init.d access.
Link: Proton_test_kernel
DISCLAIMER:
As always I am not held responsible for anything that happens with your device by flashing anything I make/guide you through making youself.
I am not responsible if flashing my file makes girls more attracted to you either. lol
Hope you guys found this tutorial useful, if so please hit the thanks/donate buttons
In case some of you notice there's an extra file I didn't use in the beastools, boot_info (this file will be used in another little guide but in short it helps you check the following things:
- page size
- base address
- ramdisk address
- cmdline
for those that didn't notice that was in there, shame on you! lol jk kinda.
Post 2,3 and 4 will be taken by me as i will post other guides such as how to make boot.img insecure and how to properly flash boot.img/recovery.img to our Note 8.0 with heimdall as I've yet to see anyone flash anything with heimdall to this tablet.
** Guides will be leaned toward making your kernel from samsung sources, making a zip file to flash it, how to flash through heimdall, and changes you can make yourself to the ramdisk. I like to keep guides that are about the same aspect of modding in the same thread.

mine! lol

30 seconds is too long of a wait to win the post lol

this post smells lol

Pretty cool how about a guide on porting a touch wiz ROM all guide I seen before only show porting from devices that have the same chipset or same android version I'd love to learn to port

DLM2583 said:
Pretty cool how about a guide on porting a touch wiz ROM all guide I seen before only show porting from devices that have the same chipset or same android version I'd love to learn to port
Click to expand...
Click to collapse
My time is limited full time work and full time school :/
I have a couple of projects including this one to work on for the note 8.
After that, for sure I'll put a guide up just know theres no generic way to port touchwiz as every rom is different and theres alot of kernel dependencies for it to work.
Sent from my SCH-I605 using xda app-developers app

Beastmode said:
Team FAH-Q Presents....
Hey guys the following tutorial is for any thinkerers of Stock Samsung Kernel for Samsung Note 8(n5110/n5100)
*Most kernels work the same way but my guide is using this source
Step One:
Download the samsung kernel source for your device
- www.opensource.samsung.com
- search for your device(in this case I'm using n5110)
- now download source(in this case MI1 source)
- download Beastools as you will need them later.
Step Two:
After source is downloaded you will have a giant zip file
- unzip GT-N5110_SEA_JB_Opensource_Update2.zip
- next you need to unzip the Kernel.tar.gz file(any zip manager should work)
Step Three:
Now you have your source to build your zImage(kernel) so lets get the toolchain!
- get Toolchain from android git server , codesourcery and etc ... arm-eabi-4.4.3
Step Four:
Lets edit the Makefile so it uses the toolchain.
- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
Ex) CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.4.3/bin/arm-eabi- // check the location of toolchain
Step Five:
To build the kernel follow these steps.
- Open a terminal
- cd to the location of your kernel source
- exceuted the following two commands:
make kona_01_defconfig
make
- give it some time as it can take up to hours to build depending on your build machine.
Step Six:
Once zImage and modules are built get them together with the ramdisk.
- the following are the locations where to find kernel and modules:
kernel/drivers/scsi/scsi_wait_scan.ko
kernel/drivers/net/wireless/bcmdhd/dhd.ko
kernel/arch/arm/boot/zImage
Step Seven:
Lets extract the ramdisk from a stock boot.img or a recovery.img file.
*use the beastools.zip file attached to this post to complete the following.
- unzip my beastools.zip and place boot.img in the same extracted folder.
- open a terminal and cd to the extracted beastools
- run this command to split ramdisk and zImage:
./split_boot boot.img (if using recovery.img just replace boot.img with recovery.img)
*I have included a script by the name of Unpack_kernel.sh that can save you the last step by just running this command:
./Unpack_kernel.sh (this is if you're lazy lol)
Step Eight:
With your ramdisk extracted make whatever changes you want to it(such as making kernel insecure or whatever)
- grab modules and place them in the ramdisk: ramdisk/lib/modules/ (replace old modules or wifi wont work).
- after modules are placed and ramdisk changes are done continue to step nine.
Step Nine:
Place the ramdisk and zImage in the same beastools unzipped folder
- to repack kernel you can use the script I included called pack_kernel.sh by running( ./pack_kernel.sh)
or
- run the commands on your own:
#Ramdisk Repacking
./mkbootfs ramdisk | gzip > ramdisk-new.gz
cd ramdisk
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
cd ../
#Boot.img repacking
./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz -o new_boot.img
Step 10:
You will now have your new kernel named new_boot.img
- rename it to boot.img and flash it through heimdall or make it into a flashable for CWM/TWRP.
My Kernel using these steps and making boot.img insecure/enabling init.d access.
Link: Proton_test_kernel
DISCLAIMER:
As always I am not held responsible for anything that happens with your device by flashing anything I make/guide you through making youself.
I am not responsible if flashing my file makes girls more attracted to you either. lol
Hope you guys found this tutorial useful, if so please hit the thanks/donate buttons
In case some of you notice there's an extra file I didn't use in the beastools, boot_info (this file will be used in another little guide but in short it helps you check the following things:
- page size
- base address
- ramdisk address
- cmdline
for those that didn't notice that was in there, shame on you! lol jk kinda.
Post 2,3 and 4 will be taken by me as i will post other guides such as how to make boot.img insecure and how to properly flash boot.img/recovery.img to our Note 8.0 with heimdall as I've yet to see anyone flash anything with heimdall to this tablet.
** Guides will be leaned toward making your kernel from samsung sources, making a zip file to flash it, how to flash through heimdall, and changes you can make yourself to the ramdisk. I like to keep guides that are about the same aspect of modding in the same thread.
Click to expand...
Click to collapse
Nice 1.
I'll try this method for build different model.

Beastmode said:
Team FAH-Q Presents....
Hey guys the following tutorial is for any thinkerers of Stock Samsung Kernel for Samsung Note 8(n5110/n5100)
*Most kernels work the same way but my guide is using this source
Step One:
Download the samsung kernel source for your device
- www.opensource.samsung.com
- search for your device(in this case I'm using n5110)
- now download source(in this case MI1 source)
- download Beastools as you will need them later.
Step Two:
After source is downloaded you will have a giant zip file
- unzip GT-N5110_SEA_JB_Opensource_Update2.zip
- next you need to unzip the Kernel.tar.gz file(any zip manager should work)
Step Three:
Now you have your source to build your zImage(kernel) so lets get the toolchain!
- get Toolchain from android git server , codesourcery and etc ... arm-eabi-4.4.3
Step Four:
Lets edit the Makefile so it uses the toolchain.
- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
Ex) CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.4.3/bin/arm-eabi- // check the location of toolchain
Step Five:
To build the kernel follow these steps.
- Open a terminal
- cd to the location of your kernel source
- exceuted the following two commands:
make kona_01_defconfig
make
- give it some time as it can take up to hours to build depending on your build machine.
Step Six:
Once zImage and modules are built get them together with the ramdisk.
- the following are the locations where to find kernel and modules:
kernel/drivers/scsi/scsi_wait_scan.ko
kernel/drivers/net/wireless/bcmdhd/dhd.ko
kernel/arch/arm/boot/zImage
Step Seven:
Lets extract the ramdisk from a stock boot.img or a recovery.img file.
*use the beastools.zip file attached to this post to complete the following.
- unzip my beastools.zip and place boot.img in the same extracted folder.
- open a terminal and cd to the extracted beastools
- run this command to split ramdisk and zImage:
./split_boot boot.img (if using recovery.img just replace boot.img with recovery.img)
*I have included a script by the name of Unpack_kernel.sh that can save you the last step by just running this command:
./Unpack_kernel.sh (this is if you're lazy lol)
Step Eight:
With your ramdisk extracted make whatever changes you want to it(such as making kernel insecure or whatever)
- grab modules and place them in the ramdisk: ramdisk/lib/modules/ (replace old modules or wifi wont work).
- after modules are placed and ramdisk changes are done continue to step nine.
Step Nine:
Place the ramdisk and zImage in the same beastools unzipped folder
- to repack kernel you can use the script I included called pack_kernel.sh by running( ./pack_kernel.sh)
or
- run the commands on your own:
#Ramdisk Repacking
./mkbootfs ramdisk | gzip > ramdisk-new.gz
cd ramdisk
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
cd ../
#Boot.img repacking
./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz -o new_boot.img
Step 10:
You will now have your new kernel named new_boot.img
- rename it to boot.img and flash it through heimdall or make it into a flashable for CWM/TWRP.
My Kernel using these steps and making boot.img insecure/enabling init.d access.
Link: Proton_test_kernel
DISCLAIMER:
As always I am not held responsible for anything that happens with your device by flashing anything I make/guide you through making youself.
I am not responsible if flashing my file makes girls more attracted to you either. lol
Hope you guys found this tutorial useful, if so please hit the thanks/donate buttons
In case some of you notice there's an extra file I didn't use in the beastools, boot_info (this file will be used in another little guide but in short it helps you check the following things:
- page size
- base address
- ramdisk address
- cmdline
for those that didn't notice that was in there, shame on you! lol jk kinda.
Post 2,3 and 4 will be taken by me as i will post other guides such as how to make boot.img insecure and how to properly flash boot.img/recovery.img to our Note 8.0 with heimdall as I've yet to see anyone flash anything with heimdall to this tablet.
** Guides will be leaned toward making your kernel from samsung sources, making a zip file to flash it, how to flash through heimdall, and changes you can make yourself to the ramdisk. I like to keep guides that are about the same aspect of modding in the same thread.
Click to expand...
Click to collapse
Thanks. I have looked for something like this for a while. Do you think this would work for a Galaxy Note 3? I am not asking for an exact answer; rather do know of any reason it would not? Should I use a different tool? Any gotchas? etc.

Beastmode said:
Step Seven:
Lets extract the ramdisk from a stock boot.img or a recovery.img file.
*use the beastools.zip file attached to this post to complete the following.
- unzip my beastools.zip and place boot.img in the same extracted folder.
Click to expand...
Click to collapse
Hi and thank you for the great post. I have been able to ceate the image and modules for a Note 3 device. I am not sure which boot.img you are referting to. Where do I get this? I did a search on my machine, and I don't have it. Do I need to get this file somewhere else online since I am working on a different device? I really appreciate your advice.

Code:
[email protected]:~/Kernel$ make kona_01_defconfig
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
drivers/usb/gadget/Kconfig:1107:warning: leading whitespace ignored
drivers/motor/Kconfig:38:warning: type of 'BCM_SS_VIBRA' redefined from 'boolean' to 'tristate'
arch/arm/mach-hawaii/Kconfig:272:warning: choice value used outside its choice group
arch/arm/mach-hawaii/Kconfig:277:warning: choice value used outside its choice group
arch/arm/mach-hawaii/Kconfig:282:warning: choice value used outside its choice group
arch/arm/mach-hawaii/Kconfig:304:warning: choice value used outside its choice group
arch/arm/mach-hawaii/Kconfig:287:warning: choice value used outside its choice group
arch/arm/mach-hawaii/Kconfig:331:warning: choice value used outside its choice group
arch/arm/mach-hawaii/Kconfig:336:warning: choice value used outside its choice group
***
*** Can't find default configuration "arch/arm/configs/kona_01_defconfig"!
***
make[1]: *** [kona_01_defconfig] Error 1
make: *** [kona_01_defconfig] Error 2
PLEASE HELP

Hi
is this method can change the SElinux status ? ( I want to change it to permissive )

Related

[TUT] Building your own Xperia Play Kernel

Since We have such a fantastic tutorial on how to build your own CM9, I thought I'd add one for building a kernel.
Edit: updated kernel sources for jellybean
First off:
You NEED Linux. DO NOT TRY THIS ON WINDOWS, IT WON'T WORK.
Sources: https://github.com/CyanogenMod/semc-kernel-msm7x30
https://github.com/DarkforestGroup/sony-kernel-msm7x30-ics
https://github.com/DooMLoRD/Xperia-2011-Kernel-2.6.32.9
http://forum.xda-developers.com/showthread.php?t=1556971
http://forum.xda-developers.com/showthread.php?t=1477845
http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/
DooMLoRD, KeiranFTW & Atarii.
Prepping:
1) Grab the toolchain I have here (Android NDK R5b), it's the only one I've been able to use that doesn't throw errors when compiling (stock based kernels): http://db.tt/hE3TmJJi Doom has provided a better toolchain https://github.com/DooMLoRD/android_prebuilt_toolchains[/QUOTE] you can get it using
Code:
git clone https://github.com/DooMLoRD/android_prebuilt_toolchains.git -b master <optional_folder_name_you_choose>
(thanks Doom!!)
Building a kernel from fxp sources
1) Terminal for any commands, file explorer for finding stuff & gedit for changes.
2) open up terminal, mkdir <name_you_want> (no spaces)
3) cd <name_you_want>
4) git clone https://github.com/freexperia/semc-kernel-msm-7x30-ics -b ics <optional_name_you_want_the_folder_to_be> (no spaces)
5) cd <optional_name_you_want_the_folder_to_be>/semc-kernel-msm-7x30-ics (if you didn't rename it)
6) (If this is after the first time, and lets say a week has past do this step, otherwise ignore) git pull (automatically updates any files)
7) First important step: Find the defconfig that fxp uses. They are located in arch/arm/config. fxp_zeus_defconfig is the name of theirs
8) copy fxp_zeus_defconfig & rename to <what_you_want_it_named>_zeus_defconfig (for example, mine will be pax_zeus_defconfig)
9) open up your defconfig & put it into another workspace, we'll mess with it later
10) Hop onto DooMLoRD's github, his we'll use for references.
11) Adding governors: https://github.com/DooMLoRD/Xperia-...mmit/bec19001ded34077d7776639834a1229b69e5f87
A1) Well, as I look into this, fxp has a ton of governors not used... (located in <name_of_kernel_folder>/drivers/cpufreq/
A2) Check the Kconfig file to see that they're all in there (they must just not be in the defconfig file)
A3) Edit the deconfig file you created in lines 467-474 removing "#" from any you want to add (and add in any you might've added by adding the line CONFIG_CPU_FREQ_GOV_<NAME_OF_GOVERNOR>=y
A4) If you want to add more governors, check out the Commits from DooMLoRD's build to add in when needed (anytime you see a "+" that means line added, "-" means line deleted)
12) Adding IO Schedulers: https://github.com/DooMLoRD/Xperia-...mmit/0ae625f7561c559d4933284f489733bf5eb66e96
B1) Navigate to <name_of_kernel>/block folder
B2) Once again, FXP has a ton of IO Schedulers added, but not used in Play kernel:
B3) Open up Kconfig.ioshced to make sure they're in there (and add any you want)
B4) Edit the defconfig file you created (lines 121-137) & fix it to your liking (same as above)
B5) If you want to add more, see Doom's commits to add 'em
13) Turning off ALS
C1) Navigate to <name_of_kernel>/arch/arm/mach-msm
C2) Open up board-semc_zeus.c
C3) Search for .als_connected (it on line 1349)
C4) Change the variable from 1 to 0
14) Overclocking
D1) open up arch/arm/mach-msm/acpuclock-7x30.c
D2) Lines 96 - 144 contain the PLL2 table, which is used to set clock speeds, note FXP can go all the way up to 2ghz, they just stop it short.
Continued in post 2 because all of this in one post 20% more awesome than XDA can handle
Pax
Cont'd from post 1
15) Building the Kernel
E1) Save your defconfig file, you'll need it now.
E2) naviage to <name_of_kernel> folder (in terminal)
E3) Type in "ARCH=arm CROSS_COMPILE=<path_to_cross_compiler_i'll_use_min e_for_example>/home/paxchristos/Android_Source/doom_ndk/arm-eabi-4.4.3//bin/arm-eabi- make <what_you_put_here>_zeus_defconfig
E4) Type in "ARCH=arm CROSS_COMPILE=<path_to_cross_compiler_from_above>/arm-eabi- make
E5) Sit back and relax (assuming it doesn't throw any errors, if it does, post here & I'll try to help you through them)
16) Getting the ramdisk
F1) Download a working copy of FXP's kernel (either through my zips or fxp zips)
F2) Goto here: http://forum.xda-developers.com/showthread.php?t=1477845, download the xperiaboottools.zip that's attached.
F3) Now what I did (you don't have to) is chmod 755 mkbootimg & split_bootimg.pl & (sudo) cp to /bin for easy calling.
F4) Navagiate in terminal to where you downloaded fxp kernel
F5) mkdir <working_folder>
F6) cp <fxp_kernel> <working_folder>
F7) cd <working folder>
F8) split_bootimg.pl <fxp_kernel>
F9) mkdir ramdisk
F10) cd ramdisk
F11) gzip -dc ../<fxp_kernel>.img-ramdisk.gz | cpio -i
F12) Now you have the ramdisk, let's futz with it.
F13) First (easiest step) is to goto default.prop & change ro.secure=1 to ro.secure=0
F14) That's mainly what we want to do with it, if you want to change the boot image, go here: http://forum.xda-developers.com/showthread.php?t=1494076 for how to do it manually, or here: http://forum.xda-developers.com/showthread.php?t=1513146 for the automatic way.
F15) now that we're done with the ramdisk, we'll go back to terminal
F16) find . | cpio -o -H newc | gzip > ../ramdisk.img
F17) cd ../
17) Putting the ramdisk & kernel together
G1) By now (hopefully) the kernel is done compiling. (time for terminal, you should still be in folder you were above)
G2) cp ~/<folder_you_put_the_kernel_source_in>/arch/arm/boot/zImage ./
G3) mkbootimg --base 0x00200000 --kernel zImage --ramdisk ramdisk.img -o <what_you_want_to_name_your_kernel>.img
18) Flashing it for testing.
H1) Keep your copy of FXP's kernel around, just in case any issues happen
H2) fastboot boot <your_kernel>.img
H3) If it boots & works, SUCCESS!! you modified your own custom kernel!
H4) If it doesn't boot (at all, just a vibrate & blank screen for 10-20 seconds) there's a problem with the ramdisk, sometimes it's bad, sometimes is needs filler, overall, it's just a pain in the butt to figure out.
H5) If it boots & bootloops the splash screen, well, that's an issue with the ramdisk again, that possibly, your ramdisk does not match you rom. Recovery, reflash rom & try again.
Courtesy of Atarii reminding me
19) Adding your wifi modules (they get built when you build the kernel) into the ramdisk
I1) Let's pretend that you haven't gotten through step F16, we're gonna add the wifi modules in.
I2) The wifi modules are located in <name_of_kernel_source_folder>/drivers/net/wireless/
I3) Copy bcm4329.ko to ~/ramdisk/working/modules/
I4) Add in the following lines to init.semc.rc
Code:
#load bcm4329 module
insmod /modules/bcm4329.ko
I5) Now your modules will autoload on boot!
Pax
Excellent guide
It may be because I'm both skeptical of us R800x users ever getting a real ICS, and the fact that going back to gingerbread sounds really tempting, but do you know / could you list the differences for compiling a gingerbread kernel for, say, CM7?
Kieran just told me to go to Sony's site. Thanks!
Sent from my R800x using XDA
Now I've read over this but I'd like to know exactly what a new Linux kernal can do for us? Does it allow us to do more stuff with any custom rom we create?
lightningdude said:
It may be because I'm both skeptical of us R800x users ever getting a real ICS, and the fact that going back to gingerbread sounds really tempting, but do you know / could you list the differences for compiling a gingerbread kernel for, say, CM7?
Click to expand...
Click to collapse
Do this in place of #4 (in the guide)
4) git clone https://github.com/freexperia/semc-kernel-msm7x30 -b master <optional_name_you_want_the_folder_to_be>
& You'll get their sources for GB instead of ics
Alternatively, if you wanna do it from SEMC kernel sources,
Download them from: http://developer.sonymobile.com/cws/devworld/technology/opensource un-tar/bzip them & work from kernel/
Phryxus said:
Now I've read over this but I'd like to know exactly what a new Linux kernal can do for us? Does it allow us to do more stuff with any custom rom we create?
Click to expand...
Click to collapse
Here's a better explanation than I can do
bassmadrigal said:
/cut/
The kernel is kinda like the nervous system of the body. It directly interacts with the hardware (which is how it is able to adjust CPU speed) and it is what allows the ROM to function.
The ROM is the rest of the body. Every other aspect of the phone. In fact, most ROMs include custom kernels. Various ROMs give you various features/enhancements/bugfixes. You will probably notice the biggest change in your phone if you load a custom ROM. Most people load the custom kernels to help with battery life as a lot of them allow you to lower the phones minimum processing speed from 245Mhz to 128MHz.
The ROM can change so many different aspects of how the phone works. There is CyanogenMod which is based off of stock Android with a lot of tweaks, bugfixes, and new features added. There is also MIUI, which is similar to the iOS style (not the same, but much closer than stock Android), and then there are a ton others out there.
Click to expand...
Click to collapse
This is an awesome guide, definitely recommend to all, if you're interested in getting into kernel development.
The only thing maybe worth mentioning is where to copy the compiled wifi drivers and modules (governors etc) from, after the kernel has compiled
I'm having a problem at the "Building the Kernel" step. I ran the command, albeit slightly different than you wrote, and got this error:
"make: *** No rule to make target `mjolnir_zeus_defconfig'. Stop."
Do I not have my NDK installed properly, or what?
Edit: Nevermind, was hit by a confusion spell. It's cured, and all is well. At least, for now.
btw, in the future you will want to clone: https://github.com/CyanogenMod/semc-kernel-msm7x30.git
ics branch
But FXP haven't updated kernel in a while, so you could use my CM9 kernel sources if you like: https://github.com/DarkforestGroup/sony-kernel-msm7x30-ics
master branch
Difference is, mine is made from pure Sony PLAY beta sources, while FXP use arc beta sources
I have successfully compiled a kernel for CM7. Thanks, pax, for this tut, and all other developers for their contributions!
Sent from my R800x using XDA
the NDK toolchain isnt good...
i have test them and they throw un-necessary errors...
best use gcc-4.4.3 toolchain from CM repo... it works with almost all device kernels i develop for...
u can also try gcc-4.6.2 toolchain (linaro)...
a working copy of both can be found at my git repo:
https://github.com/DooMLoRD/android_prebuilt_toolchains
DooMLoRD said:
the NDK toolchain isnt good...
i have test them and they throw un-necessary errors...
best use gcc-4.4.3 toolchain from CM repo... it works with almost all device kernels i develop for...
u can also try gcc-4.6.2 toolchain (linaro)...
a working copy of both can be found at my git repo:
https://github.com/DooMLoRD/android_prebuilt_toolchains
Click to expand...
Click to collapse
+1 to that, I use your arm-eabi-4.4.3 prebuilt
lightningdude said:
I have successfully compiled a kernel for CM7. Thanks, pax, for this tut, and all other developers for their contributions!
Sent from my R800x using XDA
Click to expand...
Click to collapse
Apparently I was a little premature in my findings. Having a hell of a time with the fxp sources for CM7. For some reason, I just can't get my cpu frequencies to come down from Max. DooMLoRD, what am I missing?
Sent from my R800x using XDA
It's been a while since I gave an update here, but my ics kernel is doing fine. I just gave up on gingerbread. My new question: How would I go about changing recovery and such? I prefer DooMLoRD's recovery over Keiran's, but since I'm using Keiran's sources, I don't know what to do to get a different recovery.
Sent from my R800x using XDA
lightningdude said:
It's been a while since I gave an update here, but my ics kernel is doing fine. I just gave up on gingerbread. My new question: How would I go about changing recovery and such? I prefer DooMLoRD's recovery over Keiran's, but since I'm using Keiran's sources, I don't know what to do to get a different recovery.
Sent from my R800x using XDA
Click to expand...
Click to collapse
Try replacing the recovery executable in /sbin/ with DooMLoRDs
Sent from my Xperia Play using Tapatalk 2
KeiranFTW said:
Try replacing the recovery executable in /sbin/ with DooMLoRDs
Sent from my Xperia Play using Tapatalk 2
Click to expand...
Click to collapse
I'm at work right now, but I'll try when I get home. I plan on doing some digging for the sake of learning, but that's going to wait for the weekend.
Sent from my R800x using XDA
Edit: Thanks Keiran, that worked. Like I said, I'll be poking around some more this weekend, just to see what I can mess with. Too bad I never got this far on my older phones...
looks good! so gonna try this tomorrow to build a cifs.ko module from latest Se source
watching a movies on phone, here I come
Hi great tutorial, but I'm having a problem with the wifi I have tried taking my bcm4329.ko from drivers/net/wireless and flashing it via CWM also tried moving it to system/lib/modules manually on my phone but still can't get it to work. Any idea how to fix this, its the only thing keeping me from using my own kernel
Sent from my Xperia Play using xda premium

ROM Building Guide for DROIDRAZR

This guide is referred to people who don’t know anything about building ROMs.
ROM Building Guide
Index
-Prepare building enviroment
-Install necesary packages
-Syncronize repos from ROM
-Put all the dependecies for Device
-Making NON-CM based ROMS
-Make Changes on BASE to build
-Commands for build
-Build
-Errors, Bugs and Fails
Prepare building enviroment​
First of all we need to have a prepared enviroment for build, normally if you install Ubuntu you need to download manually some programs like SDK, Phyton and other tools, but this is a really easy guide so we use a preconfigured SO in order to have most of the things configured and downloaded.
We need to download this ISO and install it on our machine:
http://www.mediafire.com/download/h5t5mbht8d85dbq/builduntu.v12.iso
install it is so easy so only burn the iso into a disk and install it.
If you don’t want to install Ubuntu in your machines you can use a Virtual Machine, if you want to use a VM you have to download this:
http://nathanpfry.com/builduntu-virtual-machine-android-rom-compiling/
Extact it and you will see a ova file, go to VM VirtualBox and then press “ctrl” + “I” and find .ova file and import it. When this finish go to “configuration” and give the machine 4GB of RAM or more and 2 processors or more.
*It’ll work anyway if you set 2GB of RAM but if you put more, much more faster the rom will build*
Install necesary packages​
If you choose VM continue to the next step.
If you choose Native OS(or secondary boot), when you finish installing Ubuntu you have to open a “terminal” and put this:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
This will install “repo” to use it later.
When this finish use nano to edit ~/.bashrc
sudo nano ~/.bashrc
And scroll down at the very bottom and add this into a new(empty) line:
export PATH=~/bin:$PATH
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
source ~/.bashrc
And this is all
Syncronize repos from ROM​
Okay, we have the enviroment, so now we need to set up the ROM, and I have to tell you that we only have to use Terminal, Firefox and File Manager. First of all you need to know that for linux is not the same if write things in capital letter, so if you can do anything or terminal didn’t recognize your command see this first. I’ll teach you some commands:
mkdir
HTML:
mkdir ~/
This command will make a new folder, after “/” you have to put the name of the new folder, where all the repos will be. For example I want to make a folder named DU:
HTML:
mkdir ~/DU
cd
HTML:
cd ~/DU
This will open this folder to work on it in my case “DU”
*note “~/DU” this made my folder into “home”
repo init
HTML:
repo init
This command will initializate the repo this will change depending the rom that you want to build, some examples:
DU
HTML:
repo init -u https://github.com/DirtyUnicorns-KitKat/manifest.git -b du44
AOKP
HTML:
repo init -u https://github.com/AOKP/platform_manifest.git -b kitkat
AOSB
HTML:
repo init -u https://github.com/AOSB/android.git
To find the repo for specific rom you have to find the manifest like this:
https://github.com/AOSB/android/tree/android-4.4
https://github.com/AOKP/platform_manifest
repo sync
HTML:
repo sync
This will download and make all the files to build a rom(sync one rom maybe tooks hours because the size of all the repo is about 10GB or more, depending wich ROM pick)
This command will be the same for all roms(but some roms made a change, but you will be noticed in the manifest)
And last thing to know is that all the files and manifest files are on:
https://github.com/
(it’s recomended to make an account here)
Ready continue, we need to make a folder to download the repos, I want to make DU(you can put the name that you want, remember the use of capital letters):
HTML:
mkdir ~/DU
Then I have to make DU my working folder:
HTML:
cd ~/DU
And initializate the repo:
HTML:
repo init -u https://github.com/DirtyUnicorns-KitKat/manifest.git -b du44
(remember to find the repo command for your rom in the manifest file, if you don’t find it Google it)
You will see that some files were downloaded.
IMPORTANT: Maybe you need to make an account and a password to download the repos from github.
Then type this:
HTML:
repo sync
And all the repos will be downloaded.
Maybe you will see that some repos didn’t download well or in terminal appears “fatal” so make “repo sync” twice(the second time will be much more faster that the first).
Put all the dependecies for Device​So we have all the repos for build the rom in our HDD, now we need to download the files to build the rom to our device.
Well in this part some roms admit to download teh device from Cyanogen and others not, so the easy way(try this first) is this:
Go to your working folder with "file explorer" and open ".repo", here create a folder named "local_manifests" open it and make a text file named "roomservice.xml"(yes, its "room") and inside the file paste this as I provide:
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_motorola_umts_spyder" path="device/motorola/umts_spyder" remote="github" revision="cm-12.0" />
<project name="CyanogenMod/android_device_motorola_omap4-common" path="device/motorola/omap4-common" remote="github" revision="cm-12.0" />
<project name="CyanogenMod/android_kernel_motorola_omap4-common" path="kernel/motorola/omap4-common" remote="github" revision="cm-12.0" />
<project name="CyanogenMod/android_device_motorola_spyder" path="device/motorola/spyder" remote="github" />
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="cm-12.0" />
</manifest>
and this is all, only make a new repo sync and if you see that the new projects are beeing downloaded your rom support this way, but if this don't work try the option below:
OPTION 2
First we need to know the codename of the device, Razr is “UMTS_SPYDER” and “SPYDER” depends if its GSM or CDMA. When we know this, we need to find the device in CyanogenMod github, to do this go here:
https://github.com/CyanogenMod
and put the name of your phone in the box that says “find a repository...”
for RAZR are these two:
(UMTS)
https://github.com/CyanogenMod/android_device_motorola_umts_spyder
(CDMA)
https://github.com/CyanogenMod/android_device_motorola_spyder
You will se something like that:
{
"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"
}
And you have to change the branch that you want to download by clicking in the button as you can see in the photo and select “cm-11.0”
When you change this then press on “download ZIP” at the right on the screen.
Okay, you will see that is a zip file, open it. When you open the file you will se a folder named like this(depending what you download this will change but this is an example).
“android_device_motorola_spyder-cm-11.0”
This name says in what folder you have to place tha files that are inside the folder(if some folder don’t exist make it).
REMEMBER TO WRITE ALL IN LOWERCASE
android=ROM folder; in my example is “DU”
device=this folder will be inside ROM folder, in my case “DU/device”
motorola=if this folder don’t exist make it
spyder=this folder will contain all the files that are into the zip inside “android_device_motorola_spyder-cm-11.0”
If you do all the steps well you will have something like this:
Inside this folder you will find some files, you you have to open one named “cm.dependencies”, inside this file you will find some lines like this:
HTML:
[
{
"repository": "android_device_motorola_omap4-common",
"target_path": "device/motorola/omap4-common"
},
{
"repository": "android_kernel_motorola_omap4-common",
"target_path": "kernel/motorola/omap4-common"
}
]
This repositories you have to download and put in the folder that says “target_path”
To find it faster only add repository name at the end of this in firefox:
https://github.com/CyanogenMod/
in my case this will be like this:
https://github.com/CyanogenMod/android_device_motorola_omap4-common
and again you have to do the same like device(choose branch, and download as a ZIP) but you have to put the files into the correct folder, in this case I have to put it in DU/device/motorola/omap4-common.
And the same with Kernel:
https://github.com/CyanogenMod/android_kernel_motorola_omap4-common
But you have to put this in the correct folder, in my case: DU/kernel/motorola/omap4-common
Remember: If the folder didn’t exist make it and DON’T PUT THE FOLDER THAT COME INSIDE THE ZIP INSIDE THE FOLDER THAT YOU MAKE, put the files only, like this: DU/kernel/motorola/omap4-common ->>> in this folder you have to put all the files that came into the folder “android_kernel_motorola_omap4-common” inside the zip.
And finally you have to find your vendor folder, for this device "motorola", download from here and put this in the correct folder, in my case: DU/vendor/motorola(inside "motorola" you have to see other folder with the name of the devices, if you see this you are ready)
Thats all for now, you have all the files to make the rom to your device(IF YOU ARE BUILDING A CM BASED ROM).
Making NON-CM based ROMS​
If you want to build a non-CM based ROM you may have to change some files in your device folder, there are a lot of roms that need this changes so I can't explain all but in general you have to make changes(NOT IN OMAP4 FOLDERS) in "cm.mk", "AndroidProducts.mk", in this web you can see all the changes needed to build OMNIROM, not all the roms have this tutorials, so if you want ask me in this post(not PM me) I can help you, and I can modify and upload the file to be usefull for everyone. A little trick, all the roms that are non-CM based need changes in "cm.mk"(and maybe only with this change you can build the rom), you have to change the name of this file and edit this two lines:
"$(call inherit-product, vendor/cm/config/common_full_phone.mk)"
"PRODUCT_NAME := cm_spyder" or "PRODUCT_NAME := cm_umts_spyder"(obviusly depending wich device you open)
for DU for example you have to change like this:
"$(call inherit-product, vendor/du/config/common.mk)"(this is the same for all phones to build DU)
"PRODUCT_NAME := du_spyder" or "PRODUCT_NAME := du_umts_spyder"(depending wich device you open)
The first line is easy, for other roms only go to *Working folder*/vendor/*name of the rom*/config(in some roms is "configs") and here find the .mk file like "common" or "common_phone".
Or other way is to go to the github page and find a supported device and compare name of files and other things.
Then you have to create a new file named vendorsetup.sh in the device repo(doing this your device will appear to build later)
"add_lunch_combo *vendorROM*_*device*-userdebug"
OMNI ROM TUTORIAL TO PORT A DEVICE:
http://docs.omnirom.org/Porting_Omni_To_Your_Device
Make Changes on BASE to build​PLEASE THIS IS FOR ADVANCED USERS, AND IF YOU WANT TO TRY FIRST OF ALL TRY TO BUILD ONCE WITHOUT THIS STEP, BECAUSE IF YOU MADE A BAD CHANGE YOUR ROM CAN BE UNUSABLE
Not all the devices have the same hardware posibilities, so some options are disabled, but once you build the ROM you can't enable it(some, not all), so you have to find the "config" file to make some changes and add functions. The config file that I'm refering you can find it in:
*Working folder*(in my case: DU)/framework/base/core/res/res/values/config.xml
and this file looks like this https://github.com/AOKP/frameworks_base/blob/kitkat/core/res/res/values/config.xml
Usually the lines that appears at the bottom are the variables from the rom, so I recomend to start from the bottom and then go up, PLEASE READ CAREFULLY ALL THE VARIABLES, don't pretend to enable funtions that the device can't support, and don't make any changes to variables that you don't know.
Some lines that appears in some config files that can be activated:
HTML:
<integer name="config_deviceHardwareKeys">0</integer>
HTML:
<bool name="config_enableWifiDisplay">false</bool>
HTML:
<bool name="config_allowAllRotations">false</bool>
(THIS IS FOR EXPERTS BUT IF YOU WANT TO BE AN EXPERT I'LL TOLD YOU SOME TRICKS, IF YOU SEE THE LINES ABOVE AND YOU DON'T KNOW WHAT THIS MEANS FIRST READ IN THE FILE "CONFIG.XML" ABOVE THE VARIABLE AND YOU CAN KNOW MORE ABOUT IT, AND THEN PAY ATTENTION TO THIS:
Example:
<bool name="config_allowAllRotations">false</bool>
IN BLUE YOU CAN SEE THE NAME OF THE CHANGE, OBVIOUSLY THIS ENABLE ALL SCREEN ROTATIONS
AND IN GREEN YOU CAN SEE THE VALUE OF THIS VARIABLE(THIS VALUE CAN BE, A NUMBER OR "true" OR "false")
Commands for build​
If you read other guides you can see that appears a lot of commands to build a ROM, like breakfast, brunch, bacon, etc. I recomend to use "make otapackage" "mka bacon" or "time mka bacon"
Build​
The last step is build the ROM, to do this go to a terminal and go into your working folder, then initialize the repo(supposing that you have follow all the other steps and have a full repo sync) and put this command: "lunch", after this you will see all the devices supported to build, if you do all OK you will be able to see your device in the list, so only pick the number of your device and then in terminal will appear all the information about the device, finaly put "time mka bacon" or "make otapackage" and the terminal will start building the ZIP, the first command "time mka bacon" will build the rom using all the resources of your computer(so the build will be faster) and at the end you can se the time that it tooks.(depending if you are building in a VM or Native OS, and the specs of your computer it will take a time, in a VM for example my computer with 5GB of RAM and 3 cores(at 3.5GHz) can make one build in 6 hours, but in native OS with 6 cores and 16GB of RAM tooks 30 minutes).
ESPECIAL THANKS TO: @sylentprofet and nathanpfry.com (for the VM and OS)
Thanks for reading and sorry for my English.
Regards
I found this link: https://github.com/SimpleAOSP-Lollipop/platform-manifest, can I build this for umts spyder? In the read me, there are nexus only supported device...is this means a port if a want it on razr? Thanks in advance..
Im a noob in this kind of stuffs.....wanna make my own rom...well tried to make one...if possible....
Edit: its not public so cant use it i guess
Btw, i have error in init repo -u command, fatal error cant find username...or something like that
And where should i open terminal in builduntu? Desktop, home or else? Thanks..
Hello me!! Its me again!!
nice guide but one issue
device/motorola/omap4-common/Android.mk:43: *** my-dir must be called before including any other makefile.. Stop.
i m getting this error while i m building it ... plz help..

Looking to create your own custom kernel? Start here!

INTRODUCTION
I create this guide in the hope to jump start development on our lovely Exynos devices.
I expect that before you start, you have a Linux installation in either a virtual machine or on a physical PC.
Debian Jessie, Kali Linux, Mint, or Ubuntu are excellent choices and what I'm familiar with, so if you get stuck it'll be easier for me to help you if you use these.
PREREQUISITES
WARNING: Custom kernels on the Note 7, S7, and S7 edge currently require encryption to be disabled in order to boot. They also have to disable some secure MobiCore firmware. You will have to format your entire data partition when going from stock kernel to a custom kernel! Once you're on a custom kernel with non-encrypted data, you shouldn't have to wipe it going to another custom kernel.
Be careful not to disable developer options or OEM unlock, otherwise all your data will be destroyed! Back up your data partition whenever you flash stock. (for upgrades, etc.)
First off, you'll want to download some tools necessary for building and downloading kernel sources:
git-core - you'll want git for downloading and maintaining your sources
build-essential - native gcc & tools for building (needed for build commands)
libncurses5-dev - needed to build menuconfig
diff - used to compare config changes
colordiff - used by diff to provide colorful human readable diff output
Code:
apt-get install git-core build-essential libncurses5-dev diff colordiff
PREPARING YOUR ENVIRONMENT
Once you've got that out of the way, you should create an organized environment for working. I like to use ~/build.
Code:
mkdir -p ~/build/toolchain ~/build/kernel
DOWNLOADING & INSTALLING A TOOLCHAIN
You'll want to download a toolchain for kernel building. I recommend using Linaro's optimized ARM toolchains.
The Exynos 8890 benefits from the Cortex-A53 code compiling optimizations.
GCC 4.9: https://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/aarch64-linux-gnu/
GCC 5.X: https://releases.linaro.org/components/toolchain/binaries/latest-5/aarch64-linux-gnu/
The actual file that you want ends in -x86_64_aarch64-linux-gnu.tar.xz (assuming you have a 64-bit Linux install, seriously, 32-bit needs to go! )
We'll use the GCC 5.3.1 2016.5 toolchain in this example.
Let's download and extract it now:
Code:
cd ~/build/toolchain
wget "https://releases.linaro.org/components/toolchain/binaries/latest-5/aarch64-linux-gnu/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz"
tar xf ./*linux-gnu.tar.xz
rm ./*linux-gnu.tar.xz
That's it for installing the toolchain, easy right?
DOWNLOADING THE KERNEL
Rather than download your kernel sources directly from Samsung full of wacky issues when you change a single configuration option, you can grab it from my GitHub!
Using this method, you have an already working stock kernel prepared to be modified and built at your leisure.
You're also able to grab updates and fixes from me should you want them. I'll be committing new kernel source updates from Samsung to the opensource branch.
The stock-6.0 branch will be rebased on top of opensource when that happens, then stock-6.0.y (stock, with Linux updates) will be rebased on top of that.
Cool concept, right?
First, you'll want to create a GitHub account if you don't have one already.
This will allow you to upload your changes and share your kernel with other interested users and developers.
Once you've got your account, and you're logged in, browse to:
https://github.com/jcadduono/android_kernel_samsung_universal8890
You want to fork the sources to your own account, to do this simply click the [Fork | ] button near the top right of the page:
{
"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"
}
Now you've got your own copy of the Note 7 / S7 / S7 edge kernel sources on your GitHub!
The next step is to use git to download it to your PC.
Replace "your_username" with your actual GitHub username. Using [email protected] you can avoid being asked for your username each time you push new changes.
Code:
cd ~/build/kernel
git clone https://[email protected]/your_username/android_kernel_samsung_universal8890 samsung_universal8890
cd samsung_universal8890
The default branch is stock-6.0. This is what most users will want. If you wish to start on a kernel that is updated to the latest Linux minor version, then simply:
Code:
git checkout stock-6.0.y
There's a twrp-6.0 branch that's used for building the kernel inside the official TWRP for Note 7 / S7 / S7 edge.
There's also a nethunter-6.0 branch used to build the kernel used by Kali NetHunter on those devices.
You can use git log <branch> to view commits, and git cherry-pick <commit id> to copy commits from those branches into yours if you like.
CONFIGURING GIT
Before you start working on your kernel, you will need to set up your git profile.
The user values show up in commit messages to tell people who authored them.
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
git config --global push.default simple
YOUR FIRST COMMIT
We'll want to check out a new branch, and give it your own cool name. I suggest adding a -6.0 suffix to it because you'll probably want to start a new branch when Android 7.0 comes out.
We're going to use "coolname" as our example, so be sure to replace that with what you really want it to be called in the next steps.
Code:
git checkout -B coolname-6.0
Next we'll need to modify the build scripts to fit our setup.
Open build.sh, menuconfig.sh, and dtbgen.sh.
You'll want to set the TOOLCHAIN= path in all 3 scripts. If you're following this guide, then it's already correct!
In menuconfig.sh and build.sh, you'll want to set your default target config name.
See the line:
Code:
[ "$TARGET" ] || TARGET=samsung
You'll want it to look like this:
Code:
[ "$TARGET" ] || TARGET=coolname
Now you want to copy the default samsung kernel configuration so you have your own to work with:
Code:
cp arch/arm64/configs/samsung_defconfig arch/arm64/configs/coolname_defconfig
Now you'll have prepared your kernel source for starting work on your own custom kernel!
Let's turn that into a commit, but first look at the changes you've made using:
Code:
git diff
Does that look good? If not, fix what's broken before proceeding.
Next you'll want to add files that will be part of your commit.
For simplicity's sake, let's just add all of the changed files into the commit.
Code:
git add .
Now to make your commit:
Code:
git commit -m "My first commit, setting up my coolname kernel!"
You've done it!
CONFIGURING YOUR KERNEL
We'll use the menuconfig.sh script to launch the kernel menuconfig.
Code:
./menuconfig.sh
Change whatever options you're interested in, but don't change a lot all at once, otherwise when or if you run into issues, you won't know which option caused it.
Once you're done playing in the menuconfig, exit and save.
You'll be shown a colorful difference between your old configuration and your new one.
It will ask you if you want to save it, and you just have to type "y" and press enter for it to be saved.
At this point it's a good idea to make another commit to save your configuration changes.
If you need to edit the commit, you can easily use git commit --amend to fix it up.
BUILDING YOUR NEW KERNEL
Let's take your new config for a test drive.
To build your kernel, simply run:
Code:
./build.sh gracelte xx
gracelte = Note 7
herolte = S7
hero2lte = S7 edge
xx = International N930F & N930FD
kor = Korean N930K, N930L, & N930S
Yes, you can compile your kernel to all 3 of those devices using just your single config!
The power of device specific config additions.
Once your kernel is finished building, the resulting files will be located at:
Code:
build/arch/arm64/boot/Image
build/arch/arm64/boot/dtb.img
build/modules/*.ko (if modules are enabled)
INSTALLING YOUR NEW KERNEL
The LazyFlasher project comes to the rescue here. It's the swiss army knife of kernel flashing in TWRP.
There's a specific branch for the Note 7 called kernel-flasher-gracelte. (use kernel-flasher-herolte instead if building for S7/S7 edge!)
To download it (feel free to fork it so you can have a copy on your GitHub to modify instead!):
Code:
cd ~/build
git clone -b kernel-flasher-gracelte https://github.com/jcadduono/lazyflasher.git
cd lazyflasher
To use LazyFlasher, you'll probably want to take a look at the Makefile, config.sh, and META-INF/com/google/android/update-binary (a shell script).
There's a few things you can change there to personalize it to your needs.
You should also enter the patch.d folder and delete 060-f2fs-fstab if you don't have f2fs enabled in your kernel, and edit the io_scheduler in 070-kernel-settings if you don't have fiops enabled either.
(make another git commit to save your setup!)
Once the installer is set up to your liking, all you have to do to build it is copy the Image and dtb.img from your build output into the lazyflasher folder.
If you have any modules (.ko files) to install, place them in the modules folder.
Now simply run:
Code:
make
A TWRP flashable zip and sha1sum is created!
At this point, you will need to use the [Format Data] button in TWRP if your device is encrypted! There is no known way around this.
This will wipe all data from your phone, including your internal storage, essentially making it like new.
Transfer it to TWRP and flash away, you've just lost your custom kernel development virginity.
Go have a few beers to celebrate, or to drown your sorrows in the case of a boot loop.
You should consider taking a look at the patch.d scripts sometime so you know what it's actually doing.
PROBLEMS?
Post a reply here and I'll try to find a solution and add it to this post.
RESOURCES
Need a text editor for coding? I use gedit. It's pretty, light, and you can get some decent plugins for it.
It's a minimal editor, so don't expect anything really fancy. Configure it and enable plugins before you decide to trash it.
Code:
apt-get install gedit gedit-plugins
Here's an awesome git starter guide: http://rogerdudler.github.io/git-guide/
THANKS
If not for @Tkkg1994 finding out what changes are needed to get custom kernels up and running, we wouldn't have this lovely guide here!
Thanks for the amazing guide, i got it compiled successfully but the problem comes after the device boots up, it asks for my Pattern and when i enter it, it keeps saying incorrect and wont let me in, any help?
Ather said:
Thanks for the amazing guide, i got it compiled successfully but the problem comes after the device boots up, it asks for my Pattern and when i enter it, it keeps saying incorrect and wont let me in, any help?
Click to expand...
Click to collapse
Sorry, I forgot to add to the guide that custom kernels don't support encryption. You should flash your stock kernel & supersu, install something like titanium backup, and back up all your things to an external SDcard.
I've added a warning in the thread and included it in the instructions now.
that's weird, I disabled lockscreen security and reinstalled the kernel, booted up fine with selinux enforcing http://i.imgur.com/IVSTfV1.png
Ather said:
that's weird, I disabled lockscreen security and reinstalled the kernel, booted up fine with selinux enforcing http://i.imgur.com/IVSTfV1.png
Click to expand...
Click to collapse
Are you still encrypted?
Maybe it's just one of the secure mobicore firmware that were removed that your lock screen depended on. You might be able to set up the lock screen again now, and this time it won't require that specific piece of firmware.
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Ather said:
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Click to expand...
Click to collapse
Oh, I'm not sure why that happened then. There shouldn't have been anything extra removed on top of what HydraKernel removes.
My device is working with both Iris and Fingerprint unlock right now.
Can you post the output of:
Code:
ls /system/app/mcRegistry
can you test out my kernel? i see hydra zip has some files that it replaces, and the lazyflasher has similar files, could that be the problem?
Ather said:
can you test out my kernel? i see hydra zip has some files that it replaces, and the lazyflasher has similar files, could that be the problem?
Click to expand...
Click to collapse
try backing up your system/data to !!external sdcard!! in twrp, saving your internal storage to pc, then formatting data.
restore your stock kernel and system before flashing your custom kernel.
then see if it works from scratch.
if it's all fine, try restoring your data backup.
Ather said:
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Click to expand...
Click to collapse
This sounds exactly like you did not patch /system/app/mcRegistry files
Sent from my SM-N930F using XDA Labs
Tkkg1994 said:
This sounds exactly like you did not patch /system/app/mcRegistry files
Sent from my SM-N930F using XDA Labs
Click to expand...
Click to collapse
They shouldn't be patched though, the installer simply removes the secure ones that the device is unhappy with.
It works fine for me, so I know the offending ones are being removed, but maybe somehow it deleted all of his tlbins?
Be nice if he provided the contents of his mcRegistry :/
jcadduono said:
They shouldn't be patched though, the installer simply removes the secure ones that the device is unhappy with.
It works fine for me, so I know the offending ones are being removed, but maybe somehow it deleted all of his tlbins?
Be nice if he provided the contents of his mcRegistry :/
Click to expand...
Click to collapse
Hello @jcadduono,
I am one of your "orphan" users of Idlekernel. It is the very best kernel for the Note 3.
Would you produce a blind update of it, please, please.
I would be more than happy to test it before you upload to general public.
Sorry guys for the OT.
Need help for finalisation kernel
Hello and thank you OP for the tutorial, I have done everything and no worries except when I want to flash the kernel does not boot, then I would like to know how to get a boot.img with the dtb.img files and the image create after Compilation, if someone can help I will be grateful
Thank you
Help on Kernel modules and patches
{MY QUESTIONS ARE ABOUT BOLD ITEMS BELOW}
Once your kernel is finished building, the resulting files will be located at:
Code:
build/arch/arm64/boot/Image
build/arch/arm64/boot/dtb.img
[B]build/modules/*.ko (if modules are enabled)[/B]
INSTALLING YOUR NEW KERNEL
The LazyFlasher project comes to the rescue here. It's the swiss army knife of kernel flashing in TWRP.
There's a specific branch for the Note 7 called kernel-flasher-gracelte. (use kernel-flasher-herolte instead if building for S7/S7 edge!)
To download it (feel free to fork it so you can have a copy on your GitHub to modify instead!):
Code:
cd ~/build
git clone -b kernel-flasher-gracelte https://github.com/jcadduono/lazyflasher.git
cd lazyflasher
To use LazyFlasher, you'll probably want to take a look at the Makefile, config.sh, and META-INF/com/google/android/update-binary (a shell script).
There's a few things you can change there to personalize it to your needs.
You should also enter the patch.d folder and delete 060-f2fs-fstab if you don't have f2fs enabled in your kernel, and edit the io_scheduler in 070-kernel-settings if you don't have fiops enabled either.
(make another git commit to save your setup!)
Once the installer is set up to your liking, all you have to do to build it is copy the Image and dtb.img from your build output into the lazyflasher folder.
If you have any modules (.ko files) to install, place them in the modules folder.
Now simply run:
Code:
make
Got a few question for anyone that is familiar with the exynos8890-gracelte BUILD. This in regards to files output after compilation of kernel code; specifically with editing patches and providing module support.
Where are the *.ko files located if default output is used(using your ./build.sh gracelte xx)? By the way...Your tutorial is awesome, first and foremost...but I want to be sure that I am pulling the files from the correct location (being a newbie at this android kernel building stuff). I found my modules under "~/build/kernel/samsung_universal8890/build/lib/modules/3.18.14-dee-gracelte-xx-0.1" which is the parent folder to other folders/files that seem to be of interest. After digging deeper there are even folders within the previously mentioned (named) one that have items of question as to whether they are needed in my "flasher" module folder. Such as pictured https://drive.google.com/open?id=0B-3GHX6_T7lYRkRUUVVORE1OM1k
I just want to have a functioning kernel with module support/modules in there proper place. Another item is patches. Would it be possible to just change "070-kernel-settings" patch to "io_scheduler=noop" if I changed default setting to such? If so, what other, if any, items in this file would need editing? Where else can I find patch files located on the web or is this something home-brewed? Thanks for all your hard work.
I also assume that by changing to the proper package manager commands, this procedure will work for pretty much most Linux distros.
Windows 10 Support Number

[LINUX][FREE] SuperR's Kitchen (v1.2.1.5 - 01/08/2022)

Disclaimer: I am not responsible for anything bad that may occur from the use of this kitchen, but I will take all the credit you can give me if it works for you
{
"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"
}
Please read the usage instructions in post #3 and the troubleshooting in post #4 below before asking for help. Thanks
Free Changelog
Download/Install
Donate version for Windows/Mac/Linux/WSL:
Dedicated thread found here
Free Kitchen (Linux terminal):
**NOTE: The free kitchen will not work in WSL**​
Download the kitchen.zip from here. Extract to a new directory.
Enter the following commands one by one pressing ENTER after each line where "/location/of/kitchen" is the directory where the kitchen lives:
Code:
cd /location/of/kitchen
./superr
Dependencies:
Java 8 or higher (8 is recommended)
Python (to run the launcher (could be bypassed by running tools/source/superr in the terminal from the main kitchen directory))
Video tutorials by @chevycam94
Credits:
@osm0sis - For Busybox Installer and Android Image Kitchen
@Chainfire - For SuperSU
@JesusFreke - For [Bak]smali
@nkk71 - For creating the TWRP minzip patch
@Captain_Throwback - For providing a pre-compiled update-binary with the minzip patch and squashing bugs
@_riddle - For oat2dex
@iBotPeaches - For Apktool
@AOSP - For zipalign, adb, aapt, img2simg, simg2img, make_ext4fs
@xpirt - for img2sdat
@bcrichster - For extensive testing
XDA:DevDB Information
SuperR's Kitchen, Tool/Utility for the XDA Community Apps
Contributors
SuperR.
Version Information
Status: Stable
Created 2017-04-27
Last Updated 2020-07-24
Usage:
Run "superr" from it's location in terminal
Create new project using the menu
Copy ROM zip into the superr_NAME directory of this tool (NAME = the name of your new project).
OR
Copy system.ext4.tar and boot.img into the superr_NAME directory of this tool.
OR
Copy system.ext4.win and boot.emmc.win into the superr_NAME directory of this tool.
OR
Copy system.img and boot.img into the superr_NAME directory of this tool.
OR
Copy official Nexus tgz into the superr_NAME directory of this tool.
OR
Copy Samsung firmware zip into the superr_NAME directory of this tool.
OR
Copy Moto firmware zip into the superr_NAME directory of this tool.
OR
Leave superr_NAME directory empty to extract from rooted device or custom recovery
Extract for new ROM from the Main menu.
Enjoy!
Example:
In your terminal, type the following where "/home/user/kitchen/" is the directory where the kitchen lives:
Code:
cd /home/user/kitchen/
./superr
NOTE: the above code is 2 separate commands and requires ENTER to be pressed after each command
OR
Double-click the superr file and choose "Run in Terminal" if your OS supports it.
Add your own device support:
Create a new project in the kitchen.
Add your files to the project directory (system.img/boot.img, system.ext4.tar, win, zip, etc.)
Extract for new rom from the menu
When asked how to get your partitions, choose detect by-name from boot.img. If it gives you an error, put a recovery.img in your project directory and choose detect mmc from recovery.img.
Enjoy
Features:
*Extract and create ROM from:
Rooted Device
Custom Recovery
Existing ROM zip
system.img/boot.img (and cache.img on Samsung devices)
system.ext4.tar/boot.img
system.ext4.win/boot.emmc.win (including multi-file *.win000, *.win001, etc)
Moto and other factory firmware zips containing sparsechunk files
cm12 + roms with sparse dat files
Zips that contain system.img and boot.img
Samsung firmware zips that contain tar.md5 file
Official Pixel/Nexus firmware tgz
Official Pixel/Nexus preview tgz
SpreadTrum firmware that includes a pac file
system directory that contains symlinks and boot.img
*Create flashable zips of many varieties including:
Full ROM
Switch between set_perm, set_metadata (KitKat+), raw_img, and sparse_dat (Lollipop+)
Kernel
Recovery
Media
app, priv-app, and framework
*Deodex the following:
Pie ROMs
Oreo ROMs
Nougat ROMs
Marshmallow ROMs
Lollipop ROMs
KitKat and earlier ROMs
*Root features:
Root/unroot
Choose SuperSU or Magisk zip (add other versions to /tools/root/root_zips directory)
Choose system OR systemless root for M+ and Samsung 5.1.1 roms (SuperSU only)
*Boot features:
Unpack/repack boot/recovery img (Big Thanks to @osm0sis for mkbootimg source!!!)
Add/remove su.d support
Add/remove insecure boot
Remove dm-verity
Remove forceencrypt
*By-name auto-detection from:
Device
Existing ROM
boot.img
kernel.elf
**OR**...manually enter it
*mmcblk auto-detection from:
recovery.img
*Kitchen updater:
View the last 3 changelogs when an update is available.
Incremental update for updating the most recent previous version
Option to check for updates when the kitchen starts
*Create system.img
*Device database for mmcblk devices (currently very small, but will grow over time)
*Add devices to the assert
*Add custom asserts
*Zipalign apks
*Debloat ROM
*Custom Debloat list support
*Remove Knox
*Add/remove busybox (Big thanks to @osm0sis for his Busybox Installer)
*Add/remove user app support (/data/app)
*Sign zips
*Translatable with language files
*Donate version additional features:
Cross-platform - Windows, WSL, Macos, Linux
tarfs - Get original permissions, contexts, and capabilities from tar/win backups.
Create system.img with identical permissions, contexts, and capabilities as the original system.img or tar/win backup.
Plugins - Probably the best part! Currently over 20 extra features and growing
Root - Use a custom root zip (not the included Magisk or SuperSU)
Custom directory - can be included in your ROM and flashed to a specified partition
Custom Signature - No Built with SuperR's Kitchen, anywhere, plus add your own
Custom Build Display in About Phone, or leave it as default
AutoROM - Automation for ROM creatiion using a congig file (there's a plugin for that)
Convert updater-script to an update-binary script
No mounting img files. One less thing requiring your password and interrupting extraction.
Upload support.zips and device.zip directly from the kitchen for review
Download language files directly from the kitchen
Restore original boot.img after modifying and repacking
Remove asserts from the updater-script
Configurable compression level for packing zips
Remove all placeholder tags (#ASSERT, #SYM, #PERM, etc.) before packing the ROM
Create ext4 img file from any partition you include in your ROM.
zipalign without building ROM
Fix ext4.img files automatically if block count is higher than actual blocks
Troubleshooting/FAQ:
When asking for help, please provide as much of the following info as possible so I can help as easily as possible. I am a busy person and would prefer not to ask all of these questions every time someone has a problem. Thank you for understanding.
What Kitchen version?
What environment are you running the kitchen in (OS, 32/64-bit, cygwin, Bash on Windows, etc.)?
What device are you working on (make/model)?
What was the source you started from (system.img, system.ext4.tar, rom.zip, etc.)
What Android version?
What perm method (set_perm, set_metadata, sparse_dat, raw_img)?
What did you do after extracting and before building?
Were there errors on the screen if you scroll up in the terminal?
Send a recovery.log after flashing if you have problems flashing the ROM.
Send a link that does not require registration to the files you started with (nandroid, system.img, boot.img, etc)
Use the support option in the Misc Tools menu and attach the support.zip to your post.
Ubuntu4Kitchen
An Ubuntu 16.04 distro with all the things you need to get the kitchen working easily.
Visit the dedicated thread here
Language Files (translations)
English - Default/Included in the kitchen
Download additional language files here
Once the language zip has been downloaded, extract to /kitchen/tools/language and restart the kitchen.
Does this kitchen support Windows CYGWIN?
CYGWIN is not supported and will not work. Try the donate kitchen for Windows, Linux, and Mac.
WSL (Bash on Ubuntu on Windows)
WSL is not supported in the free kitchen and will not work. Try the donate kitchen for Windows, Linux, and Mac.
Which perm type should I choose?
Here is a very brief summary of set_perm, set_metadata, sparse_dat, and raw_img.
set_perm : The oldest of the 4. Sets file/directory permissions when flashing a rom. Not recommended for KitKat and above.
set_metadata: Also sets file/directory permissions when flashing a rom, but also adds file contexts. It was introduced with selinux in KitKat. Recommended for KitKat and above.
sparse_dat: The newest of the 4, and only works on Lollipop +. The permissions, symlinks, and file contexts are all added inside a sparse image. A sparse image is an image with a more efficient space usage. Only for Lollipop and above. The free kitchen uses AOSP permissions/capabilities when building system.img. If your device requires different permissions, this method will not work for you in the free kitchen.
raw_img: This is literally raw images that are flashed to your device. The permissions, symlinks, and file contexts are all added inside the raw image. Works for all Android versions. The free kitchen uses AOSP permissions/capabilities when building system.img. If your device requires different permissions, this method will not work for you in the free kitchen.
Flashing error:
This package is for "xxxxx" devices; this is a "yyyyy"
The problem is the asserts and it is easy to fix. In the kitchen menu, go to ROM Tools > Asserts > Add/Remove device asserts. At the bottom it will say "xxxxx". Edit the line to say "xxxxx,yyyyy" and press enter. Build your rom again and flash.
Why is my ROM zip so small?
blkdiscard failed: Invalid argument
These are generally due to the partition size detection method. You need the correct partition size for ALL partitions you are creating sparse dat and raw_img images for. The kitchen will ask for each one that is included in your rom when you choose to build the full rom zip. If none of the provided auto-detect methods work, you will need to find the partition size on your own and enter it manually in the kitchen.
Root problems?
You can replace the SuperSU.zip and Magisk.zip in the kitchen with any flashable SuperSU/Magisk version you want. It is located in kitchen/tools/root/root_zips. Delete the one that is there (if it exists) and add yours. Then, unroot, re-root and your replacement will be used.
Auto check for updates when kitchen starts
To enable the auto update check, go to "Check for updates" in the main menu. After it checks, you will be asked if you want to enable it.
I added root and busybox but there is no su or busybox in my project. Why?
The kitchen does not add Busybox or SuperSU/Magisk files to the project. Instead it adds flashable zips inside the rom.zip. There are many variables to deal with (Android version, device architecture, manufacturer, system/systemless, etc.). Flashing the zips with the rom accounts for all of these variables and there is no reason to re-invent the wheel.
Debloat and custom debloat
There are 2 options in the debloat menu (besides knox which is self explanatory):
1) Debloat ROM
This option removes all files included in the kitchens standard bloat list file - /kitchen/tools/root/bloat
2) Custom Debloat
This option removes all files included in the bloat_custom file - /kitchen/tools/root/bloat_custom OR kitchen/superr_project/00_project_files/bloat_custom
This file is empty by default and is there for you to add whatever you want to remove. You can either add everything you want to remove and use only option 2, or you can add new files here and use option 1 and 2.
I suggest you take a look at /kitchen/tools/root/bloat to see the format of the listed bloat files. Use the same format for the bloat_custom file.
When you use either option, the files are not deleted. Instead they are moved to the 00_project_files directory in case you want to restore them later.
Deodexing
Deodexing Samsung roms may or may not work. If your rom does not boot after deodexing, try it without. If it works and you must deodex your rom, try a different tool. I hear svadev deodex tool works well for Samsung roms.
boot.img errors
If the kitchen gives you errors about unpacking boot.img, there is a good chance I will not be able to help. I suggest you figure out how to unpack it using Linux commands/binaries and let me know how you did it. You may also find a tutorial about how to unpack your boot.img. If so, please send a link. It does not help me to know another tool works. I need the commands/binaries used in order to update the kitchen.
Feel free to upload your boot.img AND the build.prop from the same rom so I can check to see if I can fix it. I will ignore you if you don't upload both mentioned files
I do not answer support questions through PM. There are no exceptions. Post in the thread if you want help so others can give suggestions and learn from your solution
I will not answer questions if it is clear that you have not read the OP, the info posts after the OP, and searched the thread for answers. I do not have time to answer the same questions over and over. Many questions are already answered in this thread and if you want help, I expect you to try and solve it on your own before posting. If your question has not been answered in the thread, I am happy to assist in any way possible.
If I ask you to upload files, they need to be uploaded on a server that does not require registration for full speed downloads, or registration for downloads at all. Drive, Dropbox, AFH, and Mega are examples of acceptable servers. There are many other good ones, but I hope you get the point.
Thanks for understanding
reserved
Looks promissing, gonna try it asap :good:
I suppose it to work for many devices but are there any already tested for?
Looks great mate. Can't wait to give it a go
Its been an honor, testing this out! This deserves to be stickied!!
Sent from my N9510 using Tapatalk
---------- Post added at 04:51 AM ---------- Previous post was at 04:48 AM ----------
Androidwizzard said:
Looks promissing, gonna try it asap :good:
I suppose it to work for many devices but are there any already tested for?
Click to expand...
Click to collapse
Zte Concord 2
Zte Warp4G
Moto E 2015
LG Exceed 2
LG Realm
Still waiting on results from:
MediaTEK VKworld (VS6050S)
SuperR. said:
Disclaimer: I am not responsible for anything bad that may occur from the use of this tool, but I will take all the credit you can give me if it works for you
Sent from my N9510 using Tapatalk
Click to expand...
Click to collapse
Nice and finally something for Linux. To bad I'm out of town can't wait to test this...
Nice work
Sent from my SM-G928T using Tapatalk
bcrichster said:
Its been an honor, testing this out! This deserves to be stickied!!
Sent from my N9510 using Tapatalk
---------- Post added at 04:51 AM ---------- Previous post was at 04:48 AM ----------
Zte Concord 2
Zte Warp4G
Moto E 2015
LG Exceed 2
LG Realm
Still waiting on results from:
MediaTEK VKworld (VS6050S)
SuperR. said:
Disclaimer: I am not responsible for anything bad that may occur from the use of this tool, but I will take all the credit you can give me if it works for you
Sent from my N9510 using Tapatalk
Click to expand...
Click to collapse
Think it needs to be in xda portal as well
Sent from my SM-N920C using Tapatalk
Click to expand...
Click to collapse
I'll give it a shot on Samsung Galaxy Note 5 - if there aren't any objections against @SuperR.
Is portal different than Chef Central?
Sent from my N9510 using Tapatalk
bcrichster said:
Is portal different than Chef Central?
Sent from my N9510 using Tapatalk
Click to expand...
Click to collapse
Xda portal is video review and goes on xda Facebook as well
Sent from my SM-N920C using Tapatalk
Androidwizzard said:
I'll give it a shot on Samsung Galaxy Note 5 - if there aren't any objections against @SuperR.
Click to expand...
Click to collapse
Right on, should have Knox removal as well. By all means, plz report back
Sent from my N9510 using Tapatalk
Good! I can test with a mtk6582 device with lollipop stock rom... sounds great!! SUPPORT!
Regarding MTK devices, I have never owned one so I am totally unfamiliar with special requirements they may need. I will add support for everything I can as issues come up
SuperR. said:
Regarding MTK devices, I have never owned one so I am totally unfamiliar with special requirements they may need. I will add support for everything I can as issues come up
Click to expand...
Click to collapse
I think you need to add mkbootimg ( https://github.com/osm0sis/mkbootimg ) for work with mtk based boot.img and maybe edit the img extraction of stock imgs.... I dont't now bro, you're the chef hahaha
Regards and support
duniel said:
I think you need to add mkbootimg ( https://github.com/osm0sis/mkbootimg ) for work with mtk based boot.img and maybe edit the img extraction of stock imgs.... I dont't now bro, you're the chef hahaha
Regards and support
Click to expand...
Click to collapse
This kitchen already uses Android Image Kitchen by osm0sis, which includes his mkbootimg. Maybe it will already work for MTK. Let me know if you encounter problems.
SuperR. said:
This kitchen already uses Android Image Kitchen by osm0sis, which includes his mkbootimg. Maybe it will already work for MTK. Let me know if you encounter problems.
Click to expand...
Click to collapse
Yes, It should work.
When I try with my device I'll tell you the results
Regards

[ Windows / Linux / Mac ][DONATE] SuperR's Kitchen (v3.2.2.2 - 10-13-2021)

Disclaimer: I am not responsible for anything bad that may occur from the use of this kitchen, but I will take all the credit you can give me if it works for you
{
"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"
}
Please read the troubleshooting in post #4 of the standard kitchen thread before asking for help.
Please indicate your OS when asking for help.
Please send a fast link to your firmware that does not require registration when asking for help.
Donate Release Thread
Donate Changelog
Donate version Info
See terms and conditions below.
Spoiler: Terms and Conditions
Terms and Conditions for SuperR's Kitchen Donate version:
Allowed:
An active kitchen account grants usage privileges of the donate kitchen and the sr-code.com website.
One kitchen account provides kitchen access to one user, on one operating system, on one personal computer.
Not allowed:
Sharing your kitchen account and/or privileges.
Transfer and/or resale of your kitchen account.
Suspicious activity.
Definition:
Suspicious activity - Decided exclusively by SuperR at the time of an incident.
Resolution:
If anything from the not allowed list occurs, your kitchen account will be disabled.
See this post for more details on the Single PC license.
Donation Options:
No longer accepting donations or new users.
EXISTING DONORS: GitLab is no longer used. See this post if you previously had GitLab access and are unable to download/update/install.
NOTE: The Plugin Repo is included in the Donate kitchen. If you wish to see a description of the available plugins, they can be found here.
Dependencies:
WINDOWS:
Java 8 or higher (Windows download)
LINUX/MAC:
Java 8 or higher
Python (to run the launcher (could be bypassed by running tools/source/superr in the terminal from the main kitchen directory))
Download/Install/Run:
Free version:
Found here ​
WSL2 (Windows 10):
WSL2 Help and information (Donate Version)
With the release of v3.2.1.0, there are many improvements to the Linux version of the kitchen compared to the native Windows version. WSL2 on Windows 10 is the perfect way to run the Linux kitchen on Windows. Installation takes a few more steps...
forum.xda-developers.com
​
Linux/Mac (Terminal):
Download the kitchen.zip from the download page sent through PM. Extract to a new directory.
Enter the following command where "/location/of/kitchen" is the directory where the kitchen lives:
Code:
/location/of/kitchen/superr
Windows:
NOTE: The native Windows version has reached end of life. Consider running the Linux kitchen in WSL2 using the guide above.​
Download the kitchen.zip from the download page sent through PM. Extract to a new directory.
Make sure Java listed above is installed and in your system environment PATH (Check Google for the many guides on this if you need help)
Double click superr.exe in newly extracted kitchen directory.
NOTE: After you start the kitchen, it will ask you for your Kitchen username and password. Make sure you enter it correctly or it will not work. Thanks for the donation, enjoy
Known Issues/Limitations:
Does not unpack/repack f2fs file systems.
Linux:
None
WSL2:
None
WSL1:
Crashes with xattr not defined error when unpacking some img files due to a bug in the Python ext4 module.
Mac:
Does not use e2fsdroid for building img files as I am not able to compile it for Mac so far.
Windows:
No longer being updated. v3.2.1.3 is the last version. The Linux kitchen runs perfectly in WSL.
Does not use e2fsdroid for building img files as I am not able to compile it for Windows.
Crashes with xattr not defined error when unpacking some img files due to a bug in the Python ext4 module.
If you run Windows as administrator and have issues with the Boot Menu, please see this post.
If superr.exe gets removed by your antivirus program, whitelist the kitchen directory in your antivirus program.
If the kitchen can't find an internet connection, try whitelisting sr-code.com in your antivirus browsing security. If it still does not find a connection, try using a VPN.
The colors are not perfect due to Windows not supporting ASCII escape codes by default. If you want it to look more like Linux, you can run the Linux version in WSL (formerly known as "Bash on Ubuntu on Windows").
Video tutorials by @chevycam94
Credits:
@osm0sis - For Busybox Installer and Android Image Kitchen
@Chainfire - For SuperSU
@JesusFreke - For [Bak]smali
@nkk71 - For TWRP minzip patch, and make_ext4fs improvements
@Captain_Throwback - For providing a pre-compiled update-binary with the minzip patch and squashing bugs
@cubinator - For Python ext4 module
@_riddle - For oat2dex
@iBotPeaches - For Apktool
@AOSP - For zipalign, aapt, adb, img2simg, simg2img, make_ext4fs
@xpirt - for img2sdat & sdat2img
@yoanf_26 - For French translation
@anestisb - For vdexExtractor
@iuss - For payload_dumper.py
Contributors
SuperR.
Version Information
Status: Beta
Created 2018-11-16
USAGE:
Run the kitchen (instructions in OP)
Create new project using the menu
Copy ROM zip into the superr_NAME directory of this tool (NAME = the name of your new project).
OR
Copy system.ext4.tar and boot.img into the superr_NAME directory of this tool.
OR
Copy system.ext4.win and boot.emmc.win into the superr_NAME directory of this tool.
OR
Copy system.img and boot.img into the superr_NAME directory of this tool.
OR
Copy official Nexus tgz into the superr_NAME directory of this tool.
OR
Copy Samsung firmware zip into the superr_NAME directory of this tool.
OR
Copy Moto firmware zip into the superr_NAME directory of this tool.
OR
Leave superr_NAME directory empty to extract from rooted device or custom recovery
Extract for new ROM from the Main menu.
Enjoy!
Features:
*Extract and create ROM from:
Rooted Device
Custom Recovery
Existing ROM zip
system.img/boot.img (and cache.img on Samsung devices)
system.ext4.tar/boot.img
system.ext4.win/boot.emmc.win (including multi-file .win000, .win001, etc)
Moto and other factory firmware zips containing sparsechunk files
cm12 + roms with sparse dat files
Zips that contain system.img and boot.img
Zips that contain payload.bin
Samsung firmware zips that contain tar.md5 file
Official Nexus/Pixel firmware tgz/zip
Official Nexus/Pixel preview tgz/zip
system directory that contains symlinks and boot.img
*Create flashable zips of many varieties including:
Full ROM
Switch between set_perm, set_metadata (KitKat+), raw_img, and sparse_dat (Lollipop+)
Kernel (including init.d if you added it with the kitchen)
Recovery
Media
app, priv-app, and framework
*Deodex the following:
Android 10 ROMs
Pie ROMs
Oreo ROMs
Nougat ROMs
Marshmallow ROMs
Lollipop ROMs
KitKat and earlier ROMs
*Root features:
Root/unroot
Choose Magisk
Choose SuperSU
Add other root zips to /tools/root/root_zips directory
Choose system OR systemless root for M+ and Samsung 5.1.1 roms
Add/remove su.d support
*Boot features:
Unpack/repack boot/recovery img (Big Thanks to @osm0sis for Android Image Kitchen!!!)
Add/remove insecure boot
Remove dm-verity
Add/remove forceencrypt
*By-name auto-detection from:
Device
Existing ROM
boot.img
kernel.elf
**OR**...manually enter it
*mmcblk auto-detection from:
recovery.img
*Kitchen updater:
View the last 3 changelogs when an update is available.
Update to the latest version
Option to check for updates when the kitchen starts
*Pack/Unpack super.img
*Create system.img
*Device database for mmcblk devices (currently very small, but will grow over time)
*Add devices to the assert
*Add custom asserts
*Zipalign apks
*Debloat ROM
*Custom Debloat list support
*Remove Knox
*Add/remove busybox (Big thanks to @osm0sis for his Busybox Installer)
*Add/remove user app support (/data/app)
*Sign zips
*Cross-platform: Windows and Linux are fully supported
*Does not say Built with SuperR's Kitchen in the updater-script
*Does not replace ro.build.display.id with Built.with.SuperRs.Kitchen
*Allows you to create a custom entry in the updater-script below the ROM name
*Removes all the Place holders (#ASSERT, #SYM, #PERM, etc) from the updater-script before zipping.
*Custom ro.build.display.id
*Option to convert updater-script to update-binary for all rom zips EXCEPT sparse_dat.
*Add custom directory to be included in and flashed with rom zip to location of your choice.
*Ability to choose an apk, decompile, modify it manually, recompile, sign, and move it back to where it came from.
*Plugin support - Add your own script to the /kitchen/tools/plugins directory and the kitchen will run it for you.
*AutoROM - Unattended ROM development using a config file.
Nice to see the windows version! Thx SuperR!
Sent from my unknown using XDA Labs
Got the notification from Gitlab
Bangin'! [emoji41]
shoey63 said:
Got the notification from Gitlab
View attachment 4139244
Click to expand...
Click to collapse
Me too. [emoji16]
Sent from my N9515 using Tapatalk
@SuperR.
I've been enjoying your free version greatly. It suites my needs just enough. But I still wanted to contribute to get the Pro version, just to Help Donate to you. The many lines of script you wrote are AMAZING!!! THANK YOU for your amazing work!!! :good:
Heres my GitLab username: aaron74xda
My 14.04 is also 64bit version maybe is better i update to the version that you offer in the other kitchen thread ?
https://forum.xda-developers.com/showpost.php?p=72066578&postcount=4 << on this post
gitlab username: OMJ
thanks again!
SuperR. said:
Thanks for the info. This project is still Beta as marked in the OP. Once we figure out how to solve all the small issues I will update the documentation and the kitchen to try and help everything along as much as possible.
Running as admin in windows brings up another point I forgot about. Apparently Windows can only create symlinks as admin, so if you need to create a system.img you will need to run as admin.
Click to expand...
Click to collapse
You could try creating a batch script that self escalates, and calls "python superr" as Admin. I'm not great with Python by any means. I have a bit more experience with batch.
---------- Post added at 03:28 PM ---------- Previous post was at 03:25 PM ----------
Is there no log file anywhere for errors? Tried to extract a 7.1.2 ROM, and it says there was a problem, but no info or anything.
@SuperR. Do you provide a Free version soon? Does we have to pay another $10 if we using version 2?
dkionline said:
@SuperR. Do you provide a Free version soon? Does we have to pay another $10 if we using version 2?
Click to expand...
Click to collapse
I believe he wants to hold off on a "free" release until more issues have been resolved. That leave those that paid for it with access (limited number of people) to help test it. Also sounds like it leaves those with a slightly more vested interest in it to help with input, as they paid for it, and therefore use it more than those that typically just have the free version.
At least in my case, the $10 I put up is all I needed. No additional money is (currently) required.
chevycam94 said:
You could try creating a batch script that self escalates, and calls "python superr" as Admin. I'm not great with Python by any means. I have a bit more experience with batch.
Click to expand...
Click to collapse
I don't know anything about batch scripts. If you want to write it to help out, I am sure some people would find it useful. I don't even know how to start cmd.exe as admin without right clicking lol
chevycam94 said:
Is there no log file anywhere for errors? Tried to extract a 7.1.2 ROM, and it says there was a problem, but no info or anything.
Click to expand...
Click to collapse
There is currently very limited logging. It is something that I would like to improve on for sure. Please send firmware as requested in the OP and I will have a look.
edit: I just downloaded and extracted the latest bullhead 7.1.2 release on Windows and Linux with no issues.
edit2: Just added the pip commands to the install instructions in the OP
dkionline said:
@SuperR. Do you provide a Free version soon? Does we have to pay another $10 if we using version 2?
Click to expand...
Click to collapse
There is already a free version of the kitchen https://forum.xda-developers.com/ap...chen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434
There is no plan for a free Python version. The free version is Bash and the donate version is Python. Eventually, support for the Bash donate version will end. All donors have already been added to the Python repo. There is no need to donate again for access unless you want to
I'm going to donate again (it'll be later this weekend)...because WOW! thank you for the rewrite in Python! I might love you geeky bro man love.
@SuperR. Ok cool, but no access here on 3.0
name: dkionline
Edit: Im in i see, but no sources visible yet, think you not open before beta is done.
GraveDigger176 said:
I got this Error message when i want start the Kitchen and psutil is installed. I'm on ubuntu 14.04
Click to expand...
Click to collapse
I dont think basic psutils is enough
Might be overkill, but enter this in your terminal
Code:
sudo apt-get install psutils && sudo apt-get install python-psutil && sudo apt-get install python3-psutil && sudo apt-get install python3.5
I had the same error on Linux Mint 18 Sarah, but the kitchen fired straight up for me after I entered the command and received the updates.
Hello,
SuperR. said:
All donors have already been added to the Python repo. There is no need to donate again for access unless you want to
Click to expand...
Click to collapse
I have a small problem:
Code:
[email protected]:~/Documents$ git clone https://gitlab.com/superr/superrs-kitchen3.git
Clonage dans 'superrs-kitchen3'...
Username for 'https://gitlab.com': migascalp
Password for 'https://[email protected]':
remote: Not Found
fatal: repository 'https://gitlab.com/superr/superrs-kitchen3.git/' not found
[email protected]:~/Documents$
migascalp said:
Hello,
I have a small problem:
Click to expand...
Click to collapse
Do it again. It will eventually work.
Edit: Unless you haven't donated.
dkionline said:
Access was granted and notification is there, but source on gitlab not visible.
404 Page not found.
Click to expand...
Click to collapse
Just git clone again. It worked for me after a couple of attempts. Gitlab is unpredictable sometimes.
shoey63 said:
Do it again. It will eventually work.
Edit: Unless you haven't donated.
Click to expand...
Click to collapse
I am already a donor user
thank you for the answer

Categories

Resources