Dual boot ICS as secondary - LG Optimus 3D

Hey guys , I've been trying to make a kernel for ICS to make it work as secondary on external partition but for some reason it doesn't work , I make it for cm10 or 10.1 it works fine but with ICS , it doesn't work.
Can someone make it so I can look into it and understand ?
Sent from my LG-P920 using xda premium

boltthrower56 said:
Hey guys , I've been trying to make a kernel for ICS to make it work as secondary on external partition but for some reason it doesn't work , I make it for cm10 or 10.1 it works fine but with ICS , it doesn't work.
Can someone make it so I can look into it and understand ?
Sent from my LG-P920 using xda premium
Click to expand...
Click to collapse
wen berni did not made that probably is not so easy.
btw... how did you extract the zImage form CM10 and CM10.1 boot.img file?
I tryed different tools but all end up with no zImage. How did you do that?

p-vlad said:
wen berni did not made that probably is not so easy.
btw... how did you extract the zImage form CM10 and CM10.1 boot.img file?
I tryed different tools but all end up with no zImage. How did you do that?
Click to expand...
Click to collapse
Follow Samno's GB Guide it works for CM10 boot.img

p-vlad said:
wen berni did not made that probably is not so easy.
btw... how did you extract the zImage form CM10 and CM10.1 boot.img file?
I tryed different tools but all end up with no zImage. How did you do that?
Click to expand...
Click to collapse
Probably not easy , yes.
I extracted the image using samno's guide , there is a bootimg.pl or something like that , it extracts and separates the boot.img into kernel and ramdisk. You need a linux distro for that by the way. I use Kubuntu.
I modified init.rc , the mtd partitions only system , data and cache... then the updater-script of course.
But no luck.
It packs okay , i extracted a boot.img and without any modifications i repacked it , then flashed it , works.
I did dual-boot from Cm10 as my secondary but i have class 4 card and it's very slow.
I don't use other functions too much to sacrifice that amount of performance since i use cm10 all the time.
I may have tried a hundred different things except for creating the whole partition table in my external.

Related

[Q] Kernel Extraction

How difficult would it be to "rip" a kernel from a ROM, to use in a different ROM? Is it a matter of pulling certain files from the zip and creating and signing a new zip, or is it much more involved?
Try it and find out. It's pretty easy to find. Not all ROMs include a kernel, so try out the Andromeda one for example, which does include a kernel.
ragnarokx said:
How difficult would it be to "rip" a kernel from a ROM, to use in a different ROM? Is it a matter of pulling certain files from the zip and creating and signing a new zip, or is it much more involved?
Click to expand...
Click to collapse
ragnarokx said:
How difficult would it be to "rip" a kernel from a ROM, to use in a different ROM? Is it a matter of pulling certain files from the zip and creating and signing a new zip, or is it much more involved?
Click to expand...
Click to collapse
If the rom you want to put it in has a kernel then it is just a matter of replacing the zImage in one with the other. Then resign.
For a rom that doesnt have one it could get a little uglier but still easy. (I just use one that has a kernel in it.)
smeyerhuky said:
If the rom you want to put it in has a kernel then it is just a matter of replacing the zImage in one with the other. Then resign.
For a rom that doesnt have one it could get a little uglier but still easy. (I just use one that has a kernel in it.)
Click to expand...
Click to collapse
So all I need is the "zImage"? I don't need the "redbend_ua" or files in any other folder?
And I did want to transplant this kernel to a ROM that doesn't come with a kernel, but you're saying that's not easy to do. So what if instead of putting the kernel directly in the ROM, I take a stand-alone kernel zip, put my zImage in there, resign, and install the kernel after I install the ROM. Would that work?
[QOUTE]So all I need is the "zImage"? I don't need the "redbend_ua" or files in any other folder? [/QOUTE]
as long as the rom your using had redbend_ua then there is no need to copy it over, but its the same redbend_ua for both probably.
ragnarokx said:
So what if instead of putting the kernel directly in the ROM, I take a stand-alone kernel zip, put my zImage in there, resign, and install the kernel after I install the ROM. Would that work?
Click to expand...
Click to collapse
That is what I always do., ps I include my keyboard hack as well. Don't forget to resign...
Sent from my SPH-D700 using XDA App

[MTD][Tool]Boot.img Extraction Tool

I know some people have had a need to take apart a the boot.img file that mtd roms use, and I have been curious myself, so I wrote a bash script to do the job. The format of these files is as follows:
Code:
[
zImage[
kernel,
initramfs,
???
],
header (512 bytes),
boot,
recovery,
]
This script will split out the zImage, boot, recovery, and the initramfs from inside the zimage. These are all in gzipped cpio format. All three of those will be extracted into separate folders.
Instructions for use:
IMPORTANT: run this as root so permissions are preserved
Code:
tar -xf extract_boot.tar.bz2
./extract_boot.sh -b boot.img -o output_dir
Download link:
extract_boot.tar.bz2 - 1 KB
Thanks:
supercurio: Used some of his code from kernel_repack_utils to learn how to extract the zImage.
How to rebuild:
There is a script in the EpicCM repos that can rebuild a boot.img from the zImage, boot.cpio.gz, and recovery.cpio.gz.
Link: mkshbootimg.py
Thank you. I've been looking for this.
Sent from my SPH-D700 using Tapatalk
What am I doing wrong? I've tried extracting both cm7 and stock mtd kernels using this tool on android using terminal emulator. They both say syntax error.
Sent from my SPH-D700 using Tapatalk
xboxfanj said:
What am I doing wrong? I've tried extracting both cm7 and stock mtd kernels using this tool on android using terminal emulator. They both say syntax error.
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
This is meant for Linux. Something like Fedora or Ubuntu. Its a bash script, so it may still work on a phone it you run it in bash, but I doubt it.
Sent from my SPH-D700 using xda premium
Also, I think our boot.img's are a little weird.
sent from my always aosp epic
While you were figuring this out, I was getting this ready......
https://github.com/nubecoder/create_boot.img
Kernel devs should easily be able to make some use of it.
=]
nubecoder said:
While you were figuring this out, I was getting this ready......
https://github.com/nubecoder/create_boot.img
Kernel devs should easily be able to make some use of it.
=]
Click to expand...
Click to collapse
Oh you sneaky....
sent from my always aosp epic
zman0900 said:
I know some people have had a need to take apart a the boot.img file that mtd roms use, and I have been curious myself, so I wrote a bash script to do the job. The format of these files is as follows:
Code:
[
zImage[
kernel,
initramfs,
???
],
header (512 bytes),
boot,
recovery,
]
This script will split out the zImage, boot, recovery, and the initramfs from inside the zimage. These are all in gzipped cpio format. All three of those will be extracted into separate folders.
Instructions for use:
IMPORTANT: run this as root so permissions are preserved
Code:
tar -xf extract_boot.tar.bz2
./extract_boot.sh -b boot.img -o output_dir
Download link:
extract_boot.tar.bz2 - 1 KB
Thanks:
supercurio: Used some of his code from kernel_repack_utils to learn how to extract the zImage.
How to rebuild:
There is a script in the EpicCM repos that can rebuild a boot.img from the zImage, boot.cpio.gz, and recovery.cpio.gz.
Link: mkshbootimg.py
Click to expand...
Click to collapse
okay so...
extracting = CHECK
repacking = wtf???
how are you supposed to use the code from github? i dont see a way to download it so u can use as an executable text file and copying and pasting code into the teminal doesnt work.... how do i use it?
roddygonzo17 said:
okay so...
extracting = CHECK
repacking = wtf???
how are you supposed to use the code from github? i dont see a way to download it so u can use as an executable text file and copying and pasting code into the teminal doesnt work.... how do i use it?
Click to expand...
Click to collapse
Click the raw link in the upper right. That will give you plain text. You might want to check out what nubecoder did above, it could be easier to use.
Sent from my SPH-D700 using xda premium
nubecoder said:
While you were figuring this out, I was getting this ready......
https://github.com/nubecoder/create_boot.img
Kernel devs should easily be able to make some use of it.
=]
Click to expand...
Click to collapse
Nice! I've been working on a kernel and set up a similar build system for it in my github.
Some questions: how does mkbootfs work? It seems tovtake the place of cpio -o -c. Does it automatically set up the correct file permissions and ownership? If not, how are these being set? Last, is there source somewhere?
Sent from my SPH-D700 using xda premium
So do u have to make a zimage first and then make that a boot.img? I am so confused.
Sent from my SPH-D700 using Tapatalk
xboxfanj said:
So do u have to make a zimage first and then make that a boot.img? I am so confused.
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Yep.
sent from my always aosp epic
So then where's the zimage maker?
Sent from my SPH-D700 using Tapatalk
xboxfanj said:
So then where's the zimage maker?
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
You compile it yourself..
sent from my always aosp epic
nubecoder said:
While you were figuring this out, I was getting this ready......
https://github.com/nubecoder/create_boot.img
Kernel devs should easily be able to make some use of it.
=]
Click to expand...
Click to collapse
This worked after a few fixes. The script references files without the ./ prefix in several places. This caused errors for me. I'm completely sure why, but I think it's because of my shell configuration change I had to make to install the codesourcery ARM toolchain.
After fixing it, it created the boot.img jsut fine, but the resulting image was too large to flash - around 7.6MB. Either the recovery or initramfs (I'm sorry I don't remember which one right now) you supplied is much larger than the one I was using and caused the increased size.
toadlife said:
This worked after a few fixes. The script references files without the ./ prefix in several places. This caused errors for me. I'm completely sure why, but I think it's because of my shell configuration change I had to make to install the codesourcery ARM toolchain.
After fixing it, it created the boot.img jsut fine, but the resulting image was too large to flash - around 7.6MB. Either the recovery or initramfs (I'm sorry I don't remember which one right now) you supplied is much larger than the one I was using and caused the increased size.
Click to expand...
Click to collapse
I think there's a lot of unnecessary parts in that initramfs, like the res folder and binaries in sbin. I think those should only be in the recovery. Check out my working initramfs in my github https://github.com/zman0900/android_kernel_epic4g_gb_mtd/tree/master/initramfs_mtd
So do the zimages inside the boot.img not have an intramfs? And if that's the case, I can probably just use the zimage that I got when I unpacked the cm7 kernel also when I repack, right? I'm updating intramfs and I know its in boot.img, but idk about zimage. Thanks.
Sent from my SPH-D700 using Tapatalk
xboxfanj said:
So do the zimages inside the boot.img not have an intramfs? And if that's the case, I can probably just use the zimage that I got when I unpacked the cm7 kernel also when I repack, right? I'm updating intramfs and I know its in boot.img, but idk about zimage. Thanks.
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
The zImage from cm7 won't work for a tw rom!
The zImage does have an initramfs. Mtd uses a two stage boot. So the zImage contains the kernel and a small first stage initramfs. The phone loads the zImage and starts the kernel, which then runs init in the first stage. That loads the second stage initramfs from the boot.img and executes its init, which mounts filesystems and handles the rest of the boot.
Sent from my SPH-D700 using xda premium
zman0900 said:
The zImage from cm7 won't work for a tw rom!
The zImage does have an initramfs. Mtd uses a two stage boot. So the zImage contains the kernel and a small first stage initramfs. The phone loads the zImage and starts the kernel, which then runs init in the first stage. That loads the second stage initramfs from the boot.img and executes its init, which mounts filesystems and handles the rest of the boot.
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
LOL. I know TW and CM7 kernels aren't compatible. Thank you very much for all the information though.
Umm...the zImage for tw WILL work for cm...its just the initramfs that changes, iirc
sent from my touchwiz 4.5-ed epic

[Q] How to change Kernel of ROM Before installatio in it's zip file.

I would like to learn how one can change the kernel/modem in a ROM's zip BEFORE flashing it. I often use the Entropy Kernel after I flash a new ROM. The Kernel has a zimage file. How do I incorporate it into the zip? Same for modem file.
Thanks in advance.
NeoMustain said:
I would like to learn how one can change the kernel/modem in a ROM's zip BEFORE flashing it. I often use the Entropy Kernel after I flash a new ROM. The Kernel has a zimage file. How do I incorporate it into the zip? Same for modem file.
Thanks in advance.
Click to expand...
Click to collapse
Whats worked for me:
First get 7zip if you are on windows
Open the kernel zip with 7zip move the redbend_ua and zImage into this location (rom name here).zip/updates
For modem do the same, open up the modem zip with 7zip, and then move the modim.bin into (rom name here).zip/update
You may need to delete the redbend and zImage already in the rom, but just overwriting it with the new ones should work
Once the new kernel/modem is copied over, just put it on your sdcard and you should be able to flash it without any problems
Sent from my SAMSUNG-SGH-I997 using XDA
or just the zimage...since the ua is same...
Never tried it without doing the ua when it came to the kernel, but it does make sense since i never moved the ua when ever id move the modem
Sent from my SAMSUNG-SGH-I997 using XDA
The ua is universal on all roms... its just an installer for the modem and kernel ... no need to change it. If the rom already has it then just replace the zimage and your good.
Sent from my SAMSUNG-SGH-I997 using xda premium
I request some experienced sr. member to comeup by posting new thread covering some of topics like safely adding and removing apks, libs. Fonts, apps, wallpapers, kernel. Modem etc. in Rom's zip with little flavouring. It will help new member to start some development work.
Thanks guys ... 1 more small step
hey can anyone give instructions on fixing RIL bug...it would be so much helpful...thnx

[DISCONTINUED]Installation Error

Hey guys,I am a starter in Galaxy Fit development(sry to be noobish).I used a stock 2.3.6 dxkt7 rom and built a custom rom without any changes to the apks or anyother things even the bootanimation but when i try to install the rom i get status 0 error.I read what a status 0 error is but not able to rectify it can someone pls help.Thanks in advance
hmm..
yeshwanthvshenoy said:
Hey guys,I am a starter in Galaxy Fit development(sry to be noobish).I used a stock 2.3.6 dxkt7 rom and built a custom rom without any changes to the apks or anyother things even the bootanimation but when i try to install the rom i get status 0 error.I read what a status 0 error is but not able to rectify it can someone pls help.Thanks in advance
Click to expand...
Click to collapse
hmm.. have you changed something in the Uppdate-Binary?
Use this recovery. Still facing problem then copy meta-inf folder from any custom rom for fit
FurFur_ said:
hmm.. have you changed something in the Uppdate-Binary?
Click to expand...
Click to collapse
no didnt make any changes to anything just extracted system.rfs and boot.img using kitchen made the system and boot.img files and added superuser and bulit the rom thatz all the edits i did
MajinSaiyan4 said:
Use this recovery. Still facing problem then copy meta-inf folder from any custom rom for fit
Click to expand...
Click to collapse
yes this ver of cwm only am using too :cyclops: yes and i tried meta inf of others but that aso not working(used razordroid,jana rom,hyperdroid,creed's rom-meta inf files)....others meta infs wont work bcoz the stock works on ext4 i think :crying:
can anyone give the updater-script of a stock rom that has root function only pls
do this zip aliign evertyhing add busybox via kitche(deodex if you want to)
then copy all the files from working folder to folder x
pick up meta inf and boot.img from any custom rom and copy it to folder x zip it via winzip or any other soft and flash the zip ....
speed_bot said:
do this zip aliign evertyhing add busybox via kitche(deodex if you want to)
then copy all the files from working folder to folder x
pick up meta inf and boot.img from any custom rom and copy it to folder x zip it via winzip or any other soft and flash the zip ....
Click to expand...
Click to collapse
Thank u mate it works now.The update-binary file was corrupted that is why it didnt install.Thanks a ton
FurFur_ said:
hmm.. have you changed something in the Uppdate-Binary?
Click to expand...
Click to collapse
The android kitchen auto generated a update-binary that did not match my mobile that was why i encoutered this issue thanks a lot mate
thats because kitchen converst update script into edify and other crap

How to copy kernel from 1 rom to an other rom [SM-G355H]

Hey guys, my Core 2 is having a broken screen and I can't install CM11 nor the stock rom. It works only with SpeedRom. So my question is which files should i copy from Speedrom to CM11 to get it to work? Cuz i really don't like stock TouchWiz roms and i want AOSP really much. Any help will be much appreciated. Thanks!
mitko7411 said:
Hey guys, my Core 2 is having a broken screen and I can't install CM11 nor the stock rom. It works only with SpeedRom. So my question is which files should i copy from Speedrom to CM11 to get it to work? Cuz i really don't like stock TouchWiz roms and i want AOSP really much. Any help will be much appreciated. Thanks!
Click to expand...
Click to collapse
Extract both zip files, then copy boot.img from speedrom and replace it in cm11.
Note: CM11 may not boot with stock kernel!
Okay i will try it. Also another question, what file system should I use for system,data,cache folders? Cuz right now i'm using ext2 but I think i should use ext4.
Nope, it doesn't work. I even tried to copy the META-INF folder without success. Still stuck on "Samsung GALAXY CORE 2" splash screen.

Categories

Resources