yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] Flounderist:
Hi, I used this tool successfully until today. I tried to unpack/repack a MTK boot.img and I had this error message:

***************************************************

* *

* Carliv Image Kitchen for Android v1.3 *

* boot+recovery images (c)2016 carliv@xda *

* including support for MTK powered phones images *

* WINDOWS x64 version *

***************************************************

* The repacking images script *

***************************************************

Processing the boot folder.

Repacking the image....

The kernel is: boot.img-kernel

Getting the ramdisk compression....

Ramdisk compression: gz

The ramdisk is: boot.img-ramdisk.gz

Getting the image repacking arguments....

Board: '1465391499'

Base: 0x40078000

Pagesize: 2048

Command line: 'bootopt=64S3,32N2,64N2 androidboot.selinux=permissive'

Kernel offset: 0x00008000

Ramdisk offset: 0x04f88000

Tags offset: 0x03f88000

"wmic" non è riconosciuto come comando interno o esterno,

un programma eseguibile o un file batch.

Your new image is boot-~0,8dt:~8,4.img.

Executing the repacking command....

Repack image utility by carliv@xda

Check and add the kernel

Check and add the ramdisk

Build the new image

'boot-~0,8dt:~8,4.img' successfully repacked

Done. Your new image was repacked as boot-~0,8dt:~8,4.img.

You can find it in [output] folder.

Premere un tasto per continuare . . .

A few days ago I installed python 3.xx for windows 10 and I set PATH in environment variables.

Could be Python to block the process?

Please help!

Thank you!
[Miscellaneous Android Development] hacknmtk:
I don't see where your error is besides the odd name of the new boot.img...
[Miscellaneous Android Development] Flounderist:
wmic has not been recognized. It is a cmd bug in Windows.
[Miscellaneous Android Development] hacknmtk:
Have you tried the Linux versions? There's the normal terminal version as well as a drag and drop version.
[Miscellaneous Android Development] Flounderist:
Well, until a few days ago it worked like a charm on Win10.

Then I installed Python and I set PATH for it. Then I tried to install cygwin, but I aborted it.

Today I disinstalled python, cleaned PATH, added C:\Windows\System and C:\Windows\System32 back to PATH, restarted and it still don't work :(

Before the mess I remember I click on "clear folder" and I lost all the folders. So I downloaded back Win ver 1.3.

I don't think it might be that, but who knows....

Other tools cmd.exe based are working fine :eek:

I will take a look to Ubuntu and I will move in Linux based environment a.s.a.p.

Cheers.
[Miscellaneous Android Development] hacknmtk:
I don't know much about how Windows works since it's closed source, so I can't help with that unfortunately.

For any kind of Android development Linux is a must, either as a full distribution on your hard drive with dual boot so you still have Windows, or you could use Linux in a virtual machine inside Windows. Setup for doing that can be found if you search the forums, or Google. I would recommend using Ubuntu 14.04 LTS as the Linux distribution since Android does all of its testing using this version (last I checked). Just make sure to use a 64bit version. Others use different Linux distros, but I don't have any experience with them.

Hopefully someone more knowledgeable with Windows can help you get things right. Best of luck to you.
[Miscellaneous Android Development] VSK1008:
Android Regular Mode

How to do Android Regular mode?
[Miscellaneous Android Development] VSK1008:
Android Regular Mode failed Please help

Android Regular Mode also fails. Please help.:confused::mad:

View attachment recovery.img

View attachment boot.img
[Miscellaneous Android Development] :
Your images aren't regular, they have mtk header but isn't a regular mtk header. You need to split the image manually and to remove the header manually with dd commands, or try michfood's tool.
[Miscellaneous Android Development] VSK1008:
How to remove mtk header?

How to remove the mtk header on my boot.img and recovery.img? I am using an Windows 10 pro laptop, so how do I do DD commands?
[Miscellaneous Android Development] :
Just copy-paste this "How to remove the mtk header " in google or here in the search field (top right corner).
[Miscellaneous Android Development] joey839:
w7 error

