Unpack and repack boot.img (Help needed, stuck at booting)

I've been trying for like hours to unpack and repack a boot.img.
I never made this before, I was reading much (actually too much) on the internet on how getting this done.
So... I downloaded some tools for unpacking and repacking the boot.img and followed this tutorial:

and I suceeded. But when I repack it (WITHOUT modifying ANYTHING), and try to flash the "new" boot.img to the phone, the phone turns on and then shows up on the upper left corner of the screen "KERNEL IS NOT SEANDROID ENFORCING" and stays there. It goes no further. I simply unpacked it and then repacked it (to see if I made the whole process right, before screwing anything up).
I saw something curious: The original boot.img is 14.3MB and the new boot.img only 14.0MB. Is there anything that got lost in the process? Remember that I set all the "adresses" to the files right.

Unpacking command:

:~/Área de Trabalho/UNPACKTOOLS$ ./umkbootimg boot.img unmkbootimg version 1.2 - Mikael Q Kuisma <> Kernel size 11073112 Kernel address 0x8000 Ramdisk size 2525114 Ramdisk address 0x1000000 Secondary size 0 Secondary address 0xf00000 Kernel tags address 0x100 Flash page size 2048 Board name is "" Command line "console=ttyS1,115200n8" This image is built using standard mkbootimg Extracting kernel to file zImage ... Extracting root filesystem to file initramfs.cpio.gz ... All done. --------------- To recompile this image, use: mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x0 --cmdline 'console=ttyS1,115200n8' -o new_boot.img --------------- :~/Área de Trabalho/UNPACKTOOLS$

And repacking:

:~/Área de Trabalho/UNPACKTOOLS$ ./mkbootimg --kernel zImage --ramdisk initramfs.cpio --base 0x0 --cmdline 'console=ttyS1,115200n8' -o new_boot.img --pagesize 2048 --ramdiskaddr 0x1000000 :~/Área de Trabalho/UNPACKTOOLS$

I also tried without those adresses. Without luck.

The phone is a (Samsung J1) "J120H" with Android 5.1.1.
And the boot image I obtained by downloading the stock rom and unpacking ONLY the "boot.img". Remember: When I flash this file alone, IT WORKS. When I unpack and repack it, it stops working.
Here are the tools which came and my boot.img (unmodified from stock rom):

If anyone can direct me in the right way, I would be very happy.
Or maybe even modify the boot.img for me, set "secure=0" and repack it. Because my main goal is to root the device.


Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by enoch.oreilly
3 hours ago
Last post by jessika47
4 hours ago
Last post by serenity11
12 minutes ago
Last post by shane.lehner
3 hours ago
Last post by trinity67
2 hours ago
Last post by dbins
3 hours ago
Started by dbins
Last post by randal03
3 hours ago
Last post by aurelie32
1 hour ago
Last post by hammes.jaquelin
4 hours ago
Last post by ondricka.carter
4 hours ago
Last post by damore.cristal
2 hours ago
Last post by daisha30
37 minutes ago