[KITCHEN][WINDOWS] Multi Image Kitchen - Repack Android partitions - Android Software Development

Multi Image Kitchen - Repack Android partitions from Windows
Possibilities:
Unpacking and packing partitions: System, Vendor, Product, ODM, SOCKO, ELABLE (RAW, SPARSE)
Unpacking and packing partitions with extension: * .img; * .fex; * .Partition; * .new.dat; * .new.dat.br; * .lz4; * .exT4; * .tar; * .md5
Unpacking and packaging logo partition: logo.img, logo.partition
Unpacking and Packaging: _aml_dtb.partition (Single, Multi, Multi / Gzipped)
Extract from the PAYLOAD.BIN file sections file
Removing from the Super.img file partitions
Unpacking and packaging of resource partition: resource.img
Unpacking and packaging SOC Amlogic firmware, Rockchip and Allwinner
Unpacking and assembling Service Package: * .zip (Update.zip)
Decompiling and compile applications (* .apk)
Github: https://github.com/CryptoNickSoft/MIK

Reserved

Reserved 2

Download link not working for me

Scramble said:
Download link not working for me
Click to expand...
Click to collapse
Update

Mine's in Russian
Edit: Nevermind, I've managed to change the language

RichardHer said:
Mine's in Russian
Edit: Nevermind, I've managed to change the language
Click to expand...
Click to collapse
So do something wrong.

omg, thanks you,this tool is useful!

@CryptoNick
Amazing, I was finally able to extract the system.fex. Originally I have a super.fex, which contained 3 other files: product.fex, system.fex and vendor.fex
Out of the 3 fex-files only 2 were automatically extracted after the initial split: system.fex and vendor.fex. The 3rd file product.fex could be manually extracted with your tool.
System.fex etc. can be created after modification, but how do I re-pack the 3 sub-files into the single super.fex again?

Packaging in super.fex has not yet been implemented. If there is a desire, help the project is financially and I will have more motivation to develop it.

Scramble said:
Download link not working for me
Click to expand...
Click to collapse
yes , not working

Zhao li said:
yes , not working
Click to expand...
Click to collapse
Everything is excellent friend

下载链接对我缠绕

just a readme
GitHub - CryptoNickSoft/MIK: Repack Android partitions from Windows
Repack Android partitions from Windows. Contribute to CryptoNickSoft/MIK development by creating an account on GitHub.
github.com

GitHub - CryptoNickSoft/MIK: Repack Android partitions from Windows
Repack Android partitions from Windows. Contribute to CryptoNickSoft/MIK development by creating an account on GitHub.
github.com

thanks
CryptoNick said:
GitHub - CryptoNickSoft/MIK: Repack Android partitions from Windows
Repack Android partitions from Windows. Contribute to CryptoNickSoft/MIK development by creating an account on GitHub.
github.com
Click to expand...
Click to collapse

CryptoNick said:
GitHub - CryptoNickSoft/MIK: Repack Android partitions from Windows
Repack Android partitions from Windows. Contribute to CryptoNickSoft/MIK development by creating an account on GitHub.
github.com
Click to expand...
Click to collapse
Thanks

Halo sir,can this tool solve Samsung devices that fail to flash with odin in the system.img section, after editing system.img with the other tool ?

Droid Maps said:
Halo sir,can this tool solve Samsung devices that fail to flash with odin in the system.img section, after editing system.img with the other tool ?
Click to expand...
Click to collapse
Hey! Try. I did not test, since this functionality is not interesting to me.

After hours and hours of googling I finally found something that can unlock logo.img files on Windows. However, it doesn't seem to work for me. I got the following error:
[7920] Failed to execute script 'imgextractor' due to unhandled exception!
Traceback (most recent call last):
File "imgextractor.py", line 374, in <module>
File "imgextractor.py", line 368, in main
File "imgextractor.py", line 261, in __ext4extractor
File "ext4.py", line 484, in __init__
ext4.MagicError: Invalid magic value in superblock: 0x0000 (expected 0xEF53)
I would really appreciate help as I'm really desperate by now.

