[KERNEL]How to build a custom Android Kernel for your device - Galaxy Y GT-S5360 General

here is the guide
http://forum.xda-developers.com/showpost.php?p=24747881&postcount=4
thakz irfanbagus for the guide

where's the package link?have you try this guide by yourself?

i hope he tried
got a ubuntu, i will try this one (cross-fingers)

it's not working. sgy stock kernel do not have /proc/config.gz and gcc version in arm-2011.03 not compatible with other precompiled module.
this is work for me
requirement :
1. linux box 32 bit with working gcc. you can use real linux machine or virtual machine
2. Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI from http://www.codesourcery.com/ (Linux version without installer arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2)
3. mkbootimg with md5support. got it from http://forum.xda-developers.com/showpost.php?p=22224170&postcount=241 . credit to harish2704
4. split_bootimg.pl (google it)
5. kernel source from http://opensource.samsung.com . i use GT-S5360_GB_Opensource_Update2.zip
6. stock boot.img (or from your custom kernel).
step :
1. make folder "sgy" in your home. the result is folder "/home/<yourname>/sgy". <yourname> is your linux user name, and from now replace <yourname> with your user name. put all file you already download there
2. extract "GT-S5360_Kernel.tar.gz" from "GT-S5360_GB_Opensource_Update2.zip". put also in "sgy" folder
3. open terminal emulator and go to your working path with command
Code:
cd ~/sgy
4. extract your compiler with
Code:
tar -xvf arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
5. create folder "kernel" and extract kernel source there
Code:
mkdir kernel
cd kernel
tar -xvf ../GT-S5360_Kernel.tar.gz
you got 2 folder, "common" and "modules"
6. open folder "common", there is file "Makefile". open with text editor and find line with content "/opt/toolchains/arm-eabi-4.4.3/bin/arm-eabi-". replace with "/home/<yourname>/sgy/arm-2009q3/bin/arm-none-eabi-", don't forget replace <yourname>.
7. in terminal goto folder "common" and load default config for sgy
Code:
cd ~/sgy/kernel/common
make bcm21553_totoro_05_defconfig
8. if you want change you config run
Code:
make menuconfig
9. if you ready to build then run
Code:
make
or if you have dual core cpu and want to make it faster
Code:
make -j3
10. when complete and no error appear, copy your kernel to "sgy" folder
Code:
cp arch/arm/boot/zImage ~/sgy
11. extract ramdisk from your boot.img
Code:
cd ~/sgy/
perl split_bootimg.pl boot.img
you got "boot.img-kernel" and "boot.img-ramdisk.gz". move "boot.img" and "boot.img-kernel" to other place.
12. repack your new kernel and ramdisk. but first get md5sum of your new kernel
Code:
md5sum zImage
you got something like
Code:
1fd319aa60abc2abae2e5932bcb9fc77 zImage
you need that "1fd319aa60abc2abae2e5932bcb9fc77" write it or copy to text editor. you need run it every time compile new kernel
13. repack
Code:
chmod +x mkbootimg
./mkbootimg --kernel zImage --ramdisk boot.img-ramdisk.gz --base 0x81600000 --kernelMD5 <your md5sum result> -o boot.img
14. make odin flash-able
Code:
tar -cf boot-sgy.tar boot.img

I thought you have to put your post into a new thread irfan...this one is a fake guide.

kurotsugi said:
I thought you have to put your post into a new thread irfan...this one is a fake guide.
Click to expand...
Click to collapse
Irfan must create a guide.yes yes..I also think Irfan sahab must compile a CM7.2 from sources.

offtopic:
btw, do you know who's working on cm7 from source with motafoca?his thread is missing and I just get curious on their progress.

kurotsugi said:
offtopic:
btw, do you know who's working on cm7 from source with motafoca?his thread is missing and I just get curious on their progress.
Click to expand...
Click to collapse
His thread was closed by moderator.You can request MOD to reopen his thread.Motafoca wanted a galacy y to be lended for his experiments
---------- Post added at 03:37 PM ---------- Previous post was at 03:33 PM ----------
Can someone download the sources around 15Gigs and stripe down the file and share it to Maroc ?

Whre can i download it?
Sent from my GT-S5360 using xda premium

kurotsugi said:
I thought you have to put your post into a new thread irfan...this one is a fake guide.
Click to expand...
Click to collapse
i don't call it fake. it's just too general and missing some detail (but critical) for our device. and in the 'spirit of operation iron fist', i think it's better to put here
premolikeshtc said:
Irfan must create a guide.yes yes..I also think Irfan sahab must compile a CM7.2 from sources.
Click to expand...
Click to collapse
with my internet connection, it will take weeks just to download the source. and i think cm, like android source, use repo. so you can't just download it. you clone it from their source repository, that mean no download accelerator.
btw beside kernel source, samsung also release their mod to android source. but to build it, you still need to get android source (about 10GB according their website).

well...thats your choice, irfan.
@sgy.creed: sorry, I don't mean to offend you. IMHO it will be nice if before someone post any guide they already have tested it by them. in this way, they'll able to give more accurate direction to anyone who need their guide. as we already know, kernel is crucial part in our device. any mistake in compiling it will lead to brick our device. we have to cautious on it. peace ^,^v

kurotsugi said:
well...thats your choice, irfan.
@sgy.creed: sorry, I don't mean to offend you. IMHO it will be nice if before someone post any guide they already have tested it by them. in this way, they'll able to give more accurate direction to anyone who need their guide. as we already know, kernel is crucial part in our device. any mistake in compiling it will lead to brick our device. we have to cautious on it. peace ^,^v
Click to expand...
Click to collapse
if you (or others) think it's better to put in other thread, or maybe op wanna edit his post, fell free to copy my post (or just link, it's up to you). i don't take any credit to that post, because it just recompilation from other thread.

GT-B5510
Is there by chance anyway to find a stock Kernel for my device for my GT-B5510???
I recently flashed a custom Kernel for GT-S5360 and the result was a Brick.
is there someone willing to help me??

Rui Oliveira 21 said:
Is there by chance anyway to find a stock Kernel for my device for my GT-B5510???
I recently flashed a custom Kernel for GT-S5360 and the result was a Brick.
is there someone willing to help me??
Click to expand...
Click to collapse
Have u tried through kies?if the answer u failed then only odin is the way.
u need pda files from the update.Search google,i found one FW but it is from Italy :
B5510CEKK1.

sgy.creed said:
Hi guys,
This guide teaches how to make a new kernel for your device, it works in most of the cases but doesnt mean it will work for everyone
You need a minimal linux experice to know WTF you are doing
If you have any questions, post Belloowww
Download the required files
You will need a linux machine with the basic development tools or a virtualbox machine running a linux distribution (ubuntu 64bits will do fine)
I use the codesourcery package
Download the IA32 GNU/Linux TAR
The tar package is the easier to install
You will also need your kernel source from your manufacturer, for samsung the sources are available here
Install the cross compiler
Enter the folder were you downloaded the package and extract it, you will get something like arm-2011.03
Move that folder to some location, i use opt
ex: mv arm-2011.03 /opt/
or
sudo mv arm-2011.03 /opt
Done!
Extract and prepare the kernel sources
I will use the samsung sources as example, but anything can be used
For the samsung sources, after you extract the zip, you will get something like DEVICE_Platform.tar and DEVICE_Kernel.tar.gz
Extract the kernel:
tar zxvf DEVICE_Kernel.tar.gz
Enter the kernel folder and list the folder contents
ls
The structure is something like this:
{
"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"
}
Most devices contain the config file inside the device
You can extract it like this:
adb shell
su
cp /proc/config.gz /sdcard/
exit
exit
adb pull /sdcard/config.gz
Good, now we have the sources, compiler and configuration
Compiling the kernel
To compile ther kernel, i usually clean the sources first, with this i know for sure nothing will go wrong (usually )
make ARCH=arm CROSS_COMPILE=/opt/arm-2011.03/bin/arm-none-eabi- distclean (Remember to replace acordingly the compiler folder)
Sources cleaned, time to load the config file
gunzip config.gz
cp config ./.config
Good, now lets check the menuconfig (menuconfig is a menu to choose the kernel options, created to make it easy to select)
make ARCH=arm CROSS_COMPILE=/opt/arm-2011.03/bin/arm-none-eabi- menuconfig
Change whatever you want and exit and save
good, now its time to build
make ARCH=arm CROSS_COMPILE=/opt/arm-2011.03/bin/arm-none-eabi- -j2
Now wait for it to finish!
Your compiled kernel will be located inside arch/arm/boot/zImage
Extracting a boot.img
Good, now we have the zImage, but WTF to do with it?
Well, android usually (some samsung devices use a different boot.img method, ex: I9000) has the boot.img, inside of it we contain:
- ramdisk (required files to load the /system partition and continue the boot sequence)
- zImage (our kernel)
- pagesize
- base
- cmdline (some kernel paremetes used on boot)
To create your own boot.img, you need one from a nandroid backup that was made from CWM or AmonRA custom recoveries (there are other methods, but for those use the madteam forum )
The boot.img is located inside your /sdcard/clockworkmod/backup/somedate/boot.img
You will also need the unpackbootimg and mkbootimg binaries, i this link there is the 64 bit version (wont work on 32 bit linux)
create an empty folder, copy the downloaded file inside, enter it and do:
tar zxvf bootimgtools.tar.gz
chmod 755 *
now copy the boot.img you got from the backup
and extract the boot.img with:
./unpackbootimg -i boot.img
this will create the files as explained above
Creating the boot.img
Before making the boot.img, we need some information from the files extracted
cat boot.img-base ( save the output #1)
cat boot.img-pagesize (save the output , place the value inside the Hex Value of this site, and copy the decimal value and save it #2)
cat boot.img-cmdline (save the output #3)
Good, now copy the compiled kernel (zImage) inside the current folder and do:
mkbootimg –kernel zImage –ramdisk boot.img-ramdisk.gz –cmdline “(replace with output#3)” –base (replace withoutput #1) –pagesize (replace with output#2) -o /tmp/boot.img
Good, the boot.img is created!
Now test on your device!
If you dont know how to flash the boot.img, enter the madteam forum and request help (its too difficult to explain the flashing of boot.img if you dont know how to do it )
Take care!
<External link removed>
Click to expand...
Click to collapse
please credits motafoca madteam

GT-B5510
Harsh06 said:
Have u tried through kies?if the answer u failed then only odin is the way.
u need pda files from the update.Search google,i found one FW but it is from Italy :
B5510CEKK1.
Click to expand...
Click to collapse
Kies said that I had the most recent firmware, tough I found some new versions.
right now trough kies I tried to do an emergency firmware restore, i guess thats the name, but it asked for a code, a 4 number code i guess and i dont know what's the code.
Via odin I tried to install stock firmware from sammobile but it failled as well, if you want I'll post the dialog from odin.
I can boot in recovery mode, Odin(download) mode and CWM mode.
could you point me in the right direction???
thanks for your time

Rui Oliveira 21 said:
Kies said that I had the most recent firmware, tough I found some new versions.
right now trough kies I tried to do an emergency firmware restore, i guess thats the name, but it asked for a code, a 4 number code i guess and i dont know what's the code.
Via odin I tried to install stock firmware from sammobile but it failled as well, if you want I'll post the dialog from odin.
I can boot in recovery mode, Odin(download) mode and CWM mode.
could you point me in the right direction???
thanks for your time
Click to expand...
Click to collapse
I believe Doky already reply your post n willing to help u in others thread.Give doky some info about your current FW.U need 3 complete files n flash through Odin.Key in *#1234# with your dialer(u will see current info version) and PM doky about the info.He surely gonna help u.
Sorry OP off topic.

GT-B5510
He did help, thanks
question now is...while trying to revive the phone I installed Creed's Rom for Gt-s5360, I got quiet, and obviously it doesnt work that well in my GT-B5510, so I need a custom Rom for my device or a Stock Rom, but I cant find neither :S
any lights??

Kernel
How to change Kernel Version when build kernel ??
usually display 2.6.35.7 [email protected] #1
i wanna change [email protected] #1 so how the setting on linux or maybe what file??
Thanks b4

Rui Oliveira 21 said:
He did help, thanks
question now is...while trying to revive the phone I installed Creed's Rom for Gt-s5360, I got quiet, and obviously it doesnt work that well in my GT-B5510, so I need a custom Rom for my device or a Stock Rom, but I cant find neither :S
any lights??
Click to expand...
Click to collapse
I was just wondering if you went to the oldest possible firmware you could find and then proceeded to update from that. Sometimes the updates only contain necessary info and kind of rely on the previous installs.
Sent from my TF101 using Crashntalk 2

Related

[KERNEL/TUTORIAL] UPDATE 31/07 Howto mod the stock XXJVR/S/T kernel SU/Init.d Support

Well what do you do when you're bored and need some distraction .....Modify the stock kernel and include SU!
If you just search on the internet and especially on XDA than you find out that this is not so difficult.
The only purpose of this modified kernel is install SU and thus get ROOT
Why superuser and busybox are not installed by default is simple: it takes only 1 minute to download it from the market...
So here I give you the stock kernel + su/Root for XXJVQ/ XXJVR
installation:
1. Flash the tar file with Odin
2. Download superuser from the market and install it
3. Download Busybox installer from the market and install it
Credits to Supercurio, Hardcore, Liliniser for the tools and sources
Tutorial is Linux based!!!
So if i can do it than you can do it also!! All you have to do is read and follow post 2
Update 01/08/11 Added XXJVT
Update 01/08/11 Added Working XXJVR
Update 06/07/11 Howto add init.d support to the kernel (post 3)
Tutorial
1. Download and install the needed tools
2. extract de stock kernel to a temporary directory
3. modify the init.rc script to include your su install script.
4. add in the tmp folder busybox and su
5. add in the sbin directory your install script.
6. Recompile the kernel
7. Tar de kernel
8. Flash the kernel with heimdall or Odin
1. Download and install the needed tools
* Cross compiler: http://www.codesourcery.com/sgpp/li...eabi/arm-2009q3-67-arm-none-linux-gnueabi.bin and install it to /opt/toolchains/arm-2009q3/
* Kernel repacker made by Liliniser / dkcldark : Download from supercurio's github. with (if installed) git clone git://github.com/project-voodoo/kernel_repack_utils or goto the website https://github.com/project-voodoo/kernel_repack_utils and click on download.
* Download busybox,su and the install script from this post, and extract the files.
2. extract de stock kernel to a temporary directory
Copy the original zImage to de directory where you extracted the kernel repacker
Rename it to zImage.org
create a temp directory in the kernel repacker directory
Open a linux shell and go to kernel repacker directory
./extracter.sh -s zImage.org -d temp (hit enter)
3. modify the init.rc script to include your su install script.
Go to the temp directory and edit init.rc with your favourite editor and put this on a new line at the end off the file.
service install_su /sbin/install_su.sh
user root
oneshot
Save the file and exit
4. add in the tmp folder busybox and su
copy busybox and su to the tmp folder in your extracted kernel folder
make sure they are markt als executable.
5. add in the sbin directory your install script.
copy install_su.sh to the sbin folder in your extracted kernel folder
6. Recompile the kernel
Open a linux shell and go to kernel repacker directory
./repacker.sh -s zImage.org -d zImage -r temp -c gzip
congratulations you must cooked your first modified kernel
7. Tar de kernel
tar -H ustar -c zImage >code.tar
8. Flash the kernel with heimdall or Odin
Howto add init.d support to the stock kernel
Whell this is easy to implement
1. Open a linux shell and goto to the extracted kernel directory. (read post 2 howto do that)
add the following lines to the init.rc file
Code:
service initd_support /sbin/initd_support.sh
user root
oneshot
Save the file and exit
2. Create a new file in the sbin directory called initd_support.sh and add the following code
Code:
#!/tmp/busybox sh
if cd /system/etc/init.d >/dev/null 2>&1 ; then
for file in S* ; do
if ! ls "$file" >/dev/null 2>&1 ; then continue ; fi
/system/bin/sh "$file"
done
fi
Save the file and make it executable
3. repack the kernel (see post 2 for the howto)
4. on your device mount system Read/Writable and create the directory /system/etc/init.d
5. Copy your init scripts to /system/etc/init.d/
Make sure the name starts with a S, and set the permissions to 777
Example step 5/6
Code:
adb push Stweakscript /sdcard/
adb shell
su
/tmp/busybox mount -o remount,rw /system
/tmp/busybox mkdir /system/etc/init.d
/tmp/busybox cp /sdcard/Stweakscript /system/etc/init.d/Stweakscript
/tmp/busybox/chmod 777 /system/etc/init.d/Stweakscripts
7. flash the kernel
I'm sorry in advance.
But WTF?
vladoots said:
I'm sorry in advance.
But WTF?
Click to expand...
Click to collapse
If you only want to root your rom don't wait for devs to do it but do it your self
lownoise said:
If you only want to root your rom don't wait for devs to do it but do it your self
Click to expand...
Click to collapse
Yes, and for learning purposes. Thanks for the tips, I was sitting down to do this on another phone the other day actually... it's good to see your ideas, I was getting pretty frustrated with the limited Android init environment (the toolbox commands are so limited!).
Thanks for this nice tutorial.Worked great!
Great! Now we have good rooting kernel.
If I want root - I want root, not tweaks and other "shiny" things.
Cfroot breaks BT in some cases, Fuguroot breaks Kies connection.
Kernel which don't add Superuser.apk as a system application is the best choice - we don't have to delete other system files and there are updates of this app, so why should we have older version on /system and new on /data as an update?
Can I do "adb root" on this kernel ?
Sure Just install superuser and busybox from the market
Wooow! These are the sort of tutorials I miss here sooo much. It's a developer forum, but what we are getting here mainly are ready-products (roms, modded kernels). And why not to do it yourself. But sometimes googling for the information is not so easy, because applies to different conditions(devices, phone models, soft versions). There are many people who would spend their time learning how to compile a kernel or edit framework files. But there are so few tuts on this here... I miss tuts that tell how to do things step-by-step, without any specific linux/java knowledge.
sebarkh said:
Wooow! These are the sort of tutorials I miss here sooo much. It's a developer forum, but what we are getting here mainly are ready-products (roms, modded kernels). And why not to do it yourself. But sometimes googling for the information is not so easy, because applies to different conditions(devices, phone models, soft versions). There are many people who would spend their time learning how to compile a kernel or edit framework files. But there are so few tuts on this here... I miss tuts that tell how to do things step-by-step, without any specific linux/java knowledge.
Click to expand...
Click to collapse
And therefore I did it. Share the knowlegde and safe this forum
Why doesn't XDA have more stuff like this?
Thanks OP!
Yes, I must thank you too.
Now I understand... Sorry for my initial confusion!
I've problem:
after applying script:
line 47: ./out/project/original.cpio -> no such files or directory
Any idea ?
Where is original.cpio files ?
Screen of error:
{
"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"
}
tq man...!!
man this is amazing, I was looking for something simple like this for months. It's right, should be more posts like these in xda
+1
Thank you very much for this, lownoise
We need more topics like that, since I am interested to learn myself...
Members posting tutorials like that are always appreciated, I cannot thank you enough.
Do you know how to replace the recovery 3e with 2e additionally?
It would be great to know since I want to have it CWM compatible (flash unsigned update.zip)
AFAIK recovery is a part of the kernel....
It would be great if you could point me to the right direction.
Others probably would like to know that as well.
Thanks again.
dago said:
I've problem:
after applying script:
line 47: ./out/project/original.cpio -> no such files or directory
Any idea ?
Where is original.cpio files ?
Screen of error:
Click to expand...
Click to collapse
Which kernel did you try to modify
lownoise said:
2. extract de stock kernel to a temporary directory
Copy the original zImage to de directory where you extracted the kernel repacker
Rename it to zImage.org
create a temp directory in the kernel repacker directory
Open a linux shell and go to kernel repacker directory
./extracter.sh -s zImage.org -d temp (hit enter)
Click to expand...
Click to collapse
Two noob questions:
1. from where to copy zImage file? Where can I find zImage file?
2. How to open linux shell? Should I install linux shell application on my PC and run it or?
Sorry for such questions but I want to try.
Thanks.

[Guide] How to customize the CM10 i9000 kernel

This is a complementary guide to [Guide] How to compile and install CM10 for Samsung i9000
Want to add support for another filesystem to the CM10 kernel?
Add a module?
Maybe slim things a bit by removing some stuff?
All fine, but where to start?
Since CM9, the kernel source code should be integrated with CM's source code.
So, if you are building CM10, you should already have a kernel folder in the source code.
So, where's the config file used to build the i9000 kernel?
Well, it's here: ~/android/system/kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
You can edit the file directly in a text editor (if you know what you're doing) and it looks something like this:
Code:
CONFIG_EXPERIMENTAL=y
CONFIG_KERNEL_LZMA=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
CONFIG_CGROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_INITRAMFS_SOURCE="source/usr/galaxysmtd_initramfs.list"
...
You can just edit the text file, but sometimes it's not that easy to find/do what you want because the labels aren't very user-friendly.
It's easy to make several types of mistakes.
... but there is a better way to do it, using the menuconfig tool.
To use menuconfig, just do:
Code:
cd ~/android/system/kernel/samsung/aries
make menuconfig
You should now have a text GUI to access all the options that is much easier and safer to use:
{
"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 need to load the i9000 configuration file.
Select "Load an Alternate Configuration File" at the bottom of the menu
Point to the i9000 default kernel config file: arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
After you hit OK, you'll open the i9000 config file. Make the changes you want and exit. You'll be asked if you want to save the changes.
NOTE: I've had some issues with make menuconfig producing "strange" files.
Do:
Code:
grep CONFIG_USB_G_ANDROID kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
and confirm the result is:
Code:
CONFIG_USB_G_ANDROID=y
If it's not, menuconfig "missbehaved".
(There's a backup of the original config in kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig.old)​
Final step: Tidy things up:
Code:
cd ~/android/system/kernel/samsung/aries
make mrproper
That's it.
Build away.
(Don't forget to do a "make installclean" and cleaning things up before building)
For more information on CM's kernel building, see this: http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building
another great summary! thank you!
USB
EDIT: This comment is now obsolete.
--------------
NOTE: While everything builds nicely and is functional, somehow the USB support seems to be gone in the builds produced. Charging still works but ADB and Storage don't.
There's something missing.
If you know what it is, drop a line.
pmos69 said:
NOTE: While everything builds nicely and is functional, somehow the USB support seems to be gone in the builds produced. Charging still works but ADB and Storage don't.
There's something missing.
If you know what it is, drop a line.
Click to expand...
Click to collapse
Did you enable/disable things in the config file? It is not as easy to change things by just changing the config file, often the underlying source code also needs to be changed if you want to enable certain features...
Did you somehow add fast charge support?
kasper_h said:
Did you enable/disable things in the config file? It is not as easy to change things by just changing the config file, often the underlying source code also needs to be changed if you want to enable certain features...
Did you somehow add fast charge support?
Click to expand...
Click to collapse
Just made simple tests enabling simple features, like enabling btrfs filesystem support.
At first I was enabling stuff like swap and zRam, but then thought about what you are saying and went for simple tests.
Just enabling btrfs filesystem support, triggers the behaviour.
I think any change may do it.
Maybe just saving the config file in menuconfig does it.
Sent from my GT-I9000 using xda premium
pmos69 said:
Just made simple tests enabling simple features, like enabling btrfs filesystem support.
At first I was enabling stuff like swap and zRam, but then thought about what you are saying and went for simple tests.
Just enabling btrfs filesystem support, triggers the behaviour.
I think any change may do it.
Maybe just saving the config file in menuconfig does it.
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
I often change stuff in defconfig, but I always do it for code I added to the source. Never had a problem with USB after that. So in principle, it should work...
kasper_h said:
I often change stuff in defconfig, but I always do it for code I added to the source. Never had a problem with USB after that. So in principle, it should work...
Click to expand...
Click to collapse
Make menuconfig + make mrproper are making a mess.
Code:
diff -d <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig.old) <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig)|grep CONFIG_USB_G_ANDROID
< CONFIG_USB_G_ANDROID=y
> # CONFIG_USB_G_ANDROID is not set
WTF?
Back to hand-editing the config file, I guess...
Edit: Just tried it again, starting from the original config, and it's not happening this time... Building now.
Maybe I did something dumb before? (happens a lot)
pmos69 said:
Make menuconfig + make mrproper are making a mess.
Code:
diff -d <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig.old) <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig)|grep CONFIG_USB_G_ANDROID
< CONFIG_USB_G_ANDROID=y
> # CONFIG_USB_G_ANDROID is not set
WTF?
Back to hand-editing the config file, I guess...
Edit: Just tried it again, starting from the original config, and it's not happening this time... Building now.
Maybe I did something dumb before? (happens a lot)
Click to expand...
Click to collapse
That is the way you learn quickest: by making mistake. I tell this to my students everyday when the ruin experiments
kasper_h said:
That is the way you learn quickest: by making mistake. I tell this to my students everyday when the ruin experiments
Click to expand...
Click to collapse
Well, don't know what happened (but it happened quite a few times).
Working fine now...
Nice howto, thanks. Have one question. I want to build kernel for ypg1, really similar device to i9000. So what to do next when I have zImage and modules. I mean have only kernel source and toolchain without whole Android sources. I need to make installable pkg but don't know how.
I'm looking for step by step how to build kernel, build recovery etc.
Sent from my GT-I9001 using xda app-developers app
oisis said:
Nice howto, thanks. Have one question. I want to build kernel for ypg1, really similar device to i9000. So what to do next when I have zImage and modules. I mean have only kernel source and toolchain without whole Android sources. I need to make installable pkg but don't know how.
I'm looking for step by step how to build kernel, build recovery etc.
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
I think there are a few how-to's on that in the cm wiki.
I've not looked much into it, sorry.
Guess you'll only have to sync the kernel sources + device specific trees and only build the kernel.
oisis said:
Nice howto, thanks. Have one question. I want to build kernel for ypg1, really similar device to i9000. So what to do next when I have zImage and modules. I mean have only kernel source and toolchain without whole Android sources. I need to make installable pkg but don't know how.
I'm looking for step by step how to build kernel, build recovery etc.
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
You could take a look at my github (github.com/kasperhettinga). I use a kernel building script (developed by stratosk) that does not require the whole source code of cm10 but will build a flashable zip using a separate ramdisk (also originating from the work of stratosk).
Verstuurd van mijn GT-I9000
Could you describe how to, after make when i have zImage and modules, pack everything to img to have CWM installable zip? I don't have this device but would like to learn it. Thanks a lot.
oisis said:
Could you describe how to, after make when i have zImage and modules, pack everything to img to have CWM installable zip? I don't have this device but would like to learn it. Thanks a lot.
Click to expand...
Click to collapse
I adapted the teamhacksung buildscript so it automatically creates a CWM-zip:
https://github.com/kasperhettinga/buildscript
I have a zImage built from CM10 kernel sources in Cygwin and I want to inject it into the CM10 boot.img.
Anyone has any idea how I can do that?
I tried to extract the boot.img from one of the nightlies using the dsxida's android kitchen, but it seems that it does not have ramdisk and the extracted zImage file is 0 bytes.
hey man i ve been trying to compile the kernel for my galaxy s2 and downloaded all the things recomended from the cyanogenmod github
these are the steps that i follow:
1. cd into my kernel root directory.
2. make cyanogenmod_i9100g_defconfig
3. make menuconfig
4. make -j5
after a few seconds i get this error
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
/home/incarnation95/cm10kernel/t1/scripts/gen_initramfs_list.sh: Cannot open '/home/incarnation95/home/incarnation95/cm10kernel/t1/usr/i9100g_initramfs.list'
make[1]: *** [usr/initramfs_data.cpio] Error 1
make: *** [usr] Error 2
[email protected]:~/cm10kernel/t1$
do you know how to tackle this problem?
please help i am really in a mess due to this.
previously i compiled a stock kernel, in stock kernel the compillation process went very good but it didnt boot
i really want to make this aosp kernel, and this is the only guide which indicates compilling an aosp kernel
hope you could sort out my problem.
thanks in advance
incarnation95 said:
hey man i ve been trying to compile the kernel for my galaxy s2 and downloaded all the things recomended from the cyanogenmod github
these are the steps that i follow:
1. cd into my kernel root directory.
2. make cyanogenmod_i9100g_defconfig
3. make menuconfig
4. make -j5
after a few seconds i get this error
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
/home/incarnation95/cm10kernel/t1/scripts/gen_initramfs_list.sh: Cannot open '/home/incarnation95/home/incarnation95/cm10kernel/t1/usr/i9100g_initramfs.list'
make[1]: *** [usr/initramfs_data.cpio] Error 1
make: *** [usr] Error 2
[email protected]:~/cm10kernel/t1$
do you know how to tackle this problem?
please help i am really in a mess due to this.
previously i compiled a stock kernel, in stock kernel the compillation process went very good but it didnt boot
i really want to make this aosp kernel, and this is the only guide which indicates compilling an aosp kernel
hope you could sort out my problem.
thanks in advance
Click to expand...
Click to collapse
These steps should resolve it
1. open the .config file that is created after you do make cyanogenmod_i9100g_defconfig
2. check the path of the file i9100g_initramfs.list and gen_initramfs_list.sh
3. edit the .config file to make sure the actual path matches to that in the .config file.
4. make -j5
5. Enjoy the new kernel !!
msri3here said:
These steps should resolve it
1. open the .config file that is created after you do make cyanogenmod_i9100g_defconfig
2. check the path of the file i9100g_initramfs.list and gen_initramfs_list.sh
3. edit the .config file to make sure the actual path matches to that in the .config file.
4. make -j5
5. Enjoy the new kernel !!
Click to expand...
Click to collapse
2. CONFIG_INITRAMFS_SOURCE="source/usr/i9100g_initramfs.list" (THIS WAS THERE BY DEFAULT)
I MADE IT CONFIG_INITRAMFS_SOURCE="~/home/incarnation95/cm10kernel/t1/usr/i9100g_initramfs.list"
as the location was.
i dont think we really have to define the path of gen_initramfs_list.sh or do we? and if yes then where?
There you have the problem...remove the "source/" from the path in the .config file
This path is defined by default and just needs customization for our device...
Sent from my GT-I9000 using xda premium
msri3here said:
There you have the problem...remove the "source/" from the path in the .config file
This path is defined by default and just needs customization for our device...
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
O thanks mate it really worked
Thanks a ton. Was tryna find sol. Since 3 days
Sent from my GT-I9100G using Tapatalk 2
---------- Post added at 11:32 PM ---------- Previous post was at 10:42 PM ----------
now after getting over those errors i am getting this error now :/
Code:
//home/incarnation95/Downloads/arm-2011.03/bin/arm-none-eabi-ld: cannot open linker script file /arch/arm/mach-omap2/sec_omap.lds: No such file or directory
make[1]: *** [arch/arm/mach-omap2/mailbox_mach.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
and weird thing is the files exists :/

[Tutorial] How to change kernel logo (1st boot srceen) [COMPLETED]

We have 3 major works here... So I gonna to make it seperated
-1st post is HOW TO EXTRACT kernel.img (boot.img)
-2nd post is HOW TO CONVERT PICTURE FILE to BOOT.RLE
-3rd post is HOW TO REPACK THE KERNEL PAKAGE into boot.img
Requiredment
-Window machine
-installed cygwin
-the full boot.img/kernel (some kernel won't work because there is no full pakage/ i mean we can't)
-bootimg.zip (tool for UNPACK and REPACK kernel)
-boot_screen_logo_creation_package.rar
Thank and Credit
i- Credit to DooMLoRD Recognized Developer over most of XPERIA devices for his own tool and tutor that I learned before
ii- Credit to jimbo77 Senior Member for his tutorial that I used and learned and tool for unpack and repack
ii- Don't forget to give them a thanks meter
=============================================================================
Here we go
1-This section I will show u how to unpack and repack the boot.img
just see from original thread by jimbo77 from here and download the UNPACK and REPACK tool by him HERE
this is a fast guide from me:-
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
cd /boot
Click to expand...
Click to collapse
{
"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"
}
5-Now, unpack your boot.img by running the following command:
./extractboot boot.img
Click to expand...
Click to collapse
If your output looks like this, then the extraction has worked correctly! Note that the Command Line string has also been read from the source file, this will be used later when you go to re-pack your file.
Your script folder should now look like this:
boot.img-kernel is the compiled kernel blob that was inside the source boot.img, if you want to replace the kernel with another compiled kernel image, you can replace this file with another one (but leave the file name the same)
boot.img-ramdisk.gz is the gzipped ramdisk image which has been split from the boot.img, you should leave this file alone.
The “out” folder contains the EXTRACTED ramdisk, and this is where you should make your changes to the ramdisk.
Important Note!
Remember, when editing files in the ramdisk through Windows, such as init.rc, Windows notepad will not format the files correctly, making them almost impossible to read, wheras Wordpad will LOOK like it is formatting the files correctly, if you save one of these files from the Wordpad application it will BREAK the file and it will no longer be able to be read correctly by Android. To edit these files you MUST use an editor such as Notepad++ which you can download for free.
AGAIN...
Special thanks/credit to jimbo77 for his excellent guide
So.. NEXT step to change a kernel logo is here
Requiredment
1-a picture what are u like to look into the 1st boot screen (kernel logo) (make sure it size/resolution same your device resolution)
2-boot_screen_logo_creation_package.rar
3-some infos and knowledges here
4-window machine like i explained on 1st post
My quick guide
-extract the tool.rar
-move extracted files into new folder (name it 'rle' folder without quote)
-move into cygwin folder (to make it easy to follow my simple guide)
-copy your own logo.png (a picture u want to use on a kernel) into same rle folder
(for 4 steps above it shold look like tis)
-now launch cygwin.bat
cd /rle
Click to expand...
Click to collapse
./convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
Ah...my mistake..don't forget to move/copy/replace new logo.rle into
C/cygwin/boot/out/ramdisk/here
if you done good...follow next step on next post (to repack your moded kernel)
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
./packboot
Click to expand...
Click to collapse
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
I need this for an extra (extra thanks..)
(may U?)
I did all the steps as you did. Packed boot.img and flashed but i still see old boot logo. Device is Huawei u8650
at this step ı have this Screen
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Well I've been scratching my head about this and just can't work out what's going wrong - after I run the ./extractboot boot.img command I keep getting the message: './extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory'
I followed your instructions as below:
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
When you say "move your fav kernel into same directory", what do you mean? Move it into the 'boot' folder? Or do you mean the 'cygwin' folder?
Any help you could give would be greatly appreciated - confused.com!
boot.img file problem
HTC ONE X beataudio
ENDEAVORU PVT SHIP S-ON RL
HBOOT-1.36.0000
CPLD-None
MICROP-None
RADIO-5.1204.162.29
eMMC-bootmode:disabled
CPU-bootmode: disabled
HW Secure boot:enabled
MODEM PATH : OFF
Nov 16 2012,18:32:39
cid: HTC__044
i install this ROM (cm-10.1-20130404-NIGHTLY-endeavoru.zip) file but can't boot.
boot problem how to fix pls i did flash boot.img file also but same problem.pls help
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
doesnt work on my innos d9 rom
sirhca said:
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
Click to expand...
Click to collapse
http://d-h.st/xwB
mesadbal said:
at this step ı have this Screen
Click to expand...
Click to collapse
Type this in your cygwin
Code:
chmod 777 extractboot
chmod 777 mkbootfs.exe
chmod 777 mkbootimg.exe
chmod 777 packboot
chmod 777 split_bootimg.pl
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Error when extracting
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
3X4MPL3 said:
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
Click to expand...
Click to collapse
Same problem here Bro... So how did you manage to fix it ?
FinixZ said:
Same problem here Bro... So how did you manage to fix it ?
Click to expand...
Click to collapse
Not at all, I didn't changed it and waited for an other kernel
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
Click to expand...
Click to collapse
why i am getting this error?
any idea?
$ ./extractboot boot.img
Page size: 131072 (0x00020000)
Kernel size: 4584280 (0x0045f358)
Ramdisk size: 3831016 (0x003a74e8)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: not in gzip format
Finally i manage to extract...
3X4MPL3 said:
Not at all, I didn't changed it and waited for an other kernel
Click to expand...
Click to collapse
Finally i manage to extract the boot image by using this script... :victory:
Thanks to the author "Beide" for his script :highfive:
Code:
#!/usr/bin/perl -W
use strict;
use bytes;
use File::Path;
die "did not specify boot img file\n" unless $ARGV[0];
my $bootimgfile = $ARGV[0];
my $slurpvar = $/;
undef $/;
open (BOOTIMGFILE, "$bootimgfile") or die "could not open boot img file: $bootimgfile\n";
my $bootimg = <BOOTIMGFILE>;
close BOOTIMGFILE;
$/ = $slurpvar;
# chop off the header
$bootimg = substr($bootimg,2048);
# we'll check how many ramdisks are embedded in this image
my $numfiles = 0;
# we look for the hex 00 00 00 00 1F 8B because we expect some trailing padding zeroes from the kernel or previous ramdisk, followed by 1F 8B (the gzip magic number)
while ($bootimg =~ m/\x00\x00\x00\x00\x1F\x8B/g) {
$numfiles++;
}
if ($numfiles == 0) {
die "Could not find any embedded ramdisk images. Are you sure this is a full boot image?\n";
} elsif ($numfiles > 1) {
die "Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.\n";
}
$bootimg =~ /(.*\x00\x00\x00\x00)(\x1F\x8B.*)/s;
my $kernel = $1;
my $ramdisk = $2;
open (KERNELFILE, ">$ARGV[0]-kernel.gz");
print KERNELFILE $kernel or die;
close KERNELFILE;
open (RAMDISKFILE, ">$ARGV[0]-ramdisk.cpio.gz");
print RAMDISKFILE $ramdisk or die;
close RAMDISKFILE;
print "\nkernel written to $ARGV[0]-kernel.gz\nramdisk written to $ARGV[0]-ramdisk.cpio.gz\n";
if (-e "$ARGV[0]-ramdisk") {
rmtree "$ARGV[0]-ramdisk";
print "\nremoved old directory $ARGV[0]-ramdisk\n";
}
mkdir "$ARGV[0]-ramdisk" or die;
chdir "$ARGV[0]-ramdisk" or die;
system ("gunzip -c ../$ARGV[0]-ramdisk.cpio.gz | cpio -i");
print "\nextracted ramdisk contents to directory $ARGV[0]-ramdisk/\n";
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Click to expand...
Click to collapse
thank you for your n00b-friendly tut., but for some reason it already goes wrong in step 1, 'cause when I extract the kernel the folder out/ramdisk remains empty, so nothing to replace. Have I done something wrong or is my Arc S just not suitable for this sort of tinkering?
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
BordenG said:
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
Click to expand...
Click to collapse
ok, found "perl" but for "cpio" I searched and installed the 3 items that had "cpio" in 'em (on top of my head "default '& "items" and a third I can't remember).
If it works the OP should add that info to the tut.

[Tut] How to change kernel logo (1st boot srceen) [COMPLETED]

We have 3 major works here... So I gonna to make it seperated
-1st post is HOW TO EXTRACT kernel.img (boot.img)
-2nd post is HOW TO CONVERT PICTURE FILE to BOOT.RLE
-3rd post is HOW TO REPACK THE KERNEL PAKAGE into boot.img
Requiredment
-Window machine
-installed cygwin
-the full boot.img/kernel (some kernel won't work because there is no full pakage/ i mean we can't)
-bootimg.zip (tool for UNPACK and REPACK kernel)
-boot_screen_logo_creation_package.rar
Thank and Credit
i- Credit to DooMLoRD Recognized Developer over most of XPERIA devices for his own tool and tutor that I learned before
ii- Credit to jimbo77 Senior Member for his tutorial that I used and learned and tool for unpack and repack
ii- Don't forget to give them a thanks meter
=============================================================================
Here we go
1-This section I will show u how to unpack and repack the boot.img
just see from original thread by jimbo77 from here and download the UNPACK and REPACK tool by him HERE
this is a fast guide from me:-
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
cd /boot
Click to expand...
Click to collapse
{
"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"
}
5-Now, unpack your boot.img by running the following command:
./extractboot boot.img
Click to expand...
Click to collapse
If your output looks like this, then the extraction has worked correctly! Note that the Command Line string has also been read from the source file, this will be used later when you go to re-pack your file.
Your script folder should now look like this:
boot.img-kernel is the compiled kernel blob that was inside the source boot.img, if you want to replace the kernel with another compiled kernel image, you can replace this file with another one (but leave the file name the same)
boot.img-ramdisk.gz is the gzipped ramdisk image which has been split from the boot.img, you should leave this file alone.
The “out” folder contains the EXTRACTED ramdisk, and this is where you should make your changes to the ramdisk.
Important Note!
Remember, when editing files in the ramdisk through Windows, such as init.rc, Windows notepad will not format the files correctly, making them almost impossible to read, wheras Wordpad will LOOK like it is formatting the files correctly, if you save one of these files from the Wordpad application it will BREAK the file and it will no longer be able to be read correctly by Android. To edit these files you MUST use an editor such as Notepad++ which you can download for free.
AGAIN...
Special thanks/credit to jimbo77 for his excellent guide
So.. NEXT step to change a kernel logo is here
Requiredment
1-a picture what are u like to look into the 1st boot screen (kernel logo) (make sure it size/resolution same your device resolution)
2-boot_screen_logo_creation_package.rar
3-some infos and knowledges here
4-window machine like i explained on 1st post
My quick guide
-extract the tool.rar
-move extracted files into new folder (name it 'rle' folder without quote)
-move into cygwin folder (to make it easy to follow my simple guide)
-copy your own logo.png (a picture u want to use on a kernel) into same rle folder
(for 4 steps above it shold look like tis)
-now launch cygwin.bat
cd /rle
Click to expand...
Click to collapse
./convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
Ah...my mistake..don't forget to move/copy/replace new logo.rle into
C/cygwin/boot/out/ramdisk/here
if you done good...follow next step on next post (to repack your moded kernel)
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
./packboot
Click to expand...
Click to collapse
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
I need this for an extra (extra thanks..)
(may U?)
Thanks a lot man, i'm looking for it.
thanks a lot my friend
now i can make may own kernal boot animation:silly:
Thanks! Subscribed to this thread, will try my best to do this soon.
and how to extract kernel.elf? ^^
jimRnor said:
and how to extract kernel.elf? ^^
Click to expand...
Click to collapse
Actually that's the same question I have lol
I think i can't do it with bootloader locked?
Thanks!
Thank you so much!
Working very talented!
R: [Tut] How to change kernel logo (1st boot srceen) [COMPLETED]
If you are on a linux distro, you can use championswimmer's kitchen
Sent from my LT26i using xda app-developers app
how to change the boot logo of the acro s?
I can't find any boot.img file in the rom.ftf
all I can see is KERNEL.SIN
I can extract it.
but how to repack ?
I just want to change the boot logo in this acro s kernel with the new logo.rle that is attached with,
pleaaaaaseeee
help me
Anyone could help me ??
No reply?
prob here is how can i find boot.img for stock rom
thanks
How can I extract elf kernel....
Sent from my LT26ii using Tapatalk 2
Why it says:
Android Magic not found in ./boot.img ????
phil1405 said:
Why it says:
Android Magic not found in ./boot.img ????
Click to expand...
Click to collapse
are you extracting kernel.elf?
this tut was not working on kernel.elf, or maybe your cygwin got problem
No i tried with a boot.img :/
Currently I'm trying to install the perl and cpio packages...

[ROM+GUIDE][SM-G955x][AQH3] CeX - Flashable Repackaged Stock [29/08/17]

{
"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"
}
Definition
Let me first define what I mean by Creator's Experience. This ROM is just as good as your stock ROM on KNOX 0x0. I am in no way taking credit for any of the development in this ROM, I'm just repackaging the stock Samsung ROM in Samsung's experience how they created it. But if you flashed stock ROM you may get a ton of KNOX warnings so selling the device or giving your device to someone else would make it more complicated and frustrating due to nagging popups that you have to disable by first setting up the device. I wanted to create something that you can restore your device to when you get bored of a custom ROM, or you just want to use the latest stock firmware again.
This ROM will never contain any tweaks or system addons, it is barebones stock with no KNOX and stubs so people can use it as a rescue/reference firmware.
Purpose
Being the owner of the Korean Samsung Galaxy S8+ 128GB/6GB (SM-G955N), there are only so many stock firmwares available from Updato or Sammobile. All listed firmwares contain all the CSCs located in the /system partition, and the CSC file toggles between them. This means that regardless of what CSC you flash on the device, you will activate all the applications that were disabled by the CSC (KT mobile apps should be disabled on the SKT CSC, and vice versa). So flashing a Canadian CSC will still have every single South Korean carrier bloat on your device, which sucks.
This is a strange situation with 955N users, where ALL THE BLOAT is stored in /system/priv-app, while the csc is just one small file that controls which applications are active/inactive on the device.
Process
So, what does this mean? I wanted the stock international 955F ROM on my device, really badly. But Odin refused to flash it due to a secure write/invalid magic string error. I have tried everything from modifying the PIT tables in the ROMs to flashing custom ROMs. As much as custom ROMs are great, I wanted something I could fall back to when sh*t hits the fan, as well as something that fit the stock lifestyle...since I would really have loved to keep KNOX 0x0 if the Korean firmware was not as bloated as I thought it would be.
So for those who were searching for the stock ROM that was created with stock in mind, I have repackaged the 955F stock using the kitchen by @SuperR., with removed KNOX + KNOX apps (Secure Folder, KNOX Settings 1 & 2, Samsung Pay, Samsung Pass, etc.), removed stub apps (Microsoft apps folder) and removed CSC (I will elaborate more below).
As it takes me from 3-6 minutes to download stock firmware, I will be keeping this up to date for people who will need a rescue zip.
Reproduction
The reason why I'm keeping this as clean as possible is because it functions the same way as the Odin package. The AP will be the ROM zip, while you have to flash your own custom kernel, and flash the CSC package by @Tkkg1994. Finally, to top everything off, Magisk will be flashed.
A flowchart of this process (clean flash) is listed below:
Flash CeX stock (this ROM)
Flash the CSC using the CSC utility tool by @Tkkg1994: https://forum.xda-developers.com/galaxy-s8+/development/utility-flashable-csc-selection-v1-0-0-t3605264
Flash the kernel, I highly recommend @jesec's Jesse Kernel: https://forum.xda-developers.com/galaxy-s8/samsung-galaxy-s8--s8-cross-device-development/kernel-jesse-s-kernel-galaxy-s8-exynos-t3603521
Flash Magisk v12+: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
A flowchart of this process (dirty flash) is listed below [dirty flash is supported on CeX, as long as you follow these steps]:
Use TWRP and wipe /system
Flash CeX stock (this ROM)
Flash the CSC using the CSC utility tool by @Tkkg1994: https://forum.xda-developers.com/galaxy-s8+/development/utility-flashable-csc-selection-v1-0-0-t3605264
Flash the kernel, I highly recommend @jesec's Jesse Kernel: https://forum.xda-developers.com/galaxy-s8/samsung-galaxy-s8--s8-cross-device-development/kernel-jesse-s-kernel-galaxy-s8-exynos-t3603521
Flash Magisk v12+: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Anomalies
At the current stage, this is just the stock Samsung firmware. So any bugs found in the official bugs list of the current firmware revision would be present in this ROM. See the second bracketed codename in the title of this thread.
Do you use Netflix or Amazon Prime Video?
With their Widevine DRM Module, it bypasses anything Magisk Hide has to offer.
Using TWRP, remove /system/lib/liboemcrypto.so, then reboot to system.
If you ever want to restore stock, this is the AQEB binary: https://www.androidfilehost.com/?fid=961840155545569722
Screenshots
There really doesn't need to be any screenshots, unless you have never turned on your phone on stock ROM before...but here, I'll show you Settings.
SafetyNet?
This is a simple phenomenon solved by having both a custom kernel with KNOX 0x0 simulation, like Jesse's kernel, and Magisk v12 installed with Magisk Hide enabled. It is confirmed that CeX respects SafetyNet.
Programmatically Displayed Debloated Applications/Services/Libraries
Code:
system/app/Facebook_stub*
system/app/MSSkype_stub*
system/app/SecureFolderSetupPage*
system/priv-app/OneDrive_Samsung_v2*
system/priv-app/SecureFolder*
system/priv-app/SamsungPass_1.1*
system/priv-app/Excel_SamsungStub*
system/priv-app/PowerPoint_SamsungStub*
system/priv-app/Word_SamsungStub*
system/container*
system/app/BBCAgent*
system/app/Bridge*
system/app/ContainerAgent*
system/app/ContainerEventsRelayManager*
system/app/kioskdefault*
system/app/KLMSAgent*
system/app/Knox*
system/app/KNOX*
system/app/MyKNOX*
system/app/RCPComponents*
system/app/SecurityLogAgent*
system/app/SwitchKnoxI*
system/app/UniversalMDMClient*
system/container*
system/etc/secure_storage/com.sec.knox*
system/preloadedkiosk*
system/preloadedmdm*
system/preloadedsso*
system/priv-app/KLMSAgent*
Download Links
AndroidFileHost Folder (Autopushed builds): https://www.androidfilehost.com/?w=files&flid=185563
AQH3 builds (August):
FullRebaseOptions from last build:
https://www.androidfilehost.com/?fid=745425885120758691
Normal build:
https://www.androidfilehost.com/?fid=817550096634795846
AQF7 build (June): https://www.androidfilehost.com/?fid=673368273298964156
AQEB build (May): https://www.androidfilehost.com/?fid=817550096634773510
Credits & Thanks
@SuperR. for his kitchen
@jesec for him helping out when I was frustrated something isn't working, and pretty much his experience with his 955N
@fahadali2315 for refreshing my memory of messing with a Samsung device
Anyone I missed, just hit me up in private!
XDA:DevDB Information
CeX, ROM for the Samsung Galaxy S8+
Contributors
nicholaschum, fahadali2315
ROM OS Version: 7.x Nougat
Version Information
Status: Stable
Current Stable Version: AQH3
Stable Release Date: 2017-05-31
Created 2017-06-01
Last Updated 2017-08-29
Building with SuperR Kitchen for your own stock region ROM
If you're interested in creating your own flashable ZIP based on a ROM, I will be listing the full instructions on how to get your own stock ROM up and running.
I will be building the latest XXU builds as soon as they drop.
Please do not PM me, instead, post in the thread for people to learn.
Prerequisites:
- Your device MUST be of the Exynos variant, with an available TWRP on the device. If you have a Qualcomm device, close this window now!
- You must have a Linux environment. I know @SuperR.'s kitchen works on Windows using Cygwin, but as an AOSP developer, I work with Linux to build stuff!
- Sudo account
- Collect and utilize as much wits as you can!
- I will be doing all of this from the command line using SSH, no GUI for this!
1) Download the latest SuperR kitchen here: https://forum.xda-developers.com/ap...chen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434
by doing this (press enter after each line in this code block):
Code:
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
git config --global credential.helper cache
cd ~/
git clone https://bitbucket.org/superr/superrs-kitchen.git
cd superrs-kitchen
./superr
The first time running the kitchen, you may need to install dependencies. It should automatically install all dependencies for you, but if it keeps asking you to install the same dependencies, you should install them using
Code:
sudo apt-get packageName
.
After all dependencies are installed, press 1 to create a new project, and name it whatever you want. In this example I will name it STOCK.
Press Q once the project is created (quits SuperR kitchen)
2) Download your Samsung stock firmware. There are two main sites nowadays to get Samsung stock firmwares from, including Updato and Sammobile.
Updato: http://updato.com/firmware-archive-select-model?q=SM-G955F&rpp=15&order=date&dir=desc&exact=1
Sammobile: https://www.sammobile.com/firmwares/galaxy-s8/SM-G955F/
You will need to get the firmware on your Linux box, or from Updato, right click Download (the orange button) and click Copy Link.
If you are planning to download from the SSH box, do:
Code:
cd ~/superr-kitchen/superr_STOCK && wget link_of_updato
3) Your firmware file is now ready to be loaded up into the kitchen. So do:
Code:
./superr
Then click 4 to extract for a new ROM, then click "y"
4) When it asks you whether you want to include cache.img, it doesn't really matter if you do or don't. Click "y" and include it in the ROM.
5) It will then ask you to type a name for your output ZIP
6) If it asks you where to locate the partition info from, pick the entry that is recommended, which takes the partition from system.img and recovery.img (Detect by-name from boot/recovery images (recommended))
So simply click 1.
7) Finally, we must set the perm type/archive type of your images. Click 1 for set_metadata (KitKat+)
NOTE: I have tried using Sparse dat for Korean 955N image - which working at a cost of all Google apps crashing/not responding, but doing so on the 955F ZIP will completely break and cause it to get stuck in TWRP trying to flash. set_metadata is the most stable.
8) You can now fiddle with the ROM! It is highly recommended to replace the stock kernel with @jesec's kernel, but make sure you extract his other folders from his ZIP into your working directory (~/superr-kitchen/superr_STOCK/system/*) or you won't boot! You can either opt for this, or just flash the kernel ZIP to retain support from Jesse (this is what I picked for CeX).
Key configurations (the options I picked for CeX):
->7) Boot/Recovery Tools
- Unpack boot.img
- Type 5 and disable forceencrypt
- Type 1 and pack boot.img
->8) ROM Tools Menu
- Asserts Menu (if you're trying to do 955N ROM)
- Add/Remove Device (dream2lte) <- change from dream2lteks or any other model, since TWRP only recognizes dream2lte.
->6) Debloat Menu
- Custom Debloat
- ~/superr-kitchen/tools/root/bloat_custom must be edited to contain these entries (nano ~/superr-kitchen/tools/root/bloat_custom to edit the file):
Code:
system/app/Facebook_stub*
system/app/MSSkype_stub*
system/app/SecureFolderSetupPage*
system/priv-app/OneDrive_Samsung_v2*
system/priv-app/SecureFolder*
system/priv-app/SamsungPass_1.1*
system/priv-app/Excel_SamsungStub*
system/priv-app/PowerPoint_SamsungStub*
system/priv-app/Word_SamsungStub*
system/container*
- Remove Samsung Knox
9) You can make external edits by placing files in ~/superr-kitchen/superr_STOCK/system, or do whatever you want with the APKs
10) Let's start building!
If you left the window, all you have to do is do:
Code:
./superr
8
7
1
This will get you to the ROM zip building screen.
If the kitchen asks if you would like to convert the updater-script to an updater-binary, do it. Now give it some time to build. Usually my computer takes 2-3 minutes.
11) Finally, you can decide whether you want to sign the ZIP or not. Personally, I do not sign my ZIPs.
If you decide to skip signing, you're done! Just type "n" on your keyboard and click "q" to quit the kitchen. Your new ZIP is located in ~/superr-kitchen/superr_STOCK/STOCK_BASED_ROM.zip
You can either move this to your h5ai server, like I do at http://download.projektsubstratum.com/, or you could use transfer.sh here:
Code:
curl --upload-file ./STOCK_BASED_ROM.zip https://transfer.sh/STOCK_BASED_ROM.zip
You could also move it to AndroidFileHost using FTP, if you have a developer account.
This may take a while for the upload to complete, but once it is done, you are ready to flash the four ZIPs:
The ROM
A custom kernel
The CSC utility flasher
Magisk (for SafetyNet)
12) Congratulations, you're done!
Pulling your own CSC files
So you tried to extract the CSC file (cache.img) from the CP tar for Odin but no luck flashing...but you really wanted an up to date version..
Prerequisites:
- Your device MUST be of the Exynos variant, with an available TWRP on the device. If you have a Qualcomm device, close this window now!
- You must have a Linux environment for simg2img
- Sudo account
- Collect and utilize as much wits as you can!
- I will be doing all of this from the command line using SSH, no GUI for this!
1) Download simg2img to your Linux box and build the project
Code:
cd ~/
git clone https://github.com/anestisb/android-simg2img
cd android-simg2img
make
2) After simg2img has been compiled, we will have to use it.
Place your cache.img.ext4, yanked out of the CP.tar.md5 file (renamed to CP.tar) in the same directory of the git cloned repo
If you need a command to extract the .tar file, run:
Code:
tar xf CP.tar
3) Convert the image
Code:
./simg2img cache.img.ext4 cache.raw.img
4) Mount the image
Code:
sudo mkdir /media/csc
sudo mount -t ext4 -o loop cache.raw.img /media/csc
cd /media/csc
5) Copy the prepared flashable CSC zip out of the image
Code:
cp sec_csc.zip ~/
6) Flash the ZIP
7) Boot into the system. If you flashed a multi-CSC, you may need to configure it to be specific to your country.
This will require root, so get yourself into adb shell, then (credits to @jesec):
Code:
adb shell
su
am start com.sec.android.Preconfig/.Preconfig
A window will pop up giving you all the options selectable in your MultiCSC. Clicking and installing any of them will wipe your device, so watch out!
one last reserve post
locking my thread till the upload is finished....
@OP
Great idea bro, thanks a lot.
Nice work! @nicholaschum
Very Good! Thanks!
Sorry, my english is to bad...
Thats mean, if i Flash this Rom and later, when i go back to stock, my knox will be 0x0?
No, KNOX still tripped but with fake 0x0
Good work !! @nicholaschum
Th3PorTuGa said:
No, KNOX still tripped but with fake 0x0
Click to expand...
Click to collapse
Thanks
@nicholaschum
Can I ask possibly a dumb question
Is flashing CSC required?
I mean what happens if you don't flash CSC.
I am currently in AU on Vodafone CSC. I would change it to XSA but if I decided not to or forgot to do it. Would the CSC activate based on what is currently set as my CSC there or is this required so the rom can then load the apps based on location?
Perfect Build Perfect ROM. Installed as per instructions and works like a charm. Thanks for the work.
davjak said:
@nicholaschum
Can I ask possibly a dumb question
Is flashing CSC required?
I mean what happens if you don't flash CSC.
I am currently in AU on Vodafone CSC. I would change it to XSA but if I decided not to or forgot to do it. Would the CSC activate based on what is currently set as my CSC there or is this required so the rom can then load the apps based on location?
Click to expand...
Click to collapse
The CSC is required or else Samsung stock ROMs will not know how to configure your phone. This also I closed LTE-A capabilities, wifi calling and VoLTE functionality. Since this ROM does not contain any CSC you could flash the DBT CSC from the flashing utility which is the default CSC on most ROMs that is Germany debranded.
@nicholaschum - thanks for sharing this ROM. i'm using as a daily driver for my "work device" in combination with the ATT CSC flashed via TK's CSC package. if/when Substratum is available for TW based S8 ROMs, can i assume your ROM will support it? thanks for taking time to read/respond to my question.
Just installed. Silky smooth! Great work op
cortez.i said:
@nicholaschum - thanks for sharing this ROM. i'm using as a daily driver for my "work device" in combination with the ATT CSC flashed via TK's CSC package. if/when Substratum is available for TW based S8 ROMs, can i assume your ROM will support it? thanks for taking time to read/respond to my question.
Click to expand...
Click to collapse
Yes. That is the whole point behind it , keeping it stockish with subs support when it arrives.
I want install it, but i dont what do..
I want sale my phone later and get Note 7.
Is complicate if we cant use Samsung pay when we back to stock.
@nicholaschum Thanks heaps for this, took the leap and followed the instructions. Very simple task! now running XSA CSC with AQEB

Categories

Resources