[HOW TO]Extract files for Nexus 7 factory image - Nexus 7 Android Development

I just find out how to extract files from factory image,think someone may need it too.
Just follow the full guide:
http://forum.xda-developers.com/showthread.php?t=1132724
This is the quick guide:
open sgs2toext4.jar from sgs2toext4.zip.
drop system.img in to sgs2toext4.jar.
wait....
there will be a file named "system.ext4.img" at the same folder with system.img.
use Diskinternals Linux Readerto mount and extract.
note: userdata.ext4.img can't be extract.:crying:
:laugh:have fun with cook...
If someone have other solution or how to extract userdata.img .please post it.
Thank you!

DearTanker said:
I just find out how to extract files from factory image,think someone may need it too.
Just follow the full guide:
http://forum.xda-developers.com/showthread.php?t=1132724
This is the quick guide:
open sgs2toext4.jar from sgs2toext4.zip.
drop system.img in to sgs2toext4.jar.
wait....
there will be a file named "system.ext4.img" at the same folder with system.img.
use Diskinternals Linux Readerto mount and extract.
note: userdata.ext4.img can't be extract.:crying:
:laugh:have fun with cook...
If someone have other solution or how to extract userdata.img .please post it.
Thank you!
Click to expand...
Click to collapse
Thanks A Lot.

Related

[Tool] [Windows] Auto Tool Unpack Repack Rom Android .DAT

[Tool] [Windows] Auto Tool Unpack Repack Rom Android .DAT [No Cygwin] [No Linux]
***(Marshmallow Supported)***
Develop by MTK THAI ROM MODDER (Thiland) Group
Create Tool by: Kritsada Chaitan
SS:
Youtube : https://www.youtube.com/watch?v=nKYozWOETIU
-NOTE 1.-
***First Install Needed For Use This Tool.***
1. Java SDK
2. Python v3.xx
-NOTE 2.-
***First Copy system.new.dat , system.transfer.list To "Paste-DAT-Here" Folder.***
Download:
MEGA
Thank you Original Thread by: "xpirt" https://forum.xda-developers.com/member.php?u=5132229
Thanks for the tool
Bebooo43 said:
Thanks for the tool
Click to expand...
Click to collapse
Good.... ^^
It is a wonderful tool, brother.
is this tool works fine?
Getting error about incompatible operating system when recompressing dat so I tried on windows and got the same do I have to install the java or the phyton to a certain directory or the auto tool to a certain directory it extracted fine thanks in advance for the feedback
Can someone lend a hand.... Program works great. After removing a couple apps, one from 'app' another from 'priv-app', I made a zip file with 7zip and tried flashing but it fails. Is 7zip okay to make a zip file? was I not supposed to remove a 'priv-app' ? I can't find any solid guides on editing a MM rom. thanks in advance.
i succesfully unpack .dat files and repack .dat files (without edit anything) using this tool .
then i replace the repack .dat file to the rom and zip it and flash it .
but the problem is, when i flash i get error 7 system partition has unexpected contents after ota update . any solution ?
can't unpack system.new.dat cm14 (7.1)
Thank you very much, really useful
update - https://forum.xda-developers.com/an...tool-tool-unpack-repack-dat-img-v2-0-t3284806
Is it work for N based ROMs
tooolll
worked for me also...
t.y.
please update it to new version waiting for it.

For (WINDOWS) Tool Android Unpack\Repack system.new.dat Nougat 7.х.х