Related

[DEV] Kernel Compiling

Hi all! I'm not a dev but i really want to do something for this phone so i'm trying to build a custom kernel.... if anyone have tried the same report here the issue, i will do the same!
I have the pre-requisites for compiling a kernel set up. However I am more interested in getting ClockworkMod Recovery working on our phone as that will encourage developers and we can then start looking at getting CyanogenMod 7. I made a topic here asking for help but I haven't received any replies yet.
I have just compiled a kernel but it doesn't work.... this because - i think - i used the initramfs provided by leshak for the i9000.... now i'm trying to extract from phone......
Kernel
Hi Skin1980, I also compiled a (stock) Kernel two weeks ago - problem is, Samsung does not use the "normal" way of storing it in a boot.img file. That is why I wasn't able to push it to the phone or at least fastboot it. I would be glad to hear from you how exactly this is possible, if you find out.
XDA_Bam said:
Hi Skin1980, I also compiled a (stock) Kernel two weeks ago - problem is, Samsung does not use the "normal" way of storing it in a boot.img file. That is why I wasn't able to push it to the phone or at least fastboot it. I would be glad to hear from you how exactly this is possible, if you find out.
Click to expand...
Click to collapse
I used the redbend_ua you can find here to write zImage to bml7.... how do you do with initramfs that is missed when you build the kernel?
Skin1980 said:
I used the redbend_ua you can find here to write zImage to bml7.... how do you do with initramfs that is missed when you build the kernel?
Click to expand...
Click to collapse
Have you managed to extract initramfs with redbend_ua?
If you don't mind, please take a look at this post. There is a step build/tools/device/mkvendor.sh device_manufacturer_name device_name /your/path/to/the/boot.img. Because Samsung doesn't use this boot.img building a recovery looks tricky. Any suggestions would help.
rb210 said:
Have you managed to extract initramfs with redbend_ua?
If you don't mind, please take a look at this post. There is a step build/tools/device/mkvendor.sh device_manufacturer_name device_name /your/path/to/the/boot.img. Because Samsung doesn't use this boot.img building a recovery looks tricky. Any suggestions would help.
Click to expand...
Click to collapse
I dumped the bml7 partition, i see that inside there's a zimage... but i'm not able to extract this f u c .......initramfs!!!!!
rb210 said:
Have you managed to extract initramfs with redbend_ua?
If you don't mind, please take a look at this post. There is a step build/tools/device/mkvendor.sh device_manufacturer_name device_name /your/path/to/the/boot.img. Because Samsung doesn't use this boot.img building a recovery looks tricky. Any suggestions would help.
Click to expand...
Click to collapse
and if we can find the initramfs i think that is not difficult to modify the recovery to allow unsigned zip files installation
Perhaps, we could use parts of the following method:
h**p://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
To extract the ramdisk from the boot.img, they do the following:
Then, look for a bunch of zeroes followed by the hex 1F 8B (which is the magic number of a gzip file). Copy everything from the first line of the file, through the zeroes, and stopping at the 1F 8B. That is the kernel. Everything from the 1F 8B through the end is the ramdisk. You could save each of these files separately. In order to see the contents of the ramdisk, you need to un-gzip it and then un-cpio it.
Click to expand...
Click to collapse
I know that we don't have a boot.img, but we do have an image including kernel and ramdisk - this should be very similar. And if you can locate the named headers in the file, the extraction should work. Further info and some useful commands can be found behind the link.
Sadly, I won't have time to try this before next weekend...
XDA_Bam said:
Perhaps, we could use parts of the following method:
h**p://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
To extract the ramdisk from the boot.img, they do the following:
I know that we don't have a boot.img, but we do have an image including kernel and ramdisk - this should be very similar. And if you can locate the named headers in the file, the extraction should work. Further info and some useful commands can be found behind the link.
Sadly, I won't have time to try this before next weekend...
Click to expand...
Click to collapse
Which file are you referring to? I have some time, I can give it a shot.
EDIT: I found "initramfs.c" and its object file "initramfs.o" under GT-I9003_Kernel/kernel/Kernel/init from the Samsung opensource tarball. Don't think that helps us though.
@rb210: I mean the dumped bml7 partition. It's an image of a partition with a kernel and ramdisk in it, or did I misunderstand something?
PS: You could try "SGS kernel flasher" from the market. It's got a backup option - look if it does produce the same image of the bml7 partition (I tried it, it did a backup image of around 8MB on my SGSL, which is about the size of bml7, as far as I remember). It would be faster and easier to carry out than using a script.
XDA_Bam said:
@rb210: I mean the dumped bml7 partition. It's an image of a partition with a kernel and ramdisk in it, or did I misunderstand something?
PS: You could try "SGS kernel flasher" from the market. It's got a backup option - look if it does produce the same image of the bml7 partition (I tried it, it did a backup image of around 8MB on my SGSL, which is about the size of bml7, as far as I remember). It would be faster and easier to carry out than using a script.
Click to expand...
Click to collapse
But ramdisk=initramfs?
XDA_Bam said:
@rb210: I mean the dumped bml7 partition. It's an image of a partition with a kernel and ramdisk in it, or did I misunderstand something?
PS: You could try "SGS kernel flasher" from the market. It's got a backup option - look if it does produce the same image of the bml7 partition (I tried it, it did a backup image of around 8MB on my SGSL, which is about the size of bml7, as far as I remember). It would be faster and easier to carry out than using a script.
Click to expand...
Click to collapse
Ah I see what you mean. I was trying to figure out how to extract the initramfs from the opensource package from the Samsung website. I figure if they're providing the kernel and platform, there's got to be an initramfs somewhere. You'll are talking about trying to extract it from inside the phone itself.
I'm still not sure how this is going to fit in with porting Clockworkmod as per that method in the blog post because it's still an initramfs and not a boot.img. Getting custom recovery is vital to attracting development for this phone, we should not make the mistake of overlooking this.
Tools for extract initramfs from a zImage : https://github.com/project-voodoo/kernel_repack_utils

[CLOSED]Deleted.

Deleted by woltrex
Deleted by Woltrex.
Deleted by Woltrex
What would I need to change in our windows installer to help create the data.img the way you are? https://github.com/BlissRoms-x86/An.../Android_UEFIInstaller/BasicInstaller.cs#L210
proof I am no windows developer, I fudge my way through it
Hi Woltrex,
Could you please adapt your toolbox to work with Android-x86 8.1-rc1? If I try to edit data or system images with your current toolbox the system doesn't boot.
the tools link is nothing but advertisements. Can't make this work
ariadnejro said:
Hi Woltrex,
Could you please adapt your toolbox to work with Android-x86 8.1-rc1? If I try to edit data or system images with your current toolbox the system doesn't boot.
Click to expand...
Click to collapse
I will make the necessary arrangements in next version. :good:
DigitalMD said:
the tools link is nothing but advertisements. Can't make this work
Click to expand...
Click to collapse
I do not fully understand. What you mean?
electrikjesus said:
What would I need to change in our windows installer to help create the data.img the way you are? https://github.com/BlissRoms-x86/An.../Android_UEFIInstaller/BasicInstaller.cs#L210
proof I am no windows developer, I fudge my way through it
Click to expand...
Click to collapse
I need to check it. Is there a problem creating Data.img?
WoltreX said:
I need to check it. Is there a problem creating Data.img?
Click to expand...
Click to collapse
I think he means that when the Windows UEFI installer(that is linked in the Blissx86 OP) is extracting the contents of the iso onto the HDD partition that is selected.
He wants the installer to create the data.img in a similar manner as your tool does
WoltreX said:
I need to check it. Is there a problem creating Data.img?
Click to expand...
Click to collapse
arifqur said:
I think he means that when the Windows UEFI installer(that is linked in the Blissx86 OP) is extracting the contents of the iso onto the HDD partition that is selected.
He wants the installer to create the data.img in a similar manner as your tool does
Click to expand...
Click to collapse
^^ Yuppers ^^
Works great.. thank you woltrex
Bliss OS/Android PC Toolbox updated.
Changelogs v1.1
-Added Android-x86 Oreo support. You can unpack/repack android x86 images.
-Added fsconfig options. Android x86 images requires it. (I will add guide in first page about it)
-Increased stability and fixed some bugs.
I know what I say would be foolish but...
Remix OS Toolbox? (Lollipop&Marshmallow)
im having problem extracting bliss os system.sfs
Parallel unsquashfs: Using 4 processors
7362 inodes (20785 blocks) to write
write_xattr: could not write xattr security.selinux for file C:\Users\farivar\Downloads\APT\unpack\system/app/AmberTheme/AmberTheme.apk because you're not superuser!
write_xattr: to avoid this error message, either specify -user-xattrs, -no-xattrs, or run as superuser!
Further error messages of this type are suppressed!
[=================================-] 20785/20785 100%
created 6654 files
created 956 directories
created 708 symlinks
created 0 devices
created 0 fifos
Click to expand...
Click to collapse
farivar said:
im having problem extracting bliss os system.sfs
Click to expand...
Click to collapse
What is the problem? I am seeing system.sfs extracted %100.
Hi,
I'm having trouble getting a BlissOS system.img to work. I already have a working installation of BlissOS, but am trying to add Surface drivers. So I extracted the system folder and then packed system.img, but on booting the modified system, it's freezing just when it says it is starting android (before the boot animation appears).
Specific steps I used:
-unpack system.sfs
-added my drivers, modified fs_config.txt to include permissions for my drivers e.g., system/lib/firmware/config.bin 0 0 644
-repack system.img
-remove system.sfs and replace with system.img
I even tried to just unpack and repack system.img without the drivers and that didn't work for me either. Any suggestions for what I may be doing incorrectly?
DoughMucker said:
Hi,
I'm having trouble getting a BlissOS system.img to work. I already have a working installation of BlissOS, but am trying to add Surface drivers. So I extracted the system folder and then packed system.img, but on booting the modified system, it's freezing just when it says it is starting android (before the boot animation appears).
Specific steps I used:
-unpack system.sfs
-added my drivers, modified fs_config.txt to include permissions for my drivers e.g., system/lib/firmware/config.bin 0 0 644
-repack system.img
-remove system.sfs and replace with system.img
I even tried to just unpack and repack system.img without the drivers and that didn't work for me either. Any suggestions for what I may be doing incorrectly?
Click to expand...
Click to collapse
If you edit fs_config, you must repack with Android-x86 option. That drivers can be uncompatible with your system. So system can not boot. I did not encounter any problems with the edits I made. You should be careful when editing the .img files.
Deleted by woltrex
WoltreX said:
Deleted by Woltrex.
Click to expand...
Click to collapse
? what happened ?

[TOOL] Convert sin to flashable.zip

Disclaimer:
Our tool was made for testing and educational purposes, ME is not responsible for what you do on/with your device using our tool, you must agree that you using our tool on your own risk, I am not responsible if you brick your device or anything else!
What is this for:
This tool converts xperia sin file and directly create flashable.zip for use to flash your android device with recovery.
Changelog:
- version 1. (missing selinux label generator)
- version 2. (implemented selinux label generator tool. Missing static busybox)
- version 3.
- version 4. some small corections, added missing update-binary
- version 5. some improvements, new sin unpack tool
How to use:
Extract sin2zip.rar archive & simple run CONVERT.bat & chose system.sin image , tool will produce flashable.zip
What you need to check or probably modify in generated flashable.zip:
1. busybox I have used is 32bit, it will work on 64bit too (not busybox.exe !!), I not recommend to change busybox, but before you go for busybox replace make sure it is STATIC busybox and have working (chcon and chown) with -h parameter!
2. check updater-script e.g. first 3 lines and last 2 lines!
3. this -> https://forum.xda-developers.com/showpost.php?p=80593639&postcount=7
Source code:
modified ext4_read tool is in attachment. Original ext4_read is here, many thanks to author! I have notified Igor, hope we see selabels listing integration in 7z without need for hackish ext4_read
sony dump tool -> https://github.com/munjeni/anyxperia_dumper
munjeni said:
This tool converts xperia sin file and directly create flashable.zip for using with recovery. 75 percent is done. 25 percent of the things is missing, selinux related things. I need help for implement selinux to the 7z to list selinux labels from ext4! Here is work in proogress
Click to expand...
Click to collapse
Maybe @SuperR. of SuperR's Kitchen fame HERE could give you some pointers on this. :fingers-crossed:
Maybe you could work together to integrate some of your great Sony specific tools into the Kitchen
That kitchen do not have anything related to our tool. I have done some progress in extracting selabels from ext4 by searcing with inode number \0/
Right now tool is able to extract selabels by inode number pointing
So you are on the drawing board again! Cool... :highfive:
About what you wrote in the j4nn's thread (1. to make fota unpack tool), count on me if you need help, ok!
If I'm not mistaken, I sent you a ota update_package file from my x performance some time ago, but if I am, here it goes again.
Cheers.
serajr said:
So you are on the drawing board again! Cool... :highfive:
About what you wrote in the j4nn's thread (1. to make fota unpack tool), count on me if you need help, ok!
If I'm not mistaken, I sent you a ota update_package file from my x performance some time ago, but if I am, here it goes again.
Cheers.
Click to expand...
Click to collapse
Thanks! I will look into ota package till after I finish our tool
Almost done! New version v2 is out! Made small tool to read ext4 image and print selabels to updater-script, it look like this:
if regular file or folder:
Code:
run_program("/tmp/busybox", "chcon", "u:object_r:location_exec:s0", "/system/bin/xtwifi-inet-agent");
if symlink:
Code:
run_program("/tmp/busybox", "chcon", "-h", "u:object_r:vendor_file:s0", "/system/bin/xxd");
Tool is curently 95 percent done, not realy ready for flashig produced flashable.zip , need to implement 5 percent of the things. You can try but plese do not try to flash with recovery it will not work corectly!
Version 3 done! Before you flash flashable.zip please check updater-script first 3 lines and last 2 lines! Do in mind our tool didn't include the rest of firmware like kernel, vendor...etc, tool only convert one sin file to flashable.zip, if you need the rest of firmware run CONVERT.bat and chose another sin file, do merges in zip by hand and do merges-modification in updater-script by hand too. Not recommended for newbies! I can't tell you if produced flashable.zip is working I'm not tried to flash flashable.zip, but I think it going work. Important thing is initial tool is done and somebody need to test. Let me know Enjoy!
Version 4 done. Enjoy!
@serajr here is some info https://forum.xda-developers.com/showpost.php?p=80599561&postcount=1330 , your file is the same format as j4nn
Version 5 done.

[Q] How to unpack system.img and modify it for Pixel4?

Hi all,
Is there a tool that can unpack system.img for the Pixel 4 (that actually works..) ?
What I want is to create a system.img that will have the following change:
Replace the below apex zip file:
`/system/apex/com.android.runtime.release.apex`
to an extracted version of it:
`/system/apex/com.android.runtime.release`
I've tried most of the online tools and tutorials with no luck.
So I unzip the ` flame-qd1a.190821.007` factory image, and then unzip the `image-flame-qd1a.190821.007` within in.
This gives me many .img files, including system.img, system_other.img, and super_empty.img.
I guess in some phones super.img had included the system.img, but that's not the case with `flame`.
imjtool can extract the `system.img` using:
Code:
imjtool system.img extract
With the below warning:
Warning: system.img is likely truncated or still compressed
Sparse image v1.0 detected, 196053 blocks of 4096 bytes
196053 blocks of 4096 bytes compressed into 15 chunks (1% compressed)
Click to expand...
Click to collapse
Then `extract/image.img` cannot be further recognized by the tool:
Code:
imjtool extracted/image.img
extracted/image.img is not a recognized image. Sorry
Click to expand...
Click to collapse
I've also tried simg2img to convert a sparse android img to a normal one,
but then mounting failed, in both Linux and mac.
Paschalis said:
Hi all,
Is there a tool that can unpack system.img for the Pixel 4 (that actually works..) ?
What I want is to create a system.img that will have the following change:
Replace the below apex zip file:
`/system/apex/com.android.runtime.release.apex`
to an extracted version of it:
`/system/apex/com.android.runtime.release`
I've tried most of the online tools and tutorials with no luck.
So I unzip the ` flame-qd1a.190821.007` factory image, and then unzip the `image-flame-qd1a.190821.007` within in.
This gives me many .img files, including system.img, system_other.img, and super_empty.img.
I guess in some phones super.img had included the system.img, but that's not the case with `flame`.
imjtool can extract the `system.img` using:
Code:
imjtool system.img extract
With the below warning:
Then `extract/image.img` cannot be further recognized by the tool:
Code:
imjtool extracted/image.img
I've also tried simg2img to convert a sparse android img to a normal one,
but then mounting failed, in both Linux and mac.
Click to expand...
Click to collapse
I use SuperR Kitchen
It unpacks everything. You must then use Apktool or third party software (ticklemyandroid) to decompile and recompile apks for editing. I don't have a way to edit a .apex file.
Here is the file in question. Just rename it by taking off the .zip. only way I could upload it.
https://www.androidfilehost.com/?fid=8889791610682898672
The full Android SDK. But it's definitely not a beginner friendly process. If you have to ask how to do it then you probably shouldn't try it until you learn more. ?

