extract kernel from rom - Optimus One, P500, V General

hey guys so i installed cm7
and then used DJNoXD.
i was wondering how can i go back to the original kernel?
how can i extract the kernel from the rom?
or do you guys have any other suggestions for which kernel should be used?
please help

Ramis93 said:
hey guys so i installed cm7
and then used DJNoXD.
i was wondering how can i go back to the original kernel?
how can i extract the kernel from the rom?
or do you guys have any other suggestions for which kernel should be used?
please help
Click to expand...
Click to collapse
You can use Roq's latest Kernel from Here.

Ramis93 said:
hey guys so i installed cm7
and then used DJNoXD.
i was wondering how can i go back to the original kernel?
how can i extract the kernel from the rom?
or do you guys have any other suggestions for which kernel should be used?
please help
Click to expand...
Click to collapse
Just flash cm7 again (without wiping anything).
After that you will have the original kernel again.

DJNoXD said:
Just flash cm7 again (without wiping anything).
After that you will have the original kernel again.
Click to expand...
Click to collapse
but that would reset all all my settings.
isnt there a way to extract the kernel?

No, if you flash a new version (or the same version) of cm you won't loose all your settings. Important is that you only wipe dalivik cache and cache, nothing else.
Than the only thing you loose are changes you have done to "system"-folder. But less people do this.
The normal configurations like wlan, ... are not touched / lost.
If you are scared to loose your rom data, create a backup (clockwork recovery) before.
Only extracting is not easily possible.
If you got the kernel "zImage" file and the "wireless.ko" module, you have to create the signed zip file before you can flash it.
source cyanogenmod
Code:
Option 1: Koush's AnyKernel zip file Koush's AnyKernel repacks the kernel in the package with the ramdisk currently flashed to the device. Therefore, we need to change the boot.img --base address so the boot.img will boot on the 32A device. This change needs to be made in mkbootimg.sh in the package. Koush has a 32A branch of AnyKernel here: http://github.com/koush/AnyKernel Clone the AnyKernel repo
git clone git://github.com/koush/AnyKernel.git -b 32A
This will make a folder called AnyKernel in your working directory. Keep this and just copy it to your packaging directory.
Copy the AnyKernel folder to a working directory. In the AnyKernel folder you have three folders:
kernel
Put the zImage in this folder. Leave it named zImage
META-INF
system
Put the wlan.ko in system/lib/modules. Replace the placeholder wlan.ko file.
Now you can zip the 3 folders together and sign them
zip -r port.zip *
java -classpath <path to SDK/tools>testsign.jar testsign port.zip signed-port.zip
for example:
java -jar ../SignApp/signapk.jar ../SignApp/testkey.x509.pem ../SignApp/testkey.pk8 port.zip update_signed.zip
This creates a signed zip file called port.zip and can be flashed. :) You are done.

DJNoXD said:
No, if you flash a new version (or the same version) of cm you won't loose all your settings. Important is that you only wipe dalivik cache and cache, nothing else.
Than the only thing you loose are changes you have done to "system"-folder. But less people do this.
The normal configurations like wlan, ... are not touched / lost.
If you are scared to loose your rom data, create a backup (clockwork recovery) before.
Only extracting is not easily possible.
If you got the kernel "zImage" file and the "wireless.ko" module, you have to create the signed zip file before you can flash it.
Click to expand...
Click to collapse
oh ok then, thanks
p.s would you recommend Roq's kernel or the default cm7 one?
(i won't be gaming on my phone. just want performance and battery life)

I haven't tried roqs latest kernel.
Just try it. Only you will know what you are searching for.
All custom kernels are good. But not every kernel is good for everyone.
Edit: What kind of performance are you searching for?

ok then,
thanks for the help

Here you can get the stock kernel for CM7
http://forum.xda-developers.com/showthread.php?t=1564203
Sent from my LG-P500 using XDA

yuripg1 said:
Here you can get the stock kernel for CM7
http://forum.xda-developers.com/showthread.php?t=1564203
Sent from my LG-P500 using XDA
Click to expand...
Click to collapse
awesome thanks

yuripg1 said:
Here you can get the stock kernel for CM7
http://forum.xda-developers.com/showthread.php?t=1564203
Sent from my LG-P500 using XDA
Click to expand...
Click to collapse
Haven't seen that you have updated your kernel to latest sources.

> you can use kitchen to extract zimage.. and copy modules from system>lib>modules folder.. I dont know how to repack it as a zip? may be by the link given above for stock kernel with outdated source.. just replace zimage and modules content on the zip.

I get the zImage using a flashable ZIP that I made.
http://db.tt/0WKE2o8w
What I did was simply modify a kernel installer (by Koush) to make it extract the boot.img of the ROM currently installed to the SD card.
After flashing it, I copy and rename the zImage in /sdcard, copy the modules in /system/lib/modules and make the flashable ZIP as any other kernel.
Sent from my LG-P500 using XDA

Related

Stock Kernel.zip

Can someone please upload a stock kernel zip update file ..I dont want to reflash my phone using kdz just because i tried out some OCed kernels ..Can one of you devs do this if it can be done ...
I'm sure one of the bright minds here can help you with that. but... why do you wnat it? are having trouble with the modified kernel for OC?
2.2 or 2.2.1?
I don't have the time but I can leave the instructions to someone which has:
1- Grab 2.2 or 2.2.1 boot.img (look in Prime ROM for 2.2.1 and Light ROM for 2.2)
2- Unpack boot.img (use dsixda's kitchen for example)
3- Extract the zImage (the file in the first folder with >2MB, it has another name but I don't recall)
4- Get the Amon_RA recovery port for P500, extract contents to some folder
5- Replace the zImage for the one you extracted in the unpacked boot.img (you have to rename it)
6- Zip it again (with no compression)
7- Sign the zip
8- Post link here
@noejn i just switched to your VOID rom from earlier MEgatron one..(btw both roms rock) and i installed that touchscreen-bug fixed kernel posted a few days back ..No there's no EDGE internt Access through phone.
.How do i go abt extracting the kernel From LG's source and making .zip update package for custom recovery????
@noejn i just switched to your VOID rom from earlier MEgatron one..(btw both roms rock and i think both run on 2.2) and i installed that touchscreen-bug fixed kernel posted a few days back ..No there's no EDGE internt Access through phone.
.How do i go abt extracting the kernel From LG's source and making .zip update package for custom recovery????
Check Janitux guide to cook
http://forum.xda-developers.com/showthread.php?t=901417
You will find there tools and how to extract.
sarfaraz1989 said:
@noejn i just switched to your VOID rom from earlier MEgatron one..(btw both roms rock and i think both run on 2.2) and i installed that touchscreen-bug fixed kernel posted a few days back ..No there's no EDGE internt Access through phone.
.How do i go abt extracting the kernel From LG's source and making .zip update package for custom recovery????
Click to expand...
Click to collapse
Check your apn settings ...
Sent from my LG-P500 using XDA App

Precook Kernel into Rom Zip

Is there a unified manner in which this is done?
I've been looking for a way to precook this kernel here: http://forum.xda-developers.com/showthread.php?t=756774 into my ROM's zip before flashing, to save myself the extra step.
Is there anything special to it? I assumed it might just be as straightforward as copying the entire folder structure into the ROM's zip, but the kernel inquestion actually has a third folder called "kernel".
Any help would be much appreciated, this combined with my LauncherPro cooking question earlier will make this ROM perfect for me
LiquidSolstice said:
Is there a unified manner in which this is done?
I've been looking for a way to precook this kernel here: http://forum.xda-developers.com/showthread.php?t=756774 into my ROM's zip before flashing, to save myself the extra step.
Is there anything special to it? I assumed it might just be as straightforward as copying the entire folder structure into the ROM's zip, but the kernel inquestion actually has a third folder called "kernel".
Any help would be much appreciated, this combined with my LauncherPro cooking question earlier will make this ROM perfect for me
Click to expand...
Click to collapse
unpack the existing rom zip's boot image, copy in the kernel you wants zImage, repack it and plop the boot image back into the sip. then remove all the modules in /system/lib/modules in the rom zip and copy all the modules from the kernel zip into the modules folder in your rom zip.
then you ware ready to go.
Yes man, but where to put the zImage? i have 2 GZ files and 1 folder. i tried to put it in the folder and repack that, and the rom stuck at the splash screen. where to put it and how?
thanks

[Q] Upgrading to ICS including other tweaks

Hi,
I'm kinda new to flashing and upgrading my phone.
Therefore I got some questions:
Currently running on my Neo: AOSP 4.0.3 ICS BETA with kernel provided there
Baseband says: 56 as last two digits
I would like to upgrade my baseband to 62. (latest)?
As far as I understood I will have to flash 4.0.2.A.0.62 Baseband using flashtool.
Do I have to flash the kernel again after upgrading baseband or should I flash the 4.0.2.A.0.62 Kernel first and change it afterwards?
fastboot flash boot boot.img
Click to expand...
Click to collapse
Will changing the baseband or kernel delete anything?
When would be the right time to apply the RAISE your NEO userdata space patch? Before or after baseband, kernel flash?
Sometimes they say that a reboot is required after flashing a new ROM before flashing an update.zip in CWM. Do I have to reboot at other times?
Is there a tool or a possibility I missed which can flash anything like baseband, kernel, ROM and updates to it in one step?
If I want to edit a ROM like directly changing bootanimation and ringtones.
How should the zip file be packed? No compression, etc?
Is it a good idea to include updates which I would have flashed in CWM directly into the ROMs zip file?
Do I have to flash the kernel again after upgrading baseband or should I flash the 4.0.2.A.0.62 Kernel first and change it afterwards?
Click to expand...
Click to collapse
Kernel is not related to baseband. Simply flash baseband, no need to flash kernel after or before.
Will changing the baseband or kernel delete anything?
Click to expand...
Click to collapse
Flashing baseband won't delete anything, but flashing kernel might. I see that kernel in that thread have CWM inside, so if you flash stock kernel you will lose that.
When would be the right time to apply the RAISE your NEO userdata space patch? Before or after baseband, kernel flash?
Click to expand...
Click to collapse
Whenever you want. It's not related to kernel or baseband.
Sometimes they say that a reboot is required after flashing a new ROM before flashing an update.zip in CWM. Do I have to reboot at other times?
Click to expand...
Click to collapse
Yes, they say that so that ROM "settles down in it's place" then you can install fixes and stuff.
What other times?
Is there a tool or a possibility I missed which can flash anything like baseband, kernel, ROM and updates to it in one step?
Click to expand...
Click to collapse
There is flashtool, but only for stock rom's. Custom roms are installed as a .zip file via CWM recovery.
If I want to edit a ROM like directly changing bootanimation and ringtones.
Click to expand...
Click to collapse
You can do that with root explorer app(or any app which can access to system), create that bootanimation.zip on pc and upload it to sdcard, then move it to where it needs to be. For bootanimation.zip, yes, it's with no compression. How it's created, check other bootanimation.zip's over the net.
For other zip's which are flashed trough CWM, it's a bit more complicated to explain how to create them.
Is it a good idea to include updates which I would have flashed in CWM directly into the ROMs zip file?
Click to expand...
Click to collapse
Well depends. Most likely yes, but I would still ask creator/porter of each rom if that is advisable
Madfysh said:
seXneo said:
If I want to edit a ROM like directly changing bootanimation and ringtones.
How should the zip file be packed? No compression, etc?
Click to expand...
Click to collapse
You can do that with root explorer app(or any app which can access to system), create that bootanimation.zip on pc and upload it to sdcard, then move it to where it needs to be. For bootanimation.zip, yes, it's with no compression. How it's created, check other bootanimation.zip's over the net.
For other zip's which are flashed trough CWM, it's a bit more complicated to explain how to create them.
Click to expand...
Click to collapse
Thank you very much.
But in this point there was a misunderstanding.
I just wanted to know how the update.zip or rom.zip has to be packed and if it's save to replace bootanimation.zip inside rom.zip. Are there any checksums for apk or other files inside an CWM update.zip I need to change?
Most of the ICS based ROMs use MT15i_Neo_ICS_Kernel_V1.img. Where does it come from and where is it's original thread?
if it's save to replace bootanimation.zip inside rom.zip. Are there any checksums for apk or other files inside an CWM update.zip I need to change?
its safe to change bootanimations.zip and any other apk or file in side the provided update.zip file
but if u extract it n do changes then u will lose the signature of the developer n wont b able to install the update.zip properly
chintu1234 said:
its safe to change bootanimations.zip and any other apk or file in side the provided update.zip file
but if u extract it n do changes then u will lose the signature of the developer n wont b able to install the update.zip properly
Click to expand...
Click to collapse
Yes of course. If original zip file flashed and runs nice it will be my fault if it won't after my edits.
So no checksums in the update.zip directly. Thanks.
Signing of an altered apk file is required. Got it.
And I figured that there is no signing of the bootanimation possible.
Will post my question regarding the kernel in an extra thread.

[Q] [Module] Build and load module on GS3

Hello,
I tried to do a simple task which raise several problem and it start to drive me crazy, so here I am, asking for help. The subject may have been already mentioned, but can't find an issue with the galaxy s3.
I work with ubuntu 12.04 and Odin on win7. My GS3 has XXELL4 baseband, and 3.0.31-742798 kernel version.
I need to load and run a custom module (let's say a "hello world" one for begin) on the galaxy S3.
I compiled it through a Makefile with the toolchain from the ndk package (
Code:
path_to_ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
and the source code from the samsung web site (GT-I9300_JB_Opensource_Update8.zip).
Obviously, when i tried to insmod my module, I've got some compatibility error like
Code:
Exec format error
.
The fact is that the kernel from website is not the same as the phone one.
So I tried to put the kernel from the website on the phone
I compiled it with the same toolchain and I received a zImage file in result. But what to do with this file ? I extracted a boot.img from the phone with Odin and split it (with perl script stuff) to use the extracted files with my compiled zImage for reconstruct a new boot.img. But since fastboot is not available on GS3 (or I miss something) I can't simply
Code:
$ fastboot flash boot boot.img
, and need to use Odin again. So I replace the boot.img from odin's backup folder on my PC with my boot.img. But the nandroid.md5 file raise an error. Am I doing it wrong or too complicated ? If I can correct the md5 error, is that my module will work ?
I also tried to compil my module directly with the kernel from the phone but didn't manage to extract the kernel files to do it. Stuck with a boot.img. Same with the stock kernel from http://forum.xda-developers.com/showthread.php?t=1646610
I made a lot of research but don't find any concrete solutions to my simple task. Maybe I miss something or looking too deep.
Is there a more simple way to run a custom module on the GS3 ?
sorry for my english
Hello and welcome to xda!
You do not have to use odin to flash your kernel, you can do it via custom recovery too.
Just get an simple cwm package of another kernel for s3 and replace the boot.img in the zip.
I attached a simple empty cwm package, just drag your boot.img to the root of the zip with winrar or something.
hsrars-d said:
Hello and welcome to xda!
You do not have to use odin to flash your kernel, you can do it via custom recovery too.
Just get an simple cwm package of another kernel for s3 and replace the boot.img in the zip.
I attached a simple empty cwm package, just drag your boot.img to the root of the zip with winrar or something.
Click to expand...
Click to collapse
Thanks
I've got also a md5 error when i tried to restore with cwm, since I have no md5 file in my folder. Do I need to generate one ? how ?
EDIT: so a generate a md5 file with md5sum, but still have the Exec format error when i try to insmod my module.
ok, im not good with kernel stuff/modules so i cant help you any further...
try to find someone that has experience with kernel modules
edit: found something with google, not exactly for s3 but the error is pretty common:
http://www.linuxquestions.org/questions/linux-kernel-70/insmod-error-version-magic-4175424366/
http://forum.xda-developers.com/showthread.php?t=444338&page=1
http://stackoverflow.com/questions/...for-android-unknown-relocation-27-when-insmod
Why are you posting in this section?
Glebun said:
Why are you posting in this section?
Click to expand...
Click to collapse
well ... I don't yet have access to other section. But If someone could move the thread in a more appropriate one I'll thanks him.
Yes, you do. Questions go in the Q&A section, obviously

[HELP] Modifying ROM doubts

Good evening,
I've written a module for my smartphone and I need to compose a rom to install on my device...
I followed some tutorials, so now I know how to build an android kernel, obtaining a zImage.
Now, a friend told me that I must make a backup with clockworkmod (done!) and download on my pc, than I can recover the boot.img from there and split them in ramdisk and kernel.
Now I can compile my new kernel and merge it (the obtained zImage?) with the ramdisk to have a new rom to flash on my device... is true?
But I don't know how I can split the boot.img (maybe with dsixda kitchen?) and how to create the new rom. I tryied som weeks ago with a .zip rom and the dsixda kitchen and I split and recomposed a rom, but files contained in the .zip files was different from files that I downloaded by my device...
Someone can explain me the correct way to do this process? Thank you!
Paolo.dev said:
Good evening,
I've written a module for my smartphone and I need to compose a rom to install on my device...
I followed some tutorials, so now I know how to build an android kernel, obtaining a zImage.
Now, a friend told me that I must make a backup with clockworkmod (done!) and download on my pc, than I can recover the boot.img from there and split them in ramdisk and kernel.
Now I can compile my new kernel and merge it (the obtained zImage?) with the ramdisk to have a new rom to flash on my device... is true?
But I don't know how I can split the boot.img (maybe with dsixda kitchen?) and how to create the new rom. I tryied som weeks ago with a .zip rom and the dsixda kitchen and I split and recomposed a rom, but files contained in the .zip files was different from files that I downloaded by my device...
Someone can explain me the correct way to do this process? Thank you!
Click to expand...
Click to collapse
So many u can use
1. http://forum.xda-developers.com/showthread.php?t=1619473
2. http://forum.xda-developers.com/showthread.php?t=2036528
3. http://forum.xda-developers.com/showthread.php?t=1877807
and many more if u search

Categories

Resources