[Q] Decompile and compile boot.Img to modify ramdisk - LG Optimus Black

Hello folks.
Does anyone know how to decompile and compile a kernel?
That is the only thing that stops me from developing on my port right know.
What i need to do is to edit some files in ramdisk / init.rc
Thanks in advance.

I used Kernel Kitchen once, and it worked great !
http://forum.xda-developers.com/showthread.php?t=1659584
Hope it helps

RomWiz said:
Hello folks.
Does anyone know how to decompile and compile a kernel?
That is the only thing that stops me from developing on my port right know.
Thanks in advance.
Click to expand...
Click to collapse
When you say decompile, you can only modify the ramdisk. There are two things inside a boot.img, zImage and ramdisk. zImage is compiled via source, where you modify, insert Governers and Schedulers and a lot more. If that's the route you ought to take, you must have Linux, toolchain, source code etc. Ramdisk on the other hand contains few to many things like init.rc where you insert for example g-recovery etc.
Up to you what you wanna do and your definition of "develop".

I need to modify some things in the init.rc
Sent from my phone via tapatalk

Vinzgore said:
I used Kernel Kitchen once, and it worked great !
http://forum.xda-developers.com/showthread.php?t=1659584
Hope it helps
Click to expand...
Click to collapse
There is no download link :what:
Edit: found it

Just use dsixda's Android kitchen: http://forum.xda-developers.com/showthread.php?t=633246
There is an option to decompile the kernel.

N00BY0815 said:
Just use dsixda's Android kitchen: http://forum.xda-developers.com/showthread.php?t=633246
There is an option to decompile the kernel.
Click to expand...
Click to collapse
finally got it working
Thanks

RomWiz said:
finally got it working
Thanks
Click to expand...
Click to collapse
Is it just me or do I not see an option to repack it?

theROMinator said:
Is it just me or do I not see an option to repack it?
Click to expand...
Click to collapse
There should be an option to compile it again.

RomWiz said:
There should be an option to compile it again.
Click to expand...
Click to collapse
It may be because I'm using an older version, I'll download the latest .
Sent from my SAMSUNG-SGH-I747 using Tapatalk 2

Query on zImage decompile
gabwerkz said:
When you say decompile, you can only modify the ramdisk. There are two things inside a boot.img, zImage and ramdisk. zImage is compiled via source, where you modify, insert Governers and Schedulers and a lot more. If that's the route you ought to take, you must have Linux, toolchain, source code etc. Ramdisk on the other hand contains few to many things like init.rc where you insert for example g-recovery etc.
Up to you what you wanna do and your definition of "develop".
Click to expand...
Click to collapse
I need to decompile zImage, which I extracted from my boot.img, as the Kitchen and other popular tools does not hold any info/way to extract that, could you please help me out.
Links to the tools would be appreciated.
Thanks in advance.
Akshay Goel

aky_style said:
I need to decompile zImage, which I extracted from my boot.img, as the Kitchen and other popular tools does not hold any info/way to extract that, could you please help me out.
Links to the tools would be appreciated.
Thanks in advance.
Akshay Goel
Click to expand...
Click to collapse
sorry for bumping this thread, edited because I didn't read properly >

Related

After changing a rom

After i make my edits to a rom, what do i have to do to compile it back togethor?
jad011 said:
After i make my edits to a rom, what do i have to do to compile it back togethor?
Click to expand...
Click to collapse
are you compiling from the source or just editing the .zips?
compiling from the source
anyone know?
what are you using to edit it? an ide?
yeah netbeans

Compatible cifs.ko

Can some one compile or point me to a cifs.ko that is compatible with the incredible. The ones I can find do not seem to be. Thanks in advance.
Interesting
http://linux.die.net/man/8/mount.cifs Not that I can help but if anyone wanted a quick reference.
Alot of the roms for other phones have it but its not compatible with out kernel. Is there a guide how to compile kernels? I made a couple in linux that worked. long ago..
here ya go...what app are you using to browse CIFS shares? I haven't tested this module, but just compiled it now.
Forgive me as I haven't actually tried this, but here is the 10,000 foot view:
At a minimum, you will need a linux system, with a gcc-arm cross compiler set up. I believe the android-sdk provides one. The version used by current kernels is gcc-4.4.4.
Then you will need the sources of the kernel you are running. The hydra kernel git tree is here: http://github.com/ejhart/Hydra-kernels.git , and the stock kernel sources are here: http://member.america.htc.com/download/RomCode/Source_and_Binaries/incrediblec_cc1c2268.tar.bz2
The hydra git tree doesn't seem to have a a working .config included, but this isn't so important if you are only building and installing kernel modules. From there, you'll need to configure the kernel in cross compiler mode, add the modules you want, and you will need to make sure the version magic string is identical to the kernel you are using. From there run make, and once the compile is finished, find the .ko 's you want, and push them to the /system/modules folder where you can insmod them.
Edit: You can use the .config from /proc/config.gz, didn't see it in there before.
mattwood2000 said:
here ya go...what app are you using to browse CIFS shares? I haven't tested this module, but just compiled it now.
Click to expand...
Click to collapse
I got one from another user but thanks do you still want me to try it? I mounted my share in a directory on the SDCARD so i can browse it with any file manager. I think any app that scans the sd card will also scan my server with about 8TB so that is a minor issue.
kernel compile guide
A guide for compiling kernels can be found here :
http://code.google.com/p/android-serialport-api/wiki/Htc
I not a techie and a newbie at any android development.
Since the guide is more or less a a set of instructions with no theory.
Got it to run, but not sure what I was doing.
Any assistance in provide either cifs.ko for the HTC Aria w/ kernel version :
liberty-2.6.29-21f066a6 or instructions on how to compile the module would be greatly
appreciated.
BTW - there an app on the store for automating the CIFS mount (CIFSManager
Regards,
-d
veli69 said:
I got one from another user but thanks do you still want me to try it? I mounted my share in a directory on the SDCARD so i can browse it with any file manager. I think any app that scans the sd card will also scan my server with about 8TB so that is a minor issue.
Click to expand...
Click to collapse
Could you please post the cifs.ko file that you have that works. Thanks.
OOMatter said:
Could you please post the cifs.ko file that you have that works.
Click to expand...
Click to collapse
Note that the post you quote was from before the 2.2 OTA, and hence that cifs.ko would be incompatible with the current kernel.
elborak said:
Note that the post you quote was from before the 2.2 OTA, and hence that cifs.ko would be incompatible with the current kernel.
Click to expand...
Click to collapse
Thanks for pointing that out. So does anyone have a compatible cifs.ko for the current DINC kernel?
OOMatter said:
Thanks for pointing that out. So does anyone have a compatible cifs.ko for the current DINC kernel?
Click to expand...
Click to collapse
I do. Check my blog. http://adrynalyne.us
Sent from my ADR6300 using XDA App
veli69 said:
Alot of the roms for other phones have it but its not compatible with out kernel. Is there a guide how to compile kernels? I made a couple in linux that worked. long ago..
Click to expand...
Click to collapse
http://marakana.com/forums/android/examples/111.html
GOOOOOOOOOOOOOOOOOOOOOOOOOOOGLE!!!!!!!!! YEAH!
Thats all fine and dandy except our source isn't on any git.
developer.htc.com
philips w732 vermagic '3.0.13 preempt mod_unload armv7' working cifs.ko and md4.ko modules
narod.ru/disk/63766749001.47b679339538b050028c3c7d87506dd2/md4.ko.html
narod.ru/disk/63743140001.693272f3661d5aac547ecc760f04db05/cifs.ko.html

Kernel compilation for Samsung Galaxy S I9000

Hi all,
we are trying to build our own kernel for a Samsung Galaxy S (I9000XWJVB).
What we did so far:
- Download the correct sources from "opensource.samsung.com"
- Studied the README
- Installed cross-compiler toolchain
- Created ".config" as described in README
- Kernel compiled
Compilation worked fine -> zImage was available (but with only 2mb very)
OK, looks like initramfs is missing.
The first question is now, where to get / how to create a correct initramfs?
We copied the initramfs from Leshak and we extracted an ".cpio" from a working zImage.
Then we tried to use them in the ".config" (CONFIG_INITRAMFS_SOURCE) for kernel compilation.
Resultant zImage was larger (around 6mb) so it looks like something changed.
But once we installed the tared zImage on the phone (using Odin), the phone freezes during reboot.
Any advice how to progress here?
Is it possible to use Leshaks initramfs for all Galaxy S phones? Or is this only for a specific version? The CONFIG_INITRAMFS_SOURCE should point to the "initrd.arm.initramfs_list", correct? And not to the initramfs-folder?
And: Is there a way to get any type of kernel boot debugging message from the booting phone back to the PC (or the phone screen)?
Many thanks in advance!
I don't know much about kernels. But i will try to help. Have you tried other itiramfs or reconfig them?
There are not many people that will know answer so ask some kernel developers like hardcore, supercurio...
Sent from my GT-I9000 using XDA Premium App
Just saw 2nd question. I think that it should point to intiramfs folder. You can zip all kernel files and upload it so i can take a look at them
Sent from my GT-I9000 using XDA Premium App
Hi,
themate1987 said:
I don't know much about kernels. But i will try to help. Have you tried other itiramfs or reconfig them?
There are not many people that will know answer so ask some kernel developers like hardcore, supercurio...
Click to expand...
Click to collapse
we tried four different initramfs now, but ended up always with a freezing phone.
I would like to ask the kernel experts directly, but I'm new to this forum and not allowed to post in the developers forums. I hope that one of the gurus will reply to this thread.
themate1987 said:
Just saw 2nd question. I think that it should point to intiramfs folder.
Click to expand...
Click to collapse
My understanding is that the .list file will describe the structure of the initramfs folder and if this file is present, it should by used in the .config. Otherwise the .config should point to the folder.
Please correct me if I'm wrong.
But anyway, we tried both versions, none worked.
Regards!
PM some kernel developers
Sent from my GT-I9000 using XDA Premium App
Use speedmod kernel patches with the readme file he has given..
or else you can go through supercurio threads also ...
they explained the kernel compilation methods....
thanks
Did you get this to work finally? I too am trying to compile and flash a custom kernel ( For SGS4G) I point my INIIRAMFS_SOURCE to an extracted initram dir, but the resulting boot zImage does not proceed past the initial boot screen(s) Please let me know if you succeeded, and if yes, how.
Thanks!
What I got the problem was about initramfs.cpio.
At that moment , the most important point you know is you should make the file in Linux..
When my friend made me a file is initramfs.cpio , it worked well.
But what I made in window made always troubles for compile.
So if you made a initramfs.cpio with hexeditor in window, try it in Linux again..
Thx!

[Q] self-build stock-kernel not booting

Hi all,
I am having hard time since a couple of days building correct samsung kernel stock forked from here https://github.com/project-voodoo/linux_gt-i9000
I followed build README, modified makefile to point to correct codesourcery cross compiler, followed supercurio notes for localversion...
When I change the original zimage of XWJVB from samfirmware.com with the one I get from the build and I falsh it, the kernel doesn't boot. Am I missing something?
Do I need to include the intiramfs? or Do I need to change the bootloader (I ignore if any cryptographic calculation are made by the original bootloader before loading the kernel)
Thanks
Initramfs are not included in stock kernel sources...that's why it doesn't boot, try with Voodoo initramfs that are surely the best ones!
PS: if u need some help just contact me! i am also a kernel dev since a couple of months
Sent from my GT-I9000 using Tapatalk
Hi Simone201,
Thanks for the hint.
I made a progress but phone still not booting.
I edited .config to point to the intiramfs folder
CONFIG_INITRAMFS_SOURCE="~/samsung_initramfs/gingerbread-i9000xwjvb"
CONFIG_INITRAMFS_COMPRESSION_GZIP=y
ONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0
Click to expand...
Click to collapse
and I was asked to either compress the intiramfs or not. I have tried both options.
once
CONFIG_INITRAMFS_COMPRESSION_NONE=y
# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
Click to expand...
Click to collapse
and other trail with
CONFIG_INITRAMFS_COMPRESSION_NONE is not set
# CONFIG_INITRAMFS_COMPRESSION_GZIP=y
Click to expand...
Click to collapse
now with the intiramfs, the zimage size increase from 3.3 mb to 5.4 mb but still doesn't match the stock size 5.5 mb
What shall I do?
thanks for your help
Made some progress but still fighting to get it work!
I am already studying scripts of supercurio from github.
I figured out that I have to delete the .igit and .gitignore from the intiramfs (I am using XWJVB from supercurio repository too).
As I understand, it is optional to copy the .ko generated module from my compilation to my /lib/module in my intiramfs. Correct? Anyway, I will make it.
I thought I have to use Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI as cross-compiler (arm-none-eabi-), but start doubting it as some scripts are using Sourcery G++ Lite 2009q3-67 (arm-none -linux-gnueabi-) (for kernel compilation!)
I flashed my phone with all XWJVB module from samfirmaware.com (boot, sbl, data, phone, pda ...) with reformat enabled. it is working. And now I am trying to only flash the pda partition with the zimage I obtain out of compilation.
I am really disappointed that there is no detailed compilation guide.
Anyway, thanks for your help guys!

Vote for new boot logo for Rafael kernel

Thanks for voting
Rafael set new boot screen
Hey i vote 4 with out red eye
Sent from my GT-S5830i using xda premium
EDIT: Seeing that Rafael kinda ordered this thread, my rant is useless.
u put this in the wrong section and when u put it under S5830i general. go into Rafael kernel thread and recommend the images. give him a few more options to use then maybe he might change it if he likes it
EDIT: Seeing that Rafael kinda ordered this thread, my rant is useless. (post#3 duplicate)
Gee were beautiful, feather boot kernel not support animation!
Only image with 224 colors.
Relax...
ant1moz said:
Hello, can you set this logo is default? :fingers-crossed:
__________________________________
without line
link: youcraft.ru/forrafael.jpg
source link: youcraft.ru/source.psd
__________________________________
with line, more beatiful
link: youcraft.ru/v2.jpg
source link: youcraft.ru/source2.psd
Click to expand...
Click to collapse
Rafael.Baugis said:
Very nice,
I had intention of opening a topic for election of the boot screen.
could do this please?
Very thanks!
Click to expand...
Click to collapse
Still wrong section.
I really dont like pre boot images if i had time i would decompile it and remove the picture and compile again.
Levent2101 said:
I really dont like pre boot images if i had time i would decompile it and remove the picture and compile again.
Click to expand...
Click to collapse
You can decompile zImage?
Rafael.Baugis said:
You can decompile zImage?
Click to expand...
Click to collapse
i actually cant but u release the source i can do whatever i want to do and compile it again
Rafael.Baugis said:
You can decompile zImage?
Click to expand...
Click to collapse
Yes its possible to decompile zimage using android kitchen by dxdia.you will get everything in form of folders and there is a folder in which there is the boot image its name is logo.rle(i dont remember the folder)once you have changed or removed it you can compile it again with the kitchen.and you you first have to convert your image from png to rle format
I think i told this method before also in the kernel's thead but no one paid attention.
Levent2101 said:
i actually cant but u release the source i can do whatever i want to do and compile it again
Click to expand...
Click to collapse
The source is in my github!
I'm going to update it now with the last reversal of frequencies!
---------- Post added at 12:34 AM ---------- Previous post was at 12:31 AM ----------
-HellRaiser- said:
Yes its possible to decompile zimage using android kitchen by dxdia.you will get everything in form of folders and there is a folder in which there is the boot image its name is logo.rle(i dont remember the folder)once you have changed or removed it you can compile it again with the kitchen.and you you first have to convert your image from png to rle format
I think i told this method before also in the kernel's thead but no one paid attention.
Click to expand...
Click to collapse
Not guys zImage is kernel
boot.img = zImage + ramdisk
you split and decompress ramdisk, but decompile zImage is never possible!
EDIT:
my boot image is compiled inside zImage.
Mod Edit
Thread closed at the request of the [OP]
malybru
Forum Moderator

Categories

Resources