hey bro carliv, got an error on 32bit. im using w7 32 bit. when i run the carliv.bat, it will open the cmd and show an error " ufind is not recognized as an internal or external command" and "cecho is not recognized as an internal or external command", the cmd exit.. how to fix this bro? please help. thank you..
[Miscellaneous Android Development] :
That looks like the bin folder can't be added in PATH for that session as it suppose to be, and how it works for all other people. That is a problem with your windows but I'm not an windows expert to tell you how to fix it.
[Miscellaneous Android Development] Nivu87:
Good Works!
[Miscellaneous Android Development] blackeangel:
http://4pda.ru/forum/index.php?showtopic=740494&view=findpost&p=52940871
[Miscellaneous Android Development] CrisBalGreece:
Great job men, but not working for recovery.img on Qualcomm LL rom. The unpack done well and everything is on file recovery file, but when finish the changes and try to repack it back, on output folder there is nothing! :) No errors or anything i'am taking when run the repack.:crying: Any solution or idea?Thanks in advance!:D

Here is the results: [IMG="empty otput folder"]https://s25.postimg.org/unugs0iov/recover_img_empty.jpg[/IMG]
[Miscellaneous Android Development] bovirus:
[MENTION=7565215]CrisBalGreece[/MENTION]

Please upload the recovery.img as archive file (compressed) and posted here the link to download it and make the testes.
[Miscellaneous Android Development] CrisBalGreece:
Thanks a lot! You have PM!:D
[Miscellaneous Android Development] bovirus:
[MENTION=7565215]CrisBalGreece[/MENTION]
[MENTION=777546]carli[/MENTION]v

I can confirm the problem with the recovery.img that you provided and current version of CIK.

https://mega.nz/#!oNFCVQ6A!5Fcci8Jbs...6Vh84wQMy6fhfo

You recovery is a 64MB file.

Probably the current version of CIK (through you component like mkbootimg) could be not compatible with so big file.
[Miscellaneous Android Development] CrisBalGreece:
Thank you very much for your try and testing. :)

There is a possibility to find a solution to this problem;

Perhaps with another program that can repack larger files from my recovery.img:confused:

edit all OK! I was able to solve this issue! I cooked the original recovery with moded and everything is ok now. Thanks!
[Miscellaneous Android Development] livedten:
Windows 7sp1 x64 good It unpacks and packs boot.img - android 5.1(intel)

Windows 10 x64 bad Do not repacks boot.img - android 5.1(intel)

Please help to get to work on windows 10
[Miscellaneous Android Development] gsser:
hey, first of all i got c5 ultra.

there is a problem and we cant unpack boot.img . its just too big size at 40mb. we took it from partition backup app.

and tried pulling boot from ftf file, dumped data from boot.sin file. and changed the .elf to .img but gave and error saying its not an image file.

any help pls

i will upload boot.img if its needed, i have system + boot in a zip. if you dont mind the size here is the link: https://drive.google.com/open?id=0B4oI7YeGtWdbTTJqMzNpdGd2NE0
[Miscellaneous Android Development] bovirus:
[MENTION=5021225]gsser[/MENTION]

I believ that should be enough to uplaod boot,.img zipped.
[Miscellaneous Android Development] gsser:
But which one?

Boot.img from partition backup app 40mb

Or boot.elf from ftf file 12mb
[Miscellaneous Android Development] bovirus:
[MENTION=5021225]gsser[/MENTION]

boot.img from backup.
[Miscellaneous Android Development] gsser:
https://drive.google.com/file/d/0B4oI7YeGtWdbeWttbnFwM3I4WGc/view?usp=drivesdk
[Miscellaneous Android Development] gsser:
android boot magic not found gives this error as i try,

