[General Topics] TheNH813:
Unpacked, but which file to copy?

So, I'v extracted the files from the recovery image successfully. It gave the following message:

unmkbootimg version 1.2 - Mikael Q Kuisma <kuisma@ping.se>
Kernel size 8388608
Kernel address 0x2600000
Ramdisk size 2406022
Ramdisk address 0x500000
Secondary size 207855
Secondary address 0x2400010
Kernel tags address 0x100
Flash page size 4096
Board name is ""
Command line "idle=halt notsc androidboot.hardware=sofiaboard apic=sofia nolapic_pm firmware_class.path=/system/vendor/firmware androidboot.selinux=permissive nolapic_timer x86_intel_xgold_timer=soctimer_only vmalloc=512m slub_max_order=0 console=ttyFIQ0,115200n8"

*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0x02600000
OFF_RAMDISK_ADDR is 0x00500000
OFF_SECOND_ADDR is 0x02400010
Please modify mkbootimg.c using the above values to build your image.
****************

Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
Extracting second to file second.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x0 --cmdline 'idle=halt notsc androidboot.hardware=sofiaboard apic=sofia nolapic_pm firmware_class.path=/system/vendor/firmware androidboot.selinux=permissive nolapic_timer x86_intel_xgold_timer=soctimer_only vmalloc=512m slub_max_order=0 console=ttyFIQ0,115200n8' --pagesize 4096 -o new_boot.img

I also extracted the v31 recovery successfully. It gave the following message:

unmkbootimg version 1.2 - Mikael Q Kuisma <kuisma@ping.se>
Kernel size 8388608
Kernel address 0x2600000
Ramdisk size 1294306
Ramdisk address 0x500000
Secondary size 524288
Secondary address 0x2400010
Kernel tags address 0x100
Flash page size 4096
Board name is ""
Command line "idle=halt notsc androidboot.hardware=sofiaboard apic=sofia nolapic_pm firmware_class.path=/system/vendor/firmware androidboot.selinux=permissive nolapic_timer x86_intel_xgold_timer=soctimer_only vmalloc=512m slub_max_order=0 console=ttyFIQ0,115200n8"

*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0x02600000
OFF_RAMDISK_ADDR is 0x00500000
OFF_SECOND_ADDR is 0x02400010
Please modify mkbootimg.c using the above values to build your image.
****************

Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
Extracting second to file second.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x0 --cmdline 'idle=halt notsc androidboot.hardware=sofiaboard apic=sofia nolapic_pm firmware_class.path=/system/vendor/firmware androidboot.selinux=permissive nolapic_timer x86_intel_xgold_timer=soctimer_only vmalloc=512m slub_max_order=0 console=ttyFIQ0,115200n8' --pagesize 4096 -o new_boot.img

While files do I combine between them? I know for sure I need to copy the zImage from my version into a new folder (I'l call it v26), and the initramfs from the v31 into the v26 folder, but which version does the second.gz file need to be copied from? Also, do I need to modify the source code of mkbootimg? I also have a mkbootimg.py script and it allows passing a kernel_offset, ramdisk_offset and second_offset parameter.

On a side note, I'v noticed that when I use adb shell on the device, it goes to a root@RCT6873W42:/ prompt now, and I haven't flashed SuperSU or anything. I assume this means that even if the touch isn't working, the permissive settings in the ramdisk are.

I'v tried building one using the included mkbootimg utility but it results in a black screen and dosen't boot. I tried making one using the offsets mentioned using the python version that supports inputting offsets but it hangs on the RCA logo. I don't remember which version of second.gz I tried.