Jump to content


Photo

unpacking and packing tcc8900_mtd.img (not fully working)


  • Please log in to reply
13 replies to this topic

#1 Loonix

Loonix

    Advanced Member

  • Hero Member
  • PipPipPip
  • 880 posts

Posted 11 February 2011 - 03:18 PM

Preamble:
I am not a linux pro, that is probably why i can not manage it. So i do not know what is important and what isnt
I have a Ubuntu 10.10 x32 VirtualBox running on my Win7 x64 host system.
Flashing the files created in this project can be EXTREMELY hazardous. Do not use files not intended for your Pad.
Dabbeling with the Sourcecode can make it even more dangerous! Try at your own Risk!!

1.) unpacking tcc8900_mtd.img (ok)
naobsd's TCC tools work very well to unpack the tcc8900_mtd.img file
also after repacking with the tccpack tool the MD5 and SHA1 match the original.
So no problem there =)
Instructions:
Download the TCC Tools from http://sites.google....-tablet/hsg-x5a
unpack the .tar.gz file
best copy them in their own directory
open a Terminal window
change into the directory where you placed the tcctools
input 'gcc -o tccunpack tccunpack.c' (means "GCC compile a new file named tccunpack from the tccunpack.c file"
now you have a compiled 'tccunpack' in your directory, lets move it to somewhere you can access it from everywhere
input 'sudo mv tccunpack /bin' (means "I am Superuser! So move the file 'tccunpack' to where all the executable files are!"
You will be asked for your Password.
Do the same with the other .c files and move them to /bin
Now you can use the command 'tccunpack tcc8900_mtd.img' from everywhere.
it extracts the boot.img, system.img and recovery.img from the tcc8900_mtd.img
you should be able to exchange the recovery.img with a clockworkmod recovery.img for your pad
and repack the firmware with 'tccpack boot.img system.img recovery.img tcc8900_mtd.img'
you should be able to alter the file names but NOT the sequence

2.) unpacking system.img (ok)
Following naobsd's links I compiled unyaffs incluging the unyaffs.c.diff patch sucessfuly
(i use 2GB NAND firmware so think i do not need to change the CHUNK and SPARE sizes right now)
unpacking the system.img gives me all the files i would expect and i can edit them (so the contens is OK)
Nice, another step that works fine.
Instructions:
We will make two different versions of this command, one for the 'old' firmware, one for the 'new' HY versions.
Follow the Link naobsd provides to http://www.bernhard-...ts/unyaffs.html
download the unyaffs.c and unyaffs.h (you do not need the patch from here)
download the patch naobsd has linked to (unyaffs.c.diff) and place it in the same directory
open a Terminal window.
If you never used the command 'patch' before use this command:
'sudo apt-get install patch' input your password, confirm... (means "I am Superuser! Download and install the command 'patch' from the intertubez!")
now change into the directory where you placed the unyaffs files
input 'patch <unyaffs.c.diff' there should be no errors.
input 'gcc -o unyaffs unyaffs.c' we just made the binary that unpacks old firmware
now use the file explorer to open the 'unyaffs.c' as a text file.
Search and replacethese lines (line 30 and 31):
unsigned chunkSize = 4096;
unsigned spareSize = 128;
with these lines:
unsigned chunkSize = 8192;
unsigned spareSize = 256;
on the commandline input: 'gcc -o unyaffsHY unyaffs.c' (remember 'unyaffs' for old firmware, 'unyaffsHY' for newer HY firmware)
And now lets move these babys to where we can call them from everywhere:
input 'sudo mv unyaffs unyaffsHY /bin'
Now lets see if it works.
copy the system.img you earlier extracted into a new directory
change in the Terminal window into that directory and use 'unyaffs system.img' OR 'unyaffsHY system.img' depending on the firmware file you chose.
after a few seconds you should be back at the commandprompt and a 'ls -all' should show you lots of files you usualy see inside the /system directory.

#2 Loonix

Loonix

    Advanced Member

  • Hero Member
  • PipPipPip
  • 880 posts

Posted 11 February 2011 - 03:18 PM

3.) re-packing system.img (NOT ok)
further following the instructions i grab yaffs2 and the android_filesystem_config.h and applied the .diff. (so this is primed for chunkSize = 4096 and
spareSize = 128 too.)
The 'make' gives a lot of warnings but no 'error'
so...
Instructions:
we will make a mkyaffs2image binary for the old firmware since i cant check at all if the HY variant works.
If you never cloned a .git repository before use the Terminal Window and enter:
'sudo apt-get install git' (give password, confirm, lean back...)
change into a directory where you want the next batch of files we will be toying with.
input 'git clone git://android.git.kernel.org/platform/external/yaffs2.git'
now you have a 'yaffs2' directory where you just have been.
change into that and the 2nd yaffs2 directory under that too.
The "yaffs2-android-git.diff" must be inside this directory. (if you want a HY version you need to open the .diff file and change the chunk and spare size to the values mentioned in the unyaffs part)
the linked "android_filesystem_config.h" must be inside the 'utils' directory.
the contens of the "android_filesystem_config.h" has no leading numbers! it looks like this:
/*
 * Copyright (C) 2007 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* This file is used to define the properties of the filesystem
** images generated by build tools (mkbootfs and mkyaffs2image) and
** by the device side of adb.
*/

#ifndef _ANDROID_FILESYSTEM_CONFIG_H_
#define _ANDROID_FILESYSTEM_CONFIG_H_

#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>

/* This is the master Users and Groups config for the platform.
** DO NOT EVER RENUMBER.
*/

#define AID_ROOT             0  /* traditional unix root user */

#define AID_SYSTEM        1000  /* system server */

#define AID_RADIO         1001  /* telephony subsystem, RIL */
#define AID_BLUETOOTH     1002  /* bluetooth subsystem */
#define AID_GRAPHICS      1003  /* graphics devices */
#define AID_INPUT         1004  /* input devices */
#define AID_AUDIO         1005  /* audio devices */
#define AID_CAMERA        1006  /* camera devices */
#define AID_LOG           1007  /* log devices */
#define AID_COMPASS       1008  /* compass device */
#define AID_MOUNT         1009  /* mountd socket */
#define AID_WIFI          1010  /* wifi subsystem */
#define AID_ADB           1011  /* android debug bridge (adbd) */
#define AID_INSTALL       1012  /* group for installing packages */
#define AID_MEDIA         1013  /* mediaserver process */
#define AID_DHCP          1014  /* dhcp client */
#define AID_SDCARD_RW     1015  /* external storage write access */
#define AID_VPN           1016  /* vpn system */
#define AID_KEYSTORE      1017  /* keystore subsystem */
#define AID_USB           1018  /* USB devices */
#define AID_DRM           1019  /* DRM server */
#define AID_DRMIO         1020  /* DRM IO server */
#define AID_GPS           1021  /* GPS daemon */
#define AID_NFC           1022  /* nfc subsystem */

#define AID_SHELL         2000  /* adb and debug shell user */
#define AID_CACHE         2001  /* cache access */
#define AID_DIAG          2002  /* access to diagnostic resources */

/* The 3000 series are intended for use as supplemental group id's only.
 * They indicate special Android capabilities that the kernel is aware of. */
#define AID_NET_BT_ADMIN  3001  /* bluetooth: create any socket */
#define AID_NET_BT        3002  /* bluetooth: create sco, rfcomm or l2cap sockets */
#define AID_INET          3003  /* can create AF_INET and AF_INET6 sockets */
#define AID_NET_RAW       3004  /* can create raw INET sockets */
#define AID_NET_ADMIN     3005  /* can configure interfaces and routing tables. */

#define AID_MISC          9998  /* access to misc storage */
#define AID_NOBODY        9999

#define AID_APP          10000 /* first app user */

#if !defined(EXCLUDE_FS_CONFIG_STRUCTURES)
struct android_id_info {
    const char *name;
    unsigned aid;
};

static const struct android_id_info android_ids[] = {
    { "root",      AID_ROOT, },
    { "system",    AID_SYSTEM, },
    { "radio",     AID_RADIO, },
    { "bluetooth", AID_BLUETOOTH, },
    { "graphics",  AID_GRAPHICS, },
    { "input",     AID_INPUT, },
    { "audio",     AID_AUDIO, },
    { "camera",    AID_CAMERA, },
    { "log",       AID_LOG, },
    { "compass",   AID_COMPASS, },
    { "mount",     AID_MOUNT, },
    { "wifi",      AID_WIFI, },
    { "dhcp",      AID_DHCP, },
    { "adb",       AID_ADB, },
    { "install",   AID_INSTALL, },
    { "media",     AID_MEDIA, },
    { "drm",       AID_DRM, },
    { "drmio",     AID_DRMIO, },
    { "nfc",       AID_NFC, },
    { "shell",     AID_SHELL, },
    { "cache",     AID_CACHE, },
    { "diag",      AID_DIAG, },
    { "net_bt_admin", AID_NET_BT_ADMIN, },
    { "net_bt",    AID_NET_BT, },
    { "sdcard_rw", AID_SDCARD_RW, },
    { "vpn",       AID_VPN, },
    { "keystore",  AID_KEYSTORE, },
    { "usb",       AID_USB, },
    { "gps",       AID_GPS, },
    { "inet",      AID_INET, },
    { "net_raw",   AID_NET_RAW, },
    { "net_admin", AID_NET_ADMIN, },
    { "misc",      AID_MISC, },
    { "nobody",    AID_NOBODY, },
};

#define android_id_count 
    (sizeof(android_ids) / sizeof(android_ids[0]))
    
struct fs_path_config {
    unsigned mode;
    unsigned uid;
    unsigned gid;
    const char *prefix;
};

/* Rules for directories.
** These rules are applied based on "first match", so they
** should start with the most specific path and work their
** way up to the root.
*/

static struct fs_path_config android_dirs[] = {
    { 00770, AID_SYSTEM, AID_CACHE,  "cache" },
    { 00771, AID_SYSTEM, AID_SYSTEM, "data/app" },
    { 00771, AID_SYSTEM, AID_SYSTEM, "data/app-private" },
    { 00771, AID_SYSTEM, AID_SYSTEM, "data/dalvik-cache" },
    { 00771, AID_SYSTEM, AID_SYSTEM, "data/data" },
    { 00771, AID_SHELL,  AID_SHELL,  "data/local/tmp" },
    { 00771, AID_SHELL,  AID_SHELL,  "data/local" },
    { 01771, AID_SYSTEM, AID_MISC,   "data/misc" },
    { 00770, AID_DHCP,   AID_DHCP,   "data/misc/dhcp" },
    { 00771, AID_SYSTEM, AID_SYSTEM, "data" },
    { 00750, AID_ROOT,   AID_SHELL,  "sbin" },
    { 00755, AID_ROOT,   AID_SHELL,  "system/bin" },
    { 00755, AID_ROOT,   AID_SHELL,  "system/vendor" },
    { 00755, AID_ROOT,   AID_SHELL,  "system/xbin" },
    { 00755, AID_ROOT,   AID_ROOT,   "system/etc/ppp" },
    { 00777, AID_ROOT,   AID_ROOT,   "sdcard" },
    { 00755, AID_ROOT,   AID_ROOT,   0 },
};

/* Rules for files.
** These rules are applied based on "first match", so they
** should start with the most specific path and work their
** way up to the root. Prefixes ending in * denotes wildcard
** and will allow partial matches.
*/
static struct fs_path_config android_files[] = {
    { 00440, AID_ROOT,      AID_SHELL,     "system/etc/init.goldfish.rc" },
    { 00550, AID_ROOT,      AID_SHELL,     "system/etc/init.goldfish.sh" },
    { 00440, AID_ROOT,      AID_SHELL,     "system/etc/init.trout.rc" },
    { 00550, AID_ROOT,      AID_SHELL,     "system/etc/init.ril" },
    { 00550, AID_ROOT,      AID_SHELL,     "system/etc/init.testmenu" },
    { 00550, AID_DHCP,      AID_SHELL,     "system/etc/dhcpcd/dhcpcd-run-hooks" },
    { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/dbus.conf" },
    { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluetooth/main.conf" },
    { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluetooth/input.conf" },
    { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluetooth/audio.conf" },
    { 00444, AID_NET_BT,    AID_NET_BT,    "system/etc/bluetooth/blacklist.conf" },
    { 00640, AID_SYSTEM,    AID_SYSTEM,    "system/etc/bluetooth/auto_pairing.conf" },
    { 00444, AID_RADIO,     AID_AUDIO,     "system/etc/AudioPara4.csv" },
    { 00555, AID_ROOT,      AID_ROOT,      "system/etc/ppp/*" },
    { 00555, AID_ROOT,      AID_ROOT,      "system/etc/rc.*" },
    { 00644, AID_SYSTEM,    AID_SYSTEM,    "data/app/*" },
    { 00644, AID_SYSTEM,    AID_SYSTEM,    "data/app-private/*" },
    { 00644, AID_APP,       AID_APP,       "data/data/*" },
        /* the following two files are INTENTIONALLY set-gid and not set-uid.
         * Do not change. */
    { 02755, AID_ROOT,      AID_NET_RAW,   "system/bin/ping" },
    { 02750, AID_ROOT,      AID_INET,      "system/bin/netcfg" },
    	/* the following five files are INTENTIONALLY set-uid, but they
	 * are NOT included on user builds. */
    { 06755, AID_ROOT,      AID_ROOT,      "system/xbin/su" },
    { 06755, AID_ROOT,      AID_ROOT,      "system/xbin/librank" },
    { 06755, AID_ROOT,      AID_ROOT,      "system/xbin/procrank" },
    { 06755, AID_ROOT,      AID_ROOT,      "system/xbin/procmem" },
    { 06755, AID_ROOT,      AID_ROOT,      "system/xbin/tcpdump" },
    { 04770, AID_ROOT,      AID_RADIO,     "system/bin/pppd-ril" },
		/* the following file is INTENTIONALLY set-uid, and IS included
		 * in user builds. */
    { 06750, AID_ROOT,      AID_SHELL,     "system/bin/run-as" },
    { 00755, AID_ROOT,      AID_SHELL,     "system/bin/*" },
    { 00755, AID_ROOT,      AID_SHELL,     "system/xbin/*" },
    { 00755, AID_ROOT,      AID_SHELL,     "system/vendor/bin/*" },
    { 00750, AID_ROOT,      AID_SHELL,     "sbin/*" },
    { 00755, AID_ROOT,      AID_ROOT,      "bin/*" },
    { 00750, AID_ROOT,      AID_SHELL,     "init*" },
    { 00644, AID_ROOT,      AID_ROOT,       0 },
};

static inline void fs_config(const char *path, int dir,
                             unsigned *uid, unsigned *gid, unsigned *mode)
{
    struct fs_path_config *pc;
    int plen;
    
    pc = dir ? android_dirs : android_files;
    plen = strlen(path);
    for(; pc->prefix; pc++){
        int len = strlen(pc->prefix);
        if (dir) {
            if(plen < len) continue;
            if(!strncmp(pc->prefix, path, len)) break;
            continue;
        }
        /* If name ends in * then allow partial matches. */
        if (pc->prefix[len -1] == '*') {
            if(!strncmp(pc->prefix, path, len - 1)) break;
        } else if (plen == len){
            if(!strncmp(pc->prefix, path, len)) break;
        }
    }
    *uid = pc->uid;
    *gid = pc->gid;
    *mode = (*mode & (~07777)) | pc->mode;
    
#if 0
    fprintf(stderr,"< '%s' '%s' %d %d %o >n", 
            path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode);
#endif
}
#endif
#endif
Now execute the Patch 'patch -p0 <yaffs2-android-git.diff'
you should get no errors while patching.
change into the 'utils' directory and execute 'make'
this should give you a lot of warnings but no error and when you are finished you should have two new files in the directory
mkyaffs2image and mkyaffsimage. we need only the first mentioned.
Here is the output while the 'make' runs for those wo know more about this:
test@test-VirtualBox:~/Downloads/yaffs2/yaffs2/utils$ make
ln -s ../yaffs_ecc.c yaffs_ecc.c
gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -DCONFIG_YAFFS_DOES_ECC -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline yaffs_ecc.c -o yaffs_ecc.o
gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -DCONFIG_YAFFS_DOES_ECC -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline mkyaffsimage.c -o mkyaffsimage.o
In file included from ../yaffs_guts.h:23,
                 from mkyaffsimage.c:34:
../devextras.h:210: warning: "DT_UNKNOWN" redefined
/usr/include/dirent.h:101: note: this is the location of the previous definition
../devextras.h:211: warning: "DT_FIFO" redefined
/usr/include/dirent.h:103: note: this is the location of the previous definition
../devextras.h:212: warning: "DT_CHR" redefined
/usr/include/dirent.h:105: note: this is the location of the previous definition
../devextras.h:213: warning: "DT_DIR" redefined
/usr/include/dirent.h:107: note: this is the location of the previous definition
../devextras.h:214: warning: "DT_BLK" redefined
/usr/include/dirent.h:109: note: this is the location of the previous definition
../devextras.h:215: warning: "DT_REG" redefined
/usr/include/dirent.h:111: note: this is the location of the previous definition
../devextras.h:216: warning: "DT_LNK" redefined
/usr/include/dirent.h:113: note: this is the location of the previous definition
../devextras.h:217: warning: "DT_SOCK" redefined
/usr/include/dirent.h:115: note: this is the location of the previous definition
../devextras.h:218: warning: "DT_WHT" redefined
/usr/include/dirent.h:117: note: this is the location of the previous definition
mkyaffsimage.c: In function ‘process_directory’:
mkyaffsimage.c:445: warning: ignoring return value of ‘readlink’, declared with attribute warn_unused_result
mkyaffsimage.c: At top level:
mkyaffsimage.c:119: warning: ‘yaffs_CalcNameSum’ defined but not used
mkyaffsimage.c: In function ‘write_chunk’:
mkyaffsimage.c:231: warning: dereferencing pointer ‘tags’ does break strict-aliasing rules
mkyaffsimage.c:230: warning: dereferencing pointer ‘tags’ does break strict-aliasing rules
mkyaffsimage.c:229: warning: dereferencing pointer ‘tags’ does break strict-aliasing rules
mkyaffsimage.c:228: warning: dereferencing pointer ‘tags’ does break strict-aliasing rules
mkyaffsimage.c:227: warning: dereferencing pointer ‘tags’ does break strict-aliasing rules
mkyaffsimage.c:226: warning: dereferencing pointer ‘tags’ does break strict-aliasing rules
mkyaffsimage.c:225: warning: dereferencing pointer ‘tags’ does break strict-aliasing rules
mkyaffsimage.c:224: warning: dereferencing pointer ‘tags’ does break strict-aliasing rules
mkyaffsimage.c:209: note: initialized from here
mkyaffsimage.c: In function ‘write_object_header’:
mkyaffsimage.c:326: warning: array subscript is above array bounds
mkyaffsimage.c:326: warning: array subscript is above array bounds
mkyaffsimage.c:327: warning: array subscript is above array bounds
mkyaffsimage.c:327: warning: array subscript is above array bounds
gcc -o mkyaffsimage yaffs_ecc.o mkyaffsimage.o
gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -DCONFIG_YAFFS_DOES_ECC -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline mkyaffs2image.c -o mkyaffs2image.o
In file included from ../yaffs_guts.h:23,
                 from mkyaffs2image.c:38:
../devextras.h:210: warning: "DT_UNKNOWN" redefined
/usr/include/dirent.h:101: note: this is the location of the previous definition
../devextras.h:211: warning: "DT_FIFO" redefined
/usr/include/dirent.h:103: note: this is the location of the previous definition
../devextras.h:212: warning: "DT_CHR" redefined
/usr/include/dirent.h:105: note: this is the location of the previous definition
../devextras.h:213: warning: "DT_DIR" redefined
/usr/include/dirent.h:107: note: this is the location of the previous definition
../devextras.h:214: warning: "DT_BLK" redefined
/usr/include/dirent.h:109: note: this is the location of the previous definition
../devextras.h:215: warning: "DT_REG" redefined
/usr/include/dirent.h:111: note: this is the location of the previous definition
../devextras.h:216: warning: "DT_LNK" redefined
/usr/include/dirent.h:113: note: this is the location of the previous definition
../devextras.h:217: warning: "DT_SOCK" redefined
/usr/include/dirent.h:115: note: this is the location of the previous definition
../devextras.h:218: warning: "DT_WHT" redefined
/usr/include/dirent.h:117: note: this is the location of the previous definition
In file included from mkyaffs2image.c:40:
../yaffs_tagsvalidity.h:23: warning: redundant redeclaration of ‘yaffs_InitialiseTags’
../yaffs_guts.h:891: note: previous declaration of ‘yaffs_InitialiseTags’ was here
mkyaffs2image.c: In function ‘process_directory’:
mkyaffs2image.c:373: warning: ignoring return value of ‘readlink’, declared with attribute warn_unused_result
mkyaffs2image.c: In function ‘write_object_header’:
mkyaffs2image.c:195: warning: array subscript is above array bounds
mkyaffs2image.c:195: warning: array subscript is above array bounds
mkyaffs2image.c:196: warning: array subscript is above array bounds
mkyaffs2image.c:196: warning: array subscript is above array bounds
ln -s ../yaffs_packedtags2.c yaffs_packedtags2.c
gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -DCONFIG_YAFFS_DOES_ECC -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline yaffs_packedtags2.c -o yaffs_packedtags2.o
In file included from yaffs_packedtags2.c:18:
../yaffs_tagsvalidity.h:23: warning: redundant redeclaration of ‘yaffs_InitialiseTags’
../yaffs_guts.h:891: note: previous declaration of ‘yaffs_InitialiseTags’ was here
ln -s ../yaffs_tagsvalidity.c yaffs_tagsvalidity.c
gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -DCONFIG_YAFFS_DOES_ECC -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline yaffs_tagsvalidity.c -o yaffs_tagsvalidity.o
In file included from yaffs_tagsvalidity.c:17:
../yaffs_tagsvalidity.h:23: warning: redundant redeclaration of ‘yaffs_InitialiseTags’
../yaffs_guts.h:891: note: previous declaration of ‘yaffs_InitialiseTags’ was here
gcc -o mkyaffs2image yaffs_ecc.o mkyaffs2image.o yaffs_packedtags2.o yaffs_tagsvalidity.o
well, lets move this to the binarys:
'sudo mv mkyaffs2image /bin'
This will pack an entire directory into one yaffs2 file so remove everything you do not want in there before you pack it!
(for example the system.img itself you just unpacked)
usage: 'mkyaffs2image DIRECTORY_YOU_WANT_TO_PACK NEW_SYSTEM_IMAGE_TO_CREATE.img'

Well, doing this last step gives a file with the same size as the original but even if i do not change anything inside the directory the MD5 sums of the original and the new system.img are different.

4.) fusing the tcc8900_mtd.img back together. (ok)[/b]
Works well as long as you did not change the system.img :(
Instructions:
Well, if you made the tccpack in step 1.) you are all set.
have all your .img files together and
input: 'tccpack boot.img system.img recovery.img tcc8900_mtd.img'
if there is already a tcc8900_mtd.img it will be overwritten.
move it to a shared directory or USB stick, Mail it to you or upload it to an online hoster,
try it in FWDN... please dont brick your pad!
(use only files intended for your pad! especialy the boot.img!!!)

I hope you did not fall asleep while reading this and can take some limited use from this.
Have some fun! (and thank you fun_ for making all the tcc tools! :))

#3 -Mr-

-Mr-

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 54 posts

Posted 11 February 2011 - 05:06 PM

Hi!

In section 3, the original and new img file is different because inside the file order is changed.
So technically the file system inside img file is same, just files are placed at another position.

-Mr-

#4 Loonix

Loonix

    Advanced Member

  • Hero Member
  • PipPipPip
  • 880 posts

Posted 11 February 2011 - 05:11 PM

that can be.
Still, none of the re-packed firmwares i made with a re-packed system.img inside passed the CRC check of FWDN.

#5 jschill31

jschill31

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 259 posts
  • LocationMidwest

Posted 11 February 2011 - 11:12 PM

Hey Loonix,

I have to admit you peaked my curiosity…  I understand several uses for this but what are you intending on using it for?  In other words, what are you hoping to achieve as a final outcome?

Cheers

#6 Loonix

Loonix

    Advanced Member

  • Hero Member
  • PipPipPip
  • 880 posts

Posted 12 February 2011 - 03:56 AM

hmm, firstly i want to be able to do this.
initialy i wanted to do this just to use firmware designed for the newer HY models on the old 2GB Pads.

Then it came ito my mind that this is the ultmate path to noob friendly custom firmware.
We could unpack stock-firmware, remove unwanted apps (eoemarket, outdated Maps apps, modifyed build.prop..)
and pack it so that any noob can flash it even without ADB.
Wouldnt clockworkmod recovery without ADB be great?

So, i hope for newer, better firware for noobs.

#7 jschill31

jschill31

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 259 posts
  • LocationMidwest

Posted 12 February 2011 - 12:44 PM

hmm, firstly i want to be able to do this.
initialy i wanted to do this just to use firmware designed for the newer HY models on the old 2GB Pads.

Then it came ito my mind that this is the ultmate path to noob friendly custom firmware.
We could unpack stock-firmware, remove unwanted apps (eoemarket, outdated Maps apps, modifyed build.prop..)
and pack it so that any noob can flash it even without ADB.
Wouldnt clockworkmod recovery without ADB be great?

So, i hope for newer, better firware for noobs.


Gotya, I admit it would be nice to include the Clockwork mod in a standard firmware.  I have found however that I have been able to learn more about this tablet by bricking it a few times.  ;)

#8 Loonix

Loonix

    Advanced Member

  • Hero Member
  • PipPipPip
  • 880 posts

Posted 12 February 2011 - 01:05 PM

jepp, trying this and writing it up was also very educational for me.
I could try and publish firmwares with build in clockworkmod recovery in them now
but i am afraid that it might not work as well on other peoples pads.
Maybe i will build a clockworked #181 build for the m701 later.

#9 Loonix

Loonix

    Advanced Member

  • Hero Member
  • PipPipPip
  • 880 posts

Posted 12 February 2011 - 05:40 PM

Ok, i did try to upload this here but i can only upload 200B files o_O

Here i give you my first m701 'custom' firmware.
it is stock Haipad m701 2GB firmware.
it is the 11.16 firmware with build number #181
I added clockworkmod recovery from naobsd dated 20101212 which keeps FWDN compatibility.
This firmware is NOT for pads that need HY firmware.
http://www.multiupload.com/VPI5CF7E5R

Maybe this will help some people that do not want / do not know how to install ADB.
I tested this on my own pad with and without formating the NAND flash so i am positive it will work.

#10 jschill31

jschill31

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 259 posts
  • LocationMidwest

Posted 12 February 2011 - 11:38 PM

Loonix,

Good for you, makes me wish I had your pad so I could give it a go.  I have decided to get a few different versions so it may happen yet.  I should have a Coby here as well next week.  I figure there there may be bits and pieces between platforms that will make a few things click that are not now.  Coby seems to have some upkeep on their software, in fact one of the guys I work with has one and is claiming 6+ hours of use on a single charge.  What I liked was it was lighter and only needed a 5v input to for charging.  These are both huge advantages over the x5a, but the x5a is almost impossible to kill.

Cheers

#11 Loonix

Loonix

    Advanced Member

  • Hero Member
  • PipPipPip
  • 880 posts

Posted 14 February 2011 - 12:12 PM

Here is a version for m701 4GB (HY)
it is the 2011/1/20 with naobsd's clockworkmod from 29-Jan-2011

http://www.multiupload.com/JMADFQ8716
This is untested!
If you try it please report back!

#12 ViníciusBR

ViníciusBR

    Newbie

  • Jr. Member
  • Pip
  • 1 posts

Posted 15 July 2011 - 05:14 PM

Hello everybody. I would like to ask a question. I have a Coby Kyros 7020 defective but I have images of him (system.img, boot.img and recovery.img) extracted from another Kyros. How do I make an image fwdn compatible? I've tried the above but with procedures (tccpack) but fwdn never ends, the screen is blue and does not end. Thank you.

#13 Urknaller

Urknaller

    Newbie

  • Jr. Member
  • Pip
  • 6 posts

Posted 06 June 2012 - 12:40 PM

Still, none of the re-packed firmwares i made with a re-packed system.img inside passed the CRC check of FWDN.


Hi Loonix,
did you manage to create a working system.img which will not fail the FWDN CRC check in the meantime :)?

I have the same problem. Unpacking, repacking and flashing tcc8900_mtd.img works fine, but as soon as I try to make a new system.img with mkyaffs2image it fails the FWDN CRC check and the ROM won't boot.

I hope you got a solution for this, you're my only hope at the moment :)!

#14 Mala

Mala

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 95 posts

Posted 11 June 2012 - 05:59 AM

@Urknaller

See here:
http://www.slatedroi...post__p__211934