First of all: Tools to be used in this guide were developed by user And_pda from Russian 4pda.ru forum. So all credits must go for And_pda.
The original thread (in Russian) is here. Actually the original thread is about several tools to works with different images for different phones. But we will talk only about Moto X 2014.
The guide will describe how to extract all files from system partition from stock firmware. The tools works under Windows (I personally tested them on Win 7).
As an example we will use FXZ for Brazilian firmware RETBR_XT1097_4.4.4_KXE21.187-30.3_cid12_CFC.xml.zip - the only full firmware available at the moment.
If you unzip stock firmware you will get 5 files, which represents system partition: system.img_sparsechunk.0, system.img_sparsechunk.1, system.img_sparsechunk.2, system.img_sparsechunk.3 and system.img_sparsechunk.4.
There are two steps to be performed to get system file extracted.
Step 1 - it will convert 5 files (system.img_sparsechunk.0, 1, 2, 3, 4) into temporary file system_motoX2.img:
1. Download Sparse-to-Img.zip and extract it.
Lets assume that it is extracted to C:\Sparse-to-Img. If not you have to modify ConvertMotoX2.bat file.
You have to edit the string set wf=C:\Sparse-to-Img\Cygwin\ according to path where you extracted archive.
2. Copy ConvertMotoX2.bat to the folder where stock firmware is unzipped (i.e. where system.img_sparsechunk.0, 1, 2, 3, 4 are located)
3. Run CMD and "cd" to the folder where where stock firmware is unzipped
4. In CMD run ConvertMotoX2.bat. File system_motoX2.img will be created.
Step 2 - it will extract all files and folders from system_motoX2.img:
1. Download ImgExtractor.zip and extract it.
2. Create directory System in the folder where system_motoX2.img is located;
3. Copy ImgExtractor.exe into the folder where system_motoX2.img is located;
4. Run CMD and "cd" to the folder where system_motoX2.img is located
5. In CMD run the following: ImgExtractor system_motoX2.img System
After ImgExtractor finished you will have all system files and folders in System directory.
That's all
PS. ImgExtractor also can extract files from modem firmware (i.e. form NON-HLOS.bin)
So, this can be done to manualy re-lock bootloader, right? I quoted the steps needed to get .img that would be use to flash using fastboot and before fastboot lock, right? If I'm wrong let me know and I'll delete this post, so it doens't confuses anyone.
Al936 said:
Brazilian firmware RETBR_XT1097_4.4.4_KXE21.187-30.3_cid12_CFC.xml.zip
If you unzip stock firmware you will get 5 files, which represents system partition: system.img_sparsechunk.0, system.img_sparsechunk.1, system.img_sparsechunk.2, system.img_sparsechunk.3 and system.img_sparsechunk.4.
Step 1 - it will convert 5 files (system.img_sparsechunk.0, 1, 2, 3, 4) into temporary file system_motoX2.img:
1. Download Sparse-to-Img.zip and extract it.
Lets assume that it is extracted to C:\Sparse-to-Img. If not you have to modify ConvertMotoX2.bat file.
You have to edit the string set wf=C:\Sparse-to-Img\Cygwin\ according to path where you extracted archive.
2. Copy ConvertMotoX2.bat to the folder where stock firmware is unzipped (i.e. where system.img_sparsechunk.0, 1, 2, 3, 4 are located)
3. Run CMD and "cd" to the folder where where stock firmware is unzipped
4. In CMD run ConvertMotoX2.bat. File system_motoX2.img will be created.
Click to expand...
Click to collapse
Thanks,
Nochnoy said:
So, this can be done to manualy re-lock bootloader, right? I quoted the steps needed to get .img that would be use to flash using fastboot and before fastboot lock, right? If I'm wrong let me know and I'll delete this post, so it doens't confuses anyone.
Thanks,
Click to expand...
Click to collapse
I am sure that flashing temporary file system_motoX2.img will not allow you to manually re-lock bootloader. And I do not recommend to flash it.
wow, Great!
Al936 said:
First of all: Tools to be used in this guide were developed by user And_pda from Russian 4pda.ru forum. So all credits must go for And_pda.
The original thread (in Russian) is here. Actually the original thread is about several tools to works with different images for different phones. But we will talk only about Moto X 2014.
The guide will describe how to extract all files from system partition from stock firmware. The tools works under Windows (I personally tested them on Win 7).
As an example we will use FXZ for Brazilian firmware RETBR_XT1097_4.4.4_KXE21.187-30.3_cid12_CFC.xml.zip - the only full firmware available at the moment.
If you unzip stock firmware you will get 5 files, which represents system partition: system.img_sparsechunk.0, system.img_sparsechunk.1, system.img_sparsechunk.2, system.img_sparsechunk.3 and system.img_sparsechunk.4.
There are two steps to be performed to get system file extracted.
Step 1 - it will convert 5 files (system.img_sparsechunk.0, 1, 2, 3, 4) into temporary file system_motoX2.img:
1. Download Sparse-to-Img.zip and extract it.
Lets assume that it is extracted to C:\Sparse-to-Img. If not you have to modify ConvertMotoX2.bat file.
You have to edit the string set wf=C:\Sparse-to-Img\Cygwin\ according to path where you extracted archive.
2. Copy ConvertMotoX2.bat to the folder where stock firmware is unzipped (i.e. where system.img_sparsechunk.0, 1, 2, 3, 4 are located)
3. Run CMD and "cd" to the folder where where stock firmware is unzipped
4. In CMD run ConvertMotoX2.bat. File system_motoX2.img will be created.
Step 2 - it will extract all files and folders from system_motoX2.img:
1. Download ImgExtractor.zip and extract it.
2. Create directory System in the folder where system_motoX2.img is located;
3. Copy ImgExtractor.exe into the folder where system_motoX2.img is located;
4. Run CMD and "cd" to the folder where system_motoX2.img is located
5. In CMD run the following: ImgExtractor system_motoX2.img System
After ImgExtractor finished you will have all system files and folders in System directory.
That's all
PS. ImgExtractor also can extract files from modem firmware (i.e. form NON-HLOS.bin)
Click to expand...
Click to collapse
functionally perfect in extraction system, of moto maxx (XT1225) thanks :good:
Related
I have seen this asked a few times recently so I figured I would try to put together a quick and easy guide to extracting files from Nandroid backups. This guide only covers Windows, I assume if you are running Linux you can download unyaffs and compile/run it without my assistance. If you are adventurous you can install cygwin and compile unyaffs on your own (or download it at any number of sites across the internet), however I have included all the files needed to extract the files from the img files.
1. Download unyaffs along with the cygwin1.dll
2. Extract the files to a new folder.
3. Copy the system.img file from the ROM or your Nandroid backup to the folder you extracted unyaffs.exe and cygwin1.dll to.
4. Open a command prompt and cd to the folder containing the three files. If you are on Windows 7 you can just navigate there with Windows Explorer and in the URL bar type cmd to open a comman prompt in that location.
5. Type unyaffs system.img
You have now extracted all the files from the system partition of your Nandroid backup. The APKs are in the /app folder and some apps require library files that can be found in the /lib folder. For example: Swype.apk requires that libSwypeCore.so be in the lib folder for it to work properly.
I get an "end of image" message and no folder is created with the extracted files.
I am trying to recover some photos from my Gallery, which I presume is in data.img - but no matter what I try to extract, I get "end of image"
any ideas?
Is the system.img the only thing you can open with this or can you open the data.img or the wimax.img also?
Lock-N-Load said:
I get an "end of image" message and no folder is created with the extracted files.
I am trying to recover some photos from my Gallery, which I presume is in data.img - but no matter what I try to extract, I get "end of image"
any ideas?
Click to expand...
Click to collapse
Your photos should be on your MicroSD card, not on one of the system partitions. Look in SDCARD:\DCIM\100ANDRO, your photos should be there.
cruise350 said:
Is the system.img the only thing you can open with this or can you open the data.img or the wimax.img also?
Click to expand...
Click to collapse
I want to know this also
Seems to work ok for me for data.img and system.img, but not wimax.img or boot.img.
Yep, I tried that too...worked.
Is there a command to repack the system or data image after you have unpacked and played around with them???
I am pretty sure that my issue is within the data file...I removed what I think caused the problem but how do I repack it all to put it on the sd card and try it out?
thanks
Does anyone know a command to repack the files???
Worked for me.
Pretty much my whole family has Evo's. theyre all rooted too thanks to me but in my experimenting, i lost the 4G keys to mines. so i troubleshooted. i put Amen Ra's recovery on my brothers phone, and nandroid'ed only the wimax. put the entire folder for that backup on my sdcard on the spot where u would find ur backups, ran Amen Ra on my Evo. and bam. working 4G. u just cant use them at the sametime cuz it interfears.
Oh ok cool.
Is there anyway to pack the files on windows
I want to see if my phone will boot now that I got rid of some programs I believe to be causing it to bootloop
Stupid question. Don't mind me.
Awesome this works Thanks allot
how can I extract /data/system to then package back as either
* SBF
or
* update.zip
to write to another identical phone?
re
http://forum.xda-developers.com/showthread.php?p=17217163#post17217163
ubuntu fyi
I've extracted *.smg files from a SBF Rom File. I'm willing to extract Stock Apk's from it.
Now, my Unyaffs is in the same folder of the SMG files such as cygwin1.dll, however when i try to execute "unyaffs cg39.smg" I receive the following:
8 [main] unyaffs 5960 handle_exceptions: Exception: STATUS_ACCESS_VIOLATIO
N
2790 [main] unyaffs 5960 open_stackdumpfile: Dumping stack trace to unyaffs.e
xe.stackdump
the log says:
Exception: STATUS_ACCESS_VIOLATION at eip=004010B0
eax=444E1A20 ebx=0000001A ecx=FFFFFFE4 edx=00801322 esi=0040130E edi=610E21A0
ebp=0022EE88 esp=0022EE50 program=C:\Motorola\unaffys\teste-extracted\unyaffs.exe, pid 4708, thread main
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame Function Args
0022EE88 004010B0 (0022EEE9, 00000000, 00000000, 00401333)
0022EEB8 004013AF (00000002, 00800180, 00800090, 610A5E22)
0022EFA8 61004DD2 (0022EFC0, FFFFFFFF, 77A651CE, 00000000)
0022FF58 6100594F (00000000, 00000000, 00000000, 00000000)
End of stack trace
I've tried to regsrv32 the DLL and also receveid error as a invalid Dll. Does anyone have an idea?
I'm looking for stock Phone, Contacts and the keyboard apk, by the way, anyone knows the keyboard apk file?
thanks
Thanks
Sent from my PC36100 using Tapatalk 2
hi guys,exist a new link for this tool or another tool for open .img files?
thanks in advance
First of all: Tool to be used in this guide was developed by user And_pda from Russian 4pda.ru forum. So all credits must go to And_pda
The original thread (in Russian) is here. Actually the original thread is about several tools to works with different images for different phones. But we will talk only about Moto X.
The guide will describe how to extract all files from system partition from stock firmware. The tools works under Windows (I personally tested it on Win 7).
If you unzip any stock firmware (for instance ROGERS-CA_GHOST_KXA20.16-1.26_cid14_CFC_1FF.xml.zip) you will find one file, which represents system partition: system.img.
To extract all files from system.img please do:
1. Download ImgExtractor_1_3_4.rar and extract it.
2. Create directory System in the folder where system.img is located;
3. Copy ImgExtractor.exe into the folder where system.img is located;
4. Run CMD and "cd" to the folder where system.img is located
5. In CMD run the following: ImgExtractor system.img System
After ImgExtractor finished you will have all system files and folders in System directory.
That's all
PS. ImgExtractor also can extract modem firmware (NON-HLOS.bin)
Hey guys!
So I was just installing S5 Settings from balliboxer
and now I am an idiot to backup the secsettings apk and odex.
After I installed it, it gone FC.
Please somebody have an stock 4.4.2 SecSettings.apk and odex file please?
I'm running on 4.4.2 G7102 NH1.
sorry i don't have nh1 so i can't help you but what about four threads for the same thing , it's not realy serious man if you need help just post one time
if you have a pc :
domload your rom from Sam
http://www.sammobile.com/firmwares/download/36186/G7102XWUBNI2_G7102OLBBNI2_XSE.zip/
--extract it yoy will have G7102XWUBNI2_G7102OLBBNI2_XSE.tar.md5 use 7zip and extract it
--When you have completed extracting all of them, you'll find many files including many .img files. For Apps you need to extract system.img. Unlike normal nandroid backup's system.img file which in yaffs, this stock one in different. So, unyaffs tool can't unpack the system.img
--To extract the system.img, download this tool: sgs2toext4 (created by drphrozen). On extracting it you'll have sgs2toext4.jar file.
--Open a command window and set the directory where you have .jar file.
--Now type sgs2toext4.jar and press enter.
--The .jar will run in a new window & will ask you to drag & drop the system.img file there. Do the same and wait till the process completes.
--When the process completes, you'll find a file named system.ext4.img in the same folder where you had the system.img file.
--Now download ext2reader and install it. Then open the program open your system.img.ext4
--Now navigate in to find the apk you need and extract it copy to your phone
maxx35000 said:
sorry i don't have nh1 so i can't help you but what about four threads for the same thing , it's not realy serious man if you need help just post one time
if you have a pc :
domload your rom from Sam
http://www.sammobile.com/firmwares/download/36186/G7102XWUBNI2_G7102OLBBNI2_XSE.zip/
--extract it yoy will have G7102XWUBNI2_G7102OLBBNI2_XSE.tar.md5 use 7zip and extract it
--When you have completed extracting all of them, you'll find many files including many .img files. For Apps you need to extract system.img. Unlike normal nandroid backup's system.img file which in yaffs, this stock one in different. So, unyaffs tool can't unpack the system.img
--To extract the system.img, download this tool: sgs2toext4 (created by drphrozen). On extracting it you'll have sgs2toext4.jar file.
--Open a command window and set the directory where you have .jar file.
--Now type sgs2toext4.jar and press enter.
--The .jar will run in a new window & will ask you to drag & drop the system.img file there. Do the same and wait till the process completes.
--When the process completes, you'll find a file named system.ext4.img in the same folder where you had the system.img file.
--Now download ext2reader and install it. Then open the program open your system.img.ext4
--Now navigate in to find the apk you need and extract it copy to your phone
Click to expand...
Click to collapse
Thanks dude! And sorry for those 4 threads. Gonna download it!
This will take soooooo long! My Internet connection is slow and can complete in 9-10 hours!
Just be patient and people will see your thread and help you! But making FOUR posts...?
maxx35000 said:
sorry i don't have nh1 so i can't help you but what about four threads for the same thing , it's not realy serious man if you need help just post one time
if you have a pc :
domload your rom from Sam
http://www.sammobile.com/firmwares/download/36186/G7102XWUBNI2_G7102OLBBNI2_XSE.zip/
--extract it yoy will have G7102XWUBNI2_G7102OLBBNI2_XSE.tar.md5 use 7zip and extract it
--When you have completed extracting all of them, you'll find many files including many .img files. For Apps you need to extract system.img. Unlike normal nandroid backup's system.img file which in yaffs, this stock one in different. So, unyaffs tool can't unpack the system.img
--To extract the system.img, download this tool: sgs2toext4 (created by drphrozen). On extracting it you'll have sgs2toext4.jar file.
--Open a command window and set the directory where you have .jar file.
--Now type sgs2toext4.jar and press enter.
--The .jar will run in a new window & will ask you to drag & drop the system.img file there. Do the same and wait till the process completes.
--When the process completes, you'll find a file named system.ext4.img in the same folder where you had the system.img file.
--Now download ext2reader and install it. Then open the program open your system.img.ext4
--Now navigate in to find the apk you need and extract it copy to your phone
Click to expand...
Click to collapse
Unfortunately this doesn't work. When you drop the system.img.ext4 file onto the sgs2ext4 tool, no file is produced. The tool just keeps endlessly repeating:
"system.img.ext4 32 B 0 B/s"
I think that tool is too old (2.5 years old) and doesn't support the newest Samsung firmwares.
siraltus said:
Unfortunately this doesn't work. When you drop the system.img.ext4 file onto the sgs2ext4 tool, no file is produced. The tool just keeps endlessly repeating:
"system.img.ext4 32 B 0 B/s"
I think that tool is too old (2.5 years old) and doesn't support the newest Samsung firmwares.
Click to expand...
Click to collapse
witch firmware do you want to extract ?and whitch file you want ?
i 've extract my latest firmware 09/2014 so it work fine for me
maxx35000 said:
witch firmware do you want to extract ?and whitch file you want ?
i 've extract my latest firmware 09/2014 so it work fine for me
Click to expand...
Click to collapse
The T-Mobile Galaxy Note 4 (SM-N910T) NK4 firmware. I can't find any instructions online on extracting Samsung firmwares other than these, which were originally written up by rwilco12 a long time ago and reposted endlessly.
siraltus said:
The T-Mobile Galaxy Note 4 (SM-N910T) NK4 firmware. I can't find any instructions online on extracting Samsung firmwares other than these, which were originally written up by rwilco12 a long time ago and reposted endlessly.
Click to expand...
Click to collapse
you have one solution try to extract md5 file
and direct mount system.img in ubunt it work for me then copy the file you want
maxx35000 said:
you have one solution try to extract md5 file
and direct mount system.img in ubunt it work for me then copy the file you want
Click to expand...
Click to collapse
I'll try doing that in a Linux VM. I'm on Windows and the Diskinternals Linux Reader keeps saying the filesystem is invalid.
siraltus said:
I'll try doing that in a Linux VM. I'm on Windows and the Diskinternals Linux Reader keeps saying the filesystem is invalid.
Click to expand...
Click to collapse
give me a link to download the system.img i try to extract it
maxx35000 said:
give me a link to download the system.img i try to extract it
Click to expand...
Click to collapse
Thank you for your help. It's this firmware: http://www.sammobile.com/firmwares/download/39224/N910TUVU1ANK4_N910TTMB1ANK4_TMB.zip/
Anything? Is this a no-go?
siraltus said:
Thank you for your help. It's this firmware: http://www.sammobile.com/firmwares/download/39224/N910TUVU1ANK4_N910TTMB1ANK4_TMB.zip/
Click to expand...
Click to collapse
sorry i have forget to do it i download the file now
but what the files needed in ?
maxx35000 said:
sorry i have forget to do it i download the file now
but what the files needed in ?
Click to expand...
Click to collapse
I just want to find a method that works for extracting the Note 4 firmware because none I found online work.
siraltus said:
I just want to find a method that works for extracting the Note 4 firmware because none I found online work.
Click to expand...
Click to collapse
I found that the Linux method works on my Mac. Took a ton of tinkering and restarting the emulator on my machine.
sgs2ext4.jar did not work for me in Windows. It just hangs.
sbrownla said:
I found that the Linux method works on my Mac. Took a ton of tinkering and restarting the emulator on my machine.
sgs2ext4.jar did not work for me in Windows. It just hangs.
Click to expand...
Click to collapse
yes sgs2ext4.jar work with some of system.img but not all but you can mount in linux i have extracted note 4 img :good:
maxx35000 said:
give me a link to download the system.img i try to extract it
Click to expand...
Click to collapse
The SAMMOBILE firmware or the system.img? I'm not yet downloading it. Let's see if I can resume the download.
If you're on Tmobile and want the 5.1.1 update and on a Mac. Just
1. download the unroot toolkit here
http://forum.xda-developers.com/showthread.php?t=2956434
2. Download the correct factory image from Google.
3. Unzip the .tgz file then the .zip file inside that, and rename the files so that they match the file names inside the unroot toolkit. Every .IMG to its corresponding .IMG file.
4. Replace the new files you just renamed (you should have only had to rename like 2 or 3 files) and all of the rest of the .IMG files into the unroot toolkit folder. It should prompt you if you want to replace all the files because they have the same name. Click OK.
5. Click on the android icon to run the unroot toolkit which will wipe your phone and install the 5.1.1 T-MOBILE update.
Worked for me!
Im not responsible if you mess up your phone and all credit goes to the original developer techfanatic9 @ http://forum.xda-developers.com/showthread.php?t=2956434
Hi everyone , sorry for my lot questions , am still not familiar with , this is my first experience with things like that , the edl tool is so helpful and i found many people recommended it so i will unloack my bootloader after downgrading from oreo to naugat and then upgrad and flash twrp , Then format and boot into B02 and then flash LOS 16 but i want to ask please here about the subfolders ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Structure of program folders:
1. Folder flash - in this folder you need to copy the files you want to flash
Subfolders:
folder full - if you want to flash full firmware (official, adapted for EDL mode), then in this folder you need to put all the files from the firmware for EDL mode:
its name usually looks like this: A2017 _......._ FULL_EDL
folder boot - if you want to flash your kernel file, you need to put a file named: boot.img in this folder (the file name must be exactly that!)
folder recovery - if you want to flash your recovery file, you need to put a file named: recovery.img in this folder (the file name must be exactly that!)
folder modem - if you want to flash your modem file, you need to put a file named: NON-HLOS.bin in this folder (the file name must be exactly that!)
folder splash - if you want to flash your splash file, you need to put a file named: splash.img in this folder (the file name must be exactly that!)
2. Folder backup - the folder contains backup copies of the phone partitions created by the program
Subfolders:
folder all - this folder contains backups of all partitions, except userdata
folder full - this folder contains backup of all partitions included in the FULL EDL firmware
folder boot - this folder contains a backup of the boot partition
folder recovery - this folder contains a backup of the recovery partition
folder modem - this folder contains a backup of the modem partition
folder splash - this folder contains a backup of the splash partition
folder efs - this folder contains backup of the efs partition
3. Folder unlock - contains all the necessary files to unlock (do not touch it!)
4. Folder logs - contains all the logs of the program
5. Folder tools - contains all the necessary files for the program (do not touch it!) ---------------------->My question here about the subfolders should i just make the twrp recommended in the folder recovery and the two roms b 02 and b 12 in the folder flash or all the folders i should make in them some files ( folder backup , folder boot , folder modem , folder splash, folder unloack , folder logs ,foler tools ) if yes tell me what i should put in those folder exactly .am in a mess . thanks and please help me
1. twrp goes into folder recovery - named: recovery.img - flash
2. boot into twrp, install ROM zips from there
or
put B02 into folder full - A2017 _......._ FULL_EDL and flash
reboot
install LOS from TWRP