Accéder au contenu principal

[TOOL][UTILITY] CIKA - Carliv Image Kitchen for Android - unpack/repack boot-recovery





Hi, I present you my latest work: CIKA aka Carliv Image Kitchen for Android.



So, what is this?

It's a utility (tool) for unpacking and repacking boot and recovery images for many kind of android phones. I made two versions, one for windows users and one for linux users. The windows version works by dragging&dropping over the script you want to use, while the linux version will work with terminal commans (very simple commands though).

What's inside?

For windows version the scripts are batch files and for linux bash files, but the names are the same and they do same thing:

  1. clear_all will clear the working folder deleting any unpacked boot/recovery folder, but not the boot or recovery files (original or repacked).

  2. image_info will print on screen all informations about the image you want to check (sizes, offsets, cmdline, etc.) and all these infos will be saved in a text file (which will be deleted when you clear the folder - see point 1). This is handy if you don't want to unpack the image, but only to see its infos. This script works for all kind of images (not specific to a hardware platform).

  3. unpack_img is the script for unpacking images for all kind of phones with different platforms (qcom, exynos,...) but not MTK. It will work I think for AndroidOne project phones.

  4. unpack_MTK_img is the script for unpack any MTK image, including the ones from new platforms (mt6595, mt6752, mt6753, and whatever they are).

  5. repack_img is the repacking script for regular (non-MTK) phones.

  6. repack_MTK_img is the repacking script for all MTK boot/recovery images.


Besides these in Utility folder there is a bin folder (hidden) with all executables needed by the scripts.

How to use it?

As I said, for windows just drag&drop an image (boot or recovery) you want to unpack over the corresponding script, and drag&drop the folder of the unpacked image over the repacking script when you want to repack it. Choose the scripts with MTK in name for MTK images, and the other ones for any other kind.

For linux open a terminal window in CIKA folder and type (or just copy/paste from here) the commands:


Code:



./unpack_img boot.img


or


Code:



./unpack_MTK_img recovery.img


or what name has your image.

To repack type like this:


Code:



./repack_img recovery


or


Code:



./repack_MTK_img boot


and so on.

NOTICE here for repacking just type the name of the folder, without slashes.



Important, my utility doesn't have any request for position on partitions or directories. In testes worked in a third sub-sub-subfolder on an external partition (both in linux and windows), and it proves to work with any kind of name (except special characters that may break the script), including spaces or dots in folders names, but I recommend you to use dashes or underscores instead of spaces, and avoid dots. In repacking procedure, the script will prompt you to introduce a name for the new image, and if it will contain dots or spaces you will see an error. Also the name must include the type of image (boot or recovery) - Eg: "boot-stock-repack" or "recovery_cwm_m7", and without the extension (.img).

Same condition about names applies for images you want to unpack; if they have other names, like "cwm-m7.img", rename it including the type of image in name: eg "recovery-cwm-m7.img". Why this? As many of you used bgcngm's tool you noticed he asked for including an argument in script command ("-boot" or "-recovery") because this is the way his script can apply the right header for ramdisks in repacking. My tool does that from image name and you don't have to add extra arguments in command.

What's under hood?

All modules used in my tools are compiled by me, both for windows and linux.

Also for windows, because it requires few cygwin libraries to work with compressing/uncompressing executables, I used those libraries and executables from latest cygwin release (gzip, xz, bzip2, cpio and the corresponding dlls).

But my utility doesn't require a cygwin installed. Well, linux version worked very well in cygwin environment, but it's not necessary since I provided a standalone windows version.

The executable modules built by me:

  1. imageinfo - a initial source is shared by osm0sis here, but I used that only for inspiration because I liked the ideea; I used the unpackbootimg from cyanogenmod 12, system/core/mkbootimg and modded to get a similar output as in osm0sis bootimg-info.

  2. mkbootfs - built in cygwin for windows and normal in linux. I used the "stock" source from cyanogenmod 12 /system/core/cpio.

  3. mkbootimg - based cyanogenmod 12 source, but modded, and for windows fixed to work (the standard source it builds in windows but doesn't work). I used for fixing the ideeas from Pete Batard's source. This module repack also dtb-images back to repacked image.

  4. mtkbootimg - same as mkbootimg, but with additions from omnirom code for MTK, to append the MTK header to this kind of images. This one will check first the kernel and then the ramdisk for MTK header, and if it's not there it will append it, but if it's there will skip.

  5. unpackbootimg - from same cyanogenmod 12 source, with few extra additions by me.

  6. unpackmtkimg - same as unpackbootimg but adapted for MTK images, for which will strip the header off before unpacking, to be easy to work with.


For windows I used jeremejevs cmdcolor source to build a module which add colors in cmd console, for a pleasant experience.

All these sources are modified, improved and fixed in some aspects by me.



Do you want to see some pictures?

Windows screenshots.

Linux screenshots.



Why I did it?

Well, the trigger was the apparition of the new platforms from MTK, which didn't worked with any of the old tools. First who found out what's changed was mrjavum. Starting from his findings I explored more, and then provided the update ideea and binaries for bgcngm's tool. But that is only for linux. I know it can be used in windows with cygwin, but we had a standalone tool, michfood's tool, which now doesn't work with the new platforms.

So I started to think for a new utility for windows to solve that need. After I did it I thought I can do it for linux too even if there exists already bgcngm's tool and works great. And I made it not only for MTK phones.

That's the reason I called it Image Kitchen. It is like a tool that combines michfood's tool with osm0sis Kitchen, and serves for different platforms (I tested MTK, Qualcomm, Exynos, with or without dtb, and all worked great). But it's first release, not fully tested (I don't have all kind of phones for that), and so it is marked beta.



Credits:

yuweng for his assistance and help on testing and troubleshooting (you should thank him too guys - it was a great help);

michfood for initial ideea;

osm0sis for bootimg-ifo source and some ideeas from his kitchen;

Cyanogenmod for mkbootimg source folder;

Omnirom for their clean implementation of MTK header.

Pete Batard for bootimage tools windows fix.



If you want to share this in other websites, blogs or forums please keep the credits from script files (I wrote those from scratch), and give proper credits for me.



Downloads are in download section (attention, that may not be visible if you are using a mobile application to visit the forum).



My gihub repository.



XDA:DevDB Information

Carliv Image Kitchen for Android, Tool/Utility for all devices (see above for details)



Contributors

carliv, carliv, yuweng



Version Information

Status: Beta

Current Beta Version: 0.1



Created 2015-01-26

Last Updated 2015-01-26





from xda-developers http://ift.tt/1ymyz0N

Commentaires

Posts les plus consultés de ce blog

Part 2 of Netflix’s Chilling Adventures of Sabrina keeps the Harry Potter influence going

Everyone who’s been enjoying the magician-in-training aspect of Netflix’s Chilling Adventures of Sabrina should be happy to know that the second half of the show’s first season doubles down on its debt to Harry Potter and Buffy the Vampire Slayer while also drawing some on Star Wars and The Lord of the Rings . One of the most enduring ideas popularized by George Lucas and J.R.R. Tolkien is that world-changing powers can easily be misused. In this latest Sabrina run, the heroine’s decision to sign her name in “The Book of the Beast” at the end of the season’s first half means she’s now one of the most capable witches on Earth, and those new abilities are changing her. Chilling Adventures debuted last October with 10 episodes, introducing... Continue reading… from The Verge - All Posts http://bit.ly/2OQyWSY via IFTTT

Change Wifi , BT , IMEI , Serial Number of any mtk android phone .

Intro : Hello guys i had used SP flash tool to flash stock rom on my micromax canvas a1 . After That i selected Format and Download ( normally we just download but i selected format and download ) and found flashed the rom . Now i noticed the serial number of the device was turned to 00000000 and imei number to invalid . So now i fixed the invalid IMEI number problem . ANd i am back with a tutorial on how to regain serial number back of you phone to regain warranty . How to FIX IMEI nUmber here => http://ift.tt/1xLplOr To check IMEI number dail *#06# To check Serial Number just connect your phone to PC ( usb debugging ) and type adb devices ( correct adb files needed ) You can also use Uncle mobile tool -> Device Information to check the serial number Using Different serial code for infinite warranty is not a good idea as there is serial code printed behind the phone. :P and its illeagal . Note : This post is for educational purpose only . Here i will be teaching you how to r...