A tool to Repack the firmware image system.new.dat Nougat 7.x.x
the author of the tool by Karan Sangaj thank you :good: on XDA haven't found the original post
The usage is very simple, I hope many will be useful.
thanks for the help ajsmsg78
1) install Python 2.7.13
2) original post File contexts.bin converter thank you
another File context tools thank you
video instruction
https://www.youtube.com/watch?v=OsHWPdIgGjY
https://plus.google.com/u/0/collection/EiQ1NE
sory for my English
cannot convert my_new_system.img.
how to convert it exactly?
Any solution??
Traceback (most recent call last):
File "C:\Users\pc\Desktop\Android Unpack Repack Nougat\tools\img2sdat.py", line 10, in <module>
import common, blockimgdiff, sparse_img
File "C:\Users\pc\Desktop\Android Unpack Repack Nougat\tools\common.py", line 112
print " running: ", " ".join(args)
^
Esakren17 said:
Any solution??
Traceback (most recent call last):
File "C:\Users\pc\Desktop\Android Unpack Repack Nougat\tools\img2sdat.py", line 10, in <module>
import common, blockimgdiff, sparse_img
File "C:\Users\pc\Desktop\Android Unpack Repack Nougat\tools\common.py", line 112
print " running: ", " ".join(args)
^
Click to expand...
Click to collapse
I am getting the same error as this, what should I do to fix it?
Have installed python v2.7.13+3.6.1, latest java jdk and jre and .NET framework v4.7 and running windows 10, it had worked on the first try but started showing this error suddenly.
It works, but after install ROM the battery discharges very quickly and heats up... I think that incorrectly exposed file permissions, because if i flash "system" folder with setting simlinks and set_metadata in updater-script ROM works fine and battery is ok.
ROM work only with system.img, system.new.dat dont flash, error 7 in TWRP...
best tools ,thanks!!
raghuM said:
I am getting the same error as this, what should I do to fix it?
Have installed python v2.7.13+3.6.1, latest java jdk and jre and .NET framework v4.7 and running windows 10, it had worked for the first time but started showing this error suddenly
Click to expand...
Click to collapse
same here
Anyway to repack oreo
Got a problem with this tool.....
it works perfectly to extracting system.new.dat and unpack system.img I modify and remove some files in the system folder (remove some apks and fonts, add some hosts....) so the size of the system folder change and when I type the 04 option got this error message.....
0 [main] make_ext4fs 7236 cygwin_exception:pen_stackdumpfile: Dumping stack trace to make_ext4fs.exe.stackdump
Impossible de trouver C:\Users\RAYMAN95\Desktop\Android Unpack Repack Nougat\temp_size.txt
How is it possible to made some modifications and repack it to system.new.dat????
thank's for the help
This tool is very nice.... But please help me guys... On the last step I'm failed to repack system.img to new.system.dat... SYNTAX ERROR... how to fix it?
By the way it is very great tool... Thx to Dev ^^
Can't Unpack system.img
Ok Bro .. That's awesome Tutorial.
I have the system.img of Note 8 AP file .. I try to unpack it directly but it Ext4Extractor.exe is stopping working.
I don't have system.new.dat file so I'm trying to unpack system.img directly but it doesn't work.
As these images show the error:
https://imgur.com/a/jlZvb
Thank you very much for your tools very easy to use Thank you again
iMenesi said:
Ok Bro .. That's awesome Tutorial.
I have the system.img of Note 8 AP file .. I try to unpack it directly but it Ext4Extractor.exe is stopping working.
I don't have system.new.dat file so I'm trying to unpack system.img directly but it doesn't work.
As these images show the error:
https://imgur.com/a/jlZvb
Click to expand...
Click to collapse
The link is not working.
You need to have a custom ROM, and in it system.transfer.list and system.new.dat.
Use this method:
[DEV] sdat2img 1.0 - img2sdat 1.2 ◦ Unpack/re-pack android DAT files
For a long time I use and have not found Android ROM 5.1.1 - 8.0.0, which can not be unpacked using sdat2img.py.
Thank you authors @xpirt , @luxi78 , @howellzhu !
You dont need a custom rom or the system.transfer.list, or system.new.dat. This unpacks images just fine. It will not unpack factory images tho. I got it to work just fine unpacking nexus 6 system.img by placing the image in the output_converted_dat_to_ext4 folder then telling the bat file what the size is and unpacking it. Do the same thing for oreo and the ext4 exe crashes.
ze7zez said:
The link is not working.
You need to have a custom ROM, and in it system.transfer.list and system.new.dat.
Use this method:
[DEV] sdat2img 1.0 - img2sdat 1.2 ◦ Unpack/re-pack android DAT files
For a long time I use and have not found Android ROM 5.1.1 - 8.0.0, which can not be unpacked using sdat2img.py.
Thank you authors @xpirt , @luxi78 , @howellzhu !
Click to expand...
Click to collapse
iMenesi said:
Ok Bro .. That's awesome Tutorial.
I have the system.img of Note 8 AP file .. I try to unpack it directly but it Ext4Extractor.exe is stopping working.
I don't have system.new.dat file so I'm trying to unpack system.img directly but it doesn't work.
As these images show the error:
https://imgur.com/a/jlZvb
Click to expand...
Click to collapse
greeshan said:
It works, but after install ROM the battery discharges very quickly and heats up... I think that incorrectly exposed file permissions, because if i flash "system" folder with setting simlinks and set_metadata in updater-script ROM works fine and battery is ok.
ROM work only with system.img, system.new.dat dont flash, error 7 in TWRP...
Click to expand...
Click to collapse
flash "system" folder with setting simlinks and set_metadata in updater-script ROM
Click to expand...
Click to collapse
How did you fix the problem?
How did you do that?
master.robot said:
How did you fix the problem?
How did you do that?
Click to expand...
Click to collapse
i use commands set_metdata(xxxx); after block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
Is this tool work with oreo roms ?
wgmmmx said:
Is this tool work with oreo roms ?
Click to expand...
Click to collapse
No i think
link77kz said:
A tool to Repack the firmware image system.new.dat Nougat 7.x.x
the author of the tool by Karan Sangaj thank you :good: on XDA haven't found the original post
The usage is very simple, I hope many will be useful.
thanks for the help ajsmsg78
1) install Python 2.7.13
2) original post File contexts.bin converter thank you
another File context tools thank you
video instruction
https://www.youtube.com/watch?v=OsHWPdIgGjY
https://plus.google.com/u/0/collection/EiQ1NE
sory for my English
Click to expand...
Click to collapse
rom isn't booting after editing system.new.dat. any help ?
For anyone having syntax errors converting systemsparse.img to system.new.dat just download the updated img2sdat files from the link below and extract all files ending in .py to the tools folder of this batch tool. There's also an updated sdat2img.py linked below which goes in the same tools folder. Overwrite all the old files when prompted.
Edit: I've attached a zip that has the tools already updated. Maybe the OP can update the first post?
img2sdate update: https://github.com/xpirt/img2sdat
sdat2img update: https://github.com/xpirt/sdat2img

how make a custom recovery file flashable for sp flash tool

can someone teach me how make flashable custom recovery file for sp flash tool?.. I already know how to port custom recovery, the problem is how to make it flashble to lsp flash tool ,, the img file.. thank you
Heremias said:
can someone teach me how make flashable custom recovery file for sp flash tool?.. I already know how to port custom recovery, the problem is how to make it flashble to lsp flash tool ,, the img file.. thank you
Click to expand...
Click to collapse
It isn't specific to your device but, try going to this thread and download ONLY the TWRP 3.0.0.3 for SPflashtool file.
https://forum.xda-developers.com/k3-note/general/sp-flash-tool-tutorial-to-install-twrp-t3346041
Then extract the file, then replace the scatter file and the recovery.img in that file with your scatter file and your recovery.img(make sure to rename your recovery .img to "recovery.img")
Then just follow the flashing instructions listed under the "Now, the flashing part" in that thread.
Sent from my LGL84VL using Tapatalk
Droidriven said:
It isn't specific to your device but, try going to this thread and download ONLY the TWRP 3.0.0.3 for SPflashtool file.
https://forum.xda-developers.com/k3-note/general/sp-flash-tool-tutorial-to-install-twrp-t3346041
Then extract the file, then replace the scatter file and the recovery.img in that file with your scatter file and your recovery.img(make sure to rename your recovery .img to "recovery.img")
Then just follow the flashing instructions listed under the "Now, the flashing part" in that thread.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
thanks droid. will that version of twrp 3.0.0.3 fit on my device huawei cun-u29?
Heremias said:
thanks droid. will that version of twrp 3.0.0.3 fit on my device huawei cun-u29?
Click to expand...
Click to collapse
You didn't understand anything about what I said
I did not tell you to use the recovery in the link that I posted.
I told you to download the file that is linked in the thread that I gave you.
Then extract the file that you download, open the folder that extracts from it then delete the scatter file that it contains and delete the recovery file that it contains.
Then you need to place a copy of the scatter file for your device and the recovery.img for your device in the extracted folder. Make sure that you change the name of your device's recovery file to "recovery.img", otherwise, the program will not recognize your recovery file. After placing YOUR files in that folder, you are ready to flash the device.
If you didn't understand that clearly then I can't help you.
Sent from my LGL84VL using Tapatalk
Heremias said:
thanks droid. will that version of twrp 3.0.0.3 fit on my device huawei cun-u29?
Click to expand...
Click to collapse
im sorry, okay ill try this

MTK Firmware Backup & Extraction ( All Partitions )

Acquire a similar scatter file for another device.
Use ADB to extract Partition information.
Edit similar Scatter using ADB and Device for Reference's.
Add the Partition information into the similar scatter.
Test scatter file for proper PMT & HW Chip ID.
Error & Repairs for HW ID Mismatch & PMT Changed.
Test Error repaired scatter to extract Preloader.
Extract preloader from BOOT_0.
Test Preloader with boot.img extraction & download.
Save Scatter file & Preloader into a safe place.
Use Scatter & Preloader for Memory Test.
Use Memory Test information for Read back of entire Memory.
Save Full Read back to a safe place.
Extract System.img, Boot.img, Recovery.img, NVram.img, NVDATA.img, frp.img, Etc.
Compile Firmware for SP Flash Tool.
Edit & Remove proprietary information from firmware for custom release.
Leave stock for stock Firmware extraction.
For Pure time consumption reasons, this guide may take me a while to complete, however the steps above should give you a rough idea of how everything is going to be written...
To start with, the information is so much at once, that I've made a video to help people go along with it...
The video is in 2 parts & in English... Please watch these first, that'll cover about everything in the steps except a few things like compilation of extracted IMG files.
The second video should be watched after the first video, so I've put that link in the description of video 1.
https://youtu.be/e2_U68EGSlY
OK... Now you've seen the instructions, you can work through extracting every partition you'll need for a firmware backup.... You don't need all of them !
After that, Copy the following files (you should now have them all ) to a new folder called Stock Firmware for SP Flash Tool ..
boot.img
cache.img
lk.img
logo.img
preloader.bin
recovery.img
secro.img
system.img
trustzone.bin or .img
userdata.img
MT*****_Android_scatter.txt
Now you need to edit the Scatter file using NotePad++ or another program that won't wreck line endings... Word pad & Notepad will wreck line endings and destroy the scatter file.
Edit the scatter file to now have the correct file names, eg.....
preloader_******_njh_gjb_.bin TO preloader.bin - The same as your copied file name.
boot_example_mt.img TO boot.img - The name of the file for boot.
Now the scatter file, Image's & Preloader should be all together...
ZIP the folder to remove empty space in .img files, Shrink the Firmware to a Zip file.....
You just need to extract the zip file and open the scatter file in SP Flash Tool v5.16+ .. Then select Download to do a firmware installation.
I will edit this guide in time, however I just wanted to get out how I do this on my MTK Device's... People keep asking me how to do it, so I released the video and this extra information for them... I don't make money on YouTube so everything here is provided free & I don't make any money from helping !!! Sorry about the terrible audio !

[REQUEST] Build system.img

Hello,
I have an ASUS K01A tablet with a blank system partition and unusable recovery. I can flash img files to their respective partitions just fine (boot.img, droidboot.img) in fastboot, but 'system' in the stock firmware zip is a directory instead of a flashable image. Of course, this (and other reasons) means I can't just flash the stock firmware in fastboot, nor flash over the entire 'system' directory.
I need a system.img to recover my tablet from softbrick, but I can't for the life of me compile one. I've exhausted every method and tool I could find in both Windows and Ubuntu.
I beseech the community; if there is anyone reading this who could build such a file for me, I would be eternally grateful. I believe I only need the system.img to recover the tablet.
The stock firmware is at the ASUS website. Here is the download link: UL-K01A-WW-12.8.1.41-user.zip.
Thanks in advance!
Why not extract the system folder of the ZIP linked to, then pack it into a ZIP what you then convert to IMG using an online-convertor that does the job?
jwoegerbauer said:
Why not extract the system folder of the ZIP linked to, then pack it into a ZIP what you then convert to IMG using an online-convertor that does the job?
Click to expand...
Click to collapse
"Why not" indeed; that sounds like it would more than suffice. Can you please recommend one?
Anyone? I have been unable to find this "online-converter" despite days of searching; still at square one.
Only as example ( found via Google search !!! )
Archive Converter - Convert your a7z, rar, zip, gzip, bzip2, tar archives to another format online
Free Archive Converter. Convert your archive files to a7z, rar, zip, gzip, bzip2, tar format online for free using OnlineConvertFree.
onlineconvertfree.com
jwoegerbauer said:
Only as example ( found via Google search !!! )
Archive Converter - Convert your a7z, rar, zip, gzip, bzip2, tar archives to another format online
Free Archive Converter. Convert your archive files to a7z, rar, zip, gzip, bzip2, tar format online for free using OnlineConvertFree.
onlineconvertfree.com
Click to expand...
Click to collapse
Thank you, but I've tried this one and all the others on Google, and none will handle the filesize (~650 MB). It must be purpose-made for Android .img files it seems, which I've been unable to find.
Kehkou said:
Hello,
I have an ASUS K01A tablet with a blank system partition and unusable recovery. I can flash img files to their respective partitions just fine (boot.img, droidboot.img) in fastboot, but 'system' in the stock firmware zip is a directory instead of a flashable image. Of course, this (and other reasons) means I can't just flash the stock firmware in fastboot, nor flash over the entire 'system' directory.
I need a system.img to recover my tablet from softbrick, but I can't for the life of me compile one. I've exhausted every method and tool I could find in both Windows and Ubuntu.
I beseech the community; if there is anyone reading this who could build such a file for me, I would be eternally grateful. I believe I only need the system.img to recover the tablet.
The stock firmware is at the ASUS website. Here is the download link: UL-K01A-WW-12.8.1.41-user.zip.
Thanks in advance!
Click to expand...
Click to collapse
maybe that video helps you...
good luck
solong
speedson
I built it finally using IMGBurn to create the raw img and Sparse Converter to convert it to sparse img fragments.
But now the tab has formatting error, and with -u option, flashing errors (all partitions and imgs now). Ah, well.
Thank you to everyone! Hopefully someone else reading this will have better luck than me.
Kehkou said:
I built it finally using IMGBurn to create the raw img and Sparse Converter to convert it to sparse img fragments.
But now the tab has formatting error, and with -u option, flashing errors (all partitions and imgs now). Ah, well.
Thank you to everyone! Hopefully someone else reading this will have better luck than me.
Click to expand...
Click to collapse
Download the attached file from the link at the bottom of this post and unzip it somewhere on your PC. It is a temporary recovery launcher. We'll come back to it in a moment. Based on your original post I'm assuming you already have your stock firmware downloaded as well as ADB and Fastboot setup. From your stock firmware unpack the following files: fastboot.img, splashscreen.img, and boot.img and place them in your ADB/Fastboot folder. Copy the stock firmware to your sd card (in its original, unzipped form...the way it was when you first downloaded it). Put the tablet in fastboot mode. Run the following fastboot commands from a command prompt.
- fastboot flash fastboot fastboot.img
- fastboot flash boot boot.img
- fastboot flash splashscreen splashscreen.img
Reboot back to fastboot mode. Go to wherever you unzipped the temp recovery that you downloaded earlier. Double click on launcher.bat. Type accept in the window, then type T2 and your device should boot into CWM recovery. Now choose install zip>install from se card>and choose the stock firmware.zip that you previously copied to your sd card then let it do its thing. Once its finished go back to the first page of the CWM recovery that you're in and select reboot system now>no>no. You should be golden now. Post back if you have any issues.
Download Disposable Recovery

Categories

Resources