Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,786,517 Members 36,851 Now Online
XDA Developers Android and Mobile Development Forum

[Q] SM-G900F build custom boot.img

Tip us?
 
cloooned
Old
#1  
Member - OP
Thanks Meter 1
Posts: 30
Join Date: Mar 2013
Default [Q] SM-G900F build custom boot.img

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
 
cloooned
Old
#2  
Member - OP
Thanks Meter 1
Posts: 30
Join Date: 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
 
daxgirl
Old
#3  
daxgirl's Avatar
Senior Member
Thanks Meter 3,038
Posts: 1,608
Join Date: Jun 2012
Location: Jerusalem
Quote:
Originally Posted by cloooned View Post
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.
Quote:
In real open source, you have the right to control your own destiny.

Linus Torvalds
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes