[Q] Repack MT6577 not working ?! - General Questions and Answers

Hi, I'm working on a custom kernel and I'm new on xda
So my problem here is from the repack scripts : bgcngm/mtk-tools on github
I'm doing :
unpack-MT65xx.pl boot.img
I do no changes on ramdisk or kernel.img and immediatly invoke
repack-MT65xx.pl -boot boot.img-kernel.img boot.img-ramdisk ../boot.img
But this gives me 2 differents sizes files (2 ko the difference between the original boot.img and the newboot.img) and the repacked boot.img won't boot.
So I'm doing something wrong but what ?

Related

[Q] Compiling kernel from source and using zImage

Dear xda-developers members,
I need some help in the right direction:
I have installed Dhollmen's kernel (from forum.xda-developers.com/showthread.php?t=2176563) on my GT-P5110
which is rooted and running CM10.1 at the moment and I used cwm to flash the kernel (from the link above).
Now I am trying to compile the same Dhollmen's kernel from their source code (see link) and flash the compiled kernel.
This has not been a success yet. I either get stuck at bootscreen or in a boot loop.
What I have tried:
Code:
export ARCH=arm
export CROSS_COMPILE=~/android/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
make dhollmen_P51XX_defconfig
make
This resulted in zImage file and I tried to flash with heimdall:
Code:
heimdall flash --KERNEL arch/arm/boot/zImage
This got me stuck on the bootscreen
Try 2:
With the compiled zImage and the working Dhollmen kernel zip (DhollmenCM-P51xx-Kernel_20130706.zip from the link)
I unpacked the working Dhollmen kernel, split boot.img, replace zImage with mine, repack to boot.img, repack to zip and flash zip from cmw
This got me stuck in a boot loop
The frustrating thing is that I have no errors so I am clueless of what is going wrong.
Can someone explain how you'd go from the source code (https://github.com/Dhollmen/DhollmenCM_kernel) to a flashable zip file?

[Q] Repacking kernel.elf help

Hey guys,
I am trying to repack the stock kernel as I have made a change to the ramdisk (ro.secure=0) I wasn't able to split the boot.img using split_bootimg.pl as it could not find android magic in the header so used flashtool to extract the kernel.elf file which gave me 3 files.
These were "kernel.elf.Image" "kernel.elf.ramdisk.gz" and "kernel.elf.3"
I have managed to extract and make the changes to the ramdisk and recompile it but im stuck at merging these 3 files back into the flashable kernel.elf file any help would be much appreciated
Sonic5317 said:
Hey guys,
I am trying to repack the stock kernel as I have made a change to the ramdisk (ro.secure=0) I wasn't able to split the boot.img using split_bootimg.pl as it could not find android magic in the header so used flashtool to extract the kernel.elf file which gave me 3 files.
These were "kernel.elf.Image" "kernel.elf.ramdisk.gz" and "kernel.elf.3"
I have managed to extract and make the changes to the ramdisk and recompile it but im stuck at merging these 3 files back into the flashable kernel.elf file any help would be much appreciated
Click to expand...
Click to collapse
Maybe you should PM @DooMLoRD
I'm sure he will help you. He will surely reply to your message when he'll have some time.

How create a new kernel

HI everyone i need your help to develop a kernel with adhoc support for gt s7270(logan)
I followed the instruction:
1) I downloaded the kernel from the repo in git hub
2) I do the modifications in broadcom wifi driver to support adhoc mode
3) I compiled the kernel for my device and now i have the zimage.
Now because i do not how to create a ramdisk image I take the zip of rom(cm11) and decompresed the boot.img and split into ramdisk and zimage.
Now i ovewrite the zimage, and i repack the boot img, all this I did with the application that I found in xda(https://forum.xda-developers.com/showthread.php?t=2319018)
Now when i flashed the zip that constains the new zimage i get a boot loop. Can you help me and tell what i did wrong?

boot.img unpacking & repacking

Hi guys,
I'm fiddling with some boot images, trying to extract TWRP from arter97's Razer Phone 2 (Aura) r14 kernel, and use it with a Magisk-patched stock kernel.
I've found several tools to unpack and repack the images, although jcadduono's bootimg seems to be the simplest. When I repack the unpacked Magisk-patched boot.img, the file size is 20M instead of the 64M. The original boot.img is mostly padded with zeros, but with a 56-byte footer starting with AVBf.
When I use avbtool add_hash_footer --partition_name boot --partition_size 67108864 --image new.img, it pads to 64M and adds nearly the same footer. There are 2 0x30's in the original that are changed to 0x20 in the new version. The image boots just fine, though.
However, when I replace the Magisk-patched stock ramdisk with the one from arter97's kernel, rebuild, and resize, the phone boots only into TWRP. I can't boot into system. (It's worth noting that arter97's ramdisk is compressed with lz4 instead of gz, so I had to expand it and re-compress with gz. I'm assuming his kernel adds lz4 support.)
Any ideas what I'm doing wrong?
Thanks,
-edison

Question [HELP][Kernel building][Kernel][OP9]

I builded custom kernel for my Oneplus lemonade (A/B 2 slot)
I got "Image" & "Image.gz" file, how can i put it in boot.img
MURSHIG said:
I builded custom kernel for my Oneplus moo lemonade (A/B 2 slot)
I got "Image" & "Image.gz" file, how can i put it in boot.img
Click to expand...
Click to collapse
I have no AIK , just mkbootimg python vers from official Google repo, im executing ./unpackimg.py --boot_img boot.img --out out
in out directory there is -
file kernel - uncompressed kernel
file ramdisk - uncompressed ramdisk

Categories

Resources