New to repacking kernels, how to? - HTC One X

Although I have been rooting and flashing for quite some time now, I am new to the kernel-module-repack part.
I am willing to use the xm kernel with the newest insertcoin 18.0.2.
I noticed the boot.img is located in the downloadable zip file. Am I correct in saying:
-the boot.img inside the zip file must be extracted and repacked. And flashed in bootloader
-the zip file as a whole is the 'module' and must be installed in recovery
Does the zip file not make conflict because the original non-repacked boot.img is present in the zip?

No, it won't conflict because our phone is S-ON > boot images in flashable zips do not get flashed at all.
Sent from my IceCold One X

Related

Flash with custom bin count as Zero :)

Hi Guyz I compiled a script that can flash boot.img from CWM Recovery and it will not increaseCustom Bin Count.
You can Install Custom Kernel 1000000 times without increasing your Custom Bin Count.
Thanks to Koush for providing source: https://github.com/CyanogenMod/android_device_samsung_bmlunlock
Version 2.0 is here with new features:
•Automatic backup of old boot.img/kernel when you flash a new boot.img/kernel.
The old boot.img can be found afterwards with OLDboot.img name.
•Automatic unmount of sdcard after flashing. (As requested by some users)
•No need to unzip and zip this version, just place this tool and boot.img on root of sdcard and flash tool from Recovery mode.
Instructions:
•To flash kernel/boot.img, just place Boot.img_flasher_V2.0_faqbly_2.zip and your boot.img on the root of your sdcard.
•Boot in CWM Recovery and flash Boot.ing_flasher_V2.0_faqbly_2.zip
•Your OLD boot.img will be backed up as OLDboot.img on your sdcard.
Download V2.0: http://dl.xda-developers.com/attach.../5/9/6/6/9/Boot.img_flasher_V2.0_faqbly_2.zip
Source:- http://www.mod2xtreme.com/f421/[tool]kernel-flasher-recovery-mode-{updated-v2-0}-12584/#post51621
Enjoy
No credits for me i have already mentioned the source i got it from, i thot it may help some of the noobs out there no hard feelings
Yes and so does mai77's method. CWM flashing doesnt increase Bin Count.
Wow great invention, you are the man buddy, but there's no need
Search before creating new threads.

How to Flash Kernel Modules?

Hi, sorry this is a really basic question but I can't find a proper answer.
How do I flash the modules for a kernel? I found the modules folder inside the zip but there are lots of files in it, how do I flash them to my phone?
Also the flashing tools provided with some roms never work for me, fastboot always says something like "....fastboot-windows isn't a recognised internal command..." but I have no problem flashing the boot.img manually through fastboot. Is the flasher tool needed to flash the kernel modules?
Any advice will be much appreciated, I'm trying to get CM9 Domination working but it just boot loops, I assume because I'm not flashing the kernel modules.
Thanks.
How to flash kernels.
first off, there should be two parts to the kernel that you have, first the module, that should be in a .zip format, and also a .img file that should be "kernel-11".img or boot.img or something or other. First you need to open fastboot, and in Command prompt with the ".img" file inside your adb.exe/fastboot.exe/adbwinapi.dll folder that contains these, forward CMD to this folder, , type "fastboot erase cache", then "fastboot flash boot "kernel-11.img" or whatever your .img filename is, then after this is complete you need to reboot recovery, then go to install zip from SD, of which you needed to place the module on your sd card, then simply flash the file and you should have installed your kernel!
^Remember to Hit thanks! ^^
Also, in regards to the error, i dont think your using the folder that you need to be in, What you should do is create a folder somewhere that is convenient for you that you can easily access and remember the address, then add the files fastboot.exe, adbwinapi.dll and adb.exe to, which are all located in your android-sdk/platform-tools/!
Thanks smithr179, I thought I'd have to flash through fastboot or adb, no wonder I couldn't figure it out! Recovery sounds much easier, thanks
The modules in the file I have for the stock kernel are in a normal folder (not a .zip) but they are inside a larger zip folder containing the boot.img, meta inf and system folders. Do I just flash the whole .zip file or should the modules be in a zip of their own?
I'm trying hard to get to grips with all this lol Many thanks for your help
NB. I just tried flashing the whole zip file with everything in it and it worked! Modules were flashed as well as the boot.img. Thanks for all your assistance, much appreciated

[Q] Why does the boot.img have to be present in the .zip file?

Why does the boot.img have to be present in the .zip file? I take the boot.img out of the zip file and
fastboot flash boot boot.img
Click to expand...
Click to collapse
it anyway, so why is it in the zip file?
Is the boot.img by the way the kernel?
zettez said:
Why does the boot.img have to be present in the .zip file? I take the boot.img out of the zip file and
it anyway, so why is it in the zip file?
Is the boot.img by the way the kernel?
Click to expand...
Click to collapse
Boot.img is inside zip because same source build sripts are used for devices with s-off. So...on s-off devices U only have to flash rom.zip and it's installing boot.img also.
icke said:
Boot.img is inside zip because same source build sripts are used for devices with s-off. So...on s-off devices U only have to flash rom.zip and it's installing boot.img also.
Click to expand...
Click to collapse
And because my One X has s-on that means I have to install the contents of the zip first and then flash because of the s-on security preventing installation from within the zip file?
zettez said:
And because my One X has s-on that means I have to install the contents of the zip first and then flash because of the s-on security preventing installation from within the zip file?
Click to expand...
Click to collapse
That's right...as long as your bootloader is saying s-on u've to flash boot.img via fastboot.
icke said:
That's right...as long as your bootloader is saying s-on u've to flash boot.img via fastboot.
Click to expand...
Click to collapse
So I could basically just make a zip file with the manifest and system folder and exclude the boot.img from there?
zettez said:
So I could basically just make a zip file with the manifest and system folder and exclude the boot.img from there?
Click to expand...
Click to collapse
What is the target to doing this? What are U meaning with "just make a zip file"?
zettez said:
So I could basically just make a zip file with the manifest and system folder and exclude the boot.img from there?
Click to expand...
Click to collapse
You cant 'just make' a zip file.. you would have to repack and sign the zip again. Better would be that the boot.img stays where it is.
Sent from my unlocked HTC One X using XDA premium.
icke said:
What is the target to doing this? What are U meaning with "just make a zip file"?
Click to expand...
Click to collapse
Based on our conversation I have come to this conclusion.
S-OFF: You need not use fastboot to flash a boot.img. When you install a ROM from a zip file it will automatically take the boot.img and put it in the right place.
S-ON: You need to use fastboot to flash a boot.img. When you install a ROM from a zip it will not install the boot.img because it is protected by the system (read-only or something) and you then need to implement one more step, the
fasboot flash boot boot.img
Click to expand...
Click to collapse
code. What I wanted to confirm is if I have an S-ON phone I need not have the boot.img in the zip file? I can just flash it after I have installed the manifest/system folder from the zip file?
anks257 said:
You cant 'just make' a zip file.. you would have to repack and sign the zip again. Better would be that the boot.img stays where it is.
Click to expand...
Click to collapse
But is it possible on an S-ON phone to skip the boot.img in the zip file and only go with the manifest and system folder?
Yes, you could delete the boot.img from the zip file if you really wanted. It won't make any difference as it isn't being written anyway (you might also want to modify the updater script so it's not referencing something you've removed).

Unable to succesfully Unpack Boot image and ramdisk and then repack

I have a boot.img file that i can use to root my Samsung J2 SM-J260F - if I flash this with Odin everything is Ok. Now I want to edit a file in the ramdisk of the boot.img to make the phone boot on power. However simply unpacking the Boot.img and unzipping the ramdisk then repacking fails - even when i do not edit anything in the ramdisk. When the repacked boot.img is flashed with Odin the device gets into a boot loop.
I am using the Carliv Image Kitchen for Androidv1.3 tool to do the packing and unpacking.
Is there some specific aspect of the Samsung boot.img such as a signature that is causing this to fail?
Progress update
The only unpacking tool that seemed to correctly repack the image was MTK_Extractor_V2.63 - all of the other (many) utilities I tried did not seem to repack the ramdisk correctly and caused the phone to boot into the recovery screen.
Changing the init.rc and init_samsungexynos7570.rc files as follows finally led to success.
In file init.rc
delete everything under "on charger" then add back setprop sys.powerctl reboot
Under "service lpm /system/bin/lpm"
delete class sec-charger critical and replace with trigger late-init
In file init_samsungexynos7570.rc
delete everything under "on property:ro.bootmode=charger"
AndyJN said:
I have a boot.img file that i can use to root my Samsung J2 SM-J260F - if I flash this with Odin everything is Ok. Now I want to edit a file in the ramdisk of the boot.img to make the phone boot on power. However simply unpacking the Boot.img and unzipping the ramdisk then repacking fails - even when i do not edit anything in the ramdisk. When the repacked boot.img is flashed with Odin the device gets into a boot loop.
I am using the Carliv Image Kitchen for Androidv1.3 tool to do the packing and unpacking.
Is there some specific aspect of the Samsung boot.img such as a signature that is causing this to fail?
Click to expand...
Click to collapse
Did you unlocked the bootloader?
Also i would recommend you to use a custom recovery like TWRP to flash boot.img
AndyJN said:
I have a boot.img file that i can use to root my Samsung J2 SM-J260F - if I flash this with Odin everything is Ok. Now I want to edit a file in the ramdisk of the boot.img to make the phone boot on power. However simply unpacking the Boot.img and unzipping the ramdisk then repacking fails - even when i do not edit anything in the ramdisk. When the repacked boot.img is flashed with Odin the device gets into a boot loop.
I am using the Carliv Image Kitchen for Androidv1.3 tool to do the packing and unpacking.
Is there some specific aspect of the Samsung boot.img such as a signature that is causing this to fail?
Click to expand...
Click to collapse
TBM 13 said:
Did you unlocked the bootloader?
Also i would recommend you to use a custom recovery like TWRP to flash boot.img
Click to expand...
Click to collapse
Which.... does not exist. J2 Core doesnt get the same love.
I recommend Android Image Kitchen (AIK) by Osmosis. Havent failed me once in my case.
Prove N. said:
Which.... does not exist. J2 Core doesnt get the same love.
Click to expand...
Click to collapse
I'm sorry, my bad.
has anyone tried to port the 9 pie firmware from J260A to other J260F/M/G?

Which .img files should I be flashing in fastboot mode?

I'm currently rooted and flashing new updates/custom ROMs by extracting the payload of the new ROM and flashing the .img files using the manual flash instructions found here.
However, I'd like to understand more about this process. The instructions sometimes flashes less .img files than were extracted, e.g. in the recent OOS 10.0.11 update, the following .img files https://imgur.com/UyenBAc extracted (31) is less than what was flashed (19). Furthermore, the instructions passed the arguments "--disblae-verity" when flashing two of the .imgs, but not the others.
Therefore my questions are:
1. What do each .img file do?
2. Which files must be flashed and in what order?
3. Why are certain files flashed with certain arguments?

Categories

Resources