View Single Post
Old 03-29-2012, 06:18 PM   #113
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by hostar View Post
I didn't know that at all .
Is it possible to extract and backup it?

EDIT: I see...
You can backup the kernels with:

dd if=/dev/mmcblk0 of=/mnt/us/mmcblk0.img bs=1K count=32K

That will save the first 32MB of the mmc device (with the "write-only" areas showing as all "\x00"). You can extract kernel images from that, which you can flash with fastboot. The main kernel starts at 0x41000 and the diags kernel starts at 0xe41000 (on the touch). I am not sure about the K4, but you can find them by searching for "Linux-" with grep. The flash header is in the 32-bytes before the "Linux-" string, and it contains the length of the flash image. It should be rounded up to the next erase block boundary. The kernel images are normally padded with a bunch of /x00 or /xff from the end of the kernel identified in the flash header up to the flash erase block boundary.

As you can see, it would be easier if this were automated in a script, which is what I plan to do.

geekmaster is offline   Reply With Quote