Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-20-2013, 12:00 PM   #16
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by kaznelson View Post
knc1

K5(PW) 5.3.3: 1812030015
That is what is shown on the Amazon HTML page.

The names in the table are taken from the archive name (which in this case does not include the build number).

Translation: I didn't screw up, Amazon did.
knc1 is offline   Reply With Quote
Old 02-20-2013, 12:21 PM   #17
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,491
Karma: 5977000
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
This is an extremely thorough one-man effort.

Respect.

(insert lab126 bashing statements here)
twobob is offline   Reply With Quote
Old 02-20-2013, 12:41 PM   #18
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
K4 Diag Specifics (from the binary)

Having learned a bit from the 'main' kernel - - -

Assume that the diags kernel came out of the same build process as the main kernel, see if we can get lucky finding the dot-config file.

The kernel uses gzip compression for the dot-config file, so search for those magic numbers:
Spoiler:

Code:
core2quad diags $ od -A d -t x1 kernel_diags_4.0.img | grep '1f 8b 08 00'
0289536 05 00 00 00 1f 8b 08 00 00 00 00 00 02 03 ed 92
0545488 1a 48 02 00 1a 48 02 00 1f 8b 08 00 00 00 00 00
0550144 cc d4 01 00 2c 12 00 00 1f 8b 08 00 00 00 00 00
0553840 00 00 00 00 6a 0e 00 00 1f 8b 08 00 00 00 00 00
0554064 1f 8b 08 00 00 00 00 00 02 03 63 61 60 60 50 01
0554112 1f 8b 08 00 00 00 00 00 02 03 5d 8e 31 0e 40 40
0554240 00 00 00 00 81 00 00 00 1f 8b 08 00 00 00 00 00
0554384 86 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0554560 a6 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0554608 26 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0554736 1f 8b 08 00 00 00 00 00 02 03 5d 8d bb 0d 80 30
0554848 c8 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0558384 1f 8b 08 00 00 00 00 00 00 03 ed 9d 4f 6c 23 57
0562688 1f 8b 08 00 00 00 00 00 00 03 ed 9d 31 93 dc 46
0566816 1f 8b 08 00 00 00 00 00 00 03 ed 9d 3f 93 dc 46
0572608 1f 8b 08 00 00 00 00 00 00 03 ed 9d bd 8f dc c6
0575600 cc d4 01 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0583168 1f 8b 08 00 00 00 00 00 00 03 ed 9d c1 8f dc 46
0588208 1f 8b 08 00 00 00 00 00 00 03 ed 9d 7f 6c 1b 67
3853328 47 5f 53 54 1f 8b 08 00 43 8a 61 4e 02 03 94 5c


Try the last one found:
Spoiler:

Code:
core2quad diags $ od -A d -t x1 kernel_diags_4.0.img | grep '1f 8b 08 00'
- - - -
3853328 47 5f 53 54 1f 8b 08 00 43 8a 61 4e 02 03 94 5c

core2quad diags $ dd if=kernel_diags_4.0.img bs=1 skip=3853332 of=kd-4.0-99.gz
1269740+0 records in
1269740+0 records out
1269740 bytes (1.3 MB) copied, 4.8644 s, 261 kB/s

core2quad diags $ file kd-4.0-99.gz
kd-4.0-99.gz: gzip compressed data, from Unix, last modified: Fri Sep  2 21:00:35 2011, max compression

core2quad diags $ zcat kd-4.0-99.gz >kd-4.0-99
gzip: kd-4.0-99.gz: decompression OK, trailing garbage ignored

core2quad diags $ file kd-4.0-99
kd-4.0-99: ASCII English text

core2quad diags $ less kd-4.0-99

Yup - that is the kernel dot-config file. Attach a copy of it here.
Code:
core2quad diags $ mv kd-4.0-99 dot-config-diags-4.0
core2quad diags $ gzip dot-config-diags-4.0
Now take a quick check of the configuration options for the initramFS file:
Code:
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="initramfs.list"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0
CONFIG_RD_GZIP=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
CONFIG_INITRAMFS_COMPRESSION_NONE=y
# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set
Yup, not compressed.

Trim the known, compressed, dot-config off of the kernel image:
Code:
core2quad diags $ dd if=kernel_diags_4.0.img bs=1 count=3853332 of=kd-trim.bin
3853332+0 records in
3853332+0 records out
3853332 bytes (3.9 MB) copied, 14.889 s, 259 kB/s
Search for the -H newc cpio magic number:
Spoiler:

Code:
core2quad diags $ od -A d -t x1 kd-trim.bin | grep '30 37 30 37 30 31' 
0102560 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30
0102672 65 76 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0102912 6f 6e 73 6f 6c 65 00 00 30 37 30 37 30 31 30 30
0103040 30 37 30 37 30 31 30 30 30 30 30 32 44 35 30 30
0103152 65 76 2f 7a 65 72 6f 00 30 37 30 37 30 31 30 30
0103280 6d 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103520 6d 69 63 00 30 37 30 37 30 31 30 30 30 30 30 32
0103760 61 74 63 68 64 6f 67 00 30 37 30 37 30 31 30 30
0103888 63 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104016 30 37 30 37 30 31 30 30 30 30 30 32 44 44 30 30
0104256 74 79 6d 78 63 33 00 00 30 37 30 37 30 31 30 30
0104384 63 34 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104624 62 2f 30 00 30 37 30 37 30 31 30 30 30 30 30 32
0104752 2f 66 62 2f 30 00 00 00 30 37 30 37 30 31 30 30
0104880 6b 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105008 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105136 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105264 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105392 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105520 30 37 30 37 30 31 30 30 30 30 30 32 45 39 30 30
0105648 30 37 30 37 30 31 30 30 30 30 30 32 45 41 30 30
0105776 30 37 30 37 30 31 30 30 30 30 30 32 45 42 30 30
0105904 30 37 30 37 30 31 30 30 30 30 30 32 45 43 30 30
0106032 30 37 30 37 30 31 30 30 30 30 30 32 45 44 30 30
0106144 65 76 2f 6d 74 64 00 00 30 37 30 37 30 31 30 30
0106272 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106400 30 37 30 37 30 31 30 30 30 30 30 32 46 30 30 30
0106640 74 64 2f 33 00 00 00 00 30 37 30 37 30 31 30 30
0106768 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106896 30 37 30 37 30 31 30 30 30 30 30 32 46 34 30 30
0107904 6f 6f 70 30 00 00 00 00 30 37 30 37 30 31 30 30
0108032 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0108160 30 37 30 37 30 31 30 30 30 30 30 32 46 45 30 30
0108400 32 63 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108528 30 37 30 37 30 31 30 30 30 30 30 33 30 31 30 30
0108768 32 63 2f 32 00 00 00 00 30 37 30 37 30 31 30 30
0108896 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0109024 6e 74 30 00 30 37 30 37 30 31 30 30 30 30 30 33
0109152 6e 74 31 00 30 37 30 37 30 31 30 30 30 30 30 33
0109264 30 30 2f 70 72 6f 63 00 30 37 30 37 30 31 30 30
0109504 30 37 30 37 30 31 30 30 30 30 30 33 30 39 30 30
0109616 69 62 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188240 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188368 30 37 30 37 30 31 30 30 30 30 30 33 30 43 30 30
0188480 6e 74 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0239072 02 95 01 00 30 37 30 37 30 31 30 30 30 30 30 33
0274192 30 37 30 37 30 31 30 30 30 30 30 33 31 30 30 30
0309840 30 37 30 37 30 31 30 30 30 30 30 33 31 31 30 30
0353312 02 0a 01 00 30 37 30 37 30 31 30 30 30 30 30 33
0371456 02 80 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0382896 30 37 30 37 30 31 30 30 30 30 30 33 31 34 30 30
0390512 02 3f 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0390624 30 30 2f 62 69 6e 00 00 30 37 30 37 30 31 30 30
0411760 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0414000 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0911712 30 37 30 37 30 31 30 30 30 30 30 33 31 42 30 30
0988224 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
1085328 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33


Maybe we can get lucky, and it is the first one:
Code:
core2quad diags $ od -A d -t x1 kd-trim.bin | grep '30 37 30 37 30 31' 
0102560 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30

core2quad diags $ dd if=kd-trim.bin bs=1 skip=102560 of=kd-trim-00.cpio
3750772+0 records in
3750772+0 records out
3750772 bytes (3.8 MB) copied, 14.8647 s, 252 kB/s

core2quad diags $ file kd-trim-00.cpio
kd-trim-00.cpio: ASCII cpio archive (SVR4 with no CRC)

core2quad diags $ mkdir cpio
core2quad diags $ cd cpio
core2quad cpio $ sudo su

core2quad cpio # cpio -i -d -m  --no-absolute-filenames -I ../kd-trim-00.cpio
cpio: Removing leading `/' from member names
1920 blocks

core2quad cpio # ls -l
total 28
drwxr-xr-x 2 root root 4096 2013-02-20 12:24 bin
drwxr-xr-x 7 root root 4096 2013-02-20 12:24 dev
lrwxrwxrwx 1 root root   18 2013-02-20 12:24 init -> /bin/recovery-util
drwxr-xr-x 3 root root 4096 2013-02-20 12:24 lib
drwxr-xr-x 3 root root 4096 2013-02-20 12:24 mnt
drwxr-xr-x 2 root root 4096 2011-09-02 21:00 proc
drwx------ 2 root root 4096 2011-09-02 21:00 root
drwxr-xr-x 2 root root 4096 2011-09-02 21:00 sys
Got lucky, make an archive of that for reference purposes.
Attached Files
File Type: gz dot-config-diags-4.0.gz (11.5 KB, 22 views)
File Type: gz diags-4.0-irfs.tar.gz (450.7 KB, 22 views)

Last edited by knc1; 02-21-2013 at 08:03 PM.
knc1 is offline   Reply With Quote
Old 02-20-2013, 12:51 PM   #19
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by twobob View Post
This is an extremely thorough one-man effort.

Respect.

(insert lab126 bashing statements here)
I cheated a bit.
I found a very complete, keystroke by keystroke, HowTo de-compose a binary kernel image on: http://MiniModding.com
knc1 is offline   Reply With Quote
Old 02-20-2013, 01:13 PM   #20
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,491
Karma: 5977000
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by knc1 View Post
I cheated a bit.
I found a very complete, keystroke by keystroke, HowTo de-compose a binary kernel image on: http://MiniModding.com
Heh. A mighty fine resource for all.

Which. I might add... is running VERY nicely now I now note...

*time to shift some articles across soon I think therefore*

Topness!!
twobob is offline   Reply With Quote
Old 02-20-2013, 02:58 PM   #21
baf
Addict
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 323
Karma: 1346560
Join Date: May 2012
Device: kt
Quote:
Originally Posted by knc1 View Post
Having learned a bit from the 'main' kernel - - -

Assume that the diags kernel came out of the same build process as the main kernel, see if we can get lucky finding the dot-config file.

The kernel uses gzip compression for the dot-config file, so search for those magic numbers:
Nice detective work! I recommend binwalk for those who don't have skills or time.

Spoiler:
Code:
wifi3:~ baf$ binwalk -x LZMA Downloads/diags_kernel.img 

DECIMAL   	HEX       	DESCRIPTION
-------------------------------------------------------------------------------------------------------
0         	0x0       	uImage header, header size: 64 bytes, header CRC: 0x2A4A2E2C, created: Sat Sep  3 04:01:08 2011, image size: 5122432 bytes, Data Address: 0x70008000, Entry Point: 0x70008000, data CRC: 0xAB6660C5, OS: Linux, CPU: ARM, image type: OS Kernel Image, compression type: none, image name: "Linux-2.6.31-rt11-lab126"
102560    	0x190A0   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev" 
102676    	0x19114   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/tty" 
102796    	0x1918C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/console" 
102920    	0x19208   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/null" 
103040    	0x19280   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/zero" 
103160    	0x192F8   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/random" 
103284    	0x19374   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mem" 
103404    	0x193EC   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/pmic" 
103524    	0x19464   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/usb1" 
103644    	0x194DC   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/watchdog" 
103768    	0x19558   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc0" 
103892    	0x195D4   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc1" 
104016    	0x19650   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc2" 
104140    	0x196CC   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc3" 
104264    	0x19748   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc4" 
104388    	0x197C4   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/fb" 
104508    	0x1983C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/fb/0" 
104628    	0x198B4   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/fb0" 
104760    	0x19938   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0" 
104884    	0x199B4   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0p1" 
105012    	0x19A34   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0p2" 
105140    	0x19AB4   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0p3" 
105268    	0x19B34   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0p4" 
105396    	0x19BB4   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1" 
105520    	0x19C30   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1p1" 
105648    	0x19CB0   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1p2" 
105776    	0x19D30   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1p3" 
105904    	0x19DB0   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1p4" 
106032    	0x19E30   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd" 
106152    	0x19EA8   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/0" 
106276    	0x19F24   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/1" 
106400    	0x19FA0   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/2" 
106524    	0x1A01C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/3" 
106648    	0x1A098   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/4" 
106772    	0x1A114   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/5" 
106896    	0x1A190   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock" 
107020    	0x1A20C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/0" 
107148    	0x1A28C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/1" 
107276    	0x1A30C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/2" 
107404    	0x1A38C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/3" 
107532    	0x1A40C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/4" 
107660    	0x1A48C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/5" 
107788    	0x1A50C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/loop0" 
107912    	0x1A588   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/loop1" 
108036    	0x1A604   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/loop2" 
108160    	0x1A680   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/loop3" 
108284    	0x1A6FC   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/i2c" 
108404    	0x1A774   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/i2c/0" 
108528    	0x1A7F0   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/i2c/1" 
108652    	0x1A86C   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/i2c/2" 
108776    	0x1A8E8   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/input" 
108900    	0x1A964   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/input/event0" 
109028    	0x1A9E4   	ASCII cpio archive (SVR4 with no CRC), file name: "/dev/input/event1" 
109156    	0x1AA64   	ASCII cpio archive (SVR4 with no CRC), file name: "/proc" 
109272    	0x1AAD8   	ASCII cpio archive (SVR4 with no CRC), file name: "/sys" 
109388    	0x1AB4C   	ASCII cpio archive (SVR4 with no CRC), file name: "/root" 
109504    	0x1ABC0   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib" 
109620    	0x1AC34   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib/klibc-1Ar3fP3hpCSBXzAOlgguMDif5TQ.so" 
188244    	0x2DF54   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules" 
188368    	0x2DFD0   	ASCII cpio archive (SVR4 with no CRC), file name: "/mnt" 
188484    	0x2E044   	ASCII cpio archive (SVR4 with no CRC), file name: "/mnt/wfm" 
188604    	0x2E0BC   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/arcotg_udc.ko" 
239076    	0x3A5E4   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/g_file_storage.ko" 
274192    	0x42F10   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/eink_fb_waveform.ko" 
309840    	0x4BA50   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/mxc_epdc_fb.ko" 
353316    	0x56424   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/mxc_keyb.ko" 
371460    	0x5AB04   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/tequila_keypad.ko" 
382896    	0x5D7B0   	ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/whitney_button.ko" 
390516    	0x5F574   	ASCII cpio archive (SVR4 with no CRC), file name: "/bin" 
390632    	0x5F5E8   	ASCII cpio archive (SVR4 with no CRC), file name: "/bin/ipconfig" 
403996    	0x62A1C   	ASCII cpio archive (SVR4 with no CRC), file name: "/bin/nfsmount" 
411764    	0x64874   	ASCII cpio archive (SVR4 with no CRC), file name: "/bin/run-init" 
414004    	0x65134   	ASCII cpio archive (SVR4 with no CRC), file name: "/bin/recovery-util" 
887244    	0xD89CC   	ASCII cpio archive (SVR4 with no CRC), file name: "/bin/hotplug" 
911712    	0xDE960   	ASCII cpio archive (SVR4 with no CRC), file name: "/bin/kinit" 
988228    	0xF1444   	ASCII cpio archive (SVR4 with no CRC), file name: "/bin/sh" 
1054572   	0x10176C  	ASCII cpio archive (SVR4 with no CRC), file name: "/bin/mkdosfs" 
1085332   	0x108F94  	ASCII cpio archive (SVR4 with no CRC), file name: "/init" 
1085468   	0x10901C  	ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!" 
1822836   	0x1BD074  	ELF
3838016   	0x3A9040  	Linux kernel version "2.6.31-rt11-lab126 (build@lucid-build01) (collect2: ld returned-build01) (collect2: ld returned 1 exit status) #1 Fri Sep 2 19d 1 exit status) #1 Fri Sep 2 19:00:58 PDT 20119:00:58 PDT 2011"
3853332   	0x3ACC14  	gzip compressed data, from Unix, last modified: Sat Sep  3 04:00:35 2011, max compression
4575694   	0x45D1CE  	ASCII cpio archive (SVR4 with no CRC), file name: "skipped) preset value.. "
baf is offline   Reply With Quote
Old 02-20-2013, 05:23 PM   #22
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by baf View Post
Nice detective work! I recommend binwalk for those who don't have skills or time.

Spoiler:
Code:
wifi3:~ baf$ binwalk -x LZMA Downloads/diags_kernel.img 

DECIMAL       HEX           DESCRIPTION
-------------------------------------------------------------------------------------------------------
0             0x0           uImage header, header size: 64 bytes, header CRC: 0x2A4A2E2C, created: Sat Sep  3 04:01:08 2011, image size: 5122432 bytes, Data Address: 0x70008000, Entry Point: 0x70008000, data CRC: 0xAB6660C5, OS: Linux, CPU: ARM, image type: OS Kernel Image, compression type: none, image name: "Linux-2.6.31-rt11-lab126"
102560        0x190A0       ASCII cpio archive (SVR4 with no CRC), file name: "/dev" 
102676        0x19114       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/tty" 
102796        0x1918C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/console" 
102920        0x19208       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/null" 
103040        0x19280       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/zero" 
103160        0x192F8       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/random" 
103284        0x19374       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mem" 
103404        0x193EC       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/pmic" 
103524        0x19464       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/usb1" 
103644        0x194DC       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/watchdog" 
103768        0x19558       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc0" 
103892        0x195D4       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc1" 
104016        0x19650       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc2" 
104140        0x196CC       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc3" 
104264        0x19748       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/ttymxc4" 
104388        0x197C4       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/fb" 
104508        0x1983C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/fb/0" 
104628        0x198B4       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/fb0" 
104760        0x19938       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0" 
104884        0x199B4       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0p1" 
105012        0x19A34       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0p2" 
105140        0x19AB4       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0p3" 
105268        0x19B34       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk0p4" 
105396        0x19BB4       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1" 
105520        0x19C30       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1p1" 
105648        0x19CB0       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1p2" 
105776        0x19D30       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1p3" 
105904        0x19DB0       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mmcblk1p4" 
106032        0x19E30       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd" 
106152        0x19EA8       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/0" 
106276        0x19F24       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/1" 
106400        0x19FA0       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/2" 
106524        0x1A01C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/3" 
106648        0x1A098       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/4" 
106772        0x1A114       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtd/5" 
106896        0x1A190       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock" 
107020        0x1A20C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/0" 
107148        0x1A28C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/1" 
107276        0x1A30C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/2" 
107404        0x1A38C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/3" 
107532        0x1A40C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/4" 
107660        0x1A48C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/mtdblock/5" 
107788        0x1A50C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/loop0" 
107912        0x1A588       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/loop1" 
108036        0x1A604       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/loop2" 
108160        0x1A680       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/loop3" 
108284        0x1A6FC       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/i2c" 
108404        0x1A774       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/i2c/0" 
108528        0x1A7F0       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/i2c/1" 
108652        0x1A86C       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/i2c/2" 
108776        0x1A8E8       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/input" 
108900        0x1A964       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/input/event0" 
109028        0x1A9E4       ASCII cpio archive (SVR4 with no CRC), file name: "/dev/input/event1" 
109156        0x1AA64       ASCII cpio archive (SVR4 with no CRC), file name: "/proc" 
109272        0x1AAD8       ASCII cpio archive (SVR4 with no CRC), file name: "/sys" 
109388        0x1AB4C       ASCII cpio archive (SVR4 with no CRC), file name: "/root" 
109504        0x1ABC0       ASCII cpio archive (SVR4 with no CRC), file name: "/lib" 
109620        0x1AC34       ASCII cpio archive (SVR4 with no CRC), file name: "/lib/klibc-1Ar3fP3hpCSBXzAOlgguMDif5TQ.so" 
188244        0x2DF54       ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules" 
188368        0x2DFD0       ASCII cpio archive (SVR4 with no CRC), file name: "/mnt" 
188484        0x2E044       ASCII cpio archive (SVR4 with no CRC), file name: "/mnt/wfm" 
188604        0x2E0BC       ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/arcotg_udc.ko" 
239076        0x3A5E4       ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/g_file_storage.ko" 
274192        0x42F10       ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/eink_fb_waveform.ko" 
309840        0x4BA50       ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/mxc_epdc_fb.ko" 
353316        0x56424       ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/mxc_keyb.ko" 
371460        0x5AB04       ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/tequila_keypad.ko" 
382896        0x5D7B0       ASCII cpio archive (SVR4 with no CRC), file name: "/lib/modules/whitney_button.ko" 
390516        0x5F574       ASCII cpio archive (SVR4 with no CRC), file name: "/bin" 
390632        0x5F5E8       ASCII cpio archive (SVR4 with no CRC), file name: "/bin/ipconfig" 
403996        0x62A1C       ASCII cpio archive (SVR4 with no CRC), file name: "/bin/nfsmount" 
411764        0x64874       ASCII cpio archive (SVR4 with no CRC), file name: "/bin/run-init" 
414004        0x65134       ASCII cpio archive (SVR4 with no CRC), file name: "/bin/recovery-util" 
887244        0xD89CC       ASCII cpio archive (SVR4 with no CRC), file name: "/bin/hotplug" 
911712        0xDE960       ASCII cpio archive (SVR4 with no CRC), file name: "/bin/kinit" 
988228        0xF1444       ASCII cpio archive (SVR4 with no CRC), file name: "/bin/sh" 
1054572       0x10176C      ASCII cpio archive (SVR4 with no CRC), file name: "/bin/mkdosfs" 
1085332       0x108F94      ASCII cpio archive (SVR4 with no CRC), file name: "/init" 
1085468       0x10901C      ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!" 
1822836       0x1BD074      ELF
3838016       0x3A9040      Linux kernel version "2.6.31-rt11-lab126 (build@lucid-build01) (collect2: ld returned-build01) (collect2: ld returned 1 exit status) #1 Fri Sep 2 19d 1 exit status) #1 Fri Sep 2 19:00:58 PDT 20119:00:58 PDT 2011"
3853332       0x3ACC14      gzip compressed data, from Unix, last modified: Sat Sep  3 04:00:35 2011, max compression
4575694       0x45D1CE      ASCII cpio archive (SVR4 with no CRC), file name: "skipped) preset value.. "
As asked earlier - what is jbuild01 used on?
knc1 is offline   Reply With Quote
Old 02-20-2013, 06:14 PM   #23
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
K5 specifics (from the binaries)

Our collection of config files and initramfs directory trees is at:
DX(G) - 2.5.8
http://www.mobileread.com/forums/sho...5&postcount=31
K3 - 3.4
http://www.mobileread.com/forums/sho...3&postcount=11
K4 - 4.1.0 (with a 4.0 diags thrown in for flavor):
http://www.mobileread.com/forums/sho...5&postcount=10

Working towards having a collection that covers the same devices that KUAL will run on (for add-in module building);
The K5 specifics next.

With lots, and lots of command examples for those who want something I don't do myself already posted, from now on I'll spoiler them.

Continued by:

K5pw, main-5.2.0:
http://www.mobileread.com/forums/sho...2&postcount=24

K5pw, diags-5.2.0:
http://www.mobileread.com/forums/sho...0&postcount=25

K5pw, main-5.3.0:
http://www.mobileread.com/forums/sho...3&postcount=30

K5touch, main-5.0.0:
http://www.mobileread.com/forums/sho...8&postcount=26

K5touch, diags-5.0.0:
http://www.mobileread.com/forums/sho...5&postcount=28

K5touch, main-5.1.2:
http://www.mobileread.com/forums/sho...9&postcount=29

Last edited by knc1; 02-21-2013 at 06:28 PM.
knc1 is offline   Reply With Quote
Old 02-21-2013, 11:03 AM   #24
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
K5pw, main-5.2.0

The kernel uses gzip compression for the dot-config.
It is the last thing concatenated to the image by the kernel build system, although the builder may have concatenated other things afterwards (some distro's put their splash image after the dot-config).

Search for the gzip magic number, assume for first try that the dot-config is the last such signature:
Spoiler:

Code:
core2quad main $ zcat pw_5.2.0-main_kernel.img.gz > km-5.2.0.img

core2quad main $ od -A d -t x1 km-5.2.0.img | grep '1f 8b 08 00'
0265728 1f 8b 08 00 00 00 00 00 02 03 ed 92 3d 6f d3 50
0266176 07 4d c7 b8 e0 84 06 00 00 1f 8b 08 00 00 00 00
0481984 30 1a 02 00 45 2d 02 00 4c 1a 02 00 1f 8b 08 00
0483728 f8 02 00 00 c7 06 00 00 00 00 00 00 1f 8b 08 00
0487424 4f 6b ca 3f 00 00 00 00 6a 0e 00 00 1f 8b 08 00
0487776 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 63 65
0487824 29 00 00 00 1f 8b 08 00 00 00 00 00 00 03 45 cf
0488032 30 14 01 00 00 00 00 00 d1 00 00 00 1f 8b 08 00
0488240 56 f3 14 01 00 00 00 00 ca 00 00 00 1f 8b 08 00
0488512 00 00 00 00 06 01 00 00 00 00 00 00 1f 8b 08 00
0488560 95 64 00 00 00 00 00 00 29 00 00 00 1f 8b 08 00
0488736 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 4d cf
0488896 14 01 00 00 a0 00 00 00 28 01 00 00 1f 8b 08 00
0492704 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed dd
0498592 ff 0f 39 52 c9 f8 0c f8 02 00 00 00 1f 8b 08 00
0504960 a9 85 0c f8 02 00 00 00 00 00 00 00 1f 8b 08 00
0514480 0c f8 02 00 1f 8b 08 00 00 00 00 00 00 03 ed dd
0519328 02 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed dd
0527488 f8 ff 00 bb 33 3f 8c 0c f8 02 00 00 1f 8b 08 00
0530384 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed dd

core2quad main $ dd if=km-5.2.0.img bs=1 skip=530388 of=km_config-5.2.0.gz
4078636+0 records in
4078636+0 records out
4078636 bytes (4.1 MB) copied, 17.0352 s, 239 kB/s


In the previous posts, we have seen the 'trailing garbage ignored' message from gunzip.
This might be anything, from a single byte of padding to a very large chunk of something else.

In this case, 4Mbytes is a bit too large for a compressed configuration file!

Investigate what gunzip thinks is the contents of the file:
Code:
core2quad main $ gunzip -l -v  km_config-5.2.0.gz 
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla ffffffff Feb 21 08:18             4078636          4294967295  99.9% km_config-5.2.0

core2quad main $ zcat km_config-5.2.0.gz > km_config-5.2.0-00
gzip: km_config-5.2.0.gz: decompression OK, trailing garbage ignored

core2quad main $ file km_config-5.2.0-00
km_config-5.2.0-00: data

core2quad main $ ls -l km_config-5.2.0-00
-rw-rw-r-- 1 mszick mszick 194572 2013-02-21 09:09 km_config-5.2.0-00
Whatever that is, it isn't a configuration file.

Try searching for an initramFS in 'cpio -H newc' format:
Spoiler:

Code:
core2quad main $ od -A d -t x1 km-5.2.0.img | grep '30 37 30 37 30 31'
0102368 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30
0102480 65 76 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0102720 6f 6e 73 6f 6c 65 00 00 30 37 30 37 30 31 30 30
0102848 30 37 30 37 30 31 30 30 30 30 30 32 44 35 30 30
0102960 65 76 2f 7a 65 72 6f 00 30 37 30 37 30 31 30 30
0103088 6d 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103328 6d 69 63 00 30 37 30 37 30 31 30 30 30 30 30 32
0103568 61 74 63 68 64 6f 67 00 30 37 30 37 30 31 30 30
0103696 63 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103824 30 37 30 37 30 31 30 30 30 30 30 32 44 44 30 30
0104064 74 79 6d 78 63 33 00 00 30 37 30 37 30 31 30 30
0104192 63 34 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104432 62 2f 30 00 30 37 30 37 30 31 30 30 30 30 30 32
0104560 2f 66 62 2f 30 00 00 00 30 37 30 37 30 31 30 30
0104688 6b 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104816 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104944 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105072 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105200 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105328 30 37 30 37 30 31 30 30 30 30 30 32 45 39 30 30
0105456 30 37 30 37 30 31 30 30 30 30 30 32 45 41 30 30
0105584 30 37 30 37 30 31 30 30 30 30 30 32 45 42 30 30
0105712 30 37 30 37 30 31 30 30 30 30 30 32 45 43 30 30
0105840 30 37 30 37 30 31 30 30 30 30 30 32 45 44 30 30
0105952 65 76 2f 6d 74 64 00 00 30 37 30 37 30 31 30 30
0106080 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106208 30 37 30 37 30 31 30 30 30 30 30 32 46 30 30 30
0106448 74 64 2f 33 00 00 00 00 30 37 30 37 30 31 30 30
0106576 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106704 30 37 30 37 30 31 30 30 30 30 30 32 46 34 30 30
0107712 6f 6f 70 30 00 00 00 00 30 37 30 37 30 31 30 30
0107840 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0107968 30 37 30 37 30 31 30 30 30 30 30 32 46 45 30 30
0108208 32 63 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108336 30 37 30 37 30 31 30 30 30 30 30 33 30 31 30 30
0108576 32 63 2f 32 00 00 00 00 30 37 30 37 30 31 30 30
0108704 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108832 6e 74 30 00 30 37 30 37 30 31 30 30 30 30 30 33
0108960 6e 74 31 00 30 37 30 37 30 31 30 30 30 30 30 33
0109072 30 30 2f 70 72 6f 63 00 30 37 30 37 30 31 30 30
0109312 30 37 30 37 30 31 30 30 30 30 30 33 30 39 30 30
0109424 69 62 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188048 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188176 30 37 30 37 30 31 30 30 30 30 30 33 30 43 30 30
0188288 6e 74 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0211472 30 37 30 37 30 31 30 30 30 30 30 33 30 46 30 30
0247920 02 f8 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0338320 30 37 30 37 30 31 30 30 30 30 30 33 31 32 30 30
0338432 69 6e 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0351792 01 00 00 00 00 00 00 00 30 37 30 37 30 31 30 30
0359568 30 37 30 37 30 31 30 30 30 30 30 33 31 35 30 30
0361808 30 37 30 37 30 31 30 30 30 30 30 33 31 36 30 30
0809120 75 70 73 00 30 37 30 37 30 31 30 30 30 30 30 33
0833632 72 6f 75 70 73 00 00 00 30 37 30 37 30 31 30 30
0976496 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
1007328 6d 65 00 00 30 37 30 37 30 31 30 30 30 30 30 33
4046000 63 20 6f 70 74 69 6f 6e 00 30 37 30 37 30 31 00


Knowing that every file in a cpio archive has the same header magic, start with the earliest one in the file:
Code:
core2quad main $ od -A d -t x1 km-5.2.0.img | grep '30 37 30 37 30 31'
0102368 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30

core2quad main $ dd if=km-5.2.0.img bs=1 skip=102368 of=km-5.2.0-irfs.cpio
4506656+0 records in
4506656+0 records out
4506656 bytes (4.5 MB) copied, 18.6441 s, 242 kB/s
Which is a reasonable size for an un-compressed file system.

You **must** be 'root' to copy permissions and ownership, also to create special files.
You **must** use the '--no-absolute-filename' option to prevent trashing your work station!
Spoiler:

Code:
core2quad main $ mkdir km-5.2.0-irfs
core2quad main $ cd km-5.2.0-irfs
core2quad km-5.2.0-irfs $ sudo su

core2quad km-5.2.0-irfs # cpio -i -d -m  --no-absolute-filenames -I ../km-5.2.0-irfs.cpio
cpio: Removing leading `/' from member names
1769 blocks

core2quad km-5.2.0-irfs # ls -l
total 28
drwxr-xr-x 2 root root 4096 2013-02-21 09:52 bin
drwxr-xr-x 7 root root 4096 2013-02-21 09:52 dev
lrwxrwxrwx 1 root root   18 2013-02-21 09:52 init -> /bin/recovery-util
drwxr-xr-x 3 root root 4096 2013-02-21 09:52 lib
drwxr-xr-x 3 root root 4096 2013-02-21 09:52 mnt
drwxr-xr-x 2 root root 4096 2012-09-06 18:28 proc
drwx------ 2 root root 4096 2012-09-06 18:28 root
drwxr-xr-x 2 root root 4096 2012-09-06 18:28 sys

core2quad km-5.2.0-irfs # cd ..
core2quad main # tar --create --gzip --file=main-5.2.0-irfs.tar.gz km-5.2.0-irfs
core2quad main # exit


Attached below.
Attached Files
File Type: gz main-5.2.0-irfs.tar.gz (419.0 KB, 18 views)
knc1 is offline   Reply With Quote
Old 02-21-2013, 11:31 AM   #25
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
K5pw, diags-5.2.0

A little bit of prep work.
Spoiler:

Code:
core2quad diags $ zcat pw_5.2.0-diags_kernel.img.gz > kd-5.2.0.img

core2quad diags $ od -A d -t x1 kd-5.2.0.img | grep '1f 8b 08 00'
0264144 1f 8b 08 00 00 00 00 00 02 03 ed 92 3d 6f d3 50
0264592 07 4d c7 b8 e0 84 06 00 00 1f 8b 08 00 00 00 00
0479968 45 2d 02 00 4c 1a 02 00 1f 8b 08 00 00 00 00 00
0481712 c7 06 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0485408 00 00 00 00 6a 0e 00 00 1f 8b 08 00 00 00 00 00
0485760 1f 8b 08 00 00 00 00 00 00 03 63 65 60 60 d0 01
0485808 1f 8b 08 00 00 00 00 00 00 03 45 cf 31 0a c2 30
0486016 00 00 00 00 d1 00 00 00 1f 8b 08 00 00 00 00 00
0486224 00 00 00 00 ca 00 00 00 1f 8b 08 00 00 00 00 00
0486496 06 01 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0486544 00 00 00 00 29 00 00 00 1f 8b 08 00 00 00 00 00
0486720 1f 8b 08 00 00 00 00 00 00 03 4d cf bb 11 c3 20
0486880 a0 00 00 00 28 01 00 00 1f 8b 08 00 00 00 00 00
0490688 1f 8b 08 00 00 00 00 00 00 03 ed dd bd 8f e3 e8
0496576 c9 f8 0c f8 02 00 00 00 1f 8b 08 00 00 00 00 00
0502944 02 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0512464 1f 8b 08 00 00 00 00 00 00 03 ed dd 31 73 e3 c8
0517312 1f 8b 08 00 00 00 00 00 00 03 ed dd bf 8f e3 e8
0525472 33 3f 8c 0c f8 02 00 00 1f 8b 08 00 00 00 00 00
0528368 1f 8b 08 00 00 00 00 00 00 03 ed dd 41 8c 1b d7

core2quad diags $ ls -l kd-5.2.0.img
-rw-rw-r-- 1 mszick mszick 4609024 2013-02-21 10:13 kd-5.2.0.img

The last gzip signature is too far away from the end-of-file for this image to have an attached dot-config file.

Moving right along, try to pull an initramfs (irfs) 'cpio -H newc' archive off of the image.
Spoiler:

Code:
core2quad diags $ od -A d -t x1 kd-5.2.0.img | grep '30 37 30 37 30 31'
0102336 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30
0102448 65 76 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0102688 6f 6e 73 6f 6c 65 00 00 30 37 30 37 30 31 30 30
0102816 30 37 30 37 30 31 30 30 30 30 30 32 44 35 30 30
0102928 65 76 2f 7a 65 72 6f 00 30 37 30 37 30 31 30 30
0103056 6d 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103296 6d 69 63 00 30 37 30 37 30 31 30 30 30 30 30 32
0103536 61 74 63 68 64 6f 67 00 30 37 30 37 30 31 30 30
0103664 63 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103792 30 37 30 37 30 31 30 30 30 30 30 32 44 44 30 30
0104032 74 79 6d 78 63 33 00 00 30 37 30 37 30 31 30 30
0104160 63 34 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104400 62 2f 30 00 30 37 30 37 30 31 30 30 30 30 30 32
0104528 2f 66 62 2f 30 00 00 00 30 37 30 37 30 31 30 30
0104656 6b 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104784 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104912 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105040 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105168 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105296 30 37 30 37 30 31 30 30 30 30 30 32 45 39 30 30
0105424 30 37 30 37 30 31 30 30 30 30 30 32 45 41 30 30
0105552 30 37 30 37 30 31 30 30 30 30 30 32 45 42 30 30
0105680 30 37 30 37 30 31 30 30 30 30 30 32 45 43 30 30
0105808 30 37 30 37 30 31 30 30 30 30 30 32 45 44 30 30
0105920 65 76 2f 6d 74 64 00 00 30 37 30 37 30 31 30 30
0106048 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106176 30 37 30 37 30 31 30 30 30 30 30 32 46 30 30 30
0106416 74 64 2f 33 00 00 00 00 30 37 30 37 30 31 30 30
0106544 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106672 30 37 30 37 30 31 30 30 30 30 30 32 46 34 30 30
0107680 6f 6f 70 30 00 00 00 00 30 37 30 37 30 31 30 30
0107808 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0107936 30 37 30 37 30 31 30 30 30 30 30 32 46 45 30 30
0108176 32 63 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108304 30 37 30 37 30 31 30 30 30 30 30 33 30 31 30 30
0108544 32 63 2f 32 00 00 00 00 30 37 30 37 30 31 30 30
0108672 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108800 6e 74 30 00 30 37 30 37 30 31 30 30 30 30 30 33
0108928 6e 74 31 00 30 37 30 37 30 31 30 30 30 30 30 33
0109040 30 30 2f 70 72 6f 63 00 30 37 30 37 30 31 30 30
0109280 30 37 30 37 30 31 30 30 30 30 30 33 30 39 30 30
0109392 69 62 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188016 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188144 30 37 30 37 30 31 30 30 30 30 30 33 30 43 30 30
0188256 6e 74 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0211440 30 37 30 37 30 31 30 30 30 30 30 33 30 46 30 30
0247904 02 f8 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0285008 30 37 30 37 30 31 30 30 30 30 30 33 31 31 30 30
0336416 30 37 30 37 30 31 30 30 30 30 30 33 31 33 30 30
0349776 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0807792 75 70 73 00 30 37 30 37 30 31 30 30 30 30 30 33
0832336 30 37 30 37 30 31 30 30 30 30 30 33 31 38 30 30
0908848 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
1006160 69 6c 00 00 30 37 30 37 30 31 30 30 30 30 30 30
4041936 00 30 37 30 37 30 31 00 6e 6f 20 63 70 69 6f 20
Only the first occurance is of any interest at the moment:
Code:
core2quad diags $ od -A d -t x1 kd-5.2.0.img | grep '30 37 30 37 30 31'
0102336 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30

core2quad diags $ dd if=kd-5.2.0.img bs=1 skip=102336 of=kd-5.2.0-irfs.cpio
4506688+0 records in
4506688+0 records out
4506688 bytes (4.5 MB) copied, 18.8597 s, 239 kB/s

core2quad diags $ mkdir kd-5.2.0-irfs
core2quad diags $ cd kd-5.2.0-irfs
core2quad kd-5.2.0-irfs $ sudo su

core2quad kd-5.2.0-irfs # cpio -i -d -m  --no-absolute-filenames -I ../kd-5.2.0-irfs.cpio
cpio: Removing leading `/' from member names
1766 blocks

core2quad kd-5.2.0-irfs # cd ..
core2quad diags # tar --create --gzip --file=diags-5.2.0-irfs.tar.gz kd-5.2.0-irfs
core2quad diags # exit


No attached dot-config but initramfs (irfs) attached here.
Attached Files
File Type: gz diags-5.2.0-irfs.tar.gz (418.0 KB, 19 views)
knc1 is offline   Reply With Quote
Old 02-21-2013, 12:25 PM   #26
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
K5touch, main-5.0.0

The search continues for dot-config files with a little bit of prep work.
Spoiler:

Code:
core2quad main $ zcat kt_5.0.0-kernel_main.gz >km-5.0.0.img

core2quad main $ od -A d -t x1 km-5.0.0.img | grep '1f 8b 08 00'
0286960 1f 8b 08 00 00 00 00 00 02 03 ed 92 3d 6f d3 50
0287408 07 4d c7 b8 e0 84 06 00 00 1f 8b 08 00 00 00 00
0531504 55 21 02 00 ec 0e 02 00 1f 8b 08 00 00 00 00 00
0536160 cc d4 01 00 2c 12 00 00 1f 8b 08 00 00 00 00 00
0539856 00 00 00 00 6a 0e 00 00 1f 8b 08 00 00 00 00 00
0540080 1f 8b 08 00 00 00 00 00 02 03 63 61 60 60 50 01
0540128 1f 8b 08 00 00 00 00 00 02 03 5d 8e 31 0e 40 40
0540256 00 00 00 00 81 00 00 00 1f 8b 08 00 00 00 00 00
0540400 86 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0540576 a6 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0540624 26 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0540752 1f 8b 08 00 00 00 00 00 02 03 5d 8d bb 0d 80 30
0540864 c8 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0543536 cc d4 01 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0548208 1f 8b 08 00 00 00 00 00 00 03 ed 9d cf 6f dd d6
0552288 81 f3 05 5e cc d4 01 00 1f 8b 08 00 00 00 00 00
0558080 d4 01 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0561088 1f 8b 08 00 00 00 00 00 00 03 ed 9d bf 72 dc 56
0566016 1f 8b 08 00 00 00 00 00 00 03 ed dd 31 6f 13 67
0567472 3f 13 00 00 9a 05 00 00 1f 8b 08 00 00 00 00 00
3817904 8f 1b 46 c0 49 4b 43 46 47 5f 53 54 1f 8b 08 00

core2quad main $ ls -l km-5.0.0.img
-rw-rw-r-- 1 mszick mszick 5090176 2013-02-21 10:54 km-5.0.0.img

core2quad main $ od -A d -t x1 km-5.0.0.img | grep '1f 8b 08 00'
- - - -
3817904 8f 1b 46 c0 49 4b 43 46 47 5f 53 54 1f 8b 08 00

core2quad main $ dd if=km-5.0.0.img bs=1 skip=3817916 of=km-5.0.0-dc.gz
1272260+0 records in
1272260+0 records out
1272260 bytes (1.3 MB) copied, 5.64149 s, 226 kB/s

That one may have a dot-config file on the end of it
Spoiler:

Code:
core2quad main $ gzip -l -v km-5.0.0-dc.gz
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla 00000000 Feb 21 11:00             1272260                   0   0.0% km-5.0.0-dc

core2quad main $ gzip -l -v km-5.0.0-dc.gz
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla 00000000 Feb 21 11:00             1272260                   0   0.0% km-5.0.0-dc
core2quad main $ zcat km-5.0.0-dc.gz >km-5.0.0-dc

gzip: km-5.0.0-dc.gz: decompression OK, trailing garbage ignored
core2quad main $ file km-5.0.0-dc
km-5.0.0-dc: ASCII English text

core2quad main $ less km-5.0.0-dc

Got one!
Code:
core2quad main $ mv km-5.0.0-dc dot-config-main-5.0.0
core2quad main $ gzip dot-config-main-5.0.0
Remove it from the image file.
Code:
core2quad main $ dd if=km-5.0.0.img bs=1 count=3817916 of=km-5.0.0-trim.img
3817916+0 records in
3817916+0 records out
3817916 bytes (3.8 MB) copied, 16.3716 s, 233 kB/s
Moving right along, try to pull an initramfs (irfs) 'cpio -H newc' archive off of the trimmed image.
Spoiler:

Code:
core2quad main $ od -A d -t x1 km-5.0.0-trim.img | grep '30 37 30 37 30 31'
0102112 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30
0102224 65 76 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0102464 6f 6e 73 6f 6c 65 00 00 30 37 30 37 30 31 30 30
0102592 30 37 30 37 30 31 30 30 30 30 30 32 44 35 30 30
0102704 65 76 2f 7a 65 72 6f 00 30 37 30 37 30 31 30 30
0102832 6d 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103072 6d 69 63 00 30 37 30 37 30 31 30 30 30 30 30 32
0103312 61 74 63 68 64 6f 67 00 30 37 30 37 30 31 30 30
0103440 63 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103568 30 37 30 37 30 31 30 30 30 30 30 32 44 44 30 30
0103808 74 79 6d 78 63 33 00 00 30 37 30 37 30 31 30 30
0103936 63 34 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104176 62 2f 30 00 30 37 30 37 30 31 30 30 30 30 30 32
0104304 2f 66 62 2f 30 00 00 00 30 37 30 37 30 31 30 30
0104432 6b 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104560 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104688 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104816 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104944 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105072 30 37 30 37 30 31 30 30 30 30 30 32 45 39 30 30
0105200 30 37 30 37 30 31 30 30 30 30 30 32 45 41 30 30
0105328 30 37 30 37 30 31 30 30 30 30 30 32 45 42 30 30
0105456 30 37 30 37 30 31 30 30 30 30 30 32 45 43 30 30
0105584 30 37 30 37 30 31 30 30 30 30 30 32 45 44 30 30
0105696 65 76 2f 6d 74 64 00 00 30 37 30 37 30 31 30 30
0105824 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105952 30 37 30 37 30 31 30 30 30 30 30 32 46 30 30 30
0106192 74 64 2f 33 00 00 00 00 30 37 30 37 30 31 30 30
0106320 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106448 30 37 30 37 30 31 30 30 30 30 30 32 46 34 30 30
0107456 6f 6f 70 30 00 00 00 00 30 37 30 37 30 31 30 30
0107584 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0107712 30 37 30 37 30 31 30 30 30 30 30 32 46 45 30 30
0107952 32 63 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108080 30 37 30 37 30 31 30 30 30 30 30 33 30 31 30 30
0108320 32 63 2f 32 00 00 00 00 30 37 30 37 30 31 30 30
0108448 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108576 6e 74 30 00 30 37 30 37 30 31 30 30 30 30 30 33
0108704 6e 74 31 00 30 37 30 37 30 31 30 30 30 30 30 33
0108832 6e 74 32 00 30 37 30 37 30 31 30 30 30 30 30 33
0108944 30 30 2f 70 72 6f 63 00 30 37 30 37 30 31 30 30
0109184 30 37 30 37 30 31 30 30 30 30 30 33 30 41 30 30
0109296 69 62 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0187920 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188048 30 37 30 37 30 31 30 30 30 30 30 33 30 44 30 30
0188160 6e 74 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0235280 30 37 30 37 30 31 30 30 30 30 30 33 31 30 30 30
0352656 30 37 30 37 30 31 30 30 30 30 30 33 31 33 30 30
0382208 14 01 00 00 02 42 00 00 30 37 30 37 30 31 30 30
0391744 30 37 30 37 30 31 30 30 30 30 30 33 31 37 30 30
0405104 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0846768 74 67 72 6f 75 70 73 00 30 37 30 37 30 31 30 30
0871232 72 6f 75 70 73 00 00 00 30 37 30 37 30 31 30 30
1014096 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
1044992 69 6c 00 00 30 37 30 37 30 31 30 30 30 30 30 30
Only the first occurrence is of any interest at the moment:
Code:
core2quad main $ od -A d -t x1 km-5.0.0-trim.img | grep '30 37 30 37 30 31'
0102112 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30

core2quad main $ dd if=km-5.0.0-trim.img bs=1 skip=102112 of=km-5.0.0-irfs.cpio
3715804+0 records in
3715804+0 records out
3715804 bytes (3.7 MB) copied, 15.4637 s, 240 kB/s

core2quad main $ mkdir km-5.0.0-irfs
core2quad main $ cd km-5.0.0-irfs
core2quad km-5.0.0-irfs $ sudo su

core2quad km-5.0.0-irfs # cpio -i -d -m  --no-absolute-filenames -I ../km-5.0.0-irfs.cpio
cpio: Removing leading `/' from member names
1842 blocks

core2quad km-5.0.0-irfs # ls -l
total 28
drwxr-xr-x 2 root root 4096 2013-02-21 11:18 bin
drwxr-xr-x 7 root root 4096 2013-02-21 11:18 dev
lrwxrwxrwx 1 root root   18 2013-02-21 11:18 init -> /bin/recovery-util
drwxr-xr-x 3 root root 4096 2013-02-21 11:18 lib
drwxr-xr-x 3 root root 4096 2013-02-21 11:18 mnt
drwxr-xr-x 2 root root 4096 2012-01-06 18:41 proc
drwx------ 2 root root 4096 2012-01-06 18:41 root
drwxr-xr-x 2 root root 4096 2012-01-06 18:41 sys

core2quad km-5.0.0-irfs # cd ..
core2quad main # tar --create --gzip --file=main-5.0.0-irfs.tar.gz km-5.0.0-irfs
core2quad main # exit


Both recovered files attached here.
Attached Files
File Type: gz dot-config-main-5.0.0.gz (11.5 KB, 21 views)
File Type: gz main-5.0.0-irfs.tar.gz (430.4 KB, 22 views)
knc1 is offline   Reply With Quote
Old 02-21-2013, 01:01 PM   #27
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,491
Karma: 5977000
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
: ) This is now officially my favourite "it's got what now?" thread.

Herculean.

I am thinking this will REALLY help when doing the OTG USB work.

twobob is offline   Reply With Quote
Old 02-21-2013, 01:48 PM   #28
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
K5touch, diags-5.0.0

The search continues for dot-config files with a little bit of prep work.
Spoiler:

Code:
core2quad diags $ zcat kt_5.0.0-kernel_diags.gz >kd-5.0.0.img

core2quad diags $ od -A d -t x1 kd-5.0.0.img | grep '1f 8b 08 00'
0289552 05 00 00 00 1f 8b 08 00 00 00 00 00 02 03 ed 92
0545504 1a 48 02 00 1a 48 02 00 1f 8b 08 00 00 00 00 00
0550160 cc d4 01 00 2c 12 00 00 1f 8b 08 00 00 00 00 00
0553856 00 00 00 00 6a 0e 00 00 1f 8b 08 00 00 00 00 00
0554080 1f 8b 08 00 00 00 00 00 02 03 63 61 60 60 50 01
0554128 1f 8b 08 00 00 00 00 00 02 03 5d 8e 31 0e 40 40
0554256 00 00 00 00 81 00 00 00 1f 8b 08 00 00 00 00 00
0554400 86 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0554576 a6 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0554624 26 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0554752 1f 8b 08 00 00 00 00 00 02 03 5d 8d bb 0d 80 30
0554864 c8 00 00 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0558400 1f 8b 08 00 00 00 00 00 00 03 ed 9d 4f 6c 23 57
0562704 1f 8b 08 00 00 00 00 00 00 03 ed 9d 31 93 dc 46
0566832 1f 8b 08 00 00 00 00 00 00 03 ed 9d 3f 93 dc 46
0572624 1f 8b 08 00 00 00 00 00 00 03 ed 9d bd 8f dc c6
0575616 cc d4 01 00 00 00 00 00 1f 8b 08 00 00 00 00 00
0583184 1f 8b 08 00 00 00 00 00 00 03 ed 9d c1 8f dc 46
0588224 1f 8b 08 00 00 00 00 00 00 03 ed 9d 7f 6c 1b 67
3853520 47 5f 53 54 1f 8b 08 00 9a 0a bb 4e 02 03 94 5c

core2quad diags $ od -A d -t x1 kd-5.0.0.img | grep '1f 8b 08 00'
- - - -
3853520 47 5f 53 54 1f 8b 08 00 9a 0a bb 4e 02 03 94 5c

core2quad diags $ dd if=kd-5.0.0.img bs=1 skip=3853524 of=kd-5.0.0-dc.gz
1269548+0 records in
1269548+0 records out
1269548 bytes (1.3 MB) copied, 5.08574 s, 250 kB/s

That one should also have a dot-config file on the end of it
Spoiler:

Code:
core2quad diags $ gzip -l -v kd-5.0.0-dc.gz
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla ffff7fff Feb 21 12:27             1269548          4294967295 100.0% kd-5.0.0-dc

core2quad diags $ zcat  kd-5.0.0-dc.gz >kd-5.0.0-dc
gzip: kd-5.0.0-dc.gz: decompression OK, trailing garbage ignored

core2quad diags $ file kd-5.0.0-dc
kd-5.0.0-dc: ASCII English text
core2quad diags $ less kd-5.0.0-dc

Got one!
Code:
core2quad diags $ mv kd-5.0.0-dc dot-config-diags-5.0.0
core2quad diags $ gzip dot-config-diags-5.0.0
Remove it from the image file.
Code:
core2quad diags $ dd if=kd-5.0.0.img bs=1 count=3853524 of=kd-5.0.0-trim.img
3853524+0 records in
3853524+0 records out
3853524 bytes (3.9 MB) copied, 15.9202 s, 242 kB/s
Moving right along, try to pull an initramfs (irfs) 'cpio -H newc' archive off of the trimmed image.
Spoiler:

Code:
core2quad diags $ od -A d -t x1 kd-5.0.0-trim.img | grep '30 37 30 37 30 31'
0102560 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30
0102672 65 76 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0102912 6f 6e 73 6f 6c 65 00 00 30 37 30 37 30 31 30 30
0103040 30 37 30 37 30 31 30 30 30 30 30 32 44 35 30 30
0103152 65 76 2f 7a 65 72 6f 00 30 37 30 37 30 31 30 30
0103280 6d 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103520 6d 69 63 00 30 37 30 37 30 31 30 30 30 30 30 32
0103760 61 74 63 68 64 6f 67 00 30 37 30 37 30 31 30 30
0103888 63 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104016 30 37 30 37 30 31 30 30 30 30 30 32 44 44 30 30
0104256 74 79 6d 78 63 33 00 00 30 37 30 37 30 31 30 30
0104384 63 34 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104624 62 2f 30 00 30 37 30 37 30 31 30 30 30 30 30 32
0104752 2f 66 62 2f 30 00 00 00 30 37 30 37 30 31 30 30
0104880 6b 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105008 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105136 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105264 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105392 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105520 30 37 30 37 30 31 30 30 30 30 30 32 45 39 30 30
0105648 30 37 30 37 30 31 30 30 30 30 30 32 45 41 30 30
0105776 30 37 30 37 30 31 30 30 30 30 30 32 45 42 30 30
0105904 30 37 30 37 30 31 30 30 30 30 30 32 45 43 30 30
0106032 30 37 30 37 30 31 30 30 30 30 30 32 45 44 30 30
0106144 65 76 2f 6d 74 64 00 00 30 37 30 37 30 31 30 30
0106272 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106400 30 37 30 37 30 31 30 30 30 30 30 32 46 30 30 30
0106640 74 64 2f 33 00 00 00 00 30 37 30 37 30 31 30 30
0106768 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106896 30 37 30 37 30 31 30 30 30 30 30 32 46 34 30 30
0107904 6f 6f 70 30 00 00 00 00 30 37 30 37 30 31 30 30
0108032 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0108160 30 37 30 37 30 31 30 30 30 30 30 32 46 45 30 30
0108400 32 63 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108528 30 37 30 37 30 31 30 30 30 30 30 33 30 31 30 30
0108768 32 63 2f 32 00 00 00 00 30 37 30 37 30 31 30 30
0108896 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0109024 6e 74 30 00 30 37 30 37 30 31 30 30 30 30 30 33
0109152 6e 74 31 00 30 37 30 37 30 31 30 30 30 30 30 33
0109264 30 30 2f 70 72 6f 63 00 30 37 30 37 30 31 30 30
0109504 30 37 30 37 30 31 30 30 30 30 30 33 30 39 30 30
0109616 69 62 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188240 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188368 30 37 30 37 30 31 30 30 30 30 30 33 30 43 30 30
0188480 6e 74 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0239072 02 95 01 00 30 37 30 37 30 31 30 30 30 30 30 33
0274208 30 37 30 37 30 31 30 30 30 30 30 33 31 30 30 30
0309856 30 37 30 37 30 31 30 30 30 30 30 33 31 31 30 30
0353328 02 0a 01 00 30 37 30 37 30 31 30 30 30 30 30 33
0371472 02 80 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0382912 30 37 30 37 30 31 30 30 30 30 30 33 31 34 30 30
0390528 02 3f 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0390640 30 30 2f 62 69 6e 00 00 30 37 30 37 30 31 30 30
0411776 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0414016 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0887872 70 73 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0912368 30 37 30 37 30 31 30 30 30 30 30 33 31 42 30 30
0988880 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
1085984 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
Only the first occurance is of any interest at the moment:
Code:
core2quad diags $ od -A d -t x1 kd-5.0.0-trim.img | grep '30 37 30 37 30 31'
0102560 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30

core2quad diags $ dd if=kd-5.0.0-trim.img bs=1 skip=102560 of=kd-5.0.0-irfs.cpio
3750964+0 records in
3750964+0 records out
3750964 bytes (3.8 MB) copied, 15.596 s, 241 kB/s

core2quad diags $ mkdir kd-5.0.0-irfs
core2quad diags $ cd kd-5.0.0-irfs
core2quad kd-5.0.0-irfs $ sudo su

core2quad kd-5.0.0-irfs # cpio -i -d -m  --no-absolute-filenames -I ../kd-5.0.0-irfs.cpio
cpio: Removing leading `/' from member names
1922 blocks

core2quad kd-5.0.0-irfs # ls -l
total 28
drwxr-xr-x 2 root root 4096 2013-02-21 12:41 bin
drwxr-xr-x 7 root root 4096 2013-02-21 12:41 dev
lrwxrwxrwx 1 root root   18 2013-02-21 12:41 init -> /bin/recovery-util
drwxr-xr-x 3 root root 4096 2013-02-21 12:41 lib
drwxr-xr-x 3 root root 4096 2013-02-21 12:41 mnt
drwxr-xr-x 2 root root 4096 2011-11-09 17:19 proc
drwx------ 2 root root 4096 2011-11-09 17:19 root
drwxr-xr-x 2 root root 4096 2011-11-09 17:19 sys

core2quad kd-5.0.0-irfs # cd ..
core2quad diags # tar --create --gzip --file=diags-5.0.0-irfs.tar.gz kd-5.0.0-irfs
core2quad diags # exit


Both recovered files attached here.
Attached Files
File Type: gz diags-5.0.0-irfs.tar.gz (450.8 KB, 19 views)
File Type: gz dot-config-diags-5.0.0.gz (11.5 KB, 19 views)
knc1 is offline   Reply With Quote
Old 02-21-2013, 04:25 PM   #29
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
K5touch, main-5.1.2

The search continues for dot-config files with a little bit of prep work.
Spoiler:

Code:
core2quad main $ zcat kt_5.1.2-kernel_main.gz >km-5.1.2.img

core2quad main $ od -A d -t x1 km-5.1.2.img | grep '1f 8b 08 00'
0287744 06 00 00 00 1f 8b 08 00 00 00 00 00 02 03 ed 92
0539760 cc 12 02 00 1f 8b 08 00 00 00 00 00 00 03 ed 9d
0544416 2c 12 00 00 1f 8b 08 00 00 00 00 00 00 03 ed 9b
0548112 6a 0e 00 00 1f 8b 08 00 00 00 00 00 02 03 5b c1
0548320 f4 0e 00 00 d0 00 00 00 00 00 00 00 1f 8b 08 00
0548368 00 00 00 00 25 00 00 00 00 00 00 00 1f 8b 08 00
0548512 81 00 00 00 1f 8b 08 00 00 00 00 00 02 03 5d 8e
0548656 00 00 00 00 1f 8b 08 00 00 00 00 00 02 03 ed d7
0548832 00 00 00 00 1f 8b 08 00 00 00 00 00 02 03 63 61
0548880 00 00 00 00 1f 8b 08 00 00 00 00 00 02 03 5d 8e
0548992 00 00 00 00 6f 00 00 00 00 00 00 00 1f 8b 08 00
0549120 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed 9c
0551792 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed dd
0556448 12 4b 14 1f cc d4 01 00 00 00 00 00 1f 8b 08 00
0560544 cc d4 01 00 1f 8b 08 00 00 00 00 00 00 03 ed 9d
0566336 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed 9d
0569328 bf b3 83 36 cc d4 01 00 00 00 00 00 1f 8b 08 00
0574256 19 f9 17 30 06 b3 ad cc d4 01 00 00 1f 8b 08 00
0575728 9a 05 00 00 1f 8b 08 00 00 00 00 00 00 03 ed 9d
3889920 47 5f 53 54 1f 8b 08 00 57 fb 05 50 02 03 94 5c

core2quad main $ od -A d -t x1 km-5.1.2.img | grep '1f 8b 08 00'
- - - -
3889920 47 5f 53 54 1f 8b 08 00 57 fb 05 50 02 03 94 5c

core2quad main $ dd if=km-5.1.2.img bs=1 skip=3889924 of=km-5.1.2-dc.gz
1352956+0 records in
1352956+0 records out
1352956 bytes (1.4 MB) copied, 5.44264 s, 249 kB/s

That one should also have a dot-config file on the end of it
Spoiler:

Code:
core2quad main $ gzip -l -v km-5.1.2-dc.gz
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla ffffffff Feb 21 15:02             1352956          4294967295 100.0% km-5.1.2-dc

core2quad main $ zcat km-5.1.2-dc.gz >km-5.1.2-dc
gzip: km-5.1.2-dc.gz: decompression OK, trailing garbage ignored

core2quad main $ file km-5.1.2-dc
km-5.1.2-dc: ASCII English text
core2quad main $ less km-5.1.2-dc

Got one!
Code:
core2quad main $ mv km-5.1.2-dc dot-config-main-5.1.2
core2quad main $ gzip dot-config-main-5.1.2
Remove it from the image file.
Code:
core2quad main $ dd if=km-5.1.2.img bs=1 count=3889924 of=km-5.1.2-trim.img
3889924+0 records in
3889924+0 records out
3889924 bytes (3.9 MB) copied, 16.231 s, 240 kB/s
Moving right along, try to pull an initramfs (irfs) 'cpio -H newc' archive off of the trimmed image.
Spoiler:

Code:
core2quad main $ od -A d -t x1 km-5.1.2-trim.img | grep '30 37 30 37 30 31'
0102496 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30
0102608 65 76 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0102848 6f 6e 73 6f 6c 65 00 00 30 37 30 37 30 31 30 30
0102976 30 37 30 37 30 31 30 30 30 30 30 32 44 35 30 30
0103088 65 76 2f 7a 65 72 6f 00 30 37 30 37 30 31 30 30
0103216 6d 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103456 6d 69 63 00 30 37 30 37 30 31 30 30 30 30 30 32
0103696 61 74 63 68 64 6f 67 00 30 37 30 37 30 31 30 30
0103824 63 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103952 30 37 30 37 30 31 30 30 30 30 30 32 44 44 30 30
0104192 74 79 6d 78 63 33 00 00 30 37 30 37 30 31 30 30
0104320 63 34 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104560 62 2f 30 00 30 37 30 37 30 31 30 30 30 30 30 32
0104688 2f 66 62 2f 30 00 00 00 30 37 30 37 30 31 30 30
0104816 6b 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104944 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105072 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105200 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105328 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105456 30 37 30 37 30 31 30 30 30 30 30 32 45 39 30 30
0105584 30 37 30 37 30 31 30 30 30 30 30 32 45 41 30 30
0105712 30 37 30 37 30 31 30 30 30 30 30 32 45 42 30 30
0105840 30 37 30 37 30 31 30 30 30 30 30 32 45 43 30 30
0105968 30 37 30 37 30 31 30 30 30 30 30 32 45 44 30 30
0106080 65 76 2f 6d 74 64 00 00 30 37 30 37 30 31 30 30
0106208 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106336 30 37 30 37 30 31 30 30 30 30 30 32 46 30 30 30
0106576 74 64 2f 33 00 00 00 00 30 37 30 37 30 31 30 30
0106704 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106832 30 37 30 37 30 31 30 30 30 30 30 32 46 34 30 30
0107840 6f 6f 70 30 00 00 00 00 30 37 30 37 30 31 30 30
0107968 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0108096 30 37 30 37 30 31 30 30 30 30 30 32 46 45 30 30
0108336 32 63 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108464 30 37 30 37 30 31 30 30 30 30 30 33 30 31 30 30
0108704 32 63 2f 32 00 00 00 00 30 37 30 37 30 31 30 30
0108832 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108960 6e 74 30 00 30 37 30 37 30 31 30 30 30 30 30 33
0109088 6e 74 31 00 30 37 30 37 30 31 30 30 30 30 30 33
0109216 6e 74 32 00 30 37 30 37 30 31 30 30 30 30 30 33
0109328 30 30 2f 70 72 6f 63 00 30 37 30 37 30 31 30 30
0109568 30 37 30 37 30 31 30 30 30 30 30 33 30 41 30 30
0109680 69 62 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188304 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188432 30 37 30 37 30 31 30 30 30 30 30 33 30 44 30 30
0188544 6e 74 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0235680 02 7c 01 00 30 37 30 37 30 31 30 30 30 30 30 33
0271872 02 f4 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0308320 30 37 30 37 30 31 30 30 30 30 30 33 31 32 30 30
0358128 02 26 01 00 30 37 30 37 30 31 30 30 30 30 30 33
0376272 30 37 30 37 30 31 30 30 30 30 30 33 31 34 30 30
0397104 30 37 30 37 30 31 30 30 30 30 30 33 31 36 30 30
0397216 69 6e 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0410576 01 00 00 00 00 00 00 00 30 37 30 37 30 31 30 30
0418352 30 37 30 37 30 31 30 30 30 30 30 33 31 39 30 30
0420592 30 37 30 37 30 31 30 30 30 30 30 33 31 41 30 30
0873824 30 37 30 37 30 31 30 30 30 30 30 33 31 43 30 30
0950336 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
1047648 69 6c 00 00 30 37 30 37 30 31 30 30 30 30 30 30
Only the first occurance is of any interest at the moment:
Code:
core2quad main $ od -A d -t x1 km-5.1.2-trim.img | grep '30 37 30 37 30 31'
0102496 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30

core2quad main $ dd if=km-5.1.2-trim.img bs=1 skip=102496 of=km-5.1.2-irfs.cpio
3787428+0 records in
3787428+0 records out
3787428 bytes (3.8 MB) copied, 15.6789 s, 242 kB/s

core2quad main $ mkdir km-5.1.2-irfs
core2quad main $ cd km-5.1.2-irfs
core2quad km-5.1.2-irfs $ sudo su

core2quad km-5.1.2-irfs # cpio -i -d -m  --no-absolute-filenames -I ../km-5.1.2-irfs.cpio
cpio: Removing leading `/' from member names
1847 blocks

core2quad km-5.1.2-irfs # ls -l
total 28
drwxr-xr-x 2 root root 4096 2013-02-21 15:19 bin
drwxr-xr-x 7 root root 4096 2013-02-21 15:19 dev
lrwxrwxrwx 1 root root   18 2013-02-21 15:19 init -> /bin/recovery-util
drwxr-xr-x 3 root root 4096 2013-02-21 15:19 lib
drwxr-xr-x 3 root root 4096 2013-02-21 15:19 mnt
drwxr-xr-x 2 root root 4096 2012-07-17 18:54 proc
drwx------ 2 root root 4096 2012-07-17 18:54 root
drwxr-xr-x 2 root root 4096 2012-07-17 18:54 sys

core2quad km-5.1.2-irfs # cd ..
core2quad main # tar --create --gzip --file=main-5.1.2-irfs.tar.gz km-5.1.2-irfs
core2quad main # exit


Both recovered files attached here.
Attached Files
File Type: gz dot-config-main-5.1.2.gz (11.5 KB, 25 views)
File Type: gz main-5.1.2-irfs.tar.gz (426.9 KB, 26 views)
knc1 is offline   Reply With Quote
Old 02-21-2013, 04:59 PM   #30
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 5,772
Karma: 5722276
Join Date: Feb 2012
Device: Too many.
K5pw, main-5.3.0

The search continues for dot-config files with a little bit of prep work.
Spoiler:

Code:
core2quad uimage $ od -A d -t x1 ku-5.3.0.img | grep '1f 8b 08 00'
0266448 1f 8b 08 00 00 00 00 00 02 03 ed 92 3d 6f d3 50
0266896 07 4d c7 b8 e0 84 06 00 00 1f 8b 08 00 00 00 00
0483136 54 1a 02 00 1f 8b 08 00 00 00 00 00 00 03 ed dd
0484880 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed 9b
0488576 6a 0e 00 00 1f 8b 08 00 00 00 00 00 00 03 ed d8
0488912 16 00 00 00 4f 01 00 00 00 00 00 00 1f 8b 08 00
0488960 95 64 00 00 00 00 00 00 29 00 00 00 1f 8b 08 00
0489184 d1 00 00 00 1f 8b 08 00 00 00 00 00 00 03 45 cf
0489392 ca 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed d8
0489664 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 63 65
0489712 29 00 00 00 1f 8b 08 00 00 00 00 00 00 03 4d cf
0489872 14 01 00 00 a0 00 00 00 00 00 00 00 1f 8b 08 00
0490048 28 01 00 00 1f 8b 08 00 00 00 00 00 00 03 ed dd
0493840 bc e2 0c f8 02 00 00 00 00 00 00 00 1f 8b 08 00
0499744 02 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed dd
0506112 00 00 00 00 1f 8b 08 00 00 00 00 00 00 03 ed 9d
0515616 f3 6b f0 6f 70 1c 68 6b 0c f8 02 00 1f 8b 08 00
0520464 f9 3f a2 14 3f cf 0c f8 02 00 00 00 1f 8b 08 00
0528640 f8 02 00 00 1f 8b 08 00 00 00 00 00 00 03 ed dd
0531520 e7 1f 00 00 27 0b 00 00 00 00 00 00 1f 8b 08 00

core2quad uimage $ od -A d -t x1 ku-5.3.0.img | grep '1f 8b 08 00'
- - - -
3889920 47 5f 53 54 1f 8b 08 00 57 fb 05 50 02 03 94 5c

That trailing one is too big to be a dot-config file on the end of it.

Moving right along, try to pull an initramfs (irfs) 'cpio -H newc' archive off of the trimmed image.
Spoiler:

Code:
core2quad uimage $ od -A d -t x1 ku-5.3.0.img | grep '30 37 30 37 30 31'
0102368 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30
0102480 65 76 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0102720 6f 6e 73 6f 6c 65 00 00 30 37 30 37 30 31 30 30
0102848 30 37 30 37 30 31 30 30 30 30 30 32 44 35 30 30
0102960 65 76 2f 7a 65 72 6f 00 30 37 30 37 30 31 30 30
0103088 6d 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103328 6d 69 63 00 30 37 30 37 30 31 30 30 30 30 30 32
0103568 61 74 63 68 64 6f 67 00 30 37 30 37 30 31 30 30
0103696 63 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0103824 30 37 30 37 30 31 30 30 30 30 30 32 44 44 30 30
0104064 74 79 6d 78 63 33 00 00 30 37 30 37 30 31 30 30
0104192 63 34 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104432 62 2f 30 00 30 37 30 37 30 31 30 30 30 30 30 32
0104560 2f 66 62 2f 30 00 00 00 30 37 30 37 30 31 30 30
0104688 6b 30 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104816 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0104944 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105072 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105200 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0105328 30 37 30 37 30 31 30 30 30 30 30 32 45 39 30 30
0105456 30 37 30 37 30 31 30 30 30 30 30 32 45 41 30 30
0105584 30 37 30 37 30 31 30 30 30 30 30 32 45 42 30 30
0105712 30 37 30 37 30 31 30 30 30 30 30 32 45 43 30 30
0105840 30 37 30 37 30 31 30 30 30 30 30 32 45 44 30 30
0105952 65 76 2f 6d 74 64 00 00 30 37 30 37 30 31 30 30
0106080 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106208 30 37 30 37 30 31 30 30 30 30 30 32 46 30 30 30
0106448 74 64 2f 33 00 00 00 00 30 37 30 37 30 31 30 30
0106576 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0106704 30 37 30 37 30 31 30 30 30 30 30 32 46 34 30 30
0107712 6f 6f 70 30 00 00 00 00 30 37 30 37 30 31 30 30
0107840 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 32
0107968 30 37 30 37 30 31 30 30 30 30 30 32 46 45 30 30
0108208 32 63 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108336 30 37 30 37 30 31 30 30 30 30 30 33 30 31 30 30
0108576 32 63 2f 32 00 00 00 00 30 37 30 37 30 31 30 30
0108704 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0108832 6e 74 30 00 30 37 30 37 30 31 30 30 30 30 30 33
0108960 6e 74 31 00 30 37 30 37 30 31 30 30 30 30 30 33
0109072 30 30 2f 70 72 6f 63 00 30 37 30 37 30 31 30 30
0109312 30 37 30 37 30 31 30 30 30 30 30 33 30 39 30 30
0109424 69 62 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188048 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0188176 30 37 30 37 30 31 30 30 30 30 30 33 30 43 30 30
0188288 6e 74 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0211472 30 37 30 37 30 31 30 30 30 30 30 33 30 46 30 30
0247920 30 37 30 37 30 31 30 30 30 30 30 33 31 30 30 30
0339456 30 37 30 37 30 31 30 30 30 30 30 33 31 32 30 30
0339568 69 6e 00 00 30 37 30 37 30 31 30 30 30 30 30 33
0352928 01 00 00 00 00 00 00 00 30 37 30 37 30 31 30 30
0360704 30 37 30 37 30 31 30 30 30 30 30 33 31 35 30 30
0362944 30 37 30 37 30 31 30 30 30 30 30 33 31 36 30 30
0810096 30 37 30 37 30 31 30 30 30 30 30 33 31 37 30 30
0834608 30 37 30 37 30 31 30 30 30 30 30 33 31 38 30 30
0911120 00 00 00 00 30 37 30 37 30 31 30 30 30 30 30 33
1008432 69 6c 00 00 30 37 30 37 30 31 30 30 30 30 30 30
4046512 6f 70 74 69 6f 6e 00 30 37 30 37 30 31 00 6e 6f
Only the first occurance is of any interest at the moment:
Code:
core2quad uimage $ od -A d -t x1 ku-5.3.0.img | grep '30 37 30 37 30 31'
0102368 30 37 30 37 30 31 30 30 30 30 30 32 44 31 30 30

core2quad uimage $ dd if=ku-5.3.0.img bs=1 skip=102368 of=ku-5.3.0-irfs.cpio
4616224+0 records in
4616224+0 records out
4616224 bytes (4.6 MB) copied, 18.2067 s, 254 kB/s

core2quad uimage $ mkdir ku-5.3.0-irfs
core2quad uimage $ cd ku-5.3.0-irfs
core2quad ku-5.3.0-irfs $ sudo su

core2quad ku-5.3.0-irfs # cpio -i -d -m  --no-absolute-filenames -I ../ku-5.3.0-irfs.cpio
cpio: Removing leading `/' from member names
1770 blocks

core2quad ku-5.3.0-irfs # ls -l
total 28
drwxr-xr-x 2 root root 4096 2013-02-21 15:53 bin
drwxr-xr-x 7 root root 4096 2013-02-21 15:53 dev
lrwxrwxrwx 1 root root   18 2013-02-21 15:53 init -> /bin/recovery-util
drwxr-xr-x 3 root root 4096 2013-02-21 15:53 lib
drwxr-xr-x 3 root root 4096 2013-02-21 15:53 mnt
drwxr-xr-x 2 root root 4096 2012-10-30 20:47 proc
drwx------ 2 root root 4096 2012-10-30 20:47 root
drwxr-xr-x 2 root root 4096 2012-10-30 20:47 sys

core2quad ku-5.3.0-irfs # cd ..
core2quad uimage # tar --create --gzip --file=main-5.3.0-irfs.tar.gz ku-5.3.0-irfs
core2quad uimage # exit


The initramFS is attached here, but it seems clear that Amazon started to strip the dot-config file off with the 5.2 firmware series.

Next, they might even realize they are making their compiled initramfs code GPL by statically linking it into the kernel image. A provision was added to the kernel back in 2005 for exactly the case of vendors that did not want their initramfs code to catch the GPL virus. Ah, but not even the professionals seem to read the documentation.
Attached Files
File Type: gz main-5.3.0-irfs.tar.gz (419.5 KB, 20 views)

Last edited by knc1; 02-21-2013 at 05:08 PM.
knc1 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unbearable Oversight of the [Original] Nook Tablet Devs! sarahmelissa Nook Color & Nook Tablet 9 08-28-2012 06:51 PM
Why don't we just signup as Active Content Devs? nathansuchy Kindle Developer's Corner 4 06-16-2012 09:31 PM
Touch [Question devs] Will we ever get Custom library? danskmacabre Kobo Reader 4 04-02-2012 06:29 PM
Suggestions for Kindle Devs jxh11215 Kindle Developer's Corner 5 03-28-2010 07:35 AM


All times are GMT -4. The time now is 05:44 AM.


MobileRead.com is a privately owned, operated and funded community.