This tool i came across when i was working on the Ubuntu for Eris.
Code:
It copies your bootimage to a temp file so it has a space to work in
It then unpack the boot.img
Replaces the zImage you included ith the original one
Repacks the boot.img
Flashes the new boot.img with your kernel in it.
All you need to do is rename your kernel zimage, and place it in the kernel folder and re-sign it. MUCH easier than fastboot or baking up a custom boot.img each time you have to swap the kernel.
All thanks to Koush, i just found the thing
Hi just asking if anyone knows any links or archives or anything i can read through, im looking to build my own ROM. any help would be much appreciated and dont mind donating to someone that can help me start to learn.
Thanks
Well, first of all you need to be able to compile Android. This is pretty easy and it's explained directly in the developers google website. If you're not running a Nexus One or a Nexus S, you can't actually compile a working android copy for your own phone "as is" from AOSP. Because of this, you firstly need to change / create some dirs and files in order to add the support for your particular device. I'd start searching on CM repositories for this (I've got the Nexus One and thus I don't have such problems).
After you've compiled Android for your device and your changes (for example root), you'll have some disk images (you can find them all under out/target/product/PHONE_MODEL/, they are the .img files). You can directly flash them via fastboot ("fastboot flash boot boot.img" etc.). You can though create an update.zip file, and this can be made extracting the system.img file in a folder. Remember that you'll have to recreate the symlinks (to toolbox and/or busybox if you want to include it in your build) and set permissions, as zip doesn't save the permissions of the files once compressed.
Thus so far, if you succeed making every single step you should have your ROM on your phone
Hi!
I am trying to create a custom kernel for my Galaxy Note 3. I have successfully modified and built the kernel. Now I want to actually test it. I've searched for possible methods to create a boot.img file from my zImage. I've tried
mkbootimg and unmkbootimg
kernel kitchen
I was able to create a boot.img with both methods and both of them failed to boot. I thought I messed up the kernel, BUT then I tried to just unpack a stock boot.img and repack it again - and this also failed with both methods.
Seeing as there are already people who made custom kernels for the Note 3, I'm wondering what I am doing wrong. Also I'm a bit new to this, that may also be a factor. Could someone possibly give a hint what might be going awry? Will of course provide additional information, if required.
Edit: nevermind that, found out I need Snapdragon 800 patched mkbootimg tools. found binary versions of them on github (Can't post link because I'm a new user). unsure where the source code is though.
Hello guys,i was trying porting MIUI for Zenfone (I used Mi Pad 2's rom).I am following this guide :http://http://forum.xda-developers.com/android/software/guide-build-port-miui-rom-to-device-t3250984
I prepared the rom,now i am trying modifying boot.img but with Android Kitchen at guide it is impossible,so i googled and found this:http://github.com/shakalaca/ZenFone-boot-tools
and this:http://github.com/sndnvaps/intel-boot-tools
but i couldn't extract ramdisk and split_img files.
So how can i extract ramdisk and split_img files or is it possible?
Thanks!
Yeap its possible!
You should look this : https://github.com/xiaolu/intel-boot-tools
Yeah,i saw that,tried but when i drag boot.img top of the unpack.exe nothing happens
My recommendation is for you to use AndImgTool, download it here: https://basketbuild.com/filedl/devs?dev=dgadelha&dl=dgadelha/Tools/AndImgTool.exe
Me and tank use it to [un]pack the kernels.
Also you can use mboot.py by quanganh2627 .This script was made for Linux and it is working good.
- unpack: mboot.py -u boot.img
- repack: mboot.py new-boot.img
https://drive.google.com/file/d/0BwEWY6gMvYOedDV1LVJUVkN2dms/view
I think that you can use AOSP kernel for miui but maybe few changes in ramdisk will be needed.
Do you have space between ur computer's user account's username???If it is there,it won't work......
Try moving that unpacking software folder to Root C drive and then from there try perform dragging the img on to the unpack.exe file....
and for other ported roms ? can by port rom unbootable duo to non ported kernoel ?
THIS IS NOT A "HOW TO BUILD A KERNEL" POST
The Pixel 2, unlike other phones I've worked with, requires two extra tools: dtc (Device Tree Compiler) and mkdtimg.
Yes, dtc is available in the main repos for most linux distros, but the Pixel 2 kernel requires the AOSP modified version of dtc.
First, grab the Pixel 2 + XL Unified kernel source (wahoo) from https://android.googlesource.com/kernel/msm/+/android-msm-wahoo-4.4-oreo-dr1
Then download wahoo-kernel-tools.zip file attatched to this post and unzip it. Make sure that the 2 files in the bin folder are available in your path (possibly by moving them to ~/bin) and symlink or move the libc++.so into an included library directory, such as /lib, /usr/lib, or /usr/local/lib.
These specific binaries were compiled on Arch Linux by me, so they may not work on every system. To build binaries compatible with your system, sync any android oreo source (AOSP, Lineage, Carbon, etc.) and run "make dtc mkdtimage -jX" instead of "make bacon" or your normal command. The binaries will be located in out/host/linux-x86/.
This is tested and working with the stock google 4.9 toolchain and the initial source as of Oct 23rd, 2017.
frap129 said:
THIS IS NOT A "HOW TO BUILD A KERNEL" POST
The Pixel 2, unlike other phones I've worked with, requires two extra tools: dtc (Device Tree Compiler) and mkdtimg.
Yes, dtc is available in the main repos for most linux distros, but the Pixel 2 kernel requires the AOSP modified version of dtc.
First, grab the Pixel 2 + XL Unified kernel source (wahoo) from https://android.googlesource.com/kernel/msm/+/android-msm-wahoo-4.4-oreo-dr1
Then download wahoo-kernel-tools.zip file attatched to this post and unzip it. Make sure that the 2 files in the bin folder are available in your path (possibly by moving them to ~/bin) and symlink or move the libc++.so into an included library directory, such as /lib, /usr/lib, or /usr/local/lib.
These specific binaries were compiled on Arch Linux by me, so they may not work on every system. To build binaries compatible with your system, sync any android oreo source (AOSP, Lineage, Carbon, etc.) and run "make dtc mkdtimage -jX" instead of "make bacon" or your normal command. The binaries will be located in out/host/linux-x86/.
This is tested and working with the stock google 4.9 toolchain and the initial source as of Oct 23rd, 2017.
Click to expand...
Click to collapse
Thanks for the files dude, you saved me some serious time since I don't need to sync AOSP
DespairFactor said:
Thanks for the files dude, you saved me some serious time since I don't need to sync AOSP
Click to expand...
Click to collapse
No problemo, I figured I'd post this since my fastboot is being retarded and I can't do much else
Forgive me for being a noob, but would these new requirements for the Pixel 2 cause existing tools used to pack/unpack the boot image fail or at least partially fail? I'm wondering if this is why we can't get Magisk to work
edit: to be clear, when I unpack the boot.img file all I see are kernel and ramdisk. When I unpack the boot.img from the Pixel 1 XL, I see those same 2 files along with devicetree.dtb and kernelimage
skaforey said:
Forgive me for being a noob, but would these new requirements for the Pixel 2 cause existing tools used to pack/unpack the boot image fail or at least partially fail? I'm wondering if this is why we can't get Magisk to work
edit: to be clear, when I unpack the boot.img file all I see are kernel and ramdisk. When I unpack the boot.img from the Pixel 1 XL, I see those same 2 files along with devicetree.dtb and kernelimage
Click to expand...
Click to collapse
Maybe? It doesn't seem like how the boot image is packed has been changed, just how the actual kernel image is put together.
nathanchance said:
Maybe? It doesn't seem like how the boot image is packed has been changed, just how the actual kernel image is put together.
Click to expand...
Click to collapse
Strange. Thanks for the response though. In the Magisk thread here, someone has posted a boot image that was simply unpacked/repacked (no changes) and we can't get it to boot. I don't want to derail this thread any further though.
skaforey said:
Forgive me for being a noob, but would these new requirements for the Pixel 2 cause existing tools used to pack/unpack the boot image fail or at least partially fail? I'm wondering if this is why we can't get Magisk to work
edit: to be clear, when I unpack the boot.img file all I see are kernel and ramdisk. When I unpack the boot.img from the Pixel 1 XL, I see those same 2 files along with devicetree.dtb and kernelimage
Click to expand...
Click to collapse
skaforey said:
Strange. Thanks for the response though. In the Magisk thread here, someone has posted a boot image that was simply unpacked/repacked (no changes) and we can't get it to boot. I don't want to derail this thread any further though.
Click to expand...
Click to collapse
No they don't, these just build the dtb/dtbo. The magisk issue is with patching sepolicy likely.
frap129 said:
No problemo, I figured I'd post this since my fastboot is being retarded and I can't do much else
Click to expand...
Click to collapse
Did you try to flash a factory image and get stuck in the bootloader? If so, extract 'image-walleye-[build number].zip' and flash each image manually. fastboot -w update doesn't work for some reason. After you flash all the images, do fastboot format userdata, and you should be back to normal. Took me a couple hours to figure this out.
ryanbg said:
Did you try to flash a factory image and get stuck in the bootloader? If so, extract 'image-walleye-[build number].zip' and flash each image manually. fastboot -w update doesn't work for some reason. After you flash each image, do fastboot format userdata, and you should be back to normal. Took me a couple hours to figure this out.
Click to expand...
Click to collapse
Thanks! I don't get stuck in the bootloader, but it won't let me flash boot images. Fastboot either hangs or spits out "remote: error: max size not reported"