[Android Software/Hacking General [Developers Only]] Innfinite4evr:
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)

chmod 0755 packsparseimg_v1.1

5)This command will pack sparse system_1.img....files to system.raw

./packsparseimg_v1.1

you can use these commands to pack sparse cache and userdata persist,vendor,cust,odm partitions

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

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 :P

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 ex:Desktop/Myfirmware)

2) Copy the downloaded packsparseimg_v1.1 and Imgextractor.exe in the same folder where you extracted your firmware

(ex:Desktop/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 3:eek:ne 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 :P

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"

packsparseimg

you can use these commands to pack sparse cache and userdata persist,vendor,cust,odm partitions

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

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 :P

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:cool:​