View Single Post
Old 11-01-2011, 12:39 PM   #71
ktwombley
Connoisseur
ktwombley began at the beginning.
 
Posts: 51
Karma: 32
Join Date: Sep 2011
Device: pocket edge
Quote:
Originally Posted by perldude69 View Post
Solved: (For me at least)
Jim dances a jig........
I tricked the update.sh into recovering the mtd partitions for me.
Here are the changes I made to the update.sh:
@Line 199
# Jim - Force update.sh to use dd instead of mtd_debug
dd if=$1 of=$3 bs=$4 count=1 >> $TMP_LOG 2>&1
@Line 216
# Jim - Force update.sh to use dd instead of mtd_debug
dd if=$3 of=$1 bs=64K >> $TMP_LOG 2>&1
@ Line 286
# Jim - Removed check for mtd device
if [[ -e $4 ]];
@ Line 329
# Jim - Removed check for mtd device
if [[ -e $4 ]];
@ Line 372
# Jim - Removed check for mtd device
if [ -e /dev/ubi0 ];
@ Line 612
# Jim - Removed check for Flash mismatch / update.sh delete
#if [ "$UPDATE_DEVICE" != "$TARGET_DEVICE" ];
@ Line 1084
# Jim - Changed == t0 != to fool update.sh into factory reimage of mtd partitions
if [ $UPDATE_TYPE != "golden" ];
@ Line 1130
# Jim Edit - Makes update.sh think this is a factory update.
if [ $UPDATE_ORIGIN != "factory" ];

It deletes everything byte by byte, and restores the image to factory default.

Enjoy!

-- Jim

For those interested, here is the whole update.sh
Rather than changing the tests at the end of update.sh you should just change the variables at the top to say it's a golden/factory update.
ktwombley is offline   Reply With Quote