Very easy Unpack System_XX.img from Firmware (Qualcomm only) - Android Software/Hacking General [Developers Only]

For Windows
Extract the firmware
Download Packsparseimg.exe and Imgextractor.exe and put it in a folder with the firmware
Execution with cmd "packsparseimg (enter)"
If an error occurs such as the image number 2 do not panic
Rename rawprogram0.xml be rawprogram_unsparse.xml
Execution with cmd "packsparseimg (enter)"
The result is a file system.raw
Extrac system.raw with imgextractor.exe
As a result there is a folder "system" in the folder
Done
Files :
- Packsparseimg.exe
- Imgextractor.exe
Thanks :
- Allah SWT
- Innfinite4evr

Thanks for developing such useful tool

Can it unpack system.new.dat.br?

zround said:
For Windows
Extract the firmware
Download Packsparseimg.exe and Imgextractor.exe and put it in a folder with the firmware
Execution with cmd "packsparseimg (enter)"
If an error occurs such as the image number 2 do not panic
Rename rawprogram0.xml be rawprogram_unsparse.xml
Execution with cmd "packsparseimg (enter)"
The result is a file system.raw
Extrac system.raw with imgextractor.exe
As a result there is a folder "system" in the folder
Done
Files :
- Packsparseimg.exe
- Imgextractor.exe
Thanks :
- Allah SWT
- Innfinite4evr
Click to expand...
Click to collapse
I get an error!
target image is system
xml_path is ./rawprogram_unsparse.xml
output_path is ./
panic: runtime error: index out of range

@zround I wanted to say thank you, I have tested this out and it works great. This should be posted somewhere else where more people can find it and use it.

May you release the source code?

doesn't work

Related

32b dream->sapphire script (updated 20th august, new feature!)

