OffWorld
Senior Member
- Oct 5, 2010
- 460
- 67
I decided to wade into the deep end of the pool and start learning how to extract from firmware and eventually to cook a rom.
First I needed the right tools:
https://sites.google.com/site/naobsd/android-tablet/hsg-x5a
I have no problem building the Telechips Utilties. That's as simple as extracting the folder, cd-ing into it, and running this in my X11 terminal:
I create a directory to extract stuff to and cd into it:
Then I can successfully unpack the nand image that comes with the firmware download using:
That gives me the following files in my "extract" folder:
system.img
recovery.img
boot.img
But the tccunpack is apparently NOT for further extracting anything, so I need "unyaffs" for that. There is a precompiled binary for Windows, but those of us on Mac and Linux will need to build it ourselves. Which is fine since it apparently needs to be patched to deal with Telechips images anyway.
So I get the unyaffs files and the patch. Drop those in a folder called "unyaffs" and do the following in a terminal:
(obviously I do a dry-run before I actually patch)
Usage is pretty simple:
Now this is where things fail. If I run this on a "system.img" fulled from the SDK my "extract" folder gets filled with the usual Android system folders. But any "system.img" from a Telechips firmware produces NOTHING. No folders, not even an error.
This is only for the "system.img" - I haven't bothered with "boot.img" or "recovery.img" since they apparently need additional tools to extract them, and for now I'm only interested in the system files.
I should mention that I first tried vanilla unyaffs and that would give me "segmentation fault" errors on the Telechips images, but also extracted the SDK images just fine.
I suppose if I can't extract the folders directly a nice option would be if I could use the "system.img" in the Android Emulator, which I recall reading somewhere is possible to do, but I don't remember how.
Any ideas?
First I needed the right tools:
https://sites.google.com/site/naobsd/android-tablet/hsg-x5a
I have no problem building the Telechips Utilties. That's as simple as extracting the folder, cd-ing into it, and running this in my X11 terminal:
Code:
#gcc -o tccpack tccpack.c
#gcc -o tccunpack tccunpack.c
#gcc -o tccsplash tccsplash.c
I create a directory to extract stuff to and cd into it:
Code:
#mkdir ~/extract && cd ~/extract
Then I can successfully unpack the nand image that comes with the firmware download using:
Code:
#~/tccutils/tccunpack /downloadedfirmware/tcc8900_mtd.img
That gives me the following files in my "extract" folder:
system.img
recovery.img
boot.img
But the tccunpack is apparently NOT for further extracting anything, so I need "unyaffs" for that. There is a precompiled binary for Windows, but those of us on Mac and Linux will need to build it ourselves. Which is fine since it apparently needs to be patched to deal with Telechips images anyway.
So I get the unyaffs files and the patch. Drop those in a folder called "unyaffs" and do the following in a terminal:
Code:
#patch --dry-run -p1 -i unyaffs.c.diff
#File to patch: unyaffs.c
#patching file unyaffs.c
#patch -p1 -i unyaffs.c.diff
#File to patch: unyaffs.c
#patching file unyaffs.c
(obviously I do a dry-run before I actually patch)
Usage is pretty simple:
Code:
#~/unyaffs/unyaffs ~/extract/system.img
#end of image
Now this is where things fail. If I run this on a "system.img" fulled from the SDK my "extract" folder gets filled with the usual Android system folders. But any "system.img" from a Telechips firmware produces NOTHING. No folders, not even an error.
This is only for the "system.img" - I haven't bothered with "boot.img" or "recovery.img" since they apparently need additional tools to extract them, and for now I'm only interested in the system files.
I should mention that I first tried vanilla unyaffs and that would give me "segmentation fault" errors on the Telechips images, but also extracted the SDK images just fine.
I suppose if I can't extract the folders directly a nice option would be if I could use the "system.img" in the Android Emulator, which I recall reading somewhere is possible to do, but I don't remember how.
Any ideas?
Last edited: