Unpack and Repack system.img? - G3 Developer Discussion [Developers Only]

Hello to all.
apologies if this should not be at the forum.
I cooked for windows mobile and now need to move to android.
I'm with the system.img file, I unpack and change what I wanted.
But now I could repackage and leave the folder as system.img.
please help Repack!

alejobog said:
Hello to all.
apologies if this should not be at the forum.
I cooked for windows mobile and now need to move to android.
I'm with the system.img file, I unpack and change what I wanted.
But now I could repackage and leave the folder as system.img.
please help Repack!
Click to expand...
Click to collapse
That's an ext2 partition. Create ext2 image, mount it, write to it, unmount & copy to device. Everything is googleable
And yeah, doing it under Windows is overly hard. You may want to use ubuntu in virtualbox.

Related

read/edit .img files

Does someone know how to mount/read/edit the .img files in the ROM?
I Know it is a small filesystem.
I googled for an hour and still don't know how it works.
For example the Radio ROM, i'd like to read the contents, Why is it for about 25MB's
Is it possible to tweak the contents and stuff.
Not sure about radio rom.
unyaffs for system.img
unpack-bootimg.pl/repack-bootimg.pl for boot.img
I think you want unyaffs. I used it to decompile a nandroid backup .img so i could take some files form it.
EDIT: Damn you Adam!
unyaffs says `Broken image`
So that won't work.
will try: unpack-bootimg.pl/repack-bootimg.pl
but i think it's for the boot.img file.
also intresting to look at.

[GUIDE] Noob Friendly RFS Browsing/Extracting Guide

Ok guys,
So after having seen a million and one questions on how to extract RFS files and all the complex answers we keep getting on mounting rfs files in linux and blah blah blah (all a waste of time if all you need is to view/extract files from an RFS file from some firmware)... and now there is no excuse for those few requesting other members to extract stuff for them.. you can do it yourself!
Here is the easy/fast way to do it without having to go through all the trouble
NOTE: This, mind you is mainly for extracting/viewing. Not for editing RFS files.
Go to:
-http://www.magiciso.com/
-Download MagicISO (its free trial but that don't matter for viewing/extracting)
-Install
-Open MagicISO
-Hit File->Open
-In the section "Files of type:" - Click the drop down and select "All Files (*.*)"
-Select RFS file of your choosing (For example: factoryfs.rfs where all firmware apps are located)
and..
VIOLA!
Browse/Extract anything you need... No hassles.
To extract you can simply click and drag to another folder/desktop as needed
Cheers!
TY for this guide. Unlike htc hd2 forums I really have hard time getting answers to my questions in tab forums so this kind of guides helps me very much. Again TY.
You sir, are very welcome!
Glad it helped. Thats what we're here for!
Make it a sticky !
add it to the wiki rather than making this post sticky. http://modadroid.com/index.php/Main_Page
Just tried it with UltraISO. It seems to work, too.
Thanks
tovarish said:
add it to the wiki rather than making this post sticky. http://modadroid.com/index.php/Main_Page
Click to expand...
Click to collapse
Its locked for editting
MagicISO didn't work for me. I copied the .rfs file to a directory on Linux and mounted as read/write and was able to modify the file system. Then, I unmounted it and flashed the changes to my GT using Heimdall.
Sent from my SCH-I800 using XDA App
chuckbeasley said:
MagicISO didn't work for me. I copied the .rfs file to a directory on Linux and mounted as read/write and was able to modify the file system. Then, I unmounted it and flashed the changes to my GT using Heimdall.
Sent from my SCH-I800 using XDA App
Click to expand...
Click to collapse
This guide is only for browsing and extracting RFS files hence the name. It is not for modification.
I'm aware of what the original post was explaining. I tried that solution and it failed. That's why I suggested another method. MagicISO didn't work for me. If others try it and it doesn't work for them either, at least they have another solution that will always work and the option to modify the file system, if they so choose.
Sent from my SCH-I800 using XDA App
chuckbeasley said:
I copied the .rfs file to a directory on Linux and mounted as read/write and was able to modify the file system. Then, I unmounted it and flashed the changes to my GT using Heimdall.
Click to expand...
Click to collapse
That's the Linux command line, right ?
#mount -o loop factoryfs.rfs /mnt/rfs
Otherwise on Mac OS X, you can use this:
#sudo mkdir /Volumes/RFS
#sudo hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount ARCHIVE.rfs
#sudo mount_msdos /dev/disk{n} /Volumes/RFS
daniel.weck said:
That's the Linux command line, right ?
#mount -o loop factoryfs.rfs /mnt/rfs
Otherwise on Mac OS X, you can use this:
#sudo mkdir /Volumes/RFS
#sudo hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount ARCHIVE.rfs
#sudo mount_msdos /dev/disk{n} /Volumes/RFS
Click to expand...
Click to collapse
Please don't forget when you finished on OSX to run:
sudo umount /Volumes/RFS/
hdiutil detach /dev/disk{n}
i can't open the factoryfs.rfs of a samsung galaxy s. can anyone send me the /lib folder from galaxy s and the flash apk in the app folder...thanks
seven2099 said:
Ok guys,
-In the section "Files of type:" - Click the drop down and select "All Files (*.*)"
-Select RFS file of your choosing (For example: factoryfs.rfs where all firmware apps are located)
and.. VIOLA!
Browse/Extract anything you need... No hassles.
Click to expand...
Click to collapse
Didn't work for me either. MagicISO did extract four files only from factoryfs.rfs.
Two were exe files of significant size... Samsun_Mobile_USB_Driver.exe, and ToolLauncher-Bootstrap.exe.
All the files apk files are probably empedded in the first of those, but no further extraction was possible from the .exe file using MagicISO.
I'm trying to find the origianal VZW Vcast apk files that I stupidly deleted instead of just renaming. I need them so the EC02 update script will run. Any ideas, anyone?
Robin M said:
Didn't work for me either. MagicISO did extract four files only from factoryfs.rfs.
Two were exe files of significant size... Samsun_Mobile_USB_Driver.exe, and ToolLauncher-Bootstrap.exe.
All the files apk files are probably empedded in the first of those, but no further extraction was possible from the .exe file using MagicISO.
I'm trying to find the origianal VZW Vcast apk files that I stupidly deleted instead of just renaming. I need them so the EC02 update script will run. Any ideas, anyone?
Click to expand...
Click to collapse
you could look up the long way of mounting and extracting RFS.. Its a major pain though, why dont you make a post asking for those missing files in the forum.
Better bet.
Robin M said:
Didn't work for me either. MagicISO did extract four files only from factoryfs.rfs.
Two were exe files of significant size... Samsun_Mobile_USB_Driver.exe, and ToolLauncher-Bootstrap.exe.
All the files apk files are probably empedded in the first of those, but no further extraction was possible from the .exe file using MagicISO.
I'm trying to find the origianal VZW Vcast apk files that I stupidly deleted instead of just renaming. I need them so the EC02 update script will run. Any ideas, anyone?
Click to expand...
Click to collapse
I used Root Uninstaller and got rid of a vcastmusic.apk file. It's 4.46mb. Is this what you need?
Where is the thanks button!! It worked for me..!! I needed it!!
one question: I am unable to extract one particular factoryfs.rf of one rom, MagicISO says it is not an image file. Can you help me there?
Use linux disk reader to open ext4 files (even .rfs files can be ext4)
@neo yea magiciso says so on ext4 archives
cdesai said:
Use linux disk reader to open ext4 files (even .rfs files can be ext4)
@neo yea magiciso says so on ext4 archives
Click to expand...
Click to collapse
@cd if i select factoryfs.rfs from linux reader i only get the same single file as the output!! No use yaar
Works for Galaxy Ace's firmwares. Thanks. I'm trying to cook my first ROM for Galaxy Ace (cooper). Wish me luck!

Guide Make Roms For Other Devices

HELLO TO ALL THIS IS A SOFTWARE FOR WINDOWS USERS AND WINDOWS SERIES THIS CAN EXTRACT SYSTEM.IMG FROM STOCK ROMS U SHOULD TRY THIS
THIS IS USE FULL SOFTWARE TOO GOOD U SHOULD TRY THIS http://www.mediafire.com/?3cwmxr03qmffwph HAVE A GOOD DAY :good::good::good::good::laugh::laugh::laugh:
THIS IS NOT REALLY FINDED BY ME THIS IS SUGGESTED BY SAVIE THANKS TO HIM
irfanbagus said:
if you do that just to extract some files from stock rom then it's ok. but if you do that you loose file attribute. link from hdulani also not working for sgy (sgy use rfs, not yaffs).
simple way to extract files from *.img is put in your sdcard (ex: system.img), mount to folder and backup using tar
Code:
cd /mnt/sdcard
mkdir -f system
busybox mount -o loop,ro system.img system
busybox tar -cf system.tar system
busybox umount system
you got your system.img content in system.tar file. if you extract in linux you got original file attributes.
Click to expand...
Click to collapse
INSTRUCTION​
IF U R CREATING A ROM FOR DEVICE THAT U DOES N'T HAVE SO IT IS VERY HELP FULL
1.DOWNLOAD STOCK ROM OF THAT DEVICE LIKE MINI,ACE,FIT,Y,Y DUOS,SGS, SGS2,SGS3
2.EXTRACT PDA OF THAT DEVICE WITH WINRAR OR 7ZIP,WINZIP TOO MANY SOFTWARES ARE THERE
3.U WILL SE SYSTEN.IMG ON THAT
4.OPEN IT BY ULTRAISO
5.AND U WILL SEE ALL SYSTEM FILES
6.COPY IT TO ANYWHERE C,D,E,G,F ANYWHERE ON LOCAL DISK
IF U R MAKEING ROM FOR THAT U SHOULD EDIT ALL THE FILE IN IT AND MAKE IT DEODEX AND MAKE A UPDATER SCRIPT OR TAKE A UPDATE SCRIPT FROM ANY ROM AND MAKE A ZIP AND U R ROM IS READY TO SERVE IN XDA
SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE :angel::angel::angel::angel:
IT IS TO EASY IF U FOLLOW ALL THE INSTRUCTION CORRECTLY :good::good::good::good:
DON'T FORGET TO THANKS ME:laugh::laugh::laugh::laugh::laugh::laugh::laugh::laugh::angel::angel::angel:
Sent from my GT-S5360 using Tapatalk
i try so many tools for windows and finally work good for me Linux Reader
install/Open Linux Reader -->Drives -->>Mount Image -->>Raw Disk Images-->>open System.img-->>Save File To Ur Folder.....
for linux use XDA kitchen (u know about it) .............
the file is encrypted. common tools won't work. I always use CWM to make a nandroid backup to extract system files from stock rom.
manoranjan2050 said:
i try so many tools for windows and finally work good for me Linux Reader
install/Open Linux Reader -->Drives -->>Mount Image -->>Raw Disk Images-->>open System.img-->>Save File To Ur Folder.....
for linux use XDA kitchen (u know about it) .............
Click to expand...
Click to collapse
I AM ON WINDOWS 7 BRO I AM NOT ON LINUX
thx for the compliment
somkll said:
I AM ON WINDOWS 7 BRO I AM NOT ON LINUX
thx for the compliment
Click to expand...
Click to collapse
its for widows os not for linux check 1st please ...............
Linux Reader Read all Linux File System/Raw Image File (System.img) in Windows OS
Step By Step Tutorial For U
http://d-h.st/FYF
Try 1st then Post
Thanks........
when i open system image it show files that does n't exist what's problem
UltraISO software or something like that i've forget.
What do u want to extract?
Do u want to extract the 'SYSTEM.IMG' or the contents of it??
if you want to extract the file then its damn simple... just open the PDA tar file from the Odin..... in my case(galaxy y) it is "PDA_S5360DDKK1_REV05.tar"... if u want to extract the system.img file go to this thread http://forum.xda-developers.com/showthread.php?t=961164
Suggest freely
SORRY TO ALL BUT I MY ANSWER ULTRAISO CAN EXTRACT IT NO PROBLEM JUST SUGEST FREELY :angel::angel::angel::laugh::laugh::laugh::laugh::good::good::good: THUMBS UP FOR ALL
Sent For My GT-s5360
wats the use of this?
hell_lock said:
wats the use of this?
Click to expand...
Click to collapse
Extract system.img in windows
savie said:
Extract system.img in windows
Click to expand...
Click to collapse
i mean wats the use of extracting when its of no use to us?!
hell_lock said:
i mean wats the use of extracting when its of no use to us?!
Click to expand...
Click to collapse
Haha sory for simple answer.
Actually some people wanna customize rom with extract system.img not nandroid cwm backup.
Longtime ago i've try to extract radio.img and data.img too and stuck bcoz don't have this tool.
IF U R CREATING A ROM FOR DEVICE THAT U DOES N'T HAVE SO IT IS VERY HELP FULL
1.DOWNLOAD STOCK ROM OF THAT DEVICE LIKE MINI,ACE,FIT,Y,Y DUOS,SGS, SGS2,SGS3
2.EXTRACT PDA OF THAT DEVICE WITH WINRAR OR 7ZIP,WINZIP TOO MANY SOFTWARES
3.U WILL SE SYSTEN.IMG ON THAT
4.OPEN IT BY ULTRAISO
5.AND U WILL SEE ALL SYSTEM FILES
6.COPY IT TO ANYWHERE C,D,E,G,F ANYWHERE ON LOCAL DISK
IF U R MAKEING ROM FOR THAT U SHOULD EDIT ALL THE FILE IN IT AND MAKE IT DEODEX AND MAKE A MAKE OR TAKE A UPDATE SCRIPT FROM ANY ROM AND MAKE A ZIP
SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE SIMPLE
IT IS TO EASY IF U FOLLOW ALL THE INSTRUCTION
Send For My GT-s5360 Using Tapatalk APP
Porting from another device and beware of bootlove.. lol..
Maybe u can add in first post bro or change the thread to guide developing tools..
This is very usefull tools even not many user use it coz lack of knowledge or information like me before.. lol..
savie said:
porting from another device and beware of bootlove.. Lol..
Maybe u can add in first post bro or change the thread to guide developing tools..
This is very usefull tools even not many user use it coz lack of knowledge or information like me before.. Lol..
Click to expand...
Click to collapse
done that thanks for sharing a u r knowledge
Well done bro. Might be of use!
somkll said:
IF U R CREATING A ROM FOR DEVICE THAT U DOES N'T HAVE SO IT IS VERY HELP FULL ...
Click to expand...
Click to collapse
if you do that just to extract some files from stock rom then it's ok. but if you do that you loose file attribute. link from hdulani also not working for sgy (sgy use rfs, not yaffs).
simple way to extract files from *.img is put in your sdcard (ex: system.img), mount to folder and backup using tar
Code:
su
cd /mnt/sdcard
mkdir -f system
busybox mount -o loop,ro system.img system
busybox tar -cf system.tar system
busybox umount system
you got your system.img content in system.tar file. if you extract in linux you got original file attributes.
irfanbagus said:
if you do that just to extract some files from stock rom then it's ok. But if you do that you loose file attribute. Link from hdulani also not working for sgy (sgy use rfs, not yaffs).
Simple way to extract files from *.img is put in your sdcard (ex: System.img), mount to folder and backup using tar
Code:
cd /mnt/sdcard
mkdir -f system
busybox mount -o loop,ro system.img system
busybox tar -cf system.tar system
busybox umount system
you got your system.img content in system.tar file. If you extract in linux you got original file attributes.
Click to expand...
Click to collapse
it is not easy on phone but on computor it becomes easy
bro this for windows 7 and series that is easy for u r using linux but we are not using it
Somekill i know ur purpose but i think irfan info is very usefull.
Why don't u make this thread general information to extract *.img from windows and linux.
If u don't have good knowledge of linux (same with me - lol) u can add link to irfan or other member that have knowledge to share.
This can be usefull thread not only in sgy but other device i think and hope usefull info not gone with spam or junk thead.
All we need is usefull information and applicable to sgy so can make our device more better.

How to extract stock ROM to retrieve certain files

Hello all,
I sold off my note 2 but i miss the ringtones that it had. I want to extract them from the stock ROM and use it in my current device.
I extracted the .tar.md5 file and a few .img files appeared. I tried to extract / view the system.img file but I couldn't. These programs couldn't read the .img files.
What should i do?
You need to convert system.img file to ext4
Then you can mount that on Linux.
Or
Simply request someone to port from device, that will be easy with root explorer.
Sent from my GT-N7100 using xda premium
dr.ketan said:
You need to convert system.img file to ext4
Then you can mount that on Linux.
Or
Simply request someone to port from device, that will be easy with root explorer.
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
Thank you for pointing me into the right direction.
I used this Wonderful tool and avoided opening the file in Linux
http://sourceforge.net/projects/androidicsjbext/

[Q] Mounting Stock ROM system.img on W7/8/Linux to view and copy files

- I unzipped e.g. T705XXU1ANF from samdownloads.de.rar.
- Then I opened the T705XXU1ANF7.tar.md5 and extracted the *.img files with winrar.
- Then I tried to mount system.img / recovery.img with OSFMount.
Mounting worked but non of the ext2 tools (Ext2Fsd, ext2explore, explore2fs-1.08beta9, Paragon ExtFS for Windows, LinuReader ) would recognice the mounted image or could mount the image itself to view the files.
For ICS/JB I read about ext4_unpacker. Do we have something like that for Kitkat ? Or is it possible under Linux (I am a noob there)
Basically on Linux, it's really easy.
mount -o loop disk1.iso /mnt/disk
Or wherever that you want it to be.
did one of you mount an system.img from Kitkat Stock Rom already ?? Because I dont think ist about W7/8 .... some of the tools listed should be able to read ext4 ... (ext4_unpacker wont work either !!)
pegasus21 said:
Basically on Linux, it's really easy.
mount -o loop disk1.iso /mnt/disk
Or wherever that you want it to be.
Click to expand...
Click to collapse
no it cant be mounted that way... I tried under unbuntu LiveDVD. the System.img can be mounted, but there is no readable filesystem. So it must be processed in some form like ext4unpacker did for ICS/JB ...
gggg said:
no it cant be mounted that way... I tried under unbuntu LiveDVD. the System.img can be mounted, but there is no readable filesystem. So it must be processed in some form like ext4unpacker did for ICS/JB ...
Click to expand...
Click to collapse
You're right... I thought it worked out of the box.
Anyway, I used RKwinTools to extract the system.img contents on Windows.
Place system.img in RKwinTools_v133\unpack\firmware\image\
Run the batch file and select option 6 and you'll find the contents under RKwinTools_v133\unpack\System
pegasus21 said:
You're right... I thought it worked out of the box.
Anyway, I used RKwinTools to extract the system.img contents on Windows. Place system.img in RKwinTools_v133\unpack\firmware\image\
Run the batch file and select option 6 and you'll find the contents under RKwinTools_v133\unpack\System
Click to expand...
Click to collapse
THX unpacking worked like a charm, but is there also a way of just converting the img to one that is a mountable.ext4. This one I could use under Win and Linux as it would keep permissions ... (Simg2img didnt work)
This is the error:
Code:
*** Please wait... ***
Ext4Extractor version 1.5.2 Created by And_PDA Based on sources ext4_unpacker
Extractor for images in EXT2\EXT3\EXT4\SPARSE formats
Open image file Unpack/Firmware/Image/system.img successfull...
Found SPARSE FORMAT
Convert to EXT4 format started...
Convert to EXT4 format finish success
*********************************
*** Error! ***
*********************************
gggg said:
THX unpacking worked like a charm, but is there also a way of just converting the img to one that is a mountable.ext4. This one I could use under Win and Linux as it would keep permissions ... (Simg2img didnt work)
This is the error:
Code:
*** Please wait... ***
Ext4Extractor version 1.5.2 Created by And_PDA Based on sources ext4_unpacker
Extractor for images in EXT2\EXT3\EXT4\SPARSE formats
Open image file Unpack/Firmware/Image/system.img successfull...
Found SPARSE FORMAT
Convert to EXT4 format started...
Convert to EXT4 format finish success
*********************************
*** Error! ***
*********************************
Click to expand...
Click to collapse
Well option 7 will convert the sparse ext4 image to a normal ext4 image. The message shows error but it would seem that it's converted. Find the image in the same location that you placed system.img.
Mount system_ext4.img on linux using
Code:
mount -t ext4 -o loop system_ext4.img /mnt
pegasus21 said:
Well option 7 will convert the sparse ext4 image to a normal ext4 image. The message shows error but it would seem that it's converted. Find the image in the same location that you placed system.img.
Click to expand...
Click to collapse
THX so far, I can mount it on my Linux PC not under Win8
- Linux Rader still cant open it
- I can Mount it with OSFMount, but neither paragon ExtFS nor ext2Mgr recognice the mounted Drive ????
ideas very welcome
gggg said:
ideas very welcome
Click to expand...
Click to collapse
try this windows system to ext4 double click bat file then drag your system.ing,cache.img or data.img to the open window
pegasus21 said:
You're right... I thought it worked out of the box.
Anyway, I used RKwinTools to extract the system.img contents on Windows.
Place system.img in RKwinTools_v133\unpack\firmware\image\
Run the batch file and select option 6 and you'll find the contents under RKwinTools_v133\unpack\System
Click to expand...
Click to collapse
How to decompile the boot and the kernel?
hello... how to repack the unpacked files?
pegasus21 said:
You're right... I thought it worked out of the box.
Anyway, I used RKwinTools to extract the system.img contents on Windows.
Place system.img in RKwinTools_v133\unpack\firmware\image\
Run the batch file and select option 6 and you'll find the contents under RKwinTools_v133\unpack\System
Click to expand...
Click to collapse
bro can you little explain how its work, i have win , after extract i have just this 3 folders
_in
app
cywim
so where i put system.img.ext4 files?
i really don,t care about extracted i need to repack to ext4

Categories

Resources