So, as the title says a simple bash script to convert a dream rom to a sapphire rom.
To make this work you need unpack / repack boot img utilities from here:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
testsign.jar from here:
http://forum.xda-developers.com/showpost.php?p=4008431&postcount=15
mkbootimg from here:
http://forum.xda-developers.com/showpost.php?p=3387504&postcount=26
since I'm a nice guy I've included these in the attached zip file.
extract the attached zip file into a folder (warning: make sure there's no spaces in the folder name!!) then run:
Code:
./convert.sh your_dream_rom.zip
this will:
extract the boot.img from the zip
unpack the boot image
rename init.trout.rc to init.sapphire.rc
repack the boot image
put the boot image back into a copy of the dream rom zip
NEW!! in v3: add anything in the 'addin' folder into the zip (see below)
resign the new zip
you'll be left with your_dream_rom-sapphire.zip which should (hopefully) work on the sapphire.
v3: new addin folder. Anything in this folder will be added to the resulting zip, overwriting if needed. So if you want to replace (for example) /system/etc/AudioPara4.csv just put the file in /addin/system/etc and it will automagically be merged in.
Deicist said:
So, as the title says a simple bash script to convert a dream rom to a sapphire rom.
To make this work you need unpack / repack boot img utilities from here:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
testsign.jar from here:
http://forum.xda-developers.com/showpost.php?p=4008431&postcount=15
since I'm a nice guy I've included these in the attached zip file.
You'll also need to compile the mkbootimg executable that (I think!) comes with the android source.
extract the attached zip file inot a folder then run:
Code:
./convert.sh your_dream_rom.zip
this will:
extract the boot.img from the zip
unpack the boot image
rename init.trout.rc to init.sapphire.rc
repack the boot image
put the boot image back into a copy of the dream rom zip
resign the new zip
you'll be left with your_dream_rom-sapphire.zip which should (hopefully) work on the sapphire.
attached is a zip file containing everything you need except mkbootimg, since that needs to be compiled for your system.
Please note, I don't have a compiled copy of mkbootimg for my system, so I haven't been able to try the full process... but extracting and repacking the zip works, signing seems to work... and it's a pretty simple script so I can't see why it wouldn't work.
Enjoy!
Click to expand...
Click to collapse
Thanks! Do I need a boot.img and wlan.ko for pvt32A if I want it to work?
it won't work for 32a, but I'm sure you can mod the script to add in a new boot.img and radio thingy.
updated initial post with new attachment:
added mkbootimg to zip file
changed script slightly.
in case anyone was wondering, I tried this script on Drizzy's "superlight hero" rom from the dream forum and it worked perfectly.
[email protected]:~$ /home/ubuntu/Desktop/a/convert.sh Personal.zip
unzip: cannot find or open ./Personal.zip, ./Personal.zip.zip or ./Personal.zip.ZIP.
/home/ubuntu/Desktop/a/convert.sh: 3: ./unpack-bootimg.pl: not found
rm: Entfernen von „boot.img“ nicht möglich: No such file or directory
mv: Aufruf von stat für „./boot.img-ramdisk/init.trout.rc“ nicht möglich: No such file or directory
/home/ubuntu/Desktop/a/convert.sh: 6: ./repack-bootimg.pl: not found
cp: Aufruf von stat für „./Personal.zip“ nicht möglich: No such file or directory
zip warning: name not matched: boot.img
zip error: Nothing to do! (update.zip)
/home/ubuntu/Desktop/a/convert.sh: 9: java: not found
rm: Entfernen von „./boot.img-ramdisk“ nicht möglich: No such file or directory
rm: Entfernen von „boot.img-kernel.gz“ nicht möglich: No such file or directory
rm: Entfernen von „boot.img-ramdisk.cpio.gz“ nicht möglich: No such file or directory
rm: Entfernen von „update.zip“ nicht möglich: No such file or directory
Click to expand...
Click to collapse
What do i wrong ... ?
No idea, according to the error message it says it can't find 'Personal.zip'... is that file present in the same directory as 'convert.sh' ?
yes it is ...
can anyone convert this boot.img ... so that i can use on 32b?
you need to actually change directory to the directory containing the utility to run it.
try:
cd /home/ubuntu/Desktop/a/
./convert.sh Personal.zip
is ist possible that it doesn't work because i'm using the live cd now?
now it says
Archive: ./Personal.zip
inflating: ./boot.img
kernel written to ./boot.img-kernel.gz
ramdisk written to ./boot.img-ramdisk.cpio.gz
472 blocks
extracted ramdisk contents to directory ./boot.img-ramdisk/
472 blocks
sh: mkbootimg: not found
repacked boot image written at ./boot.img-ramdisk-repack.img
zip error: Nothing to do! (update.zip)
Click to expand...
Click to collapse
but mkbootimg is in this directory
This is what I end up getting. I ended up using a precompiled binary of mkbootimg for OSX since it didn't work on my Linux box.
./convert.sh NewVision_2.8.zip
Archive: ./NewVision_2.8.zip
inflating: ./boot.img
kernel written to ./boot.img-kernel.gz
ramdisk written to ./boot.img-ramdisk.cpio.gz
extracted ramdisk contents to directory ./boot.img-ramdisk/
usage: cpio -o [-aABcLvVzZ] [-C bytes] [-H format] [-O archive]
[-F archive] < name-list [> archive]
cpio -i [-bBcdfmnrsStuvVzZ6] [-C bytes] [-E file] [-H format]
[-I archive] [-F archive] [pattern...] [< archive]
cpio -p [-adlLmuvV] destination-directory < name-list
repacked boot image written at ./boot.img-ramdisk-repack.img
updating: boot.img (deflated 1%)
Exception in thread "main" java.lang.UnsupportedClassVersionError: testsign (Unsupported major.minor version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Hello,
MarcoNieddu said:
extracted ramdisk contents to directory ./boot.img-ramdisk/
472 blocks
sh: mkbootimg: not found
Click to expand...
Click to collapse
You have to modify the script repack-bootimg.pl at line 19 :
replace : system ("mkbootimg ...
by : system ("./mkbootimg ...
Note the ./ before mkbootimg
Scargoll.
Got everything working.
1. Add ./ to the repack script before mkbootimg
2. make sure you have a 32bit OS, as the binary provided was compiled for it. I made an Intrepid machine on my VM server.
3. Use the latest version of Java. Even Karmic Koala Ubuntu doesn't have it. The class file in the jar was compiled with a very recent version of Java, so you'll error out since the jre version isn't equal to or above whats needed. You can simply do "export JAVAHOME=pathtojava" if you don't want to keep that version permanently.
4. Have fun!
Bugfixes:
removes boot.img when script is done
added ./ before mkbootimg (sorry!)
the provided mkbootimg *should* work on a 64bit machine, it does on my 64 bit arch linux box...as with all things linux though, YMMV.
I ve tried to convert a dream rom but it didn't work, does this method can be applied from a windows command shell ?
EDIT: can I take a dream rom, flash it, and push a boot.img from a hero 32B rom ?
EDIT2: Ok now that I have read the name of the topic I understand it wont work in windows. So here's my new question...
Is there a way to adapt this script (or to create something similar) so it works with windows ?
updated with 'addin' feature
ElChouch said:
Is there a way to adapt this script (or to create something similar) so it works with windows ?
Click to expand...
Click to collapse
A windows version would be great!
Nice work Deicist. Thanks for sharing.
some facts:
- i'm running Windows 7 RC (64-bit)
- i installed Cygwin and executed it as administrator
- i browse out to the correct folder where the rom zip file is located
i get the following errors. any suggestions?:
$ ./convert.sh modaco_hero.zip
unzipping...
./convert.sh: line 3: unzip: command not found
unpacking boot image
./convert.sh: ./unpack-bootimg.pl: /usr/bin/perl: bad interpreter: Permission de
nied
moving trout to sapphire
mv: cannot stat `./boot.img-ramdisk/init.trout.rc': No such file or directory
repacking boot image
./convert.sh: ./repack-bootimg.pl: /usr/bin/perl: bad interpreter: Permission de
nied
re-zipping
./convert.sh: line 12: zip: command not found
rm: cannot remove `boot.img': No such file or directory
Addin files found....
./convert.sh: line 18: zip: command not found
Re-signing zip (this may take a while)
tidying up
rm: cannot remove `./boot.img-ramdisk': No such file or directory
rm: cannot remove `boot.img-kernel.gz': No such file or directory
rm: cannot remove `boot.img-ramdisk.cpio.gz': No such file or directory
all done
Make it work on Fedora
Was having problems with this script working at the java part on a FC10 box.
Was able to get it to work by installing java-1.6.0-openjdk:
Code:
$ yum install java-1.6.0-openjdk
just posting that here in case anyone who needs it stumbles by.
Thanks for your great script Deicist
I'm getting this error. What am I doing wrong?
Exception in thread "main" java.lang.NoClassDefFoundError: testsign
at java.lang.Class.initializeClass(libgcj.so.90)
Caused by: java.lang.ClassNotFoundException: sun.security.x509.AlgorithmId not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:testsign.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.90)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.Class.initializeClass(libgcj.so.90)

[Fix] Mobile Hotspot Hack Reposted for OTA 4.24.651.1

I didn't write this hack, but it appears to work with the new stock GB update.
I did edit the script and zip archive so it wouldn't need any external exe's or libs to apply. Just copy the newest framework.jar file to the script directory and run the HackHotspot.bat file. Then simply run these ADB commands from a dos window.
------
adb shell
mount /system
exit
adb push framework.jar /system/framework.jar
-------
clear Dalvik and fix permissions if desired
Reboot Phone
Done!
Much appreciated but way over my head (I've never done anything with ADB). Any chance of getting this, and the USB debugging notification fix, in a flashable form?
The debug fix is the one that doesn't display the statusbar icon when connected?
I'll see what I can do for ya
townsenk said:
Just copy the newest framework.jar file to the script directory and run the HackHotspot.bat file.
Click to expand...
Click to collapse
Awesome script. Thanks.
will this work for the revolutionary?
CAn i do this on a MAC?....
Can n e one verify that this works?
im getting errors in the script:
Code:
Extracting framework.jar
7-Zip 4.65 Copyright (c) 1999-2009 Igor Pavlov 2009-02-03
Processing archive: framework.jar
Extracting META-INF
Extracting META-INF\MANIFEST.MF
Extracting preloaded-classes
Everything is Ok
Folders: 1
Files: 2
Size: 65651
Compressed: 12413
Unpacking classes.dex
Can't find the file classes.dex
Putting HotspotHack into place
The system cannot find the path specified.
The system cannot find the path specified.
0 file(s) copied.
Repacking classes.dex
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Cannot find file or directory "out/"
at org.jf.smali.main.main(main.java:173)
Could Not Find C:\AddHotspotHack\classes.dex
The system cannot find the file specified.
Updating framework.jar
1 file(s) copied.
classes.dex : no such file or directory
Cleaning up...
Could Not Find C:\AddHotspotHack\classes.dex
The system cannot find the file specified.
Done if no errors listed above!
C:\AddHotspotHack>
and shouldnt it be
adb push framework.jar /system/framework/framework.jar

[SCRIPTS] Unpack / repack MT65xx/MT83xx boot.img, recovery.img or logo.bin

If you are looking for a way to easily unpack / repack boot.img, recovery.img or logo.bin from your MediaTek device (all except Android One devices), don't look any further. Here you can find my own Perl scripts.
Scripts were first based on the ones available on Android-DLS WiKi, but are now highly modified in order to work with specific MTK boot and recovery images. The scripts fully work with every image from all known MediaTek SoC:
MT6516
MT65x3 (MT6513 and MT6573)
MT65x5 (MT6515 and MT6575)
MT6577
MT65x2 (MT6572, MT6582 and MT6592)
MT6589
MT83xx (MT8377 and MT8389)
MT6595
The most up to date version of the scripts is always available at my public github repository: bgcngm/mtk-tools. Scripts require Perl v5.14+ to be installed and were fully tested under Ubuntu 12.04 as well as Windows 7 x64 (using Cygwin).
Please don't just leech the files and go away. You can easily say thanks just by pressing "Thanks" button.
Unpack script usage:
Code:
Usage: unpack-MTK.pl <infile> [COMMAND ...]
Unpacks MediaTek boot, recovery or logo images
Optional COMMANDs for boot or recovery images are:
-info_only
Display file information only
(useful to check image information without unpacking)
-kernel_only [--debug]
Extract kernel only
-ramdisk_only [--debug]
Extract ramdisk only
(optional argument '--debug' can additionally be used to provide useful
information for debugging purposes, even while unpacking both kernel
and ramdisk)
Optional COMMANDs for logo images are:
-force_logo_res <width> <height>
Forces file to be unpacked by specifying image resolution (in pixels)
(only useful when no zlib compressed images are found)
-invert_logo_res
Invert image resolution (width <-> height)
(may be useful when extracted images appear to be broken)
Repack script usage:
Code:
Usage: repack-MTK.pl <COMMAND ...> <outfile>
Repacks MediaTek boot, recovery or logo images
COMMANDs for boot or recovery images are:
-boot [--debug] <kernel> <ramdisk-directory>
Repacks boot image
-recovery [--debug] <kernel> <ramdisk-directory>
Repacks recovery image
(optional argument '--debug' can additionally be used to provide useful
information for debugging purposes, while repacking)
COMMANDs for logo images are:
-logo [--no_compression] <logo-directory>
Repacks logo image
(optional argument '--no_compression' can be used to repack logo images
without compression)
Version history:
modified to work with MT6516 boot and recovery images (17-03-2011)
included support for MT65x3 and eliminated the need of header files (16-10-2011)
added cygwin mkbootimg binary and propper fix (17-05-2012)
included support for MT65xx logo images (31-07-2012)
fixed problem unpacking logo images containing more than nine packed rgb565 raw files (29-11-2012)
re-written logo images file verification (29-12-2012)
image resolution is now calculated and shown when unpacking logo images (02-01-2013)
added colored screen output (04-01-2013)
included support for logo images containing uncompressed raw files (06-01-2013)
more verbose output when unpacking boot and recovery images (13-01-2013)
kernel or ramdisk extraction only is now supported (13-01-2013)
re-written check of needed binaries (13-01-2013)
ramdisk.cpio.gz deleted after successful extraction (15-01-2013)
added rgb565 <=> png images conversion (27-01-2013)
code cleanup and revised verbose output (16-10-2014)
boot or recovery is now extracted to the working directory (16-10-2014)
unpack result is stored on the working directory, despite of the input file path (17-10-2014)
added support for new platforms - MT6595 (thanks @carliv) (29-12-2014)
minor code cleanup and revised information output for boot and recovery images (29-12-2014)
make scripts more future-proof by supporting even more args (30-12-2014)
continue repacking even if there's no extra args file (01-01-2015)
more verbose output when repacking boot and recovery images (02-01-2015)
added new cmdline option for debugging purposes when unpacking / repacking boot and recovery images (06-01-2015)
Credits:
Android-DLS for the initial scripts
starix (from forum.china-iphone.ru) for the decryption of logo.bin files structure
carliv (from forum.xda-developers.com) for new platform support and new binaries
XDA:DevDB Information
MTK-Tools, Tool/Utility for the Android General
Contributors
bgcngm
Version Information
Status: Stable
Created 2014-10-15
Last Updated 2014-10-17
Editing .rgb565 raw files
There may be other ways for doing this, but here's a short info that will help you to edit .rgb656 raw files found inside MTK logo images.
Download and install Paint.NET
Download the attached plugin and copy the RGB565.dll file to the folder: "C:\Program Files\Paint.Net\FileTypes"
Open the .rgb565 file and enter image height and width
Information:
The plugin will allow read and write support to the RGB565 or RAW565 format. This format is used by the Android platform for the initial boot screen of the device. It will also allow you to open a BMP, PNG, JPG or other image and save it as a RGB565 file.
RGB565 is simply the raw pixel data of a bitmap file. It does not contain any header information and does not contain the dimensions of the image. The only thing that is known is the total number of pixels. When opening a .rgb565 file, the user must specify the height and width of the image, which is the resolution of your device's screen.
Just as an example, for a device with a 540 x 960 screen, the .rgb565 file for that device will have 518400 pixels. The size of the file in bytes will be twice the number of pixels, i.e. 1036800 bytes.
hello,
i tried ur script and works with MT6573 but i need some help.
How to repack?
The syntax u posted looks little jumbled and i need a example on unpack and repacking from u
Burned from my laser torch using pencil cells
Simple... let's say you unpack a boot.img:
Code:
unpack-MT65xx.pl boot.img
This extracts the kernel (it will be named boot.img-kernel.img) and the ramdisk folder (it will be named boot.img-ramdisk).
In order to repack, you should run:
Code:
repack-MT65xx.pl boot.img-kernel.img boot.img-ramdisk new-boot.img
If you are repacking a recovery.img, then it should be:
Code:
repack-MT65xx.pl -recovery recovery.img-kernel.img recovery.img-ramdisk new-recovery.img
I m getting "can't exec "mkbootimg" : No such file or directory at ./repack-Mt65xx.pl line 66" error
Now?
Edit: Solved the error
Burned from my laser torch using pencil cells
How did u solve?
Sent from my Android using Tapatalk 2
Probably it was just a matter of setting the proper permissions.
Hello, sorry for my bad english
help me please
i'm getting this error:
C:\Perl\MT65xx_scripts>unpack-MT65xx.pl recovery.img
Subroutine Cwd::fastcwd redefined at C:/Perl/lib/Cwd.pm line 819.
Subroutine Cwd::getcwd redefined at C:/Perl/lib/Cwd.pm line 819.
Subroutine Cwd::abs_path redefined at C:/Perl/lib/Cwd.pm line 819.
kernel written to boot/recovery.img-kernel.img
the boot image does not appear to contain a valid gzip file at C:\Perl\MT65xx_sc
ripts\unpack-MT65xx.pl line 48.
My telephone have a MT6573 processor
I have only used the scripts under Ubuntu, so never tested it on a Windows environment.
Are you sure that you have Perl correctly installed?
tried with ubuntu works.
Thanks!!!
Works in windows with cygwin too with some minor tweaking...
change the repack script line 66, mkbootimg to ./mkbootimg.exe & replace mkbootimg with this windows version... i think it should work with any mkbootimg.exe windows version too...
ignore the unpack scripts error though, it works fine actually in cygwin...
bgcngm said:
If you are looking for a way to easily unpack / repack boot.img (or recovery.img) from your MediaTek device, don't look any further. Here you can find my own Perl scripts.
These scripts are based on the ones available on Android-DLS WiKi, but highly modified in order to work with specific MTK boot and recovery images. Currently, these scripts fully work with any MT6516, MT6513 or MT6573 boot image. I believe it will still work for the new MT6575 images.
Unpack script usage:
Code:
unpack-MT65xx.pl <image>
Repack script usage:
Code:
repack-MT65xx.pl [-recovery] <kernel> <ramdisk-directory> <outfile>
Click to expand...
Click to collapse
when i type
unpack-MT65xx.pl boot.img
in terminal it says
unpack-MT65xx.pl cammand not found
im on ubuntu 11
Solution to the error!!
Edit: Solved the error - can't exec "mkbootimg"
If someone gets the error:
can't exec "mkbootimg" : No such file or directory at ./repack-Mt65xx.pl line 66
Follow this:
In Ubuntu:
copy the 'mkbootimg' file and paste it in your /bin folder.
A command like this in the terminal will do the work:
Code:
sudo cp /path/to/unpack-repack-scripts/mkbootimg /bin
(enter your password, when it asks)
In windows(using cygwin):
Edit:
Use the OP to download latest script.
bindassdost said:
when i type
unpack-MT65xx.pl boot.img
in terminal it says
unpack-MT65xx.pl cammand not found
im on ubuntu 11
Click to expand...
Click to collapse
type like this bro:
Code:
./unpack-MT65xx.pl boot.img
hope it helps !
marsavo said:
Hello, sorry for my bad english
help me please
i'm getting this error:
C:\Perl\MT65xx_scripts>unpack-MT65xx.pl recovery.img
Subroutine Cwd::fastcwd redefined at C:/Perl/lib/Cwd.pm line 819.
Subroutine Cwd::getcwd redefined at C:/Perl/lib/Cwd.pm line 819.
Subroutine Cwd::abs_path redefined at C:/Perl/lib/Cwd.pm line 819.
kernel written to boot/recovery.img-kernel.img
the boot image does not appear to contain a valid gzip file at C:\Perl\MT65xx_sc
ripts\unpack-MT65xx.pl line 48.
Click to expand...
Click to collapse
I am getting the same error. I am running this script on windows 7. My phone is based on MT6516.
ajparag said:
I am getting the same error. I am running this script on windows 7. My phone is based on MT6516.
Click to expand...
Click to collapse
Dude Check whether you have installed perl packages for cygwin properly
bgcngm said:
Simple... let's say you unpack a boot.img:
Code:
unpack-MT65xx.pl boot.img
This extracts the kernel (it will be named boot.img-kernel.img) and the ramdisk folder (it will be named boot.img-ramdisk).
In order to repack, you should run:
Code:
repack-MT65xx.pl boot.img-kernel.img boot.img-ramdisk new-boot.img
If you are repacking a recovery.img, then it should be:
Code:
repack-MT65xx.pl -recovery recovery.img-kernel.img recovery.img-ramdisk new-recovery.img
Click to expand...
Click to collapse
Thanks for sharing. Very useful.
varun.chitre15 said:
I m getting "can't exec "mkbootimg" : No such file or directory at ./repack-Mt65xx.pl line 66" error
Now?
Edit: Solved the error
Burned from my laser torch using pencil cells
Click to expand...
Click to collapse
give the binary execute permission, and move it to somewhere in the path:
sudo chmod a+x mkbootimg
sudo mv mkbootimg /bin
@OP
Real Gr8 job
For those people facing problems regarding the mkbootimg ,
Just that you need that binary compiled for your system
Here is for OS X (tested on 10.7.4) attached !
I just compiled form the Source
got from Internet ( lazy to boot that thing in Parallels )
for compiling !!
Source for Windows :
http://www.freeyourandroid.com/guide/extract-edit-repack-boot-img-windows
mkbootimg for OS X, Linux and Windows
Does any one need for Linux ?
ninadpchaudhari said:
Does any one need for Linux ?
Click to expand...
Click to collapse
The binary for Linux is already included in the 7zip file, along with the scripts.

[ROM][I9001][Factory][MOD] Samsung and Swype keyboard Polish in I9001XXKQI

.
.
This information applies only to the factory ROM.
.
.
The solution is as follows.
.
1. Sign in to your system as root (in Windows You create a user account called root with administrator privileges)
2. cache.img.ext4 extract from inside the GT-I9001_I9001XXKQ1_I9001XXKPI_I9001DBTKP1_HOME.tar.md5 package (in Windows use Linux Reader)
3. Preload.img.ext4 extract adsp.mbn amss.mbn system.img.ext4 boot.img recovery.img extract from inside the GT-I9001_I9001XXKQI_I9001XXKPM_I9001OXFKQ3.tar.md5 package (in Windows use Linux Reader)
4. Files should have UID = GID = root (on Windows, copy the extracted files to the cygwin home directory, and then in the cygwin copy them to another directory.)
5. create a tar file in the Linux or cygwin with a script
tar -c adsp.mbn amss.mbn boot.img cache.img.ext4 preload.img.ext4 system.img.ext4 recovery.img > I9001XXKQI_I9001XXKPM_I9001DBTKP1_HOME.tar
md5sum –t I9001XXKQI_I9001XXKPM_I9001DBTKP1_HOME.tar >> I9001XXKQI_I9001XXKPM_I9001DBTKP1_HOME.tar
mv I9001XXKQI_I9001XXKPM_I9001DBTKP1_HOME.tar I9001XXKQI_I9001XXKPM_I9001DBTKP1_HOME.tar.md5
Click to expand...
Click to collapse
6. Upload I9001XXKQI_I9001XXKPM_I9001DBTKP1_HOME.tar.md5 by ODIN
Useful links:
Freeware Linux Reader for Windows
Finding out how to build a i9001 odin rom
Installing and Updating Cygwin
.
.
The text was translated by translate.google.com
.

[GUIDE][Linux/Win] How to unpack system_1.img+system_2.img+...+system_*.img | 2019

A youtube video on this guide
Watch video
Hello guys,
I rarely write guide and tutorials .so neglect my typos and gramatical mistakes
Today im gonna show you how to unpack sparsed system.img files (system_1.img+system_2.img+............+system_*.img)
supports system / cache / userdata / persist / vendor / cust / odm /oem partitions from QFIL firmwares
Lets get started
LINUX
Things Needed:
1) Packsparseimg
2) Imgextractor.exe -Need wine for this
Procedure:
1) First of all extract you device firmware in which you have sparse system.img files in a folder.
(folder path ex:~/Desktop/firmware)
2) Copy the downloaded packsparseimg_v1.1 and Imgextractor.exe in the same folder where you extracted your firmware
(ex:~/Desktop/firmware)
3) Open terminal and enter below commands.
4)
Code:
chmod 0755 packsparseimg_v1.1
5)This command will pack sparse system_1.img....files to system.raw
Code:
./packsparseimg_v1.1
you can use these commands to pack sparse cache and userdata persist,vendor,cust,odm partitions
Code:
Usage of ./packsparseimg_v1.1:
-o string
output dir path (default "./")
-t string
image to unsparse: system / cache / userdata / persist / vendor / cust / odm / oem (default "system")
-x string
xml file to load (default "./rawprogram_unsparse.xml")
6) After joining of sparse system.img's finishes you will get system.raw file
7) Use below commands to unpack system.raw to system folder
Note: You need wine on your linux to run imgextractor.exe
Code:
wine imgextractor.exe system.raw
8) Hell Yeah! you have successfully unpack those system_1,2,3,4....imgs
now you can make your own stock deodexed rom
Downloads For linux:-
[MOD EDIT: URL REMOVED]
Password:innfinite4evr
Imgextractor.exe
WINDOWS
Things Needed:
1) packsparseimg_v1.1
2) Imgextractor.exe
Procedure:
1) First of all extract you device firmware in which you have sparse system.img files in a folder.
(folder path exesktop/Myfirmware)
2) Copy the downloaded packsparseimg_v1.1 and Imgextractor.exe in the same folder where you extracted your firmware
(exesktop/Myfirmware)
3) Open Command Prompt (cmd.exe) and enter below commands.
PS: you can open command propmt by any of these methods. Here method 1 is preferred
Method 1: Most suitable method for this guide
hold down shift key while pressing the right mouse onto the folder you want to open "command prompt" then a new menu item will appear in your context menu offering you exactly that: "open command prompt here" select it and command prompt will open.
Method 2:Search is very helpful. In Windows 7, open the Start Menu and type command or cmd. Then, click or tap the Command Prompt
Method 3ne of the quickest ways to launch the Command Prompt is to use the Run window (press Win+R on your keyboard and type cmd and press enter to open it).
i guess three methods are enough for windows users
4) AFter command prompt opens enter below comamnds to proceed further
5)This command will pack sparse system_1.img....files to system.raw
Note default is "system"
Code:
packsparseimg
you can use these commands to pack sparse cache and userdata persist,vendor,cust,odm partitions
Code:
Usage of packsparseimg:
-o string
output dir path (default "./")
-t string
image to unsparse: system / cache / userdata / persist / vendor / cust / odm (default "system")
-x string
xml file to load (default "./rawprogram_unsparse.xml")
6) After joining of sparse system.img's finishes you will get system.raw file
7) Use below commands to unpack system.raw to system folder
Code:
imgextractor.exe system.raw
8) Now you will get unpacked system folder
Hell Yeah! you have successfully unpack those system_1,2,3,4....imgs
now you can make your own stock deodexed rom
Downloads for windows:-
Imgextractor.exe
Password:innfinite4evr
[MOD EDIT: URL REMOVED]
Changelog:-
in update v1.1
now supports system / cache / userdata / persist / vendor / cust / odm /oem partitions from QFIL firmwares
Credits:
kidd for initially making packsparseimg binary
@and_pDA for imgextractor,exe(Based on sources ext4_unpacker)
@Innfinite4evr for testing this method and write this guide​
Great work bro :good: Nice job and thanks for this
great work man. thanks
can you share code?
There is another way to unpacj that instead of using wine.
Code:
mount -o loop -t ext4 system.img [path]
Replace:
[Path] with path to the output directory you want (ex: ~/sys-img)
ext4: This might be different, check it by yourself, but most device now using ext4
Thanks for the info, btw
Please can somebody tell me how to revert the process? To create again sparse images and flash via qfil? Thanks in advance!
cofface said:
can you share code?
Click to expand...
Click to collapse
only prebuilts
cofface said:
can you share code?
Click to expand...
Click to collapse
only prebuilts
I get this error on Ubuntu:
bash: ./packsparseimg: cannot execute binary file: Formato eseguibile non valido
What is the procedure to do the reverse?
How to repack as parts
sir i was trying to repack system folder to system_1.img system_2.img etc.
is there any way for that?
i need to repack and flash to my phone
Doesn't seem to work for Oreo a/b system
@Innfinite4evr Hi there, can you add vendor, cust and odm support ?
AL_IRAQI said:
@Innfinite4evrHi there, can you add vendor, cust and odm support ?
Click to expand...
Click to collapse
Yes there is.
Im thinking to update this stuff
AL_IRAQI said:
@Innfinite4evrHi there, can you add vendor, cust and odm support ?
Click to expand...
Click to collapse
Ive updated the tool, maybe you can try for odm partition.
Innfinite4evr said:
Ive updated the tool, maybe you can try for odm partition.
Click to expand...
Click to collapse
I've try to buy, with all my2 credit card (master card and american express)
I was addebited 1€ in my mastercard, but it always give me error and I can't download the program.
I do not want the refund, I'd like to have the tool!
Samuele Bonzio
I give you my phone number by PM if that need!
Thank you!
Thread closed. PM me when you have download links that don't require payment to be added to the OP.

Categories

Resources