unpacked boot.sin and got boot.elf, renamed it to boot.img and tried but still same:(
[Miscellaneous Android Development] AlexZap:
Your trying to use this on a Sony device, and it won't work. There are other tools extracting Sony kernels... search xda.
[Miscellaneous Android Development] gsser:
We tried he ones with perl. Both didnt work

Itsjust too annoying, i take boot.img from phone still gives error or not works,

I extract data from boot.sin and it just gives me boot.elf and we cant do anything about it
[Miscellaneous Android Development] Pyr0ball:
Hello gents. I'm hoping to get a little help with my first attempt at porting a recovery to a device that really doesn't have a lot of support to it (Alcatel OneTouch Pixi 7 9006w). I've got a stock recovery image to work with, a working TWRP recovery, one labeled as CWM that appears to be stock with touch added, and a Philz recovery I'm attempting to port from the Galaxy Tab p3110.

Here's my files.

https://www.androidfilehost.com/?w=files&flid=125374

Info about the tablet:

Manufacturer: TCL

Model: 9006W

Board: msm8916

CPU:

- Snapdragon 400/410

- Adreno 306

Android Version: 5.0.2

API Level: 21

Build ID: LRX22G

Process I've followed:

Dropped all four recoveries into recovery-resources and unpacked them all

Removed the kernel files from the target recovery (Philz_p3110)

Copied the kernel files from the stock recovery over to the target recovery

Under ramdisk, removed original fstab.espresso and ueventd.espresso.rc and replaced with fstab.qcom and ueventd.qcom.rc

Copied/replaced the following files:

/ramdisk/etc/recovery.fstab

/ramdisk/init.rc

/ramdisk/ueventd.rc

Repacked the recovery image

Attempted to boot the image through fastboot (success)

The issue I'm running into now is that the tablet stays stuck on the bootloader logo. I can tell it's booted into the recovery because ADB comes back up and I can shell into it, but the UI does not work. I'm guessing I'm missing something obvious or the recovery I'm trying to port is a bad choice or something.
[Miscellaneous Android Development] bovirus:
[MENTION=3562224]Pyr0ball[/MENTION]

I believe the problem is regarding the tablet and not the recovery and CIK.

I suggest you to open a thread avout your device, to post there all details and discuss there.

I suggest to host the file with standard name (ex. recovery.img) compressed az zip fiel with the name that explian the contents (ex. Alcatel-OneTouch-Pixi 7-9006w-TWRP-recovery-2.8.7.0.zip).
[Miscellaneous Android Development] Pyr0ball:
Okidokie thanks for the suggestion
[Miscellaneous Android Development] vinaykharayat:
Is it able to unpack stock recovery?
[Miscellaneous Android Development] bovirus:
@ev.shinchan

CIK can pack repack any boot/recovery (stock or custom).
[Miscellaneous Android Development] AlexZap:
[MENTION=5186178]bluefirebird[/MENTION] is there a chance at getting an arm version of this? I tried to use it on my raspberry pi and it failed. Or is there a git repository I can check out and build myself?
[Miscellaneous Android Development] Sasurtio:
The best for the task

Can i use this tool for one guide in this forum?

Credits for you obviulsy

Thanks in advance

Good job :good:
[Miscellaneous Android Development] CodeElixir:
Thanks! Helps a lot

Learned a lot from you. Thanks for this amazing tool.
[Miscellaneous Android Development] t-ryder:
Got this TWRP image for Xiaomi Kenzo/Kate.

- I can decompile and recompile it and it works

- Scenario 1; I decompile, change a only two language XML files, recompile and flash, TWRP does not boot

- Scenario 2; I decompile, change PNG images in twres folder, recompile and flash, TWRP does not boot

Seems like if I change any resources it does not boot anymore. Anybody got a hint?
[Miscellaneous Android Development] sebastiantoro84:
Problems when repacking Samsung Tab A 7" (SM-T280)'s boot image

I am also experiencing problems when repacking my Samsung Tab A 7" (SM-T280)'s boot image. When flashing a repacked unmodified version of a perfectly fine boot.img, it gets stuck at the boot image (first image that appears after you turn on the device) and doesn't load the OS. It still lets me enter Recovery mode and Download mode, though.

I attached an image so you can see the differences of the repacked version using your kitchen and the original one. You can see that Magic Offset and the Ramdisk size is different.

[IMG="SM-T280 repacked boot.img vs original boot.img"]https://s28.postimg.org/x8gu4pih9/carliv_boot_img_differences.png[/IMG]

[MENTION=5186178]bluefirebird[/MENTION] do you know how to solve this? If someone else knows how to solve this I would be incredibly thankful.

Here is the boot image I used so you can try it for yourselves.
[Miscellaneous Android Development] vinaykharayat:
Any update for it?

Coz I am getting same problem

mine is gzip
[Miscellaneous Android Development] IcemanSR:
This tool is amazing, unpacked recovery and boot without issues on my ulefone u007 PRO mt6735 (6.0 android) , will start working on making twrp for it as none exist yet.

Thanks man!
[Miscellaneous Android Development] Er. Aditya:
Deleted
[Miscellaneous Android Development] :
All sources are on my github (still named carliv).
[Miscellaneous Android Development] AlexZap:
edit: i'm stupid... found the repo... thanks, carliv! you are awesome!
[Miscellaneous Android Development] kirito9:
Hello carliv, nice to see you here once more :). How are things? I saw your signature and was able to relate. Hope things are well and don't expect to see you active on XDA soon.
[Miscellaneous Android Development] :
This is just a short break. Things are not well yet. I don't know if I will return here again. Take care ... all of you!
[Miscellaneous Android Development] droiddeb:
Mi Max Prime (Android v6.0.1) Recovery ERROR!

I got this error message, can OP or any one else help?

1 [main] ufind 4736 child_info_fork::abort: D:\Desktop\CarlivImageKitchen_x32\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2F0000) != child(0x280000)

ufind: cannot fork: Resource temporarily unavailable

The scripts and executables can't get execution permission The kitchen won't run this way.
[Miscellaneous Android Development] :
This was already discussed on some posts in this thread. It matters where you get the kitchen from, how you unpacked it and what windows you use. Anyway your problem is at your end.
[Miscellaneous Android Development] SirDroidNoob:
Hello. I have a Samsung SM-G531M Galaxy Grand Prime. Android 5.1

-My system is windows 7.

-CarlivImageKitchen_x64

Your image: boot.img

Create the boot folder.

*Printing information for "boot.img"

*Unpack image utility by carliv @ xda

*Header:

**Magic: ANDROID!

**Magic offset: 0

**Page size: 50331648 (0x03000000)

**Base address: 0x10000000

**Kernel address: 0x10008000

**Kernel size: 6294484 (0x00600bd4)

**Kernel offset: 0x00008000

*>> kernel written to 'boot / boot.img-kernel' (6294484 bytes)

**Ramdisk address: 0x11000000

**Ramdisk size: 1532010 (0x0017606a)

**Ramdisk offset: 0x01000000

*>> ramdisk written to 'boot / boot.img-ramdisk.unknown' (1532010 bytes)

**Second address: 0x10f00000

**Tags address: 0x0001f800

**Tags offset: 0xf001f800

**Dt size: 268435712 (0x10000100)

*>> device_tree written to 'boot / boot.img-dt' (268435712 bytes)

Compression used: unknown

Unpacking the ramdisk ....

The system can not find the specified batch label: unknown

And the ramdisk folder appears empty.

file boot.img MD5-04edb9fa342872098269b548054fc5a8

Thanks in advance.
[Miscellaneous Android Development] :
My tool won't help you for non-standard samsung boot images. You need something custom like degas-unpackbootimg or other made specific for those images. If you search the xda you will find them.
[Miscellaneous Android Development] LiquidXed:
Smaller size

Im trying to port a custom recovery TWRP, to this head unit.

I managed to get root and make a nandroid backup, got the stock recovery. Not able to use USB Debugging with this device, not sure why. Using your tool in manual mode to make the port.

The file of the stock recovery.img is 16mb, but the size of the port folder is 4.60mb. When i pack the port its alot smaller then the 16mb stock img. Is that normal or em i missing something?

Atoto M4272

CPU: MTK Soc-based Quad-core 1.5Ghz. GPU: ARM Mali-450 MP4

ARMv7, MT8127

Full HD 7” 1024*600 Capacitive Touchscreen
[Miscellaneous Android Development] vampirefo:
That sounds normal, sounds like the stock recovery isn't compressed.

Unpack stock recovery, change nothing and repack, this will be your compressed stock recovery size.

TWRP recovery will be larger than the compressed stock recovery.
[Miscellaneous Android Development] sub77:
no, the recovery partition is about 16mb and the raw image dump of it got the same size, independend if the partition is full of data or completly empty.

the 5mb stock recovery data is ok and the 16mb rec. partition is quite enough to deal with.
[Miscellaneous Android Development] LiquidXed:
Thanks. Everything seems to be good. I got 1 question ive dun added all the extra stuff from the stock default.prop to the port. Do i need to so the same to the init.rc file?
[Miscellaneous Android Development] bovirus:
[MENTION=5186178]bluefirebird[/MENTION] (and for all users)

Pelase take care that if in the PC where are you using Android Image Kitchen you have other versions of cygwin library in path you can get error during decompilation of boot.img/recovery.img (I tested it personally).

I propose to make a change in batch that start Image Kitchen (carliv.bat)

------ Original

IF EXIST "%~dp0\bin" SET PATH=%PATH%;"%~dp0\bin"

---- Modified

IF EXIST "%~dp0\bin" SET PATH="%~dp0\bin";%PATH%

In this way the Image Kitchen tool search always file/exe before in bin sub-folder than in the path (in the original batch the tool search file/exe sub-folder bin as

last option

- first search in PATH)

In this way I fixed the problem.

Please take care that %~dp0 contains "" at the end of variable then %~dp0\bin has a path like "...\\bin" at the end of the variables.

To avoid this problem could be an idea

SET current-dir=%~dp0

SET current-dir=%current-dir:~0,-1%

IF EXIST "%current-dir%\bin" SET PATH="%current-dir%\bin";%PATH%"

First line set current-dir variable using %~dp0 value

The second line remove from current-dir variable the last character ("")

the third line set path variable putting first the bin sub-folder of image kitchen.

In the batch after that I replaced the variable %~dp0 with %current-dir%

Thanks.
[Miscellaneous Android Development] zahirabs:
Regarding TWRP

Hello guys,

I have a phone (MT6580) which only supports maximum 8,388,608 bytes recovery image, and I wanted to install TWRP on it, Is there any way I can install TWRP recovery on my small recovery partition (8,388,608 bytes maximum)?

Find the attached stock recovery image file.

It would be really great if you can convert my this recovery image to TWRP recovery, but file size shouldn't exceed to 8,388,608 bytes.

Please help me .. :(
[Miscellaneous Android Development] bovirus:
[MENTION=8200269]zahirabs[/MENTION]

Your request is OT (Off Topics) here.

Please read carefully first posts and the scope of this thread.

This thread is only about Carliv Image Kitchen.

Not about other arguments (like as for you request how to create/reduce a recovery).

Please see on https://xdaforums.com/showthread.php?t=2798257
[Miscellaneous Android Development] firemax13:
thanks a lot
[Miscellaneous Android Development] Alan90:
I have an aim I could need help with I want to port CM13 to my Alcatel Pixi 3 4009x
[Miscellaneous Android Development] dmilz:
x86 boot image fails to extract..error ~1

is it for MTK only?
[Miscellaneous Android Development] bovirus:
[MENTION=5186178]bluefirebird[/MENTION],

I refresh my request to update all batch files of CIK replacing the string

IF EXIST "%~dp0\bin" SET PATH=%PATH%;"~dp0\bin"

with

IF EXIST "%~dp0\bin" SET PATH="%~dp0\bin";%PATH%

I exprimented that if in your path you have same file name (of tools used by CIK) of different version you can get problem unapcking/repacking file.

With the change proposed the batch search always FIRST the file in "bin" subfolder of CIK (now search program tools first in PATH and then in bin folder of CIK).
[Miscellaneous Android Development] vampirefo:
It works on some x86 boot, what device do you have?
[Miscellaneous Android Development] dmilz:
Ok. Unfortunate for me then

Lenovo p90
[Miscellaneous Android Development] Axims:
Thank you for this correction. it was exactly problem I had launching this script.

I wonder why op hasn't made this change in first post.
[Miscellaneous Android Development] EnerJon:
Yes Sir, You Are Absolutely Right, 7Zip Doesn't Keeps The Original File Stamps And its A Bit Slow While RePacking But i Have To Use it To Save Few KBs Because Of My Device Small Size Recovery Partition, i Can increase My Device Recovery Partition But My Device/Clone Users Won't Like To Do it, Thats Why i Use 7ZIP in Michfood's Tool And i Never Faced Any Problems, i Guess Sir [MENTION=4478781]yuweng[/MENTION] is Also Using 7ZIP in His Easy Magic Tool For Repacking Because The Output File Size Of IMGs Made With His Tool Are Same As My Mooded Michfood's Tool...
[Miscellaneous Android Development] shoxxy:
!

GREAT !!!

Big Big Thx , for this .....

also credits to my master yuweng ;)

very usefull..........................:good:
[Miscellaneous Android Development] Fraggel:
Hi,

Im trying to use this tool to unpack repack both recovery an boot.img on a Jiayu S3 Mt6752,

i use the Linux and Windows version but on both the same problem

I only make a unpack_MTK recovery.img

and then a repack_MTK recovery

Without changing anything.....and the resultant recovery file that the tool creates dont boot

Any idea?

Thanks o much
[Miscellaneous Android Development] :
If you used version 0.1, yes there is a problem. Now I corrected that. Try version 0.2.
[Miscellaneous Android Development] iZLeeP:
Did encounter this when testing version 0.1. There was a slight difference of 4 bytes, more or less, from unpacking to repacking w/o any changes. But the resulting images (boot and recovery) did boot.

I assume, the DND linux version of yuweng will have to be updated as well given that this has been bumped up to v0.2.
[Miscellaneous Android Development] EnerJon:
Carliv Sir, its An Humble Request To Make a New Post in The End Of Your Main Thread Whenever You Release a New Version Of Your Tools, it Will Be Helpful For Those Who Are Subscribed To Your Post :)

Thanks For The v0.2 :)

Edit:

Great :D So Now This Tool Support Paths Having Spaces Or Maybe Weird Characters Also? :D And Better Compression :D
[Miscellaneous Android Development] :
Yes, it was my mistake, I used a wrong formula to calculate kernel offset in unpackbootimg, and the result got altered on repack. In old platforms that isn't an issue, but the new ones check offsets in uboot and if there is a mismatch it won't boot.

And yes, the DnD version for linux needs to be updated too. But only the scripts, the binaries are updated by me.

Yes, sorry about that, I wasn't aware there is much interest for my tool :o

You're right, I added max compressions for repacking (except xz and lzma which for now only supports 1), and that support for spaces in paths (special characters too, but not all - a quote and other things may break that.

About this path support, it's a very weird thing. I made that correction many times (once my friend yuweng pointing me to it when he was testing), but I don't know how the scripts always ended up without those quotes :confused: It's a mistery for me and very frustating, because I made those changes for sure.
[Miscellaneous Android Development] EnerJon:
i Like Your Work Because Of Cleanness & Error Proof Code :) Thanks For Your Efforts And Time You invest in This Work :)

Though i Never Run Tools From A Path Having Spaces Or Weird Characters To Avoid Such Problems, But i Will Check it For Testing Purpose :)
[Miscellaneous Android Development] Fraggel:
with version 0.2 everything works fine

Thanks ;)