Add Apk to X96Q's priv-app dir

Hi,
I have some experience modifying rookchip Firmware. Unpacking, modifying repacking and flashing. Was a long way but finally I got it to work.
Now I have a X96Q device and downloaded it's stock firmware. I can open the archive with 7zip.
If I try to extract the super.img from the firmware.img with 7zip or other tools I get error "unexpected end of archive" at 78% progress.
Some ideas how to unpack the super.img to modify the system-dir?
Thanks!
PS: if it would help I can provide this Firmware-file.
super.img?
or system.img?
if system.img try this tool Multi Image Kitchen
I got it finally to work using imgRePacker and simg2img.
Fage91 said:
I got it finally to work using imgRePacker and simg2img.
Click to expand...
Click to collapse
can you share simg2img to me?
i try unpack and repack system.img on multi image kitchen but something bug like wifi can't on after flash the repack system.img
ijrx001 said:
can you share simg2img to me?
i try unpack and repack system.img on multi image kitchen but something bug like wifi can't on after flash the repack system.img
Click to expand...
Click to collapse
Try this:
GitHub - anestisb/android-simg2img: Tool to convert Android sparse images to raw images
Tool to convert Android sparse images to raw images - GitHub - anestisb/android-simg2img: Tool to convert Android sparse images to raw images
github.com
The steps I got it to work:
First step: unpack with imgRePacker
Second step: unpack super with simg2img
Third step: loop mount it with offset in debian
Forth step: make modifications and !! Umount!!
Fifth step: Pack super with img2simg
Sixth step: Pack it all togeher with imgRePacker
I cant Flash it using phoenix usbpro oder phoenix suit. Do you have some Tips for me? After connectng my Box in downloadmode it seems to Start flashing but nothing happens.

Categories

Resources