What type of this .img file?

352 views
Skip to first unread message

Tony

unread,
Jun 4, 2011, 3:25:19 PM6/4/11
to android-porting
Hello,

I'm new to android dev and learning how to port gingerbread to my
samsung i9003.
I successfully converted partitions on the phone from samsung's RFS
to ext2.
But I have a problem, I need to modify the file init.rc to change the
mount option to ext2. but the file is in ramfs, and I need to modify
its source.
There are to .img file which I think init.rc is placed -
normalboot.img and recover.img. I have no idea what type of these
files are.
But I open it in a hex editor and found that the very first byte of
the file is a string "ANDROID".
Could someone give me a hint what these file are and how can I open or
extract(repack) it?
Is it a type of file system?

Tony

hedwin

unread,
Jun 5, 2011, 4:07:34 PM6/5/11
to crack...@gmail.com, android-porting

Ashwini Singh

unread,
Jun 6, 2011, 1:05:40 AM6/6/11
to android-porting
Hi Tony,



TO UNPACK:
$ mkdir open_ram
$ cd open_ram
$ gunzip -c ../your-ramdisk-file | cpio -i

PACK it again:
$ cd <open_ram>
$ find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz



Thanks.

Linux Box Solutions

unread,
Jun 6, 2011, 2:32:43 AM6/6/11
to android...@googlegroups.com

Linux Box Solutions

unread,
Jun 4, 2011, 10:51:51 PM6/4/11
to android...@googlegroups.com

My splash image though keeps loading like a garbled mess

Linux Box Solutions

unread,
Jun 5, 2011, 7:55:28 PM6/5/11
to hedwin...@gmail.com, crack...@gmail.com, android-porting

Phinitnan Chanasabaeng

unread,
Jun 6, 2011, 12:16:43 AM6/6/11
to hedwin, android...@googlegroups.com
hedwin,

I already tried all partition type supported by stock samsung's kernel (ext2,rfs,j2fs?). I also tried extract the file with unyaffs but no luck.
It also seems samsung's system.rfs & userdata.rfs are not actually partition image of rfs. This is very confuse me.

Linux Box Solution,

Thank you for your link. I'll read them to find what I can do.

Linux Box Solutions

unread,
Jun 6, 2011, 1:40:42 AM6/6/11
to asing...@in.com, android-porting

Already gave him the tutorials with scripts much easier also depending on device you may have to add header info which the tutorials explain also

Phinitnan Chanasabaeng

unread,
Jun 6, 2011, 1:42:33 AM6/6/11
to asing...@in.com, android...@googlegroups.com
Ashwini Singh,

Thank you for your suggestion. But the files are not even the gz form. It seems like the files are packed in to a single image which I don't know its type yet.
I'll post here if I can find a solution.

Phinitnan Chanasabaeng

unread,
Jun 6, 2011, 1:55:15 AM6/6/11
to android...@googlegroups.com
I think it may help if i provide more info.
Samsung packed their firmware into files which after extracted are,
- boot.bin
- modem.bin
- slb.bin
- param.lfs
- normalboot.img
- recovery.img
- cache.rfs
- system.rfs
- userdata.rfs

What i guess about these files:
- the first 3 files are bootloader, modem and secondary bootloader
- have no clue what the param.lfs is.
- the .img files are where I should look at (the main & backup kernel+ramfs files, I guess)
- the .rfs files are the platform file, I though they are rfs partition images but they are not. Could be some kind of compressed files.

when open the .img files, their header started with 'ANDROID'. So I guess they might relate to android project in some way.

Tony

Linux Box Solutions

unread,
Jun 6, 2011, 2:17:31 AM6/6/11
to android...@googlegroups.com

Linux Box Solutions

unread,
Jun 6, 2011, 2:22:33 AM6/6/11
to android-porting

Phinitnan Chanasabaeng

unread,
Jun 6, 2011, 3:38:20 AM6/6/11
to Linux Box Solutions, android...@googlegroups.com
Dear all,

by following the instruction from Linux Box Solutions, I'm now able to extract the ramfs file.
Next, I'll try to replace the system.rfs & userdata.rfs with my own build.

Thank you.

Tony

On Mon, Jun 6, 2011 at 1:20 PM, Linux Box Solutions <linuxbox...@gmail.com> wrote:
On Jun 4, 2011 3:38 PM, "Tony" <crack...@gmail.com> wrote:

Linux Box Solutions

unread,
Jun 6, 2011, 10:55:53 AM6/6/11
to crack...@gmail.com, hedwin, android...@googlegroups.com

Linux Box Solutions

unread,
Jun 6, 2011, 10:57:56 AM6/6/11
to linuxbox...@gmail.com, android...@googlegroups.com
Well the android header means it's just a simple partition or something like that thats android specific

www.YouTube.com/linuxboxsolution
www.Krzyview.com
www.Email-Marketers.com

Ismael Miguel

unread,
Sep 1, 2011, 2:46:29 PM9/1/11
to android...@googlegroups.com
img files are disk images, like iso or cso...
those files where used when was no iso or cso...
but, those files are also a image format (check out on any
good image editor)...
i would like to have some help cause i want to edit a img file
on android itself!!!
i know that it's not the right place but needed here...
i want to edit a img file to insert some zip files on it to
run windows 95 correctly, with network and creative blast 16
drivers to have sound...
please, help me!!!

Reply all
Reply to author
Forward
0 new messages