Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] SM-G900F build custom boot.img

OP cloooned

1st May 2014, 05:10 PM   |  #1  
OP Member
Thanks Meter: 1
 
37 posts
Join Date:Joined: Mar 2013
Hi

I am used to rebuild boot images with unkmbootimg/mkbootimg on my S4 mini. When I repack a G900F a working stock boot.img and flash it with Odin, the device boots into download mode. I didn't made any changes in the ramfs, the sources are binary the same, but when I repack it to the boot.img it's different to the stock.

Is my bootloader locked? Do I need a special mkbootimg to enable SEAndroid enforcing? It does not matter if I disable it in the ramfs. Do I have to modify the kernel too?

Regards
2nd May 2014, 11:56 AM   |  #2  
OP Member
Thanks Meter: 1
 
37 posts
Join Date:Joined: Mar 2013
It seems, that not the boot image is the problem but the cpio initramfs.

I can use the command

Code:
abootimg -u boot.img -r initrd.img
to replace the ramdisk in a working boot image. This works only if a replace the current initramfs with the original initramfs. If I unpack the initramfs too and repack the exact same sources, it won't boot. The sources are binary the same, but the packed initramfs is totally different.

I use the following command to repack my initramfs:

Code:
find . | cpio -o -H newc | gzip > ../initrd.img
14th August 2014, 02:02 AM   |  #3  
daxgirl's Avatar
Senior Member
Flag Jerusalem
Thanks Meter: 3,931
 
1,990 posts
Join Date:Joined: Jun 2012
More
Quote:
Originally Posted by cloooned

It seems, that not the boot image is the problem but the cpio initramfs.

I can use the command

Code:
abootimg -u boot.img -r initrd.img
to replace the ramdisk in a working boot image. This works only if a replace the current initramfs with the original initramfs. If I unpack the initramfs too and repack the exact same sources, it won't boot. The sources are binary the same, but the packed initramfs is totally different.

I use the following command to repack my initramfs:

Code:
find . | cpio -o -H newc | gzip > ../initrd.img

I don't know if this is still relevant to you, but I have found that so far the only tool that repacks s5 kernel properly is the Osm0sis kernel kitchen. I am working on linux and I was able to pack my compiled zimage and modified ramdisk using his tool. You can read more on his original thread here .
I hope thos